The iPhone Lover/Hater

| Tags: my-life, iphone, train

It’s Monday and I enter the train home after a day full of work. The train is well filled but I get a seat between a woman browsing on her Samsung smartphone and some guy I ignore at first.

I pull my iPhone from a pocket of my Jeans as the guy besides me starts talking: “Ahh, an iPhone 5. Nice! It’s twice as fast as the iPhone 4S”.

I try to ignore him and open Tweetbot to check my Twitter timeline. As I’ve been pairing with a colleague on a project the whole day I haven’t looked at Twitter for the last 9 hours and there are 50 new tweets.

The guy goes on: “It’s rectangular, rather flat, has rounded corners and does what it’s meant to do.”

Oh dear, where does he get something like that from. I throw a sideways glance at him. Could be from an ad agency, at least he talks that way.

Most of the new Twitter posts are boring. A post from someone reporting about his 10 km run. I’ve muted Runkeeper and some other running related clients and hashtags, but from time to time some post of that kind still filters through. There’s also some new consultancy wisdom tweeted and retweeted by my colleagues. No funny posts and nothing really exciting.

“Movies look great on the iPhone 5.”

Really? I open Riposte and check out App.net. That’s a much more nerdy timeline and not as crowded as Twitter.

“But the battery sucks. Yeah, the battery really sucks. I had an iPhone 5, but I returned it because the battery sucks. I’ll probably get myself a Samsung Galaxy.”

Huh, what’s changed. Is he getting offensive because of being ignored?

“Are there any good apps for the iPhone 5. I didn’t find any back then. And it sucks for games. I think they rushed the release of the iPhone 5 a bit.”

No way opening the Kindle app and trying to read my current novel “Third Shift” by Hugh Howey as the guy tries hard to get some reaction from me. I don’t feel like arguing why I like my iPhone, though. I’m not religious about it. It works for me. If something different works for you, then by all means get that.

“But movies look great on it.”

In that instant I remember hearing David Lynch talking about how you can never experience a movie on a phone. That still holds true for an iPhone 5 - even with it’s 4" display.

Luckily I need to change trains now.

Cloud Atlas

| Tags: movie, book, fiction

A half year ago I saw the trailer of the then announced movie “Cloud Atlas”. The trailer got me interested. So I browsed around the web a bit and found out that it is based on a novel said to be spectacular and impossible to make a movie from.

So I bought “Cloud Atlas” by David Mitchell in Amazon’s Kindle Store and since I prefer to read the book before watching movies based on it, I started reading.

The book is great. It consists of six stories ranging from the 18th century to some more or less distant future. Each of the stories is written in its own style and uses a language matching the time.

The first story — the one from the 18th century — is quite difficult to read — It is written in a rather archaic English — and for me it was also quite boring. But the rest is all a very good read. The stories are told in two parts. You read the first parts from past to future and then the second parts come in reversed order from future to past.

All stories are somehow connected. There are people reading the older stories or watching them as a movie, but there are more than those obvious connections.

Now I also watched the movie. It is impossible even for a movie of nearly three hours to show each scene described in the book, but it captures the essence of the book.

One interesting aspect of the movie is that it tells all stories simultaneously. Sometimes you see 5 minutes of each story and sometimes the movie runs in a mere amount seconds through all six stories. At first it is a bit irritating, but in the end it is a good technique to bind all stories together and to remind the audience what the current situation is in each story.

The book carries some subtle notion of reincarnation and the movie reinforces that notion in a kind only a movie can, but you’ll have to see for yourselves.

One more tidbit maybe: In one of the stories taking place in the future a sort of fast food restaurant is described that uses golden arches in it’s logo. My brain made a connection to a currently existing chain of fast food restaurants. It’s hard to make that connection when watching the movie. Either the book isn’t as explicit in that case as I imagined or the movie makers decided to not be as obvious as the book.

So definitely first read the book and then watch the movie.

Static Publishing Again

| Tags: blogging

After two years with WordPress I decided to again move to a totally different blogging engine. WordPress started to annoy me when I wanted to write a post about a testing framework I had implemented in Dart. This post contains one block of code and the WYSIWYG editor in WordPress made it a pain to just type it in. I somehow got around this with typing it in somewhere else, copying it into the editor and fumbling with the font settings.

There is a Markdown plugin for WordPress, but then all posts are handled by it – even if they weren’t written using Markdown.

Back then I read about Jekyll and Octopress and started playing with it.

Octopress seemed like a good starting point as it contains some useful rake tasks and a framework for a blog. I didn’t like the theme and even being able to change the colors wasn’t enough to make it attractive for me. I was satisfied with the theme I used in the WordPress blog.

So really hard editing and much cleanup was needed. I learned a bit about liquid, the templating library used in Jekyll and had an occasion to code in Ruby again.

Unfortunately, the transition won’t be as imperceptible as I would wish for. I have never before looked into the templates for RSS and Atom feeds but since Octopress only comes with a template for an Atom feed and I still wanted to serve a RSS feed for those who have subscribed it, I needed to have a deeper look into this topic.

Wordpress generates its page numbers as ids for the entries in a feed even though you don’t see that page number anywhere else and permalinks use a human readable format.

The new feeds now again contain ids based on the permalinks and many feed readers will most likely display the feed as a whole bunch of new entries. Sorry about that.

Thanks to Apache rewrite rules everything else should work as before.

You’ll probably notice that there is no more search box at the top. That’s because there is no database. All pages are generated and served statically. Take a search engine of your choosing and search for anything you’d like to find there with “beeger.net” as a context. Since it’s all static again, the search engines should have no problem indexing the site.

10th Anniversary of beeger.net

| Tags: css, design, html, theme, blogging

Today is the 10th anniversary of this blog. With a little help from the wayback machine I’ll take a look at those past 10 years and make fun of my website design efforts.

At first beeger.net was pretty empty. It only contained a logo and I only had it registered to have the e-mail-address robert@beeger.net. Anyway it looked way too empty and as I learned about blogs, I decided to start one myself. I started it by using a Windows tool simply called Blog. With this tool I typed my first posts into an integrated editor and Blog generated the HTML files for me which I then uploaded to the server.

Website Design from 2002

I wanted a cool logo for my website and began sketching some ideas until I had one that looked fairly cool in my mind. Unfortunately my limited talents could not transfer the image in my mind to the screen of my computer or a piece of paper. So I started programming the generation of the logo in Java. The logo is a combination of arcs and lines. I remember running the program over and over again and moving lines and arcs around till it looked good.

Also of note on this one is the background color. Somehow I always liked beige and creamy colors. It also shows in the Squareness look and feel which I created some time later and the current design of the blog.

Back then table layouts were the way to do website design and the table layout is clearly visible in this first version.

After using Blog for a year I switched to MovableType . Back at that time MovableType was a fresh blogging system that I could host myself on my website. It had a nice templating system and posting new blog posts was a joy. But it wasn’t until 2005 that I changed the look of the site.

Website Design from 2005

The logo stayed the same, but the background got changed to white and was less aggressive. Though it was still a table layout, it was a bit more subtle by leaving out some borders. Also notice the side menu. Side menus were the big new thing - at least for me - and I spend considerable time to get the CSS right. I also added some CSS-only buttons telling things none really wanted to know like what MovableType version I was using and that the site was valid XHTML 1.0 and CSS.

Website Design from 2006

One of my biggest problems of all time is that I always want to create something visually cool but simply fail to make it happen. There’s always so much that gets lost or wrong on the way to the paper or the screen that I dump it. So I’ve always played around with ray tracers and such tools. By combining things in a script like for POV or by arranging them in a tool like blender and then applying materials to those objects one can things that look good without having to be overly talented in drawing.

In January 2006 I was playing again with blender and somehow ended up creating a scene that looks like some highway in cyberspace. I think Tron inspired me here. I spend much time fiddling with it and even added motion blur to it. I liked it so much, I rendered two shots of the scene, came up with the title “Travelin’ The CyberSpace - A Nerd’s Blog” and made it the new theme.

I also played around with CSS and discovered negative margins. You see how the menu and the post box overlap the main content block. It was so nice and looked so cool. Well it did until I tested it in InternetExplorer. InternetExploerer was a real spoilsport. It just ignored those negative margins and it all looked really bad. But I won this fight by adding a transparent margin on the left and right side of the background image. Gotcha, IE!

One of the biggest pains in MovableTime has always been the update procedure. You had to upload the new files to the server, make sure you uploaded some as binary and most as text and then there always were some other steps to take care of during an upgrade. Also it got more and more bloated with each new version. So in November 2010 I decided to move to WordPress. With the move to WordPress I also decided to give the site a new look. I took the minimal HTML5 starter theme and tweaked it until it looked like this:

Website Design from 2012

Actually that’s not entirely true. Back then the main title was just “beeger.net”. Unfortunately moving away from static publishing with MovableType to dynamic publishing with WordPress has the effect that the wayback machine can no longer make snapshots of this site. Anyways the look is still the same.

I wanted the website to be readable on a mobile device like an iPhone. So by applying some “mobile first” thinking I got rid of the side menu. There are now only three buttons at the top and a search box. Here’s some more playing around with CSS. Inspired by Mac OS X segment buttons I used children selectors to make the first and last button round at one side. Since it should be readable on mobile devices and mobile devices are often on the way with low bandwiths, I decided to try to make a theme that would use no images. I browsed Google’s WebFont library and came across a font named “Reenie Beanie”  while searching for some font that looks like handwriting. The description of the font tells us that “Reenie Beanie could be used to represent the scribbling of a mad scientist, or the recipes of a genius chef.”. As the subtitle of the website was set on “The Ravings of Robert F. Beeger” the font was a perfect match. Even after more than a year I like this combination of Reenie Beanie for titles and Trebuchet for the rest of the text.

The latest change is only 3 months or something like that old. “beeger.net” looked like a boring title and one day as I registered some more domains, I thought it would be fitting a nerd to have some regular expression as a title. So that’s how the current title came to be. All of the domain names you can generate from it forward to this site.

And well, the background is again a beige tone. Not as aggressive as 10 years ago, but still.

Yoda Expectations

| Tags: dart, dev, web

Since releasing the Dart testing framework dahlia two months ago, I have been using it on a Dart project of mine. Although I’m pretty satisfied with it, there’s one aspect of it that is somewhat ugly. To test something in dahlia you specify an expectation and look whether it holds as in

expect(a).to(equal(b))

For my taste there are too many parentheses there and normally you get an additional pair around it when you put it into a one-line it-block like in

it('a should equal b', ()
  => expect(a).to(equal(b)));

So I want to get rid of some of those parentheses and working on my project I took inspiration from Dart’s event system which provides a nice approach for defining event handlers. Here’s an example

someElement.on.click.add(....)

Now I’m experimenting with a new form of expectations

expect(a).to.equal(b)

That looks better. But what about negations and combinations?

expect(a).to.not.equal(b)

can be implemented quite easily, but

expect(a).to.equal(b).or.equal(c)

is another matter. There is no way to know that after the first equal-matcher an and-matcher and another equal-matcher follows as there is no finishing method call that completes the expectation. A solution is to find some expression that puts a marker at the start like

expect(a).to.either.equal(b).or.equal(c)

but “either a or b” is definitely not the same as “a or b” and isn’t really flexible.

Doing it Yoda-style seems to solve the problem

to.equal(b).or.equal(c).expect(a)

For the fun of it, you can make it sound even more like Yoda

to.equal(b).or.equal(c).expect(a).hmm()

I’m unsure whether it solves a real problem, though. Tests shouldn’t be that complicated that the need for combinations of matchers arises. And though it’s fun, the original form where you know the subject before what is expected of it is more readable.

Ender's Game

| Tags: book, fiction, sci-fi

It’s now over 20 years since I first read “Ender’s Game” by Orson Scott Card. I remember that I was searching the science fiction shelf in my local library for something new to read when the german translation of “Ender’s Game” caught my eye.

It was one of those books you start reading and only stop to go to sleep or eat something. It had it all: a gripping story, characters you could identify with and a cool setting. Although I nearly never reread books since there are so many interesting ones I haven’t read yet, I just thought to myself “Wouldn’t it be cool to read it again” and bought it in the kindle store. And as before I read through it until I finished it.

Nowadays books like “Ender’s Game” are categorized as “Young Adult” books. It’s not a hard science science fiction book. The plot isn’t overly complicated, but it has it’s fill of philosophy. It’s also a book that is easy to read. But despite being like that or perhaps because of it, it’s a recommendable book even for the no longer quite so young adult.

In the nearly 30 years since it’s publication Orson Scott Card has written some sequels  and prequels and stories taking place at the same time as the original book.

There are some reoccurring elements in those books, but nonetheless they are all at least entertaining and definitely good reads. In my opinion the best of the Ender books is “Children of the Mind”. It comes with several new ideas not seen in the other books and the story is as gripping as the original one.

There are rumors about a movie based on “Ender’s Game” and I wonder what it will be like. Most movies based on science fiction novels are just action movies in a science fictional setting. There’s much action in that book that can make an action movie, but I hope they won’t cut out the profound parts.

dahlia - a unit testing framework for Dart

| Tags: dart, dev, web

When I started experimenting with Dart some time ago, I looked around for some pointers on unit testing with Dart and found a post on a blog titled “Test Driven Dart Development” and a Google Docs page. Both describe a unit testing framework that is not part of Dart’s standard library but can be downloaded from the Subversion repository of Dart.

I downloaded it and started writing my first tests. I didn’t like that it used a style that I perceived as being inspired by JUnit 3, though. It also has a nice grouping feature, but groups looked a bit to unspecific to me.

At it-agile, the company I work for, everyone gets 30 slack days per year we can use however we want – as long as it has some connection to agile software development. So I decided to invest some slack days and try to implement my own testing framework. I wanted it to use matchers like the ones provided by Hamcrest. I liked that grouping feature of the existing testing framework but wanted to give it more meaning. As I pondered this I remembered that my colleague Sebastian Sanitz once introduced me to a JavaScript testing framework named Jasmine and upon revisiting it, I decided to build something similar for Dart.

As it is inspired by Jasmine and is implemented in and for the Dart programming language, I named it “dahlia”. Like “jasmine”, “dahlia” is the name of a kind of plant and its name start with the same two characters as “dart”.

A dahlia test looks like this

describe('two equal strings', () {
 it('should be equal', () => 
   expect('test').to(equal('test')));
});

Like in other BDD testing frameworks (the most widely known being RSpec), the describe-part describes something that will be tested and the it-part specifies and tests the behavior of the tested object. So you read this text “two equal strings should be equal”.

The parameter to expect() is the actual value, the one you want to test. Typically you call a method on the tested object here and test whether it mets your expectation. The testing part is the parameter of the to method. It is a matcher. Here an equal matcher is used that simply tests whether the actual value equals the expected value which is passed as a parameter to the matcher. Currently there are only a few basic matchers but the number of available matchers will be expanded in the near future. It’s fairly easy to implement your own matchers should the need arise. You just need to implement the Matcher inferface and provide a convenient function like the equal-function in this example to provide a new matcher.

The expect-part is - similar to the describe- and it-parts – meant to be easily readable. In the example this leads to “expect ’test’ to equal ’test’”. The it-function takes a function as its second parameter. In many cases those will be simple one line functions like the one in the example, but if some setup code is necessary, a full multi-statement function can be passed here. The it-call is also called a specification as it defines a behavior and a test for it. Every it-call is therefore counted as a “spec”. The total number of specs, of failures – failed expectations – and crashes – any other exceptions that may occur – is displayed at the end of a testrun.

Currently there is only one reporter that prints the test run results to the console – be it the Dart VM console in DartEditor or Dartium or the script console in any browser –, but other reporters that  create HTML and other formats will be added later. As dahlia is currently ment to be used for unit testing, the output to the console is the kind of output one needs the most.

dahlia is available at GitHub. If you are interested in Dart or are already developing with Dart, please take a look at it.

Dart

| Tags: dart, dev, web

Some time ago as I was looking into JavaScript frameworks for the development of mobile web applications I stumbled upon Google Closure. Compared to jQuery and jQuery mobile Google Closure is a somewhat underhyped toolset for the development of client-side web applications.

Several features of Closure made me take some time to dive into it:

  • The closure library contains many small useful frameworks that fit together. So there is no need to mix and match different frameworks for functional programming, ui composition etc.
  • There is a working module concept. You can separate your application into different parts and specify which of the many frameworks in the closure library you really need.
  • You can use static typing and there is a compiler that checks it. So many errors can be found by the compiler. You don’t have to find them while running the app in the browser.
  • Since the compiler knows what is used from the huge closure library and your own code, it can delete unused code from the compiled application and run some other advanced optimizations that make the resulting code much smaller and faster.

Especially the static typing and having a compiler that checks the code before it is executed, appealed to me. Debugging in a browser is quite comfortable nowadays but if there is a chance to get rid of bugs without having to debug, I’ll take it. As someone having developed in Java for over a decade now, using an IDE and a compiler feels natural to me.

But there is a downside. The static type information for Closure has to be typed in into comments since JavaScript itself as a dynamically typed language doesn’t provide any constructs for this. Having to put type annotations into comments is quite cumbersome and after some time my initial enthusiasm for Google Closure somehow waned. Was it really worth the additional effort?

Dart seems to be the answer for all those loving Closures’ features while disliking the notation needed to get them. Dart is a new class-based language by Google created for the development of client-side web applications.

Dart has optional static typing. You can provide static typing information and if you do, the compiler that generates JavaScript from your Dart code, will check it. If you choose not to provide that information, it will obviously not be checked.

Static typing in Dart only affects compilation. It isn’t used while running a Dart based application.

Dart also comes with real classes and inheritance among them. The notation for classes and inheritance is much simpler than the prototype-based notation in Closure. It all just looks cleaner and more readable in Dart than it does in a Closure class.

The Dart team provides an Eclipse-based IDE for Dart called Dart-Editor. It’s still in the alpha phase and lacks many features that simply belong to a good IDE like refactoring support, but even in this very early stage it’s useful for the development of Dart applications and the exploration of the Dart libraries.

Currently much is happening in the Dart universe. The language is far from fixed. Frequently new proposals or changes that will break code from a month before are announced. Some weeks ago for example a change of the meaning of the == operator was proposed. Currently Dart is not for the faint of heart but it’s fun.

The End of The Mongoliad

| Tags: book, fiction

My subscription for “The Mongoliad” ended a few days ago and I did not renew it.

My initial enthusiasm for it melted away after half a year. I haven’t read a single chapter since June or maybe even May. Serial novels don’t seem to work for me. I prefer to read a book at my own pace. I just cannot stand to have to wait for the next chapter for a week or maybe even two or three weeks.

It’s the same with tv series. I watch the first episode and maybe the next two. Then I get impatient and if the series isn’t really gripping or otherwise fascinating, I don’t watch it anymore.

I had expected that The Mongoliad would keep me reading longer because Neal Stephenson is part of it, but somehow it isn’t like any other book from him.

I suspect that either he doesn’t participate in the writing of the book or that the serial character of the book isn’t doing it any good.

Though I don’t know anything about writing fiction books, I can imagine, that it’s quite hard to write a book if you cannot return to an earlier chapter and fix a part or add something to make the whole book work better. The Mongoliad looks – at least to the point where I left it – like a cronologically sorted collection of stories about some people. The stories themselves are OK, but somehow there is something missing, something that makes me want to read on.

Pinboard

| Tags: tool, web, bookmark

When rumors came up that Yahoo would shut down “Delicious” some time ago, I started searching for an alternative online bookmark management solution. Finally I came across Pinboard and signed up for an account. Importing all my Delicous bookmarks was a piece of cake and the interface looked nice and clean.

Then Delicious wasn’t shut down. It only got sold to another company. So somehow I returned to Delicious. I don’t have many bookmarks. I collected 350 of them and sometimes there are weeks when I really don’t add a new one. So it’s not as if the bookmark manager were a vital tool for me.

Anyways Delicious started to irritate me a bit recently. It looks bloated and they seem to add features I don’t really need. So I returned to Pinboard recently and will probably stay there. It still has the clean and nice interface and a useful mobile variant of it. The feature set  hasn’t changed for ages, but as it’s good as it is it doesn’t need to.

There’s one difference to Delicious that will matter to some people. For a Pinboard-account you have to pay a one time sign up fee of currently 9,51 $. The fee is getting increased by one cent for each new account.

In case of being interested you can browse my public bookmarks at Pinboard.