A notch above a monkey

Back to my roots!

It has dawned on me recently, that I’m not using Linux as much as I used to. True, all my servers are Linux based and all new code is eventually deployed on them, but I haven’t been using it for a while on a desktop.

Probably the main cause for this was my Powerbook, where practically everything I create starts its life. It’s just so much easier to carry all your work with you. Linux cause also wasn’t helped by a fact, that my PC is incredibly loud and makes air in office unbreathable in a matter of minutes.

Mac OS X was never a perfect match for me and I always missed some things like true network transparency. But lately I became tired of various software bugs and hardware troubles that plague me and started to think about Linux more. I also miss being part of open source community.

So, after this pre-launch mayhem is over, I’ll look for a new Linux machine. It’s time to go home.

Looping through getElementsByTagName list

There’s a small quirk that developers hit now and then when they are processing a list of elements returned by getElementsByTagName function. Usual, but still unexpected behavior is that not all elements of the list have been processed and if you are using javascript console, it might complain that there’s no element in the list at index, where you’re certain it should be.

The reason for this is that returned list of elements is not really a list. It’s a live view of matching elements. If you delete one of them in document, it will be removed from the list as well. List will become shorter and some elements in it may change their position to fill empty slot formerly occupied by deleted element.

Therefore, if you loop through such a list and its possible that you might remove current element, it’s best to loop from last element to the first. This keeps positions stable and predictable even when you delete.

It can be a bit trickier to handle if you add matching elements inside such loop. Sadly there’s no easy solution that would work all the time and you have to take in account your situation.

When to release your product?

I’m usually quite fond of weekends. There’s never a good reason for it, since they’ve looked like normal working days for quite some months now. But the feeling of a time off still lingers and I’m usually happy when it’s Friday.

I’m also quite happy that there are only few more hours of this hellish weekend, when nothing went right. Among other things, I got so exhausted that I slept straight for almost 12 hours (personal record) and I got acquainted really well with spinning wheel on my Powerbook. Probable cause: dying disk at time when that’s least needed. One more thing made by Apple (beside iMac and iPod) that I need to take to service when I get around to it.

So, not much work has been done in last few days and I won’t be able to finish even what I promised to do. This never fails to annoy me.

I have been thinking, while strolling around lake, about when to reveal our very buzzword compliant service to the greater public. Is the right time when it’s finally useful, but still obviously inspired by other services found on web or is it better to wait half a year or so, when it will gain the really interesting parts?

I still think the right time is this autumn, even though this will lead to accusations of plagiarism. At this point they won’t be really unfounded even if I believe we are just borrowing ideas from others to build something interesting and different (hopefully somebody will someday return the compliment).

However, it would be good to see how others react to what we build and to fix things now when this can be done more easily then if we wait longer. I also learned the importance of releasing things to keep developers motivated and at least somewhat happy. Nobody likes to be completely irrelevant. At last, there’s also the ever present problem of money.

If anybody actually gets around to reading this, I’d love to hear your thoughts on this subject. What do you prefer, big bang revelation or evolution of service?