TNBT: Persistence

19. February, 2011

In this issue of “The Next Big Thing”, I’ll talk about something that every software uses and which is always developed again from scratch for every application: Persistence.

Every application needs to load data from “somewhere” (user preferences, config settings, data to process) and after processing the data, it needs to save the results. Persistence is the most important feature of any software. Without it, the code would be useless.

Oddly, the most important area of the software isn’t a shiny skyscraper but a swamp: Muddy, boggy, suffocating.

Therefore, the next big thing in software development must make loading and saving data a bliss. Some features it needs to have:

  • Transaction contexts to define which data needs to be rolled back in case of an error. Changes to the data model must be atomic by default. Even if I add 5,000 elements at once, either all or none of them must be added when an error happens.
  • Persistence must be transparent. The language should support rules how to transform data for a specific storage (file, database) but these should be generic. I don’t want to poison my data model with thousands of annotations.
  • All types must support persistence by default; not being able to be persisted must be the exception.
  • Creating a binary file format must be as simple as defining the XML format.
  • It must have optimizers (which run in the background like garbage collection runs today) that determine how much of the model graph needs to be loaded from a storage.

Related Articles:

  • The Next Best Thing – Series in my blog where I dream about the future of software development

What You Don’t Know About Copyright

18. February, 2011

Rick Falkvinge has a good overview over the history of copyright in his blog:

  1. The Black Death decimates scribecraft
  2. A Vengeful Daughter Creates Censorship
  3. The Monopoly Dies – And Rises
  4. The United States and Libraries
  5. Moral rights on the Continent
  6. Hijacked By Record Industry

Odd File Names

18. February, 2011

A colleague of mine had a problem with test cases in Eclipse. When we checked, the current directory looked pretty … odd.

After closer inspection, we found this directory on his hard disk:

odd filename in a directoryAs an old Unix buff, I know that there are only two characters which are not allowed in a file: The null byte and “/”. Obviously, the rule has been broken here.

Solution: The slash you see is not the normal slash but the Unicode fraction slash.

So with the Unicode support in your file system, you can finally create files with “absolute” names. 🙂


So Nokia’s Dead, Too

16. February, 2011

Nokia finally submitted to the dark side. My guess is that the managers at Nokia and Microsoft fail to understand two things:

  1. People don’t get paid to use smartphones.
  2. A phone should “just work.”

At work, I get paid (a lot) to use the stuff that Microsoft shells out. That helps to ease the pain. This isn’t true for my own mobile phone. The iPhone blew all the “competition” away is because of a single fact: It’s mind-bogglingly easy to use. A lot of time and effort went into making it a pleasurable experience. When did you feel pleasure last time using something from Microsoft (the software company, not the sex shop)? Or from Nokia?

On the run, I don’t want to think how I can beat my phone into submission. I just want it to do what I have in mind without me having to tell it. Nokia didn’t care, so they have a problem. Microsoft doesn’t care; who cares for such petty details when you rake in one buck for every two you spend?

Being able to install Windows 7 on hundreds of millions of mobile devices doesn’t solve any of the inherited problems. There is a reason why Microsoft failed with their mobile OSs for years. Nokia knows how to build great hardware; only the user experience was always just the top of the reeking pile. When Apple suddenly started with something that didn’t stink, no one wanted to suffer the old crap anymore.

Especially not in two years when the first new phones will come out.


Building Eclipse from Git

16. February, 2011

Andrew Niefer blogs about Building Eclipse from Git. Unfortunately, he doesn’t explain how to do that if you’re not a committer (i.e. have a user on eclipse.org).

I’m still hoping that one day, it will be possible for people outside the Eclipse team, to be able to build Eclipse projects.


Marvel Digital Comics

14. February, 2011

I’m a huge comic fan, spending usually $100 each month on buying them. So when I found the Marvel app for Chrome, I gave it a whirl.

Unfortunately, the experience could be better. The comic reader is implemented in Adobe flash. That’s not a problem as such, only the implementation sucks.

The reader has three modes: Single page, double page and “smart”. There is a reason for the quotes …

In single and double page mode, the print is too small to read on my screen when I can see the whole page (it’s only 1920×1080; portrait mode would work better I guess). So I have to zoom in. But when I zoom in, navigation becomes a chore. The cursor keys don’t repeat. They scroll the page by about 10 pixels. At a readable zoom, I have to press the keys about 100 times to scroll to the bottom.

For every page of the comic. That’s 3,737 keys pressed to read a 37 page comic. Useless.

“Smart mode” to the rescue. In smart mode scrolls cursor left moves to the next unread part of the page. There are only two zoom levels which I call “too small to read” and “cut off balloons mode”. If you’re lucky, you get three panels on a row, and you have to remember the text of all of them so you can finish understanding what everyone says when you can see the bottom half.

So when reading the demo comics, I find myself often grabbing the scroll bars and adjust the screen position just a little. A nag but it works, I guess.

Recommendation: I can live with it.

 


New Way of Testing Pupils

13. February, 2011

Remember the horror of tests at school? The attempts to prepare, the insanely short hours of the test itself, the dreading wait for the results.

In Switzerland, pupils in the 8th grade can take a “Stellwerk Test” which works a little bit different. It’s a web based test. Instead of presenting all pupils the same questions, everyone gets different ones. Depending on the answers (correct or wrong), the program will select a more simple or more difficult question. After a while, this selection process will level out. At that point, it’s possible to calculate the level of understanding that each individual pupil has on the topic.

Unlike traditional tests, it doesn’t matter (much) if you can’t answer a question. Also, the leveling out is individual. Some pupils can finish the test in 30 minutes, others need 2 hours. That doesn’t mean the “slow” pupils are dumber; their understanding is just more “uneven”. That means the test is more fair than the traditional tests. Teachers also don’t have to come up with genuine questions every year (or make sure the questions can be kept confidential if they always use the same ones). Stealing the tests in advance doesn’t get you an advantage.

Makes me wonder when this kind of test can be used for more than math and physics. Not every school can afford a super computer like the one necessary to run Watson. Not yet.


Russia Abolishes Winter Time

10. February, 2011

Just saw this: Russia frozen in time by plan to brighten the bleakest winter

It’s just odd that they get rid of winter time (which is the one that our bodies are used to; in winter time, the sun is highest at noon).

I also vote for getting rid of “daylight saving time.” It always takes me two weeks to get used to the new time and I’m sure I’m not alone. On top of that, it costs millions to do it every year. Let’s admit the mistake, and get rid of this foolishness.


Stupid Ideas Revisited

9. February, 2011

Ever had a stupid idea? One which would instantly trigger the “that’ll never work. Ever.” response?

Did you withstand or gave you in?

Maybe it’s time to give stupid ideas more leeway. During my holidays, I started to think about a stupid idea. Really stupid. But this post is not about the idea, it’s about stupid ideas in general. Let’s look at a famous one: Christopher Columbus believed that the world was much smaller than everyone else.

So when everyone else set out eastward for India and fortunes in spices, little Christopher thought: Let’s take the shortcut. I’ll go west, land must be 4’000km away tops.

Of course, he was wrong. Earth was much bigger than he believed. But he wasn’t completely wrong: There was land. America.

So if he hadn’t pursued his stupid idea, one of the world’s largest economies wouldn’t exist. Millions of Indians wouldn’t have been slaughtered. Europe wouldn’t have made a fortune by selling slaves. The GIs wouldn’t have stopped the killing of millions by the Nazis. The Vietnam War wouldn’t have happened. Neil Armstrong wouldn’t have been to the moon. B. Obama wouldn’t have been elected 44th President.

A stupid idea can change the world.


Tired of Being Tracked?

9. February, 2011

If you don’t want to be tracked by online advertising companies, there is a site where you can opt-out:  http://www.networkadvertising.org/managing/opt_out.asp

That doesn’t stop ads and spam, it just stops the companies from tracking your movements through the web.

Note that I couldn’t opt-out of more than roughly half of the networks; the other half simply ignores my selection. Not sure why that is; I’m suing FF 4 and I can’t find an option to allow third party cookies anymore.