2008

2007

Doing stuff is hard, and it's boring as well

▁ aug 11 2008

If you haven’t read anything by Ted Dziuba yet, go do it now. For a while he ran a blog called Uncov, where he covered Web 2.0 ideas and startups with humor and sarcasm that was razor sharp. Then he started his own Web 2.0 company that isn’t all that, but his writing is still good (he’s got his own column at The Register).

In his latest essay in his column, titled Hadoop: When grownups do open source, he writes about the differences between people that get things done and those who dabble in the programming language fad of the week. The essay is worth reading, and he is dead on.

The essence of the essay is this: shit is hard. Or things, if you like. Writing a fully functional system for distributed processing and storage (like Hadoop) is complicated and takes a lot of intelligence and effort. And you don’t choose the tool that is popular this week to do it, you choose something with wide industry like Java.

While I was reading the essay, I was reminded how Paul Graham writes in his book, Hackers & Painters, that there’s money in boring stuff because not many people want to work on it. So if you’re looking for a business idea that will survive, perhaps you should think of a boring and complicated project… The latter being optional, only include it if you’re smart. ;)

If your idead is boring, then you’ll get a head start since people won’t make the effort of doing the same thing until they see there’s money in it … enough money to make up for it being boring. And then if it’s complicated you’ll have a wider head start, since you have gained more domain knowledge. Too bad if they’re smarter than you, though - and someone always is.

. o .

XHTML Basic 1.1 finalized, no one seems to care

▁ aug 02 2008

The XHTML Basic 1.1 recommendation was published by the World Wide Web Consortium (W3C) on Tuesday this week, but no one seems to care. I was a little puzzled, so I tried to find out why…

It turns out that XHTML Basic is a document type that has the minimal set of modules (as per the modularization of XHTML), in addition to a few other basic things. It is “designed for Web clients that do not support the full set of XHTML features; for example, Web clients such as mobile phones, PDAs, pagers, and settop boxes.” Wait, what?

Is this the 90s? Don’t users expect the full web experience on their mobile phone or settop box? Granted, it might be a problem putting a browser on a pager (anyone still use that?), but why bother? Sure, I guess creating a fully compliant browser can be difficult, but there is one company that has made one that is installed on such different devices as the Nintendo Wii and barcode scanners.

There really is no excuse to give users of mobile phones or settop boxes a subpar browsing experience, and any specification that supports that myth makes me sad…

. o .

Not very cuil

▁ jul 28 2008

I don’t know why Cuil is pronounced “cool”, but I might not have to worry too much about it, considering the new search engine doesn’t work at all at the moment.

You’d think ex-Googlers would have some ideas of how to make a service scale, but today they’ve alternated between being totally unavailable and having a “we’ll be back soon” page. Not a very good launch, it seems. Sure, getting lots of traffic is good, but they can’t be getting more traffic then what they should be able to handle, and they’re still most likely far away from getting the amount of traffic Google gets on a good day.

Still, I did manage to give it a spin, and it wasn’t horrible. Instead of showing the results in a vertical list, it shows the results in a grid. Going away from the old format is a gamble, and no one has succeeded with that yet. With more than $30 million in the bank, they should have some money to spend on experimentation, though.

The name leaves something to be desired, but coming up with company names isn’t easy, I suppose…

Oh, and one other thing. If Cuil does become popular, how will it be verbed? You can Google something, but can you Cuil it? “I cuiled for it, but couldn’t find anything.”

. o .

Mobile browsing

▁ jul 28 2008

Years ago, a Norwegian columnist wrote how the Internet was just a passing fad. It’s easy to look back on that now and laugh at it, but predicting the future is difficult, and if you get it wrong you’ll be laughed at. This is why I’ll try to be a bit careful with my statements here. ;)

A friend of mine asked me recently what the point of browsing on your mobile phone really is. It’s a good question. Web browsing on mobile phones is getting a lot of attention these days, mostly brought on by the rise of the iPhone, which makes the browsing experience on a phone much more enjoyable than on many others. Opera Software is having success with their Opera Mobile 9.5 beta, which is a great product (now all they need is an equally great phone to run it on).

So, what is the point of web browsing on your mobile phone? After all, many or most people are usually nearby a computer, either at home or at work. And the rest of the time you’re on the go, perhaps driving a car. Sure, you could be taking the subway, in which case browsing is something you’d just do to pass the time.

So really, what is the point of web browsing on mobile phones? Unless some killer application is made (which may happen, of course) and critical mass is reached, mobile browsing may be doomed to be something that is just done once in a while. After all, there is a limit to how much browsing you need to do when you’re on the go. Isn’t there? There’s nothing wrong with this, of course, but the killer app is still missing for it to take of completely.

Perhaps casual browsing is the point, though. With high quality browsers on our phones, with us at all times, the Internet will truly be ubiquitous.

It will definitely be interesting to keep an eye out on the usage patterns for mobile browsing in the coming years.

. o .

A bucket for your bits

▁ jul 19 2008

A friend of mine, Jesper Noehr, just announced Bitbucket.org (which he’s done together with Eirik Stavem, who did the user interface design and QA work). It’s a site that provides free hosting for Mercurial projects. If you didn’t know it already, Mercurial is a distributed version control system, and it’s pretty neat.

If you need somewhere to hosts your projects, go check it out, it’s a pretty nice site, and you won’t be disappointed.

. o .

ORM, schmorm

▁ jun 17 2008

Here is a blog post by someone who dislikes ORMs. I guess you know what I have in store now … A HORRIBLE RANT!

Actually not. In some ways I agree with him, and in some ways I disagree with him. You could call it a more nuanced view, perhaps? I don’t agree with much of what he writes, though. Let’s get that out of the way first. I agree with him that ORMs may introduce overhead and that it certainly is possible to write clean and efficient code that doesn’t use an ORM if you know how the database works.

Ok, so my perhaps my view isn’t that balanced, because he writes things about preferring procedural code and using triggers. What is this, the 80s? Triggers may be efficient, but they tie the application too much to the database implementation and creates problems if you want to change the database implementation (and I live in a world where that happens). Also, it makes it harder to debug and develop, with more steps that are needed in order do deploy code that has changed.

And as for the rest… Well, I like objects, he doesn’t - not much more to say about that. But as your code grows you will basically end up writing an ORM yourself, although perhaps tied to that particular application. And then you start making changes and you may find out it’s too rigid, because you can’t reuse your code. Or you start a new project and have to create yet another application-specific “ORM”. After a while you get tired, and realize that bright people have spent a lot of time on writing ORMs, and they even have caching now! Yes, it’s true… I know, it’s amazing (that’s sarcasm, in case you didn’t notice).

Some ORMs have quite nice caching, and you can select numerous fetching strategies for retrieving objects, which can limit amount of SQL statements executed. Speaking of SQL statements, his comment about hearing of “popular CMS systems and web frameworks that will make dozens of database calls to refresh a single page” is probably true, but is it due to ORMs or lazy/incompetent programmers? You’d be amazed (or perhaps you wouldn’t) about the amount of crappy code people are guilty of writing (myself included, I’m not embarrassed about that).

In the end though, ORMs are about convenience and ease of programming substantial applications, then performance. I don’t think anyone is trying to hide that fact. For me, and many others, the benefit of using a more abstract model is more efficient (brain-wise) than using the old school style, as he recommends. I much prefer writing something like:

@Entity
public class Person {
    Integer id = null;
    String name = null;

    @Id
    @GeneratedValue(strategy=GenerationType.IDENTITY)
    public Integer getId() { return id; }
    pubic void setId(Integer id) { this.id = id; }

    public String getName() { return name; }
    public void setName(String name) { this.name = name; }
}

… and then instantiating that class and storing/retrieving objects, than starting to write a database schema to define my model.

As for the performance problems he rants about, there are solutions to improve that. Perhaps he should get acquainted with a modern ORM.

. o .

Unit testing: Don't use HSQLDB

▁ jun 16 2008

As previously mentioned, I recently changed jobs, and that meant going from Perl/Python and back to Java. Things certainly have changed in four years, and it seems that most of it is for the better. I’ve been putting a lot of effort into unit testing lately, and it’s working out great. There’s multiple people working on the project I’m on at the moment, and unit tests make sure things are working properly before others start using my code, which is a persistence layer written using Hibernate annotations (which are great, by the way). Or so I thought…

To make it easier to run the unit tests, it was quite convenient to use HSQLDB, a relational database engine written in Java. The benefit of using it with unit tests, is that it can exist entirely in memory, and there is basically no need for configuration. Quite handy, since this means that we don’t need to set up a database for our continuous integration server, which runs the tests automatically on every commit.

I was coding along minding my own business, when I suddenly got a complaint that this or that didn’t work properly. That was pretty strange, since the tests were green across the board, so I changed to another database, and guess what? FAIL! Not all of the tests failed, of course. The failed tests seemed to be related to constraints that were ignored, and data types that were handled a bit differently. Mainly it seemed to be because HSQLDB was too lightweight. The other database I tested with was MySQL, by the way (which is not what we’re deploying on, I’ll have to test with that later on).

If you search for unit testing and hsqldb on Google, you’ll find several articles recommending this combination. Personally, I don’t see the point if it doesn’t give you an environment closer to the real world. I honestly don’t know why anyone would use HSQLDB for this purpose, unless they’re writing a really simple application, or actually deploying to HSQLDB.

You may wonder why I’m not testing with the database server we’re deploying on… Well, I’m not too familiar with it, and at Enonic we have a history of making our applications work across multiple application servers and databases. That, by the way, still takes effort despite the fact that we’re using database abstraction layers.

. o .

Hackz

▁ jun 15 2008

Picture 3.pngInspired by Esteban’s post about hacking his camera, I wanted to see if there was anything available for my camera, the Fujifilm Finepix F50. Of course, I went to google and searched for “fujifilm finepix hacks”.

However, I was a little surprised, when Google asked if perhaps I meant “fujifilm finepix hackz”! Come on! Isn’t the suggestions meant to help with spelling mistakes? Or perhaps the world has progressed to the point where we the lines between correct and incorrect spelling are fading? I, for one, find my self using semi-correct spellingz spelling frequently when writing in English in IM, but I try to spell right when writing other text.

I’m old, though. How will younger generations influence spelling, and how will it be when they grow up? With the introduction of paved roads and motorized vehicles, the cross contamination of different cultures became easier, with television and satellites even more so. Now, with the Internet, the cultures are converging even more. Just think about the Internet memes like Star Wars kid or LOLCATS that are not only a part of the culture that they originated in, but also in many other cultures across the world.

We live in interesting times, and we’re just starting to see how the Internet will forever change our cultures across the world.

(Ok, that last line was a bit lolz, but I couldn’t help it.)

powered by