Main Contents

It’s Time and Energy Wasting Time

March 14, 2010

Once again, it’s time for every clock in America to be messed with. According to the most optimistic estimates from the Department of Energy, this will provide a savings of 0.03% on the country’s annual electricity consumption. According to actual measurements from a study in Australia, it’ll achieve nothing. According to an NBER study of Indiana’s transition to observing DST, DST increases electricity usage by 1%. So, either DST achieves almost nothing, or it wastes energy, we’re not quite sure.

However, energy usage isn’t the whole story. According to studies the DST shift will cause around 17% more car accidents on Monday, with a smaller increase in the fall because it’s easier to sleep in than to get up early.

DST doesn’t benefit farmers either, in spite of what you might have heard. They lobbied against its introduction. Cattle don’t care what the clocks say, so DST just means the farmer has to get up and milk them at a different clock time.

For IT people, of course, DST is more annoying. It means checking every system that keeps time, to verify that it made the change on the correct date, and adjusting systems that don’t adjust themselves. That’s assuming your government doesn’t decide to change the date of the DST switchover, like the Bush administration decided to, causing hundreds of millions of dollars to be spent patching embedded systems, servers and desktops. (Since Java, Linux and IBM Lotus Domino all use their own independent time zone rule databases, I had to apply three separate fixes to some servers.)

Even non-IT people are starting to catch on to the fact that DST is an annoying waste of time and energy. Can we get rid of this stupid practice, please?

Filed under: System administration | Comments (0)

8001050F

March 2, 2010

As I’ve written before, date and time calculations are surprisingly difficult. What’s more, even the bits that aren’t difficult often get messed up. Sony have just demonstrated this.

Apparently, a firmware bug in the real time clock in some models of PS3 lead the RTC to think that 2010 is a leap year. This confused the PS3’s OS, which was then unable to connect to PlayStation Network. This, in turn, caused havok with all kinds of games, even single player games with no network play, because PS3 trophy support requires network connectivity. It also disabled all DRM-protected content. Sony advised people not to use their PS3 until engineers could find a fix, as content might get corrupted. In the event, the ‘fix’ was to wait until the next day, when the RTC moved to a valid (but incorrect) date, and the OS would once again recognize it.

I happened to be using my PS3 when the date hit March 1st 2010 UTC (or February 29th 2010 PS3 time, you might say). I was playing “inFAMOUS”, a game by Sucker Punch. I got an error message saying I’d been logged out of PSN; a little while later I got a trophy sync error. I finished the game that evening, so I qualified for more trophies, but of course I won’t have gotten them. I didn’t particularly care about the trophies, and PSN failures aren’t exactly unheard of, so I thought no more of the issue.

Not all games are as well-written as Sucker Punch’s, however. Many people reported that “Heavy Rain” crashed on startup; apparently it assumes that if the network is enabled, the PSN trophy server must be reachable. “Flower” also died.

There are a few observations I’d make about this whole situation:

Firstly, yes, it’s a stupid error to find in code. However, if you read RISKS Digest you’ll see the same error happening in a big system every few years.

Secondly, the scale of the failure was undoubtedly due to the system brittleness required for DRM. The existence of time-limited rentals requires that the DRM system not trust the system date, and fail to authenticate if the date appears incorrect. This means that even indefinite rentals (which are dishonestly called “purchases”) ended up with copy protection errors when you tried to run them; people reported that none of their downloaded games worked.

Thirdly, this kind of slapdash QA is all too typical of the video game industry nowadays. My impression is that the quality of game software is getting worse, now that consoles are assumed to have an Internet connection. It used to be expensive to recall and replace faulty discs, so games spent a long time in QA; now, the developers will just throw a faulty game out so long as it’s more or less playable, and plan to fix it with a point release. Games even get released to consoles with sound that doesn’t work properly (“The Orange Box” for PS3, for example). Sometimes a patch eventually fixes the problems, sometimes it doesn’t.

Filed under: Business, Programming | Comments (0)

More Buzz buzz [updated]

February 13, 2010

Someone on Slashdot said something that led me to come up with a clearer explanation for why Buzz doesn’t belong in Gmail, but belongs in Reader:

  • Google Reader is about blogs. It’s all about stuff that’s public, and commenting on stuff that’s public. It doesn’t even support authenticated web feeds.
  • Gmail, on the other hand, is typically about private communication.
    In many cases, it’s exclusively about private communication; I get mailing list traffic, but many people use their Gmail accounts purely for private e-mail.

Buzz is emphatically about making things public and commenting on things which are public, and doing so in public, which is why it has no logical business being in Gmail. I subsequently saw a TechCrunch author make the same point.

Computerworld’s review of Buzz tries to explain that Buzz is a bit like Twitter, insofar as anybody with an account can see your post. The fact that this needs explaining is a clear indication that there’s a fundamental conceptual problem with the product: Google has shoved a public sharing mechanism into an interface focused around private activity, with no clear differentiation. No wonder users are confused. Computerworld also agrees with me that shoving Buzz into Gmail is problematic purely from a UI perspective.

Meanwhile, the buzz on Buzz has been worse than I expected, including one heartwarming story of how a woman was put back in touch with her abusive ex-husband and his friends, thanks to the power of Google Buzz. Suw Charman-Anderson, a web developer, identifies another half dozen horrible UI and privacy flaws of Buzz. There are dissenters, of course, but pretty much every comment I’ve seen on Buzz has been negative overall.

User Provides Feedback on Buzz (Scene from "The Swarm")

Oh, and that “Turn off Buzz” link? It doesn’t actually turn off Buzz in the sense of deleting anything about you that Buzz made public. No, it just turns off Buzz in the UI, leaving all your information out there and all the following/being followed by relationships intact and visible. It was probably a feature allowed reluctantly by marketing, as a sop to shut up the engineers who were telling them what a disaster Buzz was going to be, and was never intended to be fully functional.

Some of these gaping flaws in Buzz are likely accidental, but I think it would be a mistake to assume that it’s all a problem of inadequate user testing. Google is infamous for its user testing, and I firmly believe that they have enough bright engineers that almost all of these issues would have been brought up repeatedly before launch even without user testing. I’m certain that multiple people pointed out that Buzz belonged in Reader, or even as an improvement to Jaiku, rather than in Gmail. I’m even more certain that many voices warned that Buzz should go into some kind of beta or limited deployment. Gmail was in beta for 5 years, yet Buzz was released to everyone on day one, and nobody thought that was a questionable decision?

Frankenproducts like Buzz, and epic failures like the Buzz launch, rarely happen by mistake. They mostly happen because they fit the objectives of a misguided corporate strategy or a deluded marketing department. Google’s product is eyeballs, and the Buzz launch was designed to try and rip people away from Facebook whether they wanted to switch or not. That’s why Buzz automatically built you a “friend” list of everyone with a gmail address and shared all your stuff with them by default: it wasn’t a bug, it was a feature. That’s why it was shoved in at the top of Gmail, right under your inbox whether you wanted it there or not. (Contrast to Apple, who added web feed reading to Mail, but put it at the bottom of the navigator, under your folders, respecting that mail is a program for reading mail.)

So what happens now? Well, my guess is still that a bunch of engineers at Google are saying “See, told you so”, and that a bunch of marketing people are frantically trying to think up ways to patch Buzz so that it kinda sorta works in Gmail without being hopelessly annoying, confusing and privacy-invading. I’m betting they’ll fail, and since Google is now openly talking about making a standalone version of Buzz, I think Google knows it too. The company is not willing to admit it made a ghastly mistake cramming Buzz into Gmail yet, but give it time. The thing is, by then, will anyone still have Buzz enabled? Google have tarnished a brand, wrecked a bunch of their loyal users’ goodwill, and squandered a golden opportunity to leverage their existing user relationships to launch a social networking product, all in one week.

Update: Someone else makes many of the same points, and as I suspected Google starts the “we didn’t do enough testing” spin.

Filed under: Business | Comments (0)

Google Buzz

February 11, 2010

The sad thing about Google Buzz is that it marks a complete failure of user-centered design.

Logically, the added Buzz functionality belongs in Google Reader. That’s where I read blogs, subscribe to friend feeds, comment on posted links, and share items.

However, Google added Buzz to Gmail–not because it belongs there, but because Gmail has more users than Reader, and Google’s goal is to push as many people as possible into using Buzz. That’s also why they made the profiles so privacy-invading by default.

As Giles Bowkett put it, Google’s best product became a launching point for a poor product which couldn’t stand on its own.

As far as I’m concerned, I’ll use Buzz when they put it in Reader where it belongs. Half the time I don’t use Gmail’s web interface to read my mail anyway, I use a mail client.

Until Google put Buzz where it belongs, it’s time to turn off Buzz and hide it from the Gmail interface.

Filed under: Uncategorized | Comments (2)

Ruby packages: chaos and confusion

January 31, 2010

In October of last year, someone built a new RubyGems hosting site called Gemcutter. Everyone liked it so much that GitHub decided to stop offering RubyGem hosting, and point people at Gemcutter instead.

Then the maintainer of RubyGems decided to make Gemcutter the default repository for gems when you install RubyGems.

Then RubyForge decided to get rid of their Gem hosting, and make gems.rubyforge.org point to Gemcutter.

Now, it looks as if RubyForge is going to go away. The Gem-specific bits will migrate to Gemcutter, and the rest will be left to other sites that deal with bug tracking, source code versioning, and so on, like Sourceforge, Launchpad, GitHub, and Google Code.

So RubyForge is still there for existing projects, but its days are probably numbered. You now want Gemcutter for Gems, and some other site for everything else.

So on the minus side, there’s no longer a central repository for Ruby projects. On the plus side, you can now use something better than SVN for version control, and presumably all the dead and empty projects cluttering RubyForge will be allowed to vanish.

Filed under: Programming, Ruby | Comments (0)

The Curse of Microsoft strikes again

December 23, 2009

2004: 7-Eleven decides to switch its in-store computer systems to Microsoft Windows and SQL server.

2008: Russian hackers use SQL injection flaw to breach 7-Eleven’s in-store computer systems, and then use them to carry out a massive ATM fraud.

Filed under: Microsoft | Comments (0)

The case of the Null Empty Nothing

December 1, 2009

Most programming languages have a null value which is used to indicate the absence of a valid value. Lisp and Ruby have nil, Python has None, Perl has undef, and so on.

LotusScript is a bit different. It’s modeled on Microsoft’s Visual BASIC, a decision that probably seemed sensible in the pre-JavaScript early 90s when Lotus picked a scripting language for Notes. As a result, LotusScript has three different null values. This can lead to some unexpected run-time crashes.

The first null value is Empty. This is the value of a variable of type Variant that has not yet had a value assigned. You can’t directly assign something to be Empty, but you can do something like this:

Dim empty As Variant
x = empty ' x is now empty too

You can’t make non-Variant variables Empty; you’ll get a run-time error if you try.

The second null value is Null. It’s also used with Variants. Whereas Empty is the default null value of a Variant, Null is the usual null value resulting from an assignment expression. That is, it’s the null value you would typically return from a function that returns a Variant, in order to indicate an error, exception or missing value to the caller. (Though as noted above, you could return Empty if you really wanted to.)

Then there’s the third null value: Nothing. Nothing is primarily used with non-Variant variables. For example, NotesView.GetDocumentByKey will return Nothing if the document isn’t found. Also, if you declare an object variable but don’t initialize it, it is set to Nothing by default. Unlike Empty, however, you can directly assign variables to have a value of Nothing. So basically, it plays the role of both Null and Empty, but for object variables.

But while Nothing is primarily used with non-Variant types, you can also assign Notes objects to Variant variables, which means that Variants can end up being Nothing, depending on your code. Which led to my discovering a couple of interesting pitfalls.

To make life exciting, each kind of null in LotusScript has a different way of testing for it. Isnull and Isempty test for Null and Empty values respectively; but for Nothing, the syntax to check is expr Is Nothing.

(Why? My guess is that when object orientation was bolted onto BASIC, the developers at Microsoft decided to provide for null object references by creating a special predefined object called Nothing, because that was the easiest thing to code. Probably nobody cared that the language already had Null and Empty. Similarly, adding a new “Is” operator was probably easier than making the existing comparison operator work on objects.)

Not only is the syntax different for testing Nothing values, the behavior is different too. While Isnull and Isempty are safe when passed Nothing, expr Is Nothing will crash with a run-time error if the expression is Null or Empty. So if you have a Variant which may contain Nothing as well as either Empty or Null, you need to test it with Isnull and/or Isempty before testing for Nothing.

A second pitfall is that you can print Null and Empty values–they display as “Null” and “” (empty string) respectively–but a Nothing value will cause a run-time error if you try to print it.

The two pitfalls can combine, of course. If you want to print or log your Variant’s value for debugging purposes, you need to check for Nothing in order to avoid a crash when printing; however, that means you need to check for Null and Empty first, to avoid having the check for Nothing crash. So you end up with:


If Isnull(v) Or Isempty(v) Then
Print v
Elseif v Is Nothing Then
Print "v is Nothing"
Else
Print v
End If

Here’s a summary:

Null value Applies to Purpose Test for it using Outputs as
Empty Variants Value of uninitialized Variant IsEmpty(expr) “”
Null Variants Indicates an error, exception or missing value Isnull(expr) or expr = Null “Null”
Nothing Variants or object variables Unitialized object, error, exception or missing value expr Is Nothing Run-time error

On the bright side, it could be worse, as Visual BASIC has four more null values to worry about: Missing, vbNullString, vbNull, and vbNullChar.

Filed under: Domino, Java, Linux | Comments (0)

RPM cheat sheet

November 20, 2009

The worst thing about commercial Linux is RPM. I can never remember the command line incantations required for even fairly simple tasks.

While yum eventually takes away the pain of applying software updates–so long as you’re not in a hurry–there are all kinds of other tasks it doesn’t handle. I therefore rely on an RPM cheat sheet I’ve assembled over the years. Here’s a copy for anyone else who might find it useful.

RPM cheat sheet
rpm -e package-1.2.3-gm Erase named package from system
rpm -i package-1.2.3-gm.rpm Install package file into system
rpm -U package-1.2.3-gm Upgrade package
rpm -F package1 package2 Upgrade packages to latest versions in an appropriate order
rpm -Fvh * Upgrade a bunch of packages from the matching RPM files
rpm -q package Returns full name and version of installed package
rpm -qp package.rpm Same for a non-installed package
rpm -qi package Returns misc details about package
rpm -qpi package.rpm Same for a non-installed package
rpm -qa | grep something Search all installed packages for something
rpm -qf file Which package put this file here?
rpm -ql package List of files in an installed package
rpm -qlp package.rpm Same for files in a non-installed package
rpm -qRl package List dependencies of an installed package
rpm -qR package.rpm List dependencies of a non-installed package
rpm -ivh package.src.rpm Install a source RPM, spec goes into /usr/src/RedHat/SPECS
rpmbuild -ba package.spec Build from installed source installed
rpm -qa --queryformat="%10{SIZE}\t%{NAME}\n" | sort -k1,1n List installed software packages in order of size

Notes:

  • Wildcards work with filenames, but not with package names.
  • Any package filename argument can be replaced with a full URL of where to get the package from.
  • --test to see what a command would do without actually doing it.
  • -v for verbose output.

Filed under: Linux, System administration | Comments (0)

AT&T Global Network Client (agnclient) and Ubuntu 9.10

November 5, 2009

Within IBM we use AT&T Global Network Client (agnclient), a proprietary VPN solution. Unfortunately, the packages available to me didn’t work with a clean install of Kubuntu 9.10 Karmic Koala, because of dependencies on outdated libraries. Here’s the workaround.

The first issue is libstdc++5. That one’s easy, you can just download the package from the previous release of Ubuntu and install it using dpkg -i.

The second package is libkrb53. Ubuntu 9.10 has replaced this with libkrb5-3 and various other packages. The solution here is to install the equivs tool, and build a dummy package.

After installing equivs, create a file libkrb53.equivs containing:


Package: libkrb53
Version: 1.6.dfsg.2+fake1
Depends: libkrb5-3, libgssapi-krb5-2, libk5crypto3, libkrb5support0
Description: Dummy package provides libkrb53 by requiring the pieces it was split into.

If you then run equivs-build libkrb53.equivs, it will spit out a .deb file you can install.

Finally, run apt-get -f install to locate and install the dependencies.

You should then find that agnclient will install and run correctly.

Hopefully AT&T will soon provide updated packages.

Filed under: Linux | Comments (3)

The story is always the same

October 11, 2009

February 2008: Microsoft aquires Danger Inc, makers of the T-Mobile Sidekick phone. The phone is based on a NetBSD kernel with Java VM and APIs.

May 2009: Microsoft lays off most of the ex-Danger employees.

October 2009: Leaks indicate that the Danger OS is dying, with the Danger-based Project Pink phone to be replaced by Windows Mobile (of course), with some ideas from the Sidekick reimplemented and grafted on. Again we hear that most of the ex-Danger employees have been fired or have resigned.

Later in October 2009: A server crash at Microsoft wipes out the entire database of user data for T-Mobile Sidekick devices. It is rumored that a SAN upgrade was outsourced to a contractor, who decided to cut costs by not bothering with a backup, and then screwed up and lost all the data. Since all Sidekick user data is stored at the data center and there’s no way to back it up to your PC or SIM card, T-Mobile advises customers that if their Sidekick crashes or powers down for any reason, they will lose all their data.

On the plus side, Perez Hilton has lost his entire address book, and we will probably be spared more leaked celeb addresses and photos.

I always thought the Sidekick looked like a great device, but the fact that the data was stored on someone else’s server with no way for me to back it up made me steer well clear–and that was even before it was bought by Microsoft.

So once again, Microsoft buys a piece of technology in order to kill it. They acquire a company, take its IP, get rid of all the employees, and spit out a worthless husk.

Update 2009-10-15: Microsoft are now confident that they’ll be able to recover the data eventually.

Filed under: Microsoft | Comments (0)