Friday, October 22, 2004

Best Software Essays of 2004

An interesting discussion has opened on Joel On software forum - Joel asks readers to post essay which they consider were the best essay on software in 2004 (2003 is accepted as well). Great way to discover articles and/or authors you may have missed.

As it turns out, I've already read about a third of them and they were indeed excellent. Looking forward to consume another two-thirds though.

Check it out here: Best Software Essays of 2004.

Thursday, October 21, 2004

efficience vs. simplicity

I had to write a function that would generate a fixed-length sequence of symbols to be used as short, human-readable identifier for some database entities.

The first version I wrote rather quickly used a brute-force algorithm:

def idgenerator(length, prefix=None, seq=None):
if prefix:
length = length - len(prefix)
seq = seq or (string.digits + string.ascii_lowercase)
while 1:
bits = []
for _ in range(length):
value = ''.join(bits)
if prefix:
value = prefix + value
yield value

It works okay, but I was concerned with it's efficiency: it calls random.choice() function N times, where N is length of identifier. And I assume random.choice() must be computationally expensive. So, after some googling and hacking, I come up with the following:

def str_base(seq, n, base=10):
results = []
while n:
n, r = divmod(n, base)
return ''.join(results)

def idgenerator_fast(length, prefix=None, seq=None):
if prefix:
length = length - len(prefix)
seq = seq or (string.digits + string.ascii_lowercase)
N = len(seq) # a magic number
minvalue = int(seq[0]*(length-1), N)
maxvalue = int(seq[-1]*length, N)
while 1:
n = random.randint(minvalue, maxvalue)
value = str_base(seq, n, N)
if len(value) < length:
pad = seq[0]*(length-len(value))
value = pad + value
if prefix:
value = prefix + value
yield value

I didn't profile this code, but IMO it should be much more efficient. But the problem is that it is twice as big and more difficult to comprehend - due to this base36 conversion trick.
And if you take into account that this function is called by the db-access code than you realize than it's costs are negligible compared to interprocess db calls.

Therefore I decided to stick with the simpler version. Nevertheless, it was a nice coding exercise, something like a mini-Kata.

Wednesday, October 20, 2004

sofware as a service

disclaimer: I'm nor a business wise nor I pretend to be one, so the following thoughts may be just bogus or make you laugh. OK with me. But if you laugh, please spare a minute and enlighten me as well.

I regret I couldn’t attend Web 2.0 conference, as it turned out to be quite fruitful for ideas, both for business approaches and technical questions. I did listen to some of the talks given on the conference, thanks to ITconversations and The Web 2.0 weblog sites.

One of them was a Gillmor Gang from October 8, 2004 on which Kim Polese (CEO), presented her new company, SpikeSource. Their business model assumes building a "solid product offering" on top of open source components. For their launch, they're planning to offer a product stack that would include MySQL, Apache, PHP and JBoss. In the future, they would create new offering, driven by the customer's demands. And they have been developing a "deep computer science" code that would allow (as I understood) to build and maintain these product stacks in a (semi-)automatic fashion. They are going to earn money from the support, training and other service-type activities, contributing the code back to the open source community.

While the idea looks interesting and the talk is quite entertaining I wonder how good this approach would scale in terms of revenue. One of the nice things with software is it's "softness" - once you built a product it costs nothing to duplicate (and sell) any number of copies. With any service, costs to run it usually proportional to it's size. Plus, scaling it depends on people - which mean you need right stuff, with appropriate training, experience, etc, etc. So, basically, building a software product is (potentially) much more profitable than selling a service and it's much easier to sell.

The SpikeSource (again, IIUC) has two assumptions to address this issue. Firstly, in the brave new world that's coming software components (at least, at the infrastructure level) are a commodity and hence it's very hard to squeeze a revenue in this market niche. IOW, could you build and sell a web server? Probably only a very specialized one, because it hard to compete with Apache. Secondly, there would be a custom software in their offering, as an value-add for basic OSS components. So, the success would depend on whether they could add enough value to the commodities to attract customers.

P.S.: I had read a couple of months ago about a similar initiative to provide a solid OSS-based platform for enterprises on top of Debian but just can't find a link. Pity.

P.P.S: About a year ago, I was dreaming about starting a similar company here in my country (Ukraine) but not having had enough experience, money and courage I put it aside. So I'm a bit envious (again). ;-)

update: google search for "
Lightweight Business Models" turns up quite a few interesting links.
update: fascinating post from Jason Fried about "human scaling" and some intrigue details about the Basecamp product.

Friday, October 15, 2004

Google Desktop

In recent weeks/months Google literally flooded us with new products and services. Yesterday they released a Google Desktop -- windows application that indexes your hard drive and provides an integrated search: both for web and local files simultaneously.

I don't intend to describe it in details here or post screenshots how it looks on my computer. Just envy to those guys that happen to be in the right place to work for Google and have an itch to build something remarkable by myself.

update: Bloglines's Most Popular Links puts google desktop on the top, with +641 increase from yesterday! I guess it's more than all other delta combined.

python coverage tools

Some time ago, browsing source code for SQLObject, I found a decent module for code coverage analisys for python. It was hooked to the unittests' runner and in effect, provided you with a statistics on how much of the codebase were actually covered by these tests.

I decided to try out this idea on my project's test code and results were rather impressive. One of the problem with dynamic languages like Python is that you have to run a particular line of code to be sure that it doesn't contain some syntax error or a typo. Yes, the interpreter is able to detect some classes of errors upon the complication but far fewer than, say, Java compiler. Code coverage, while it does not guarantee anything about the code's behaviour (whether it's correct or not) at least tells you what was and what wasn’t executed. And for Python that's of double importance.

Now I'm hooked to the idea and pondering about the option to start and keep a coverage database. This should be even more helpful, as I could track the metric over time.

PS: I've also found an Apycot package from Logilab, which contains a whole suite of testing tools, including coverage, lint and more. Unfortunately, it's not very well decoupled from the logilab's internal development process and hence hard to configure. And it's not Windows-aware (where I happen to develop now).

Apart from the rather old (2001) and logilab's project I didn't find a lot of other, metric-oriented tools for python. Any suggestions on what I have missed are welcome.

Monday, October 11, 2004

software is my business

Today's been a plentiful day. I've added several high-quality blogs about software business:

Wednesday, October 06, 2004

The linkblogs are dead, long live

"Linkblog" is a blog which just links to entries in other blogs/sites.

With I can mix-and-match available links to create just a kind of linkblog I want. Or even a bunch of them.

The procedure is very simple:
1. Register with
2. Browse available links select ones you want to track and subscribe to them.
3. Grab aggregated feed from your inbox.


Open source platform for rich web application

Laszlo announced that they are open sourcing their platform for developing rich internet applications (RIA).

More info here:

Looks very promising, at lest for enterprise world. Will see how this will take off.

update: Laszlo uses XML-based language to specify user interfaces and it is object-oriented. Result looks rather ... er ... awkward, a bit unusual, but easy to get used to.

Tuesday, October 05, 2004

Gmail new features - have you seen them?

When I started Gmail today I noticed some changes in the interface: the "Contacts" link is move to the left and now opens without a popup and I found "forwarding" option in the settings menu, Plus, there is prominent link "New features!" at the top right corner.

That's nothing new here, some UI changes I notice regularly. The interesting part of the story is that my co-worker, sitting next table and also using Gmail does not have this features but see the old interface.

This is interesting, indeed. A reasonable explanation I may be that may be some Gmail users are switched to the new version to gather feedback. Or, another one, that Gmail's users that are actually report bugs got new versions first/exclusively while the rest using more-or-less stable beta.

So, my question is - have you seen these new features?

update: others notice this too. See, for example, comments on this post about Gmail's new features.

Friday, October 01, 2004

Hire me

Hi there!

I'm willing to provide software development and consulting services both for short-term and long-term projects. The price tag typically lies within 15-30 USD/hour, but this is all negotiable, depending on the kind of work.

If you managed to reach this page, hopefully you already have an idea how I could be helpful for your particular situation. Detailed resume and references are available upon request.

You could contact me via e-mail or phone: +38 050 1660266.