Browser-JavaScript Performance on Mac OS X

JavaScript performance is one of the most important things in recent browser development.

Google did an awesome job with Chrome’s V8, and Mozilla’s Tracemonkey also raises the bar.

I usually compare the performance on this site

The tests were done on a MacBook Pro (2007), here the results.

Continue to full post...

XML as human interface and DSLs

While reading “The Definitive ANTLR Reference” by Terence Parr I encountered this quote. I’m a bit sceptic about XML beyond its use of data exchange, so the quote has completely won me over for the book.

Don’t be afraid to build a human-readable configuration file (I implore everyone to please stop using XML as a human interface!) or to build domain-specific languages to make yourself more efficient. Designing new languages and building translators for existing languages, when appropriate, is the hallmark of a sophisticated developer. —Terence Parr, The Definitive ANTLR Reference, Page 23.


Being an expert in XML is like being an expert in comma-separated values. —Terence Parr

Please Leopard, don't Suck

Apple’s next generation operating system is nearing its release date. Time to face the truth – is it as awesome as Steve told us?

Since I’m a Mac user (despite my Vista adventures), I can only repeat what the brave people of The Joy of Tech published in September: Please Leopard, don’t suck!

Tiger is already far better than Vista – it does the small things so much better than all Windows versions together. Of course on a competitive market these “features” don’t count. But for me as user these are the features I really really love on Mac OS X.

Here my list of these things make OS X the better operating system:

  • OS X always prints in the right order – on Windows I often had to reverse the pages.
  • I can print to PDF in almost all situations.
  • Pressing Shift+Cmd+4 I can make screenshots of a part of my screen (press the spacebar to make pictures of whole windows).
  • For certain tasks I’m simply so much faster on the (sane) command-line than by clicking through myriads of dialogs (but both ways are possible).
  • Unix! ‘nuff said.
  • Taste – yes, I know, this word was stressed a lot in combination with “Apple”, but it’s simply true – compare Windows to OS X. OS X isn’t just a conglomerate of desktop effects, but a fine-tuned composition of feedback-mechanisms. It’s like candy, but you can’t get sick by eating to much of it.
  • Innovation – being so much smaller than MS, Apple has to put in considerable effort into their products, but – and this is what I like about them – they don’t suffer featuritis (indeed they had a big disaster because of featuritis in the nineties, but they learned their lessons well).

Well, the list got a bit esoteric at some point, but many many things “just work”. Of course Apple is all but perfect, their “closed-system” policy is dangerous and very annoying. Doing things they don’t want you to do (for good or bad reason) is very hard (try to keep a Macbook running while the lid is closed, for example).

Anyway, closed systems also have their advantages, and if you don’t like it, you can always switch to some other operating system on your Intel Mac. Windows is easily installed on a Mac, and for Linux there are some guides found on the net (depending on your actual hardware).

At some point I didn’t want to care about operating systems anymore (Linux was great, but very time consuming), I wanted something that “just worked” (which ruled out Windows). OS X came to the rescue – and here I am several years later, more happy with my OS than ever.


Please Leopard, don’t suck!

Bookmarks

Somewhere around 2004 Tim O’Reilly gave a talk and asked the attendees if they still use bookmarks or not.

The majority said they use bookmarks, and Tim O’Reilly was a bit surprised because he doesn’t use bookmarks anymore. He checks Google or some other search engine to find the stuff again.

Years after the talk I finally got what he meant.

Continue to full post...

Climate Change

Currently we’ve got quite a discussion about climate change and terrifying prognoses for the future. Terrifying for us because it’s going to be incredible hot, or incredible cold, because disasters like floods, hurricanes, tornados, and fires will hit our homes and the ones we care about.

Continue to full post...

The state of the Internet

You might have noticed that the quality of postings to sites like Digg, del.icio.us, and Reddit declines very quickly and people start to rant about it.

Continue to full post...

Weblog Hoster/Software Comparison

Choosing the right tool for a job is very important, but often it is very tedious and bothersome to collect all the data you need.

Once I was searching for a replacement of my previous Blog-hoster and ended up with Hobix (see here). Hobix is certainly not for everyone – and most likely not for me, but currently I’m stuck with it.

Anyways, if you are searching for a good Blog-software, or Blog-hoster check out WeblogMatrix.com, a fresh Matrix-Wiki from the makers of WikiMatrix.com and ForumMatrix.com. Maybe you can also add your own favorite system?

Via it’s developer.


The tools we use have a profound (and devious!) influence on our thinking habits, and, therefore, on our thinking abilities. —Edsger Dijkstra

Blue on red

Del.icio.us is an amazing service1, clean, fast, and usable – except for one thing, it’s color scheme.

Continue to full post...

Java is OpenSource

Java is going open (really open as in GPL2).

They were talking about it for a long time, now it’s real! Java is (going) OpenSource!

Continue to full post...

GMail User Interface

I really like Google’s user interfaces. Most of them are really good and their search interface changed the whole industry.

There’s currently only one thing I don’t get – the Delete button in GMail.

Continue to full post...

Rethink your Web-Interfaces

Forbes recently published a list of Web-Applications for small businesses. Google won in several categories (Calendar, E-Mail, Information Managers, Spreadsheets), my question is why?

Continue to full post...

Mental workout

According to this article from Popular Science thinking really hard causes your brain to consume 15 times more calories than in “stand-by mode”. The calorie consumption goes up from 0.1 calorie per minute to 1.5 calories per minute.

So let’s do some (brain) workout and loose some weight.

Continue to full post...

The year 2038 problem

I just found some information on an upcoming problem, the year 2038 problem. On that page is also an program to test whether your operating system has a problem or not.

In summary: the system time is usually stored as seconds since 1970 in a 32-bit register (or variable). On 2038-01-19 at 03:14:07 the register will overflow… . The solution is to switch to an 64-bit register (sufficient more than 4,000,000,000,000 years).

Usually not only the operating system has to be tuned, all time variables have to be large enough. 32 years aren’t that much for some programs (I’ve heard :-)). BIOS variants may also have problems on that day.

Some operations do have that problem now! Just think of an average of two dates after Jan 2004 (a+b)/2! a+b is already too large for 32 bits.

I couldn’t resist to check it on my systems

Linux currently has a problem, Mac OS X doesn’t.

Mac OS X Tiger on a G5

Tue Jan 19 03:14:01 2038
Tue Jan 19 03:14:02 2038
Tue Jan 19 03:14:03 2038
Tue Jan 19 03:14:04 2038
Tue Jan 19 03:14:05 2038
Tue Jan 19 03:14:06 2038
Tue Jan 19 03:14:07 2038
Tue Jan 19 03:14:07 2038
Tue Jan 19 03:14:07 2038
Tue Jan 19 03:14:07 2038

Mac OS X Tiger on a G4

Tue Jan 19 03:14:01 2038
Tue Jan 19 03:14:02 2038
Tue Jan 19 03:14:03 2038
Tue Jan 19 03:14:04 2038
Tue Jan 19 03:14:05 2038
Tue Jan 19 03:14:06 2038
Tue Jan 19 03:14:07 2038
Tue Jan 19 03:14:07 2038
Tue Jan 19 03:14:07 2038
Tue Jan 19 03:14:07 2038

Linux (Kernel 2.6.16)

Tue Jan 19 03:14:01 2038
Tue Jan 19 03:14:02 2038
Tue Jan 19 03:14:03 2038
Tue Jan 19 03:14:04 2038
Tue Jan 19 03:14:05 2038
Tue Jan 19 03:14:06 2038
Tue Jan 19 03:14:07 2038
Fri Dec 13 20:45:52 1901
Fri Dec 13 20:45:52 1901
Fri Dec 13 20:45:52 1901


We are at the very beginning of time for the human race. It is not unreasonable that we grapple with problems. But there are tens of thousands of years in the future. Our responsibility is to do what we can, learn what we can, improve the solutions, and pass them on. —Richard Feynman

REST Web-services

If people talk of "Web-Services", they often mean SOAP as maintained by the W3C. But SOAP isn't everything. In fact SOAP was a basically a RPC (Remote Procedure Call) protocoll over HTTP (therefore the name Simple Object Access Protocoll). Since W3C took over SOAP (from Microsoft and later IBM) it has been extended into more general directions.

With REST (Representational State Transfer) similar applications can be written. REST itself is only an architectural style (defining how you should design your application). REST was initiated by the IETF as the basic model for the modern Web. HTTP 1.1 was designed using REST as tool for discovering unproper features etc... .

What is the essence of REST?

REST sees the Web as a collection of resources connected to a common network. Each resource has a set of associated methods (PUT, GET, POST, DELETE) to operate on them. SOAP on the other hand has services with definable methods (like getCustomerRecord, setCPUHeat etc...).

Since REST heavily depends (or defines) on existing standards existing software can easily be used with it. For example firewall administrators can block writing methods (DELETE, PUT, POST) on some resources, or internet caches are able to store resources requested by GET. SOAP uses POST (non-cacheable) to transfer the data between the client and the server. Using SOAP a firewall administrator has no chance to control access to his resources - he can allow or disallow SOAP (meaning HTTP). SOAP applications have to manager their own security.

The REST/SOAP debate is often compared to pre-SQL eras. Think of a database providing "getCustomerRecord" and "setCPUHeat" commands instead of general SELECT and UPDATE statements on resources like "Customer" and "CPU". The same applies to REST - here we have general methods, with SOAP we have specialized interfaces.

Why SOAP if REST is so good?

SOAP is a product (at least you can make products from the SOAP specification) - REST is "only" an architectural style. Guess with which one companies can make money? REST of course has it's drawbacks too, for example you cannot buy libraries to ease some task... . REST isn't widely known/accepted and few companies provide explicit support. Amazon calls it's XML over HTTP a REST interface, del.icio.us and flickr have REST interfaces too (usually XML over HTTP). The biggest drawback of REST is the lack of a description language - SOAP has a very powerful one with WSDL.

More? REST

--
The Church says that the Earth is flat, but I know that it is round. For I have seen the shadow on the moon and I have more faith in the Shadow than in the Church. -- Ferdinand Magellan (or not)

Battery lifetime

Rechargeable lithium-ion batteries are very common in gadgets like laptops, PDAs and cell phones, unfortunately these are very expensive. I had to replace my Sony battery for 250 Euro(!) – well I bought a cheaper clone for 100 Euro, but it has its drawbacks (at the beginning it worked for 3 hours, now for about one…).

So it pays if you keep your current battery up and running as long as possible. Here are a few facts I’ve collected over the last few months:

  • Lithium-ion batteries can be recharged whenever convenient, there is no memory effect
  • A new battery should be charged and discharged fully for the first three cycles (initial conditioning)
  • Keep the electrons moving (discharge/recharge the battery at least once every month)
  • Don’t keep your device plugged in all the time (this is very bad for the battery)
  • Keep the working temperature in mind (22°C is best for most devices)

I put my notebook battery out if I’m working plugged in for a longer time.

Notebook Li-Ion batteries have a typical lifetime of about three years, but this depends on how you use it. A friend of mine uses his notebook on a daily basis (on battery) and his battery works for about four years now – I’ve used my notebook occasionally (mostly plugged in) and the battery had to be replaced after 2.5 years… .

I’ve read some posts on bulletin boards telling me to put my battery into the refrigerator – these procedure should repair some structure and the battery should work like a new one. Well I’ve tried it with my old battery, but it didn’t work :-).

Broken batteries usually provide their full power but only on very low power consumption, for example my broken laptop battery could power my cell phone for days (weeks?) because it consumes much less power than the laptop.

More resources: Apple Cellpower

Well – I’m after all a software guy, so the electronic stuff written here should be used with caution :-).


No man’s knowledge here can go beyond his experience. —John Locke