Showing posts with label screed. Show all posts
Showing posts with label screed. Show all posts

7 Sept 2010

Whether the test or the code is more important depends solely on who has to write the tests

In the world of open source development, automated tests are like gold. They're the glue that makes it easy to maintain projects with hundreds of collaborators. When they don't exist, code dies, and nobody knows about it - that would be a bad thing, so preventing it is job one. Unless of course, it means you actually have to write tests for your code, in which case it's delegated just as far down the food chain as possible. And nothing's further down the food chain than a paying customer who's already paid you.

Let's say you paid the author/owner of an open source project to add support for something you need. Let's just say that it's something you need, but that would be useful to him/her as well as others. And let's just say that s/he puts that code in his/her distribution. And you pay him/her for his/her time and effort. All is good.

Then, about six months later, you discover a bug in his/her library, in the very code that you paid him/her to write. You fix the code, and that's a good thing, because you really need it to work. It really should have worked in the first place, but oh well. Shit happens, right?

So then let's say that the code is all hosted on Github [because this hypothetical case happened in 2009/2010 and anything worthwhile is being hosted on Github], that you branched the main project, made your change, and committed it. Then you send a pull request to the project maintainer explaining the situation. Beautiful, this is exactly how open source is supposed to work. Git is wonderful, Github is fantastic, and everything just works because of it.

And you get the answer back from a minion of the author that you paid: "well, no, we can't accept this change, because you see, there is no test that was broken in the first place, and no new test has been written to prove that this change is a good one. So go write a test and then we'll think about it."

Which strikes you as a bit odd, because hypothetically, if s/he wrote the code in the first place, and s/he/they is/are such [a] holy motherfucking test-first code ninja[s], s/he would never write a line of code without tests for it. Except the evidence is in the code that never worked in the first place (despite your having, er, paid for it).

So now you have to maintain your own branch of this stuff in perpetuity, because they have rules, you see, and standards, and these rules and standards say that they won't accept changes that don't fix tests. Oh, and by not accepting your fix they're actually hurting your reputation, because the fact that the stuff they wrote for you doesn't work with their library might look like it's your fault, not theirs. But you paid them, and it's all over now. Unless you want to try to write a test for them, which they'll consider accepting.

What you might expect from the maintainer would be an apology, a gracious acceptance of the fix, and for him/her to write the test s/he should have written in the first place (if that's what makes him/her so goddamn happy).

Purely hypothetically speaking. I mean, it would be totally inappropriate to name names if this actually happened.

12 Apr 2007

The jig is up.

The desktop era is over, just as the DOS era ended when Windows 3.1 came out fifteen years ago. Suddenly the Windows monopoly is irrelevant. Nobody targets Windows, they target the web, and they probably target Mac as well if there's some software they have to install. Windows (and Office) are not being pushed aside primarily by Mac and Linux; no, that is a symptom. Instead Windows has been made irrelevant by web-based email and a cloud of little productivity tools that are now available (and growing fast). It's April on the web, December on the desktop. There's no reason to put up with tired Windows with the high cost and terrible quality (usability, speed, security – name your criteria) because you can get a Mac or install Linux and get all of the productivity tools you need – on the network, to which everybody has access everyplace they want to work. The days of emailing Word documents around to attempt to collaborate are over. The way that people work is changing, and today's desktop software gets in the way of collaboration. In two years nobody will be bothering with it anymore. And don't even get me started on Sharepoint and the rest of Microsoft's collaboration "tools" that they're tacking on to the outside of their old, brittle applications. The new services are organized around collaboration and can do much, much more of what people actually need to do. Game over.

Yes, Windows will still be around, as will Office. Today's 30+ population will continue to use it, and they might even upgrade one more time before they get pressured into switching platforms too. They'll get tired of sitting in support queues trying to install these packages on Windows, and at the same time be attracted by friends to services that have no such problems (and, usually free of charge, and carry no expectation of hand-holding telephone support). MS is defanged: they have to compete with Linux (free) and Mac (qualitatively better) to provide a stable, simple operating system that gets people online and lets them get their work done. Except Microsoft probably can't do that with Windows and maintain backwards compatibility. They are stuck.

Developers who are hooked on Microsoft tools will continue to maintain a wilting set of applications in a deteriorating Windows market. They'll try to use the Microsoft stack to build web services, but the licensing costs will squeeze them right out of business. Microsoft development tools are very sleek, very sexy: they are space shuttles built for architecture astronauts, when what most people need is a bus or a Hyundai (or if they're super rich/irresponsible, a Hummer) to get them to the office. You can't build a web-scalable application with that swollen, sluggish .NET framework for any money. (If so, name one. It's hard enough to find a really big site that runs Java.) Yes, these tools are a very satisfying environment to code in, and they debug like a dream, but they're built for desktop software (at most, client-server) and that game is played out.

So, how am I not full of it? I'll give you three real-world examples.

First, my own case. Plain fact is, I can (and do) virtually all of my real work without using any desktop software other than the browser. I use Ubuntu Linux. I run Firefox, IM and Skype regularly, and that's about it. Maybe P2P software, and video players (which are all available cross-platform). Sometimes I use OpenOffice.org when I have to look at Office documents. In very rare cases, I have to pop open a windows virtual machine. There's nothing to keep me from using Linux or Mac, so I use Linux because I'm a crazy open-source pinko commie (what else is new). But what's scary for Microsoft is, I really can do all I need to do with free software.

Second, Adolfo. His laptop got old (battery, mouse, screen dying) and he needed a new one. I suggested a Mac, but he is familiar with Windows and wanted to stick with it. At the same time, his Windows XP install stopped booting (for the third time in 18 months) -- and while he shopped he still wanted to use his computer. I declined to spend the 36 hours (fact!) to reinstall and patch it, and instead installed, configured and patched Linux in 90 minutes (fact!). Adolfo didn't like Linux: he's not your early adopter to begin with (not thrilled with change) – and the software for IM he really didn't like. Yahoo! Messenger and Windows Live Messenger are much more sexy and feature-rich than Pidgin (f.k.a. GAIM), and even Skype is missing video conferencing in their Linux version. So he bought a new HP laptop with Vista on it. He didn't like that either: the change was too radical and not positive. It asks him a lot of questions he doesn't understand (that it gives no clue how to answer). It introduces installation hurdles to overcome the security holes inherent in the Windows architecture, not to mention the brick walls introduced by the antivirus software. The transparent windows make the interface cluttered and hard to use. There are too many options standing in the way of anything (insert a USB flash drive and just see how many decisions you now have to make. Oh, then try to eject it! That's great stuff.) He spent time with Windows Movie Maker, which has improved to the point where it doesn't crash every five minutes, but it was jerky, slow, and awkward. It has an Office 2007 trial installed, but he'd have to buy it all over again, and eventually he conceded that he really has no use for it. In the end, he said that next time he's going to get a Mac. The lesson here is that he has a painless choice.

Third, my Mom. She doesn't use any desktop productivity software, ever: she has stopped writing letters and no longer uses Word. She just uses web-based email and surfs the web, and sometimes uses IM (but not the advanced features). She doesn't know about configuration and doesn't want to pay just to keep her machine from stabbing her in the back. So why does she need Windows? She doesn't, and her next computer will probably be a Mac. Or it might be a Linux appliance that updates itself and requires no configuration, like Google is rumoured to be producing.

Nobody can say that this is pie-in-the-sky, Henny-Penny, pass-the-bong bullshit, not anymore. This is the actual state of affairs. Pundits agree. Wall Street agrees. Startups are all focused on web applications. The last new category of desktop applications, P2P, came out eight years ago. The reality is that the desktop is already irrelevant, therefore Microsoft is vulnerable, as the real battle is being joined elsewhere. Microsoft has everything to lose.

Now we look back at 1992 and say that was when the DOS era ended, and that's not controversial. It was very controversial in 1992 to people whose livelihoods depended on DOS applications, and denial is a powerful force. Today I got an email invitation for Excel training. Why not classes about shorthand and how to operate a Dictaphone? In three years that won't be a joke anymore.