Monday, May 28, 2012

Blogger App

I am posting this from the Blogger app on my galaxy Nexus.

Thursday, November 3, 2011

From Luton Airport to London City

If you take one of the budget airlines to London, i.e. EasyJet, there is a good chance your flight will end up at Luton Airport (LTN). It seems like a rather smallish and remote airport, when indeed it is quite frequented and well connected to London City.

You bridge the 50km to the capital by either taking the bus or the train. If you are flying EasyJet, you can purchase tickets for either prior to landing on the plane. Obviously the train will get you to London faster, but it will cost you more and requires you to ride a shuttle bus to the train station  Luton Airport Gateway first. After you board the train you will arrive at St. Pancras International Station after around 25 minutes.


The bus ride, in contrast, lasts considerably longer, but still may be the more convenient option for you. You find the 757 bus right outside the entrance of the airport; it leaves every 20 minutes. The bus driver will store your luggage for you and retrieve it for you later at your destination stop. You can exit the bus at one of the several bus stops, the last one being Victoria Station. The bus seemed more convenient for me because I didn't need to transfer, haul around my luggage or purchase an oyster card or tube tickets before arriving in Central London. Also, if you fly EasyJet you are eligible to purchase a discounted bus ticket for the Green Line for only £15.50. Note: When you board the bus, the driver will take your print-ticket and give you a ticket voucher in return for your ride back.

I got stuck in traffic (which is quite normal in London); so the bus ride took me 120 minutes instead of 80. You should take that in account when riding the bus back to Luton Airport and and you should also allow for an additional 20 minutes for security (and more if you need to check-in first). If you arrive early you can kill time in the lounge eating sandwiches or drinking pints before boarding. In summary the London Luton airport is quite comfortable inspite of or maybe precisely due to its compact size.


Saturday, September 17, 2011

Wake me up when September ends

A small but fresh breeze makes me put on my turtleneck sweater that I brought along. An half empty glass of beer and my laptop computer sit on the garden table in front of me. Now and then I lean back in the matt white plastic chair and concentrate on the late summer's atmosphere:  the pastel-colored sky, the light smell of BBQ, the sound of a few crickets chirping and the occasional crowing of birds -- left, right and already far away.

There is no doubt that the summer that hasn't really been there for me is coming to an end. A weak feeling of sadness rises up as I realize that it's been almost a year since my last blog post. I'm telling myself that it surely must have been the amount of work rather than the lack of exciting things that kept me from writing.

Outside I try to enjoy the last signs of summer. But it's already dark now at 8PM and it's getting cold. I quickly  finish what's left of my beer before I go inside.

Saturday, October 16, 2010

Short Status Review for Technical Blog

Markdown syntax is really helpful when you need to create structured text. I'm having a lot of problems in the WYSIWYG-Editors of all the blog portals when dealing with tags, escaping and code blocks. For example wanting to talk about the [sourcecode] tag and later having an actual [sourcecode] ... [/sourcecode] listing will not work in Wordpress. A nice article about the dilemma with WYSIWYG-Editors can be found here.

In Markdown you simply indent the sourcecode by 4 spaces and don't need to worry about escaping characters or tags. As the Markdown Reference puts it nicely:

This makes it very easy to include example HTML source code using Markdown. [...] Regular Markdown syntax is not processed within code blocks. E.g., asterisks are just literal asterisks within a code block. This means it’s also easy to use Markdown to write about Markdown’s own syntax.

The only downside is that in standard Markdown you cannot add the class for syntax highlighting on the <pre> that is generated. Instead of indenting you could also go with a "plain" HTML block:

<pre class="brush: javascript">
    for(var i=0; i<n; i++){
      bounds.extend(markers[i].getPosition());
    });
</pre>

Unfortunately this doesn't work as the less-sign is not automatically converted to its HTML entity because within a HTML block no markdown parsing is made.

In the simplest workaround you would simply replace all ampersands and brackets with the verbose HTML entities. But this kind of defeats Markdown's philosophy of being as easy-to-read and easy-to-write as feasible. So I will take a look at some of Markdown's dialects and extensions, like Maruku, as well as other lightweigt markup languages like Textile.

Chosing a Technical Blogging Portal

Recently I have thought of creating an extra blog for the more technical stuff I post, i.e. program listings and solutions to problems. Those kind of posts usually include some source code that I want to be displayed as preformated text and with syntax highlighting. So I looked at the source code posting features of three of the most popular blogging platforms:

  • Blogger.com
  • WordPress.com
  • Posterous.com

What I did in Blogger so far (as you can see in my older posts) is to simply change the font type to Courier and decrease the font size. That kind of works for small listings, but doesn't look pretty. It get's really messy when you try to post longer lines of source code though. To improve things and get syntax highlighting working what you can do is modify the header part of your template to include a javascript highlighter. Alex Gorbatchev's SyntaxHighlighter seems to be a very popular choice. It is self contained, brings 23 Syntaxes with it and is used by big players like Apache, Yahoo and even Wordpress.

Following the installation instructions you must do the following to get it running reference the core javascript, css and theme files (3 lines) references all the syntaxes that you need (up to 23 lines) set blogger.com mode (and other default mode) and then call the syntax highlighter javascript function (>=2 lines) The large number of lines may seem intimidating at first, but it's pretty much just javascript and css references and you don't need all the files. The actual source code is then embedded in pre or javascript tags. Customization parameters can be passed class values on that tag.

As mentioned above WordPress.com includes Alex Gorbatchev's Syntax higlighter by default, which is nice; the usage is even simplified as instead of using the above HTML tags you can just wrap your source code in [sourcecode] tags where you also put some the options. Take a look at the support page. Example:

    [sourcecode]
    This is a short snippit of code with padlinenumbers set to 4.
    [/sourcecode]

Pretty neat and not as verbose as using pure HTML. Posterous goes a similar way, but seems to have problems with line spacing. And the HTMl editor is really not that usable, especially if you created a blog by E-Mail. But Posterous supports markdown syntax out of the box now, which is kinda neat; you just have to wrap the (markdown) content in tags. That let's you embed source code in "regular" markdown syntax by indenting it (pitfall: at least 4 spaces for posterous). Language is set up with a she-bang. So you would have:

    #!c++
    void main(){
      cout << "hello world!";
    }

As mentioned before, though, the HTML editor is a pain to use and won't work if you sent your markdown by E-Mail; I think it's a bug. Still having the markdown option built-in is nice. Blogger.com and WordPress.com won't allow you to write your posts in markdown.

In conclusion, SyntaxHighlighter seems to provide very nice looking code listings and gives you a lot of configuration options. If you don't want to mess with the HTML of your layout files go with WordPress.com that gives you easier access to it. If you want to write markdown online or in the email your only choice seems to be Posterous. But if you can live with writing your markdown and running it through a HTML converter you could use every blogging service here. Overall Wordpress.com seems to be the winner for maintaining a technical blog. So I probably will be looking into Wordpress for my technical blog that I plan to create. Opinions?

Colophon

I have added the above mentioned changes to my blogger template and used markdown to reformat this blog, parse it and then paste the HTML. My "source" markdown looks as follows:

<pre class="brush: c++">
    void main(){
      cout << "hello world!";
    }
</pre>

Wednesday, August 18, 2010

About blog writing and why it's important for me

I realize it has been almost 5 months since I wrote the last article on this blog. I also realize that it is not that easy to regularly write articles and that might be reason I haven't followed up until now.  Finally I have come to the conclusion that despite all of that I should continue writing articles and do so more often for the following reasons:

First, in the plethora of RSS-feeds and podcast I regularly listen to entrepreneurs emphasize how important good writing skills are, especially being able to write concisely. "Hire good writers", says 37 Signals in their book Getting Real because good writing skills will pay off. Or like the English proverb goes:  "The quill is mightier than the sword".  And it is only by writing that you will get better at writing. So writing regularly on your blog makes a good practice.

A big advantage of writing on your blog is that you practice the entire writing process. You will do  drafting, revising and fine-tuning before you publish your post. Why? Because virtually everyone might read the stuff you put on your blog. And if you go through the pain of keeping a blog it must be way better than any Twitter micro-content. Otherwise your blog wouldn't have the right to exist. It's almost the same phenomenon as with open source software where programmers pay attention to good design and style for similar reasons.

Second, by writing a blog you are effectively creating a personal brand. Your blog becomes a showcase of you and your work.  At the same time, however, you can leverage your blog for marketing your internet products. That can be a of real advantage if you need to push your internet site's traffic and ranking. It's like free SEO and advertisements together.

Lastly, I think that reviewing your old blog entries is real fun. Reading that one or two year old text that you ones wrote makes you kinda proud. In the end you're doing it for yourself so that writing a blog still makes sense if you don't have an audience.

For all of above reasons I have decided to create this blog entry and continue adding more in the future.  Surely I yet have to learn how to write concisely because this text could probably be half the size. I should practice more. But for now I'm going with Mark Twain's excuse: "I didn't have the time to write a short letter, so I wrote a long one instead."

Saturday, May 29, 2010

Making VIM more TextMate like


TextMate is supposedly the text editor for MacOS to have. It's used by many Rails developers and I must admit it's quite slick and fast. It feels like a polished and better Emacs in my opinion and takes many of its keyboard shortcuts.  Unfortunately it's closed source, costs money and is only available on the MacOS platform.

I have converted back to VIM (I am using the MacVIM version). One of  features of TextMate that I am missing is the project drawer. Fortunately you can extend VIM with plugins. I have tried two plugins: Project and NERDTree. If you want something TextMate like go with NERDTree. You get a directory pane at the left, from which you can easily find and open files.

That's quite fine, but as a TextMate fan you will be missing the command line mate program to start with a directory "drawn out". I wrote a simple shell script to mimic that behavior and now typing 'vmate' behaves like its Mac OS counterpart:

function vmate(){
  if [ -d $1 ]; then
    mvim -c ":NERDTree $1"
  else
    mvim $1
  fi
}

To open a directory in project mode simply pass directory path to vmate. If you doing any Rails development be sure to check out the great rails.vim plugin.