Symbian's Utopia - and why it was an impossible dream
Cruel and unusual? No, merely misguided
Now to the interesting bit. What were Symbian's designers doing going to such trouble?
Jay illustrates this with an anecdote:
HBufCis a great example of this design consideration. So, why is an object allocated on the heap constant, requiring you to create a temporary
TPtrto modify it?
The first Epoc (later Symbian OS) device had 4MB of memory
Well, think back to the very first Symbian device, when it was still called EPOC. The first Series 5 prototypes had 4MB RAM - which looks ridiculous now, you couldn't even boot a modern Symbian device in 4MB of RAM. Saving memory was important, and somebody had a very obvious idea. A modifiable descriptor like
TBufneeds a 4-byte field (that is, ARM word-sized integer) to store its length. But a heap cell already has a length field for the heap management, so you can save 4 bytes by not duplicating this information and making use of the heap cell field instead.
However, for consistency with the rest of the descriptor classes, this means that the heap descriptor had to pretend to be a "constant" class, since it's lacking the length data member that the writable descriptor classes contain. The way around this of course was to create a temporary
TPtrwhich contains a temporary length field compatible with all functions that take a writable descriptor. All that effort to save 4 bytes may sound silly, but think how many strings there might be in the entire OS, and then consider that you only have 4MB or 8MB of RAM in total - it really mattered back then.
And here's the core of Jay's argument.
If I sound like I'm griping, I am, but at the same time it's true that Symbian's utopian idea was misguided - they were never going to find that the rest of the world shared their aim to go to a little extra pain to produce better products.
A lot of people also tended to take the view that because something existed on another OS that it must be "easy" to implement and therefore Symbian was only being lazy by not doing it. I've always found it a strange view that because a thing exists it must be easy, or the complete lack of appreciation that that ease-of-use can have a price to pay that's sometimes unacceptable. It's like saying to someone that they ought to be able to build a 747 aeroplane because Boeing make them so they must be easy. Again Symbian was misguided in believing that others would share the view that a bit of ease-of-programming can be sacrificed when it benefits overall.
Overall Symbian contains a mix of good design and poor design, but much of the criticism that I've seen leveled at it over the years stems from (a) programmers unwilling, or haven't got the time, to go through the "pain-for-gain" approach that Symbian internally accepted and (b) they're really talking about Series 60 which was written by Nokia, and gave Symbian OS a bad name.
So, Jay argues, Symbian was utopian, as it demanded that developers go to a little extra effort to help create more efficient and reliable systems. But developers didn't value what it gave them. Today, we have less reliable and less efficient software, because programmers were lazy, and didn't take put in the small amount of additional effort.
What do you think?
No comment required: Google blames developers for lousy Android battery life [May 2010].
There are many more anecdotes on system design in our old Psion history special, here. ®
Sponsored: 2016 Cyberthreat defense report