Web Development Has Become Too Hard

Web development has become too hard. It's not nostalgia - it's been a while since it has been easy, and I'm not sure it ever was. But in any case, the past does not matter - it is very very hard.

Linus Torvalds commented that: User space developers are weenies. One of the most fun parts of git development for me has been how easy everything is.. Well, git confuses me and many other people who starts with it; often emits obscure error messages and refuses to do many operations that require me to consult other people on how to proceed; it tends to emit over-verbose error messages; it lacks a good external or internal API ; and it has been the topic of an excessive amount of blog posts explaining obscure ways to do various processes in the "Grand Unified Theory of Version Control Using Git", a potential thesis subject of some Ph.D. diplomas. (that was sarcasm.). So I'm not sure Torvalds did a very good job.

However, designing command line applications is easy, as I can testify (though some people fail to do it too), and designing APIs is not much harder. But what about web development? I once attended a supper after a Linux-Herzeliya meeting where an open source contractor said something along these lines: "Some people think that web-development is easier than kernel development, but it's really not true. It's actually harder. Just getting everything to work with Internet Explorer 6 is excruciatingly difficult.". Of course, the more I thought about it recently, the more I concluded that supporting Internet Explorer 6 (which some web-sites including my own have decided to avoid recently) is just the tip of the iceberg of how hard contemporary web-development is.

The Past

The Internet.

"The Net is the Computer"

HTTP and HTML - Hypertext Transfer Protocol and Markup Language.

The Web Becomes a "General" Application Platform

New daily buzzwords

Case study: www.shlomifish.org

I maintain a personal web-site on www.shlomifish.org. It is large and contains essays, articles, stories, aphorisms and quotes, presentation materials, information about myself, links to open-source software I've worked on and many other resources. I enjoy working on it, and many people who stumbled upon it or I referred them to it have complimented me on it and said that they enjoyed some of it.

Here are some factors that facilitate my work on the site:

  1. The site is almost completely static data and the server just serves the files as is. In order to have a common look and feel, I generate the pages from templates, text and other data using my own, custom, static site generator, which I invoke from the command line on my local computer, it generates the final site and I then update it on the server. The static site generator is open-source, but it's besides the point.

  2. I recently dropped support for MSIE 6 and may not support MSIE 7 either. My pages broke with IE 6 and I could not bother to hack around it and I have an anti-IE page.

Despite all that, the site has the following problems:

  1. It fails to render properly when the font sizes are increased too much (somewhere past 20pt IIRC). While this is quite unusual, some people - especially those who have a poor eyesight may opt to use it and thus the site is less usable for them. Someone on webdesign-L who pointed me to it, has given me some fixed CSS but he didn't test it and I didn't know where to put it and whether it will work at all, so I didn't pursue this direction.

  2. Some people have complained about the site's width being either too narrow or too wide. The site uses a fixed-width layout (because that is what the original WordPress design that I based my efforts on used), and so there's no one-size-fits-all.

  3. The separators between the links in the bottom are not properly middle aligned and I don't know how to fix it. (Very minor problem but it is still annoying.)

  4. Like I said, the site does not work properly in MSIE 6, which in a perfect world would be easy to do.

  5. One cannot comment on the pages. I added Disqus JavaScript-based comments once, but I believed they made the site much slower, and the fact that they started loading Google Analytics, which I want to avoid was the last straw and I removed them. Now if I wanted to add comments, I'll need to either find a different JavaScript-comments provider, or alternatively implement comments myself using a server-side scripting solution.

  6. Despite that, my site still requires Google Analytics due to the ShareThis button I placed there. While I like the functionality that ShareThis provides to people who visit my site, I'm unhappy with its Analytics requirement. When I contacted ShareThis about this they told me "At this time, there is no way to disable our widget from accessing Google Analytics.", so I need to hack something in Perl or whatever to render the link sharing buttons in order to avoid ShareThis and subsequently Google Analytics. I haven't done it yet.

  7. The colours of the background layout images are a little off on my stationary computer's LCD screen and completely off on my laptop's screen. I intend to fix it, but didn't yet get to it.

Benjamin Frankling is misquoted as saying that "To find out a girl's faults, praise her to her girl friends." (he did say something similar more verbosely). Similarly, at the two times I have published revisions of my essay "Create a Great Personal Homesite", people took the opportunity to criticise my home site, in order to demonstrate how smart they were in demonstrating how much I didn't practise what I preached, instead of what I said in the essay itself. So if you want to discover problems with your site, then publishing such an essay would be a sure-fire way to see what people think of it, despite the fact that their own sites may have a fraction of the useful content of your site (or mine for that matter).

Naturally, all the problems I mention here are just the current state of the site. Many more were solved along the way, and the time I invest in solving such problems, could be invested in adding more content to the site, which is what actually attracts people to it. I am a mostly one-man team in maintaining www.shlomifish.org and do not have a lot of monetary resources at my disposal to invest in it (so I cannot afford to hire a good CSS designer, for example).

Don't get me wrong: many people have complimented me or thanked me for the many resources they found on the site and I'm happy to hear from them. But I always have the nagging feeling that not everyone are happy, or that I can never please everyone, or that people like complaining for the sake of complaining to show how smart they are and are never happy. Luckily, I'm not a perfectionist, but still the point is that it would take too much effort to create a site that functions perfectly.

The Problem with The Web Today

In order to do good web design today, you need to first learn HTML/XHTML, CSS and most probably JavaScript as well. While the situation is much better than a few years ago, different browsers still have different quirks and different problems with implementing the standards for them (especially Internet Explorer 6, which many sites still need to support). Then you'll need to design an attractive site that will be look adequately everywhere. Some designers only give you a big image (PSD, etc.) of the web-site's layout that they expect you to slice and dice and convert to XHTML+CSS yourself, and there are services (such as PSD2HTML) that will do it for you ("Starting at $159."), or you can do it yourself. If you're a good designer, you might be able to do the CSS and images work yourself.

A few problems along the way are: 1. CSS positioning being the hard, quirky and counter-intuitive monster that it is. 2. Browser incompatibilities. 3. Having to learn a good JavaScript abstraction library, such as jQuery, and hope that you won't have to learn another one when working on a different project.

Now once we are done with the client-side code (which is much easier on paper), we are going to the server-side. Here you have to deal with the HTTP protocol, with various potential holes such as SQL injection, Cross-site scripting (a.k.a "HTML injection" or XSS), Cross-site request forgery (CSRF), and simple design bugs that may escalate into security problems. Even if your web application is perfectly secure, it still does not mean that it doesn't have usability bugs or general usability issues.

And then naturally, there's the choice of server-side technology: Perl, Python, PHP, Ruby, ASP, ASP.NET, Java/JSP, ColdFusion, Erlang, Haskell, C++, server-side JavaScript, Squeak Smalltalk and many more obscure technologies. And after you've done choosing a technology, you still need to choose the web-development framework or content-management system. In Perl alone the choice of web-development frameworks includes CGI-Application (and Titanium), CGI-Application-Plus, CGI-Builder, CGI-Prototype, Jifty, Catalyst (and Reaction), Mojo, SweetPea, Dancer, Gantry, AxKit, WebGUI and I've heard of some new ones under development. Each such framework comes with its own APIs to learn, bugs and mis-features to be aware of, new surprises and a whole lot of stuff to learn as you go.

When I worked on a web-based mailing list software for an Israeli company, it was decided to convert the existing PHP codebase to the Symfony web framework. It took me a while to get the demo application to work, and afterwards I had problems with the database abstraction layer there leaking memory (which made me have to resort to using the old mysql interface). Moreover, the recent versions of PHP (in a minor third digit release) broke compatibility with the testing framework that Symfony standardised on, which made it harder for us to write tests, unless we would have upgraded the test framework to its non-officially-released beta.

The motivation for converting the code to Symfony was to improve its quality, but one day I glimpsed at some code that my co-workers were working on, and while it has been using the framework conventions, was still clearly horrible code. So using a web-development framework was not sufficient for having elegant code.