<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">

 <title>Dr. Michiel Overeem</title>
 <link href="https://www.movereem.nl/atom.xml" rel="self"/>
 <link href="https://www.movereem.nl/"/>
 <updated>2026-03-03T16:21:18+00:00</updated>
 <id>https://www.movereem.nl/</id>
 <author>
    <name>Michiel Overeem</name>
    <email>michiel@movereem.nl</email>
 </author>

 
    <entry>
	    <title>The Art of Computer Programming - part 2 - MMIX and fundamental programming techniques</title>
	    <link href="https://www.movereem.nl/the-art-of-computer-programming-part2"/>
        <updated>2017-03-18T00:00:00+00:00</updated>
 	    <id>https://www.movereem.nl/the-art-of-computer-programming-part2</id>
		<content type="html">&lt;p&gt;I set out to read &lt;a href=&quot;http://www-cs-faculty.stanford.edu/~uno/taocp.html&quot;&gt;The Art of Computer Programming&lt;/a&gt; this year. 
In &lt;a href=&quot;http://www.movereem.nl/topic.html#taocp&quot;&gt;these blog posts&lt;/a&gt; I will report on the progress.
Mostly for me, but maybe someone finds it fun to read :)&lt;/p&gt;

&lt;h3 id=&quot;sections-13-volume-1-fascicle-1---mmix&quot;&gt;sections 1.3’ (Volume 1 Fascicle 1) - MMIX&lt;/h3&gt;

&lt;p&gt;The section on MMIX, the language that Knuth uses throughout the book for his code samples.
Although it seems a strange choice, a machine language for samples, I can appreciate the reasons.
It is not that hard, and it shows a lot of how the machine works.&lt;/p&gt;

&lt;p&gt;Nice from a theoretical perspective, but to be honest, I skipped/skimmed these parts.
Although I typed &lt;a href=&quot;https://github.com/overeemm/the-art-of-computer-programming/blob/master/Section1.3/Hello.mms&quot;&gt;some&lt;/a&gt; &lt;a href=&quot;https://github.com/overeemm/the-art-of-computer-programming/blob/master/Section1.3/Prime.mms&quot;&gt;programs&lt;/a&gt;, I didn’t put to much effort in this part.&lt;/p&gt;

&lt;h3 id=&quot;sections-14-volume-1-fascicle-1-and-144-and-145-volume-1-third-edition---fundamental-programming-techniques&quot;&gt;sections 1.4’ (Volume 1 Fascicle 1) and 1.4.4 and 1.4.5 (Volume 1 Third Edition) - Fundamental programming techniques&lt;/h3&gt;

&lt;p&gt;These sections are a bit more general, and I really liked the ideas in it.&lt;/p&gt;

&lt;p&gt;In 1.4.1’ Knuth explains the steps for writing a program with subroutines as follows:&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;Start with the problem: what wil be the plan.&lt;/li&gt;
  &lt;li&gt;Write a top-down version of the solution. First the general flow, while putting details in subroutines (that are not yet implemented). Then the subroutines are filled in. In this step, any language can be used. The interesting idea is that this version is an exploration, and the result is not used except for knowledge discovery.&lt;/li&gt;
  &lt;li&gt;After that initial exploration, a second version can be written. This time in a real programming language, but bottom-up. Write the subroutines, and then the main routine that combines them.&lt;/li&gt;
  &lt;li&gt;The final step is the reexamination of the solution. Depending on the state, return to step 1 or 2 and refine.&lt;/li&gt;
  &lt;li&gt;After the reexamination, it is time to finalize the version by running and inspecting it. Or debugging as Knuth says. This is necessary to observe the behaviour at run-time.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Step 1 reminded my of &lt;a href=&quot;http://www.movereem.nl/notes-from-the-class-advanced-agile-developme&quot;&gt;Alistair Cockburn’s view: design as knowledge acquisition&lt;/a&gt;.
Choosing something else than a programming language, or maybe a programming language other than your normal language frees you from the feeling that you are writing production code.
It gives opportunity for knowledge acquisition without the burden of quality.&lt;/p&gt;

&lt;p&gt;Step 3 is of course non-trivial: when to stop, when is enough enough.
This is something that one can only learn through experience, I guess.&lt;/p&gt;

&lt;p&gt;Step 4 might be something that we often forget to do in a controlled fashion.
A run, not just to validate the functionality and correctness, but also a run to validate the performance and other aspects.
Maybe automated tests can improve this: a controlled fashion that is part of source control and can be ran on every build.
This prevents errors that slip with later changes.&lt;/p&gt;

&lt;p&gt;Secion 1.4.2’ was also interesting, coroutines versus multiple passes.
It reminded me of generators, iterators, reactive programming, etc.
Much to think about!
I might write another blog about that in the future.&lt;/p&gt;

</content>
	</entry>
 
    <entry>
	    <title>The Art of Computer Programming - part 1</title>
	    <link href="https://www.movereem.nl/the-art-of-computer-programming-part1"/>
        <updated>2017-01-05T00:00:00+00:00</updated>
 	    <id>https://www.movereem.nl/the-art-of-computer-programming-part1</id>
		<content type="html">&lt;blockquote class=&quot;twitter-tweet&quot; data-lang=&quot;en&quot;&gt;&lt;p lang=&quot;en&quot; dir=&quot;ltr&quot;&gt;Goal for 2017: read through this massive work. &lt;a href=&quot;https://twitter.com/hashtag/knuth?src=hash&quot;&gt;#knuth&lt;/a&gt; &lt;a href=&quot;https://twitter.com/hashtag/art?src=hash&quot;&gt;#art&lt;/a&gt; &lt;a href=&quot;https://twitter.com/hashtag/computerprogramming?src=hash&quot;&gt;#computerprogramming&lt;/a&gt; &lt;a href=&quot;https://twitter.com/hashtag/taocp?src=hash&quot;&gt;#taocp&lt;/a&gt; &lt;a href=&quot;https://t.co/DGh5XnVg8X&quot;&gt;pic.twitter.com/DGh5XnVg8X&lt;/a&gt;&lt;/p&gt;&amp;mdash; Michiel Overeem (@michielovereem) &lt;a href=&quot;https://twitter.com/michielovereem/status/811228070740893699&quot;&gt;December 20, 2016&lt;/a&gt;&lt;/blockquote&gt;
&lt;script async=&quot;&quot; src=&quot;//platform.twitter.com/widgets.js&quot; charset=&quot;utf-8&quot;&gt;&lt;/script&gt;

&lt;p&gt;I have these books on my shelve since graduation (2007), and a couple of weeks ago I finally set the goal to actually read them. 
It is a challenge for myself to see if I can read all volumes, comprehend them (more or less), and get something useful out them.
So in this serie of blogs I will summarize, share notes, and tell the world about my progress.
I have not set a deadline or a schedule, I am just going with the flow.
And in the spirit of &lt;a href=&quot;https://www.amazon.com/Pragmatic-Programmer-Journeyman-Master/dp/020161622X&quot;&gt;The Pragmatic Programmer&lt;/a&gt; I will use this challenge as an opportunity to learn some F#.
Code snippets and what more can be found in the &lt;a href=&quot;https://github.com/overeemm/the-art-of-computer-programming&quot;&gt;github repo&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;These books are impressive. 
And to be honest a little intimidating. 
I like reading and learning, but I’m not sure if I can follow all this stuff. 
But we will see.&lt;/p&gt;

&lt;h3 id=&quot;sections-11-and-12-volume-1-third-edition&quot;&gt;sections 1.1 and 1.2 (Volume 1 Third Edition)&lt;/h3&gt;

&lt;p&gt;Section 1.1 is labeled &lt;strong&gt;Algorithms&lt;/strong&gt;, and this first section was fun. 
It contained history (which I like), a little background, and some general explanation.
An example of the background: the origin of the word &lt;em&gt;algorithm&lt;/em&gt;. 
I sure didn’t know that its origins are in the name of the Persian author &lt;a href=&quot;https://en.wikipedia.org/wiki/Muhammad_ibn_Musa_al-Khwarizmi&quot;&gt;al-Khwārizmī&lt;/a&gt;.
An algorithm is a receipe, procedure, a routine. But how to know when something is an algorithm?
Knuth gives the following list:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Finiteness. An algorithm should terminate in a finite number of steps. 
A finite number of steps could mean a large number of steps, but it should stay reasonable.&lt;/li&gt;
  &lt;li&gt;Definiteness. Every step should be precisely defined. 
The definition should have rigour and no ambiguity. 
This is where formally defined languages like programming languages are useful.&lt;/li&gt;
  &lt;li&gt;Input. Algorithms have input: zero or more inputs.&lt;/li&gt;
  &lt;li&gt;Output. And they have one more outputs.&lt;/li&gt;
  &lt;li&gt;Effectiveness. Effective here is defined as using basic operations such that they can be done exactly and in finite time.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;What is a good algorithm?
We have to look at elegance, the number of steps, simplicity, and more.&lt;/p&gt;

&lt;p&gt;The book gives an example by lookinmg at &lt;a href=&quot;https://github.com/overeemm/the-art-of-computer-programming/blob/master/Algorithm1.1E/Program.fs&quot;&gt;Euclid’s algorithm&lt;/a&gt;: find the greatest common divisor of two integers.&lt;/p&gt;

&lt;p&gt;Section 1.2 is &lt;strong&gt;Mathematical Preliminaries&lt;/strong&gt; and for this section I followed the advise of Knuth: skimming these sections and familiarizing myself with the math.
I did not do any exercises.
To be honest, I am more interested in the computer programming parts and less in the math part, so I will regard this as reference material.
The subsections of 1.2 covered among other things numbers, powers, logarithms, sums, products, permutations, factorials, fibonacci, the analysis of algorithms, and asymptotic representations.&lt;/p&gt;

&lt;p&gt;As an example of the analysis of an algorithm, the &lt;a href=&quot;https://github.com/overeemm/the-art-of-computer-programming/blob/master/Algorithm1.2.10M/Program.fs&quot;&gt;algorithm for finding the maximum&lt;/a&gt; is given.&lt;/p&gt;

&lt;p&gt;The last subsection was most interesting as it covered the &lt;a href=&quot;https://en.wikipedia.org/wiki/Big_O_notation&quot;&gt;big-O notation&lt;/a&gt;.
And it made my think about another book in my digital shelve: &lt;a href=&quot;https://bigmachine.io/products/the-imposters-handbook/&quot;&gt;The Imposter’s Handbook&lt;/a&gt;.
In this book Rob Conery dives into different computer science topics for those who never studied computer science.
And to be honest, his explanations also make sense for the ones that did study computer science (yep, that’s me).
In this case I read Knuth’s subsection and after that I read what Rob Conery said about it.
Knuth is pure and comprehensive with all the math, while Rob gives a rather short overview, but they reinforce each other and I am good to go :)&lt;/p&gt;

</content>
	</entry>
 
    <entry>
	    <title>bookreview - Learning JavaScript Design Patterns</title>
	    <link href="https://www.movereem.nl/bookreview-learning-javascript-design-patterns"/>
        <updated>2014-02-25T00:00:00+00:00</updated>
 	    <id>https://www.movereem.nl/bookreview-learning-javascript-design-patterns</id>
		<content type="html">&lt;p&gt;&lt;strong&gt;Learning JavaScript Design Patterns&lt;/strong&gt; by &lt;em&gt;Addy Osmani&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;JavaScript is everywhere. We cannot ignore it. And I even think it is foolish to ignore it. Like &lt;a href=&quot;http://www.hanselman.com/blog/IfYouHadToStartOverWhatTechnologiesWouldYouLearnIn2014.aspx&quot;&gt;Scott Hanselman&lt;/a&gt;, I think everyone should learn JavaScript. The web is here to stay, and we should embrace it. And if you are doing web, client side stuff, you cannot ignore JavaScript. The frontend of many applications is much larger then it was a few years ago. You could build a web application, and add a little JavaScript for the effect. Nowadays, there is a lot more to be done.&lt;/p&gt;

&lt;p style=&quot;float:right; width: 200px; margin-left: 20px;&quot;&gt;
  &lt;img src=&quot;/images/learningjavascriptdesignpatterns.png&quot; alt=&quot;Learning JavaScript Design Patterns&quot; title=&quot;Learning JavaScript Design Patterns&quot; style=&quot;width:200px;&quot; /&gt;
&lt;/p&gt;

&lt;p&gt;And that is exactly why this book is important. Because JavaScript was seen as a script language, nobody thought about patterns, modules, organization, etc, etc. But if you have a few hundred, or a few thousand lines of JavaScript, you will need organization. And then you will need design patterns. Most software developers will be familiar with patterns. There are some classic books that will tell you everything. But those books are mostly aimed at Java, or C#. Altough JavaScript is object-oriented, its lack of classes and prototypical inheritance asks for a different description of patterns.&lt;/p&gt;

&lt;p&gt;This book will give you everything to get started. It is split into two parts. The first part describes what patterns are, how patterns are found and described, and how to write your own patterns. I think that it will be usefull for experienced developers and larger teams that want to write up their own patterns. The second part is more of a reference. You can find many patterns and various ways to implement them. It is something that I will use to look up details of patterns. But it will also give you inspiration to solve you problems in different ways.&lt;/p&gt;

&lt;p&gt;I would recommend this book to every one that is serious about programming JavaScript. Let us look at the language as professional developers, and force ourself to develop maintainable code.&lt;/p&gt;

&lt;p&gt;Find the book at &lt;a href=&quot;http://shop.oreilly.com/product/0636920025832.do&quot;&gt;http://shop.oreilly.com/product/0636920025832.do&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Disclaimer: I have joined the O’Reilly Blogger Review Program (&lt;a href=&quot;http://oreilly.com/bloggers/&quot;&gt;http://oreilly.com/bloggers/&lt;/a&gt;). It means that I receive free books that I review. I am not forced to write nice things, so this review is an honest one.&lt;/em&gt;&lt;/p&gt;

</content>
	</entry>
 
    <entry>
	    <title>Certified Rx Developer</title>
	    <link href="https://www.movereem.nl/certified-rx-developer"/>
        <updated>2014-02-15T00:00:00+00:00</updated>
 	    <id>https://www.movereem.nl/certified-rx-developer</id>
		<content type="html">&lt;p style=&quot;float:right; width: 200px; margin-left: 20px;&quot;&gt;
  &lt;img src=&quot;/images/certified-rx-sticker.jpg&quot; alt=&quot;Certified Rx Developer&quot; title=&quot;Certified Rx Developer&quot; style=&quot;width:200px;&quot; /&gt;
&lt;/p&gt;

&lt;p&gt;My current company gives every employee a training budget. This budget can be spend on every training that you like, there is no need to ask permission up front (but how you spend it is part of the evaluation). So when &lt;a href=&quot;http://en.wikipedia.org/wiki/Erik_Meijer_(computer_scientist)&quot;&gt;Erik Meijer&lt;/a&gt; asked on &lt;a href=&quot;https://twitter.com/headinthebox/status/428851131003830272&quot;&gt;twitter&lt;/a&gt; if people wanted to follow a &lt;em&gt;certified Rx developer&lt;/em&gt; training, I had a training to spend my money on.&lt;/p&gt;

&lt;p&gt;I had already taken the coursera course &lt;a href=&quot;https://www.coursera.org/course/reactive&quot;&gt;Principles of Reactive Programming&lt;/a&gt; (which is highly recommended!), but the Rx stuff had not really sunk in yet. That is why I started &lt;a href=&quot;/presenting-GrapNode/&quot;&gt;a new project&lt;/a&gt;. But still, the opportunity to learn from Erik, the one that started the whole Rx movement (years ago)? I had to be there :-)&lt;/p&gt;

&lt;p&gt;This blog post is a combination of a summary of Rx and my experience following the &lt;em&gt;certified Rx developer&lt;/em&gt; training. Let me start with the last, my experience. Erik is a great teacher. Not only is he super smart, he is also funny, entertaining and a nice person to chat with. But more, he is a real hacker, not some scientist that cannot write code. He honestly ended our lunch to start hacking on some idea (with &lt;em&gt;goto&lt;/em&gt;’s for crying out loud)!&lt;/p&gt;

&lt;p&gt;So, what is Rx anyway? I could point you to &lt;a href=&quot;http://www.introtorx.com&quot;&gt;this great introduction&lt;/a&gt;, or to &lt;a href=&quot;https://github.com/Reactive-Extensions&quot;&gt;the code&lt;/a&gt;. But it might be fun to see if I can explain some things. I like the path that Erik took, which started not with Rx, but with monads. Those things always sound awful. In the Haskell community, there is a quote saying that they should have called those things &lt;em&gt;warm fuzzy things&lt;/em&gt;, because that sounds so much more fun. But monad it is. But before we get to monads, let us first look at exceptions.&lt;/p&gt;

&lt;h3 id=&quot;exceptions&quot;&gt;Exceptions&lt;/h3&gt;

&lt;p&gt;When programming C# and JavaScript (my primarly languages), exceptions are used to abort the execution when something happends that you did not expect. Which exceptions a method might throw is not visible from the outside. The method signature does not tell you about those cases (in Java you have checked exceptions, not in C#). So when we have a method like this, the signature is lying to us!&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;#c#
private int DoSomething(int number)
{
  if(number &amp;lt; 0) {
    throw new Exception(&quot;No negative numbers allowed.&quot;);
  }

  return number * number;
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;It tells us that this method takes a integer as argument, and returns an integer. There is however, another possible outcome: the exception. So the effect of failing is hidden from us. To make this more explicit, we introduce the &lt;em&gt;Try&lt;/em&gt; type. Using this will give us the following method (implementing the Try type is left as an exercise to the reader).&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;#c#
private Try&amp;amp;lt;int&amp;amp;gt; DoSomething(int number)
{
  if(number &amp;lt; 0) {
    return Try { Failure = new Exception(&quot;No negative numbers allowed.&quot;) };
  }
 
  return Try { Success = number * number };
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This signature shows us that the method has two possible outputs: an integer, or an error. We have made the possibility of failure explicit.&lt;/p&gt;

&lt;h3 id=&quot;the-four-essential-effects-in-programming&quot;&gt;The four essential effects in programming&lt;/h3&gt;

&lt;p style=&quot;float:right; width: 400px; margin-left: 20px;&quot;&gt;
  &lt;img src=&quot;/images/rx-erik.jpg&quot; alt=&quot;Erik Meijer&quot; title=&quot;Erik Meijer&quot; style=&quot;width:400px;&quot; /&gt;
&lt;/p&gt;

&lt;p&gt;The Try type is essential for programming, because we use it for synchronous, single values. If we move from single values to many values we need to use another type, the Iterable type. In C#, this is the &lt;em&gt;Enumerable&lt;/em&gt; type. But this type is still synchronous. This means that asking values from an Iterable blocks the execution till all values are given. You are pulling values from the iterable and that blocks the execution. When you want to develop a scalable, responsive system, blocking is not done: asynchronous is the way to go.&lt;/p&gt;

&lt;p&gt;If we move from a synchronous single value to an asynchronous single value, we need yet another type, the &lt;em&gt;Future&lt;/em&gt; type. This type makes it explicit that we have latency. It might take a while for a value to be available. In C#, this is done using the &lt;em&gt;Task&lt;/em&gt; type, which corresponds with Futures. In JavaScript we have the Future/Promise objects.&lt;/p&gt;

&lt;p&gt;The last step is from a asynchronous single value to multiple values, asychronously. That is where the &lt;em&gt;Observable&lt;/em&gt; type comes into play. And that, that is the heart of Rx. To summarise these four effects:&lt;/p&gt;

&lt;table class=&quot;content&quot;&gt;
  &lt;tr&gt;
    &lt;td&gt;&lt;/td&gt;&lt;th&gt;Single&lt;/th&gt;&lt;th&gt;Many&lt;/th&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;th&gt;Synchronous&lt;/th&gt;&lt;td&gt;Try&amp;lt;T&amp;gt;&lt;/td&gt;&lt;td&gt;Iterable&amp;lt;T&amp;gt;&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;th&gt;Asynchronous&lt;/th&gt;&lt;td&gt;Future&amp;lt;T&amp;gtl;&lt;/td&gt;&lt;td&gt;Observable&amp;lt;T&amp;gt;&lt;/td&gt;
  &lt;/tr&gt;
&lt;/table&gt;

&lt;p&gt;But what about monads? And why is Rx so special? Untill now I only explained four effects and the corresponding types. Let’s move on to monads now.&lt;/p&gt;

&lt;h3 id=&quot;monads&quot;&gt;Monads&lt;/h3&gt;

&lt;p&gt;So what is a monad? I do not pretend to understand it better then others, so I will not try to write a formal (or informal for that matter) explanation. Search google if you want the real stuff, or &lt;a href=&quot;http://stackoverflow.com/questions/2704652/monad-in-plain-english-for-the-oop-programmer-with-no-fp-background/2704795#2704795&quot;&gt;read this one&lt;/a&gt;! For now, all you need to grasp is that a monad is a datastructure that comes with a set of functions, of which I will give you three examples in C#:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;#c#
public static Something&amp;amp;lt;U&amp;amp;gt; FlatMap(this Something&amp;amp;lt;T&amp;amp;gt; source, Func&amp;amp;lt;T, Something&amp;amp;lt;U&amp;amp;gt;&amp;amp;gt; func)

public static Something&amp;amp;lt;U&amp;amp;gt; Map(this Something&amp;amp;lt;T&amp;amp;gt; source, Func&amp;amp;lt;T, U&amp;amp;gt; func)   

public static Something&amp;amp;lt;U&amp;amp;gt; Filter(this Something&amp;amp;lt;T&amp;amp;gt; source, Func&amp;amp;lt;T, bool&amp;amp;gt; func)   
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Now, these types are very general. But you could substitute the generic &lt;em&gt;Something&lt;/em&gt; type with a couple of familiar types. For instance with &lt;em&gt;Try&lt;/em&gt;. Or with &lt;em&gt;Future&lt;/em&gt;, &lt;em&gt;Iterable&lt;/em&gt;. You might even substite it with &lt;em&gt;Observable&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;A monad is a general data structure that gives you a set of common operations (others are &lt;em&gt;zip&lt;/em&gt; and &lt;em&gt;flatten&lt;/em&gt;). From them, you can build lots of stuff. You can filter, combine and project your data. And that is the power of monads. They give you a basic set of functions that work on all four effects: synchronous, asynchronous, single or many.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;By the way, the names FlatMap, Map and Filter seem new. But just put them next to the &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/bb397926.aspx&quot;&gt;LINQ&lt;/a&gt; functions SelectMany, Select and Where. They do look familiar now, don’t they?&lt;/em&gt;&lt;/p&gt;

&lt;h3 id=&quot;rx&quot;&gt;Rx&lt;/h3&gt;

&lt;p&gt;Rx thus fills in the last quadrant, the missing piece: many asynchronous values. Now that I write it down, it all seems very simple and nothing new in general. But the Rx library gives you an implementation of the &lt;em&gt;Observable&lt;/em&gt; type, with all the monad functions implemented. It allows you to turn any stream of data (from a database, from a webservice, from an input device, from an user) into an Observable that you can then filter, combine and project. And all of this is asynchronous by default. You are forced to think about latency, which is a good thing if you want your app to stay responsive.&lt;/p&gt;

&lt;p&gt;In the training, Erik went on the give some example use cases. Projecting earthquakes on a map for instance. Or updating the average earthquake strength per region while earthquake data comes in. The guys at github used Rx to build a &lt;a href=&quot;http://www.reactiveui.net&quot;&gt;reactive UI&lt;/a&gt;. Netflix &lt;a href=&quot;https://github.com/Netflix/RxJava&quot;&gt;uses&lt;/a&gt; Rx. &lt;a href=&quot;https://squareup.com&quot;&gt;Square&lt;/a&gt; (could not find any source but Erik told us) and &lt;a href=&quot;https://github.com/soundcloud/RxJava&quot;&gt;SoundCloud&lt;/a&gt; as well.&lt;/p&gt;

&lt;p&gt;One thing you have to keep in mind, is that Rx is not about concurrency, or parallelism. It is about asynchronous computations. However, you could use it for concurrency and parallelism, using the schedulers that they implemented. But that is not the key point.&lt;/p&gt;

&lt;h3 id=&quot;take-aways&quot;&gt;Take aways&lt;/h3&gt;

&lt;p&gt;So what are the take aways from this training and Rx in general? Let me offer a small list of things that I can think of:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Programming is fun, seeing Erik enjoy coding and talking about it was such an inspiration.&lt;/li&gt;
  &lt;li&gt;Rx is not hard, it makes stuff easier because you can use the same toolset that you use with synchronous or single value sources.&lt;/li&gt;
  &lt;li&gt;Asynchronousity and latency are effects that we need to make explicit.&lt;/li&gt;
  &lt;li&gt;Futures and promises are also not that hard. They are cleaner then callbacks as a pattern.&lt;/li&gt;
&lt;/ul&gt;

</content>
	</entry>
 
    <entry>
	    <title>Automating JavaScript testing in a Microsoft environment</title>
	    <link href="https://www.movereem.nl/automating-javascript-testing-in-a-microsoft-environment"/>
        <updated>2014-02-08T00:00:00+00:00</updated>
 	    <id>https://www.movereem.nl/automating-javascript-testing-in-a-microsoft-environment</id>
		<content type="html">&lt;p&gt;Writing software with JavaScript can be a lot like writing software in the dark. There is no static typing and no compiler, most errors are not found untill the code is executed. Hopefully that is in a test environment, and not when a user is working with your software. I think that a lot of emphasis should be on automated testing and analysing the code. At my current project, we have a rather nice setup in place to do this and guard our quality.&lt;/p&gt;

&lt;p&gt;The thing that caused a bit more work is that we are working in a Microsoft environment. So we have Visual Studio (2013) and TFS (2013). The rest of our project consists of C# and we like to work in Visual Studio. Any tooling that we add is preferred to integrate with our current tools. We already have gated checkins and continous integration builds for the .NET code. The CI build runs everything that is in the gated checkin build plus more (and slower) tests.&lt;/p&gt;

&lt;h3 id=&quot;code-analysis&quot;&gt;Code analysis&lt;/h3&gt;

&lt;p&gt;We started without any code analysis on our JavaScript. We had to do lots of testing to find bugs before checking in/ releasing/ deploying. And we started to get more and more different coding patterns and styles. We wanted to get rid of this time, therefore we integrated &lt;a href=&quot;http://eslint.org&quot;&gt;ESLint&lt;/a&gt; into our development process. There are more linters for JavaScript available. ESLint however was started with the promise to enable people to write their own rules, specific for their architecture. &lt;a href=&quot;http://www.nczonline.net/&quot;&gt;Nicholas Zakas&lt;/a&gt; being one of our inspirations while evolving our architecture, the decision for ESLint was made rather quick.&lt;/p&gt;

&lt;p&gt;Running ESLint on your code is one thing, integrating and forcing it to pass on every checkin is another. What we did is building a C# Unit test that executes ESLint on our files. It fails when there is an error or warning, and passes when everything is fine. This test is run during the gated checkin, so we know that the code in our source control system is following our rules.&lt;/p&gt;

&lt;p&gt;We started with some debt, as we needed to cleanup. What we did was enabling all rules that passed, and worked from there to meet our goals (a set of rules and limits that we decided on). This allowed us to move gradually to a more stricter rule set without slipping and adding more stuff that we needed to cleanup one day.&lt;/p&gt;

&lt;p&gt;Rules that really help us to keep a clean code base are things like unused variables, naming conventions, scope issues, using &lt;em&gt;strict&lt;/em&gt; mode and lots more. Things that we find less important are &lt;a href=&quot;http://eslint.org/docs/rules/no-use-before-define.html&quot;&gt;order&lt;/a&gt; (using vars that are assigned further on the file) and &lt;a href=&quot;http://eslint.org/docs/rules/one-var.html&quot;&gt;defining all vars on top of the function&lt;/a&gt;. But it sure helps us to keep things nice and clean.&lt;/p&gt;

&lt;h3 id=&quot;unit-tests&quot;&gt;Unit tests&lt;/h3&gt;

&lt;p style=&quot;float:right; width: 400px; margin-left: 20px;&quot;&gt;
  &lt;a href=&quot;http://www.leonardscomic.com/comic/68/unit-testing/&quot;&gt;
    &lt;img src=&quot;/images/unit_testing.png&quot; alt=&quot;Unit testing&quot; title=&quot;From Leonard&apos;s Comic - Unit Testing&quot; style=&quot;width:400px;&quot; /&gt;
  &lt;/a&gt;
  &lt;span style=&quot;font-style: italic;&quot;&gt;From Leonard&apos;s Comic - Unit Testing&lt;/span&gt;
&lt;/p&gt;

&lt;p&gt;A test suite was also something on our todo list. We started out with &lt;a href=&quot;https://qunitjs.com&quot;&gt;QUnit&lt;/a&gt; and a static html file to run the tests. QUnit is a simple test framework, with few concepts. That’s why we like it so much, it is dead simple. There are many more frameworks, so go find the one that suits you.&lt;/p&gt;

&lt;p&gt;The first approach, using one static html file for all QUnit tests, became soon unmanageable. And we wanted to execute those tests in our build. So we looked at some test runners for Visual Studio and TFS. We already use Resharper for Visual Studio and they have some support for running JavaScript tests. But is far from complete, for instance it misses basic support for &lt;a href=&quot;http://RequireJS.org&quot;&gt;RequireJS&lt;/a&gt;. We also found &lt;a href=&quot;http://chutzpah.codeplex.com&quot;&gt;Chutzpah&lt;/a&gt;, an open source project with much more features and support. With Chutzpah, we could get rid of our html files and execute the tests from the build. Chutzpah can run the tests in &lt;a href=&quot;http://RequireJS.org&quot;&gt;PhantomJS&lt;/a&gt; or in the browser. Running them in the browser gives us much better support for debugging and solving problems.&lt;/p&gt;

&lt;p&gt;In previous versions, Chutzpah also didn’t really have support for RequireJS, the module loader that we use. We implemented a mock of RequireJS instead, that enabled us to run our tests and make sure that we didn’t need to modify our code. It was far from beautiful. We had a double administration of dependencies (both in RequireJS and in QUnit tests). But hurray, the latest version has &lt;a href=&quot;http://matthewmanela.com/blog/chutzpah-3-0-mocha-requirejs-and-more/&quot;&gt;support for RequireJS&lt;/a&gt;. We deleted our mock and now we can really run our tests the way we want.&lt;/p&gt;

&lt;p&gt;There is one thing that made our setup a little more difficult. We like to make separate Visual Studio Projects for code and test-code. With C# tests, this is no problem. For JavaScript, it is somewhat harder. We have our code in code-library projects, no web projects. We release and deploy through nuget packages, that’s way we do not need web projects. Our QUnit tests are in a separate code-library project under the folder &lt;em&gt;tests&lt;/em&gt; (our code is under &lt;em&gt;src&lt;/em&gt;). To make sure that RequireJS can find the files, we have a special RequireJS config for the QUnit tests, in which we use the &lt;a href=&quot;http://requirejs.org/docs/api.html#config&quot;&gt;path&lt;/a&gt; config option to point to the right source folders.&lt;/p&gt;

&lt;h3 id=&quot;integration-tests&quot;&gt;Integration tests&lt;/h3&gt;

&lt;p&gt;Another thing that we wanted to test was the JavaScript code that we generate. Our current architecture consists of generated code and framework code combined. But we wanted to make sure that certain generated code patterns were tested. Therefore we added C# tests that calls our generator and executes JavaScript tests on that code, all from PhantomJS. A hacky way of testing, but it works rather well in our case. The generated code is linted with ESLint (using a different set of rules) and then loaded in PhantomJS. We insert the test code and execute them. The result is a passing or failing test.&lt;/p&gt;

&lt;p&gt;The upside of this is that we automatically check a number of code generation patterns and know for sure that they work. The downside is that those tests are hard to debug. When we need to attach a debugger, we start PhantomJS with the debug option and connect to the right port. It works, but is far from beautifull. Lucky for us that we do not need it that much (most failing tests are solvable without attaching a debugger).&lt;/p&gt;

&lt;h3 id=&quot;code-coverage&quot;&gt;Code coverage&lt;/h3&gt;

&lt;p&gt;The last step that we took was enabling code coverage. The latest and greatest version of Chutzpah also has support for code coverage, through &lt;a href=&quot;http://Blanketjs.org&quot;&gt;Blanket.js&lt;/a&gt;. It instruments every code file and returns a report of lines that were executed.&lt;/p&gt;

&lt;p&gt;Now of course we know the downside of code coverage and that it can be misused. But the one thing that is useful, is to show you that certain code is never executed under tests. It gives some direction and level of confidence in our code. We see that it tells us something about our test level, not using code coverage would mean that we know nothing about this level except some gut feeling.&lt;/p&gt;

&lt;p&gt;First we enabled it for our QUnit tests. That was easy. &lt;em&gt;Although you need to know that the Chutzpah config file is being cached, so changing it will not always directly work. See this &lt;a href=&quot;http://chutzpah.codeplex.com/workitem/193&quot;&gt;bug&lt;/a&gt;.&lt;/em&gt; But we had some tests failing because of timeouts. That was odd. Then we saw that it were tests that not exactly tested a unit, they loaded most of the framework. And with the framework, most of the third party libraries (with both JQuery and Handlebars). Blanket.js does not really handle those files well. So we needed to exclude those files, not that we wanted coverage on them anyway. But we hit a minor missing feature in Chutzpah, excluding files for coverage does not play well with RequireJS. We made a local fix for our situation, but I am working on a pull request to get this fixed (and filled an &lt;a href=&quot;http://chutzpah.codeplex.com/workitem/201&quot;&gt;issue&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;After that we enabled coverage in our integration tests. We altered the C# code to insert Blanket.js in the generated code, and wrote some extra code to export the coverage results to disk. By then we had tens of coverage files, all telling us something about the code coverage from their point of view. A little C# console app fixed the last hurdle: combining all that information into a single coverage report, telling us how much code we covered.&lt;/p&gt;

&lt;h3 id=&quot;conclusion&quot;&gt;Conclusion&lt;/h3&gt;

&lt;p&gt;And now we have a nightly build. It runs all of our tests with code coverage enabled. It gives us two reports, a coverage file for the C# code, and html file for the JavaScript code. And all was well :-)&lt;/p&gt;

&lt;p&gt;&lt;em&gt;One thing is missing: the html file is in the drop folder. But we want it to be attached to the build report like the coverage file. If someone knows how to do this, I would love to hear!&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Any suggestions? I love to hear them!&lt;/em&gt;&lt;/p&gt;

</content>
	</entry>
 
    <entry>
	    <title>Testing if the eventloop is blocked</title>
	    <link href="https://www.movereem.nl/testing-if-the-eventloop-is-blocked"/>
        <updated>2014-01-22T00:00:00+00:00</updated>
 	    <id>https://www.movereem.nl/testing-if-the-eventloop-is-blocked</id>
		<content type="html">&lt;p&gt;In the previous post, we talked about some core concepts of node.js, one of them being the event loop.
In the first version of the GrapNode code, we did some asynchronous phantomjs stuff. That looked good, but I wanted to know for sure that the eventloop is not blocked during the 1.5 second that it takes to make a screenshot.&lt;/p&gt;

&lt;p&gt;So I added a couple of other requests handlers to my code. See how we can do this with rx? We can assign the stream of requests to a variable, filter them and subscribe to the filtered stream:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;#js
var server = new RxServer();
var requests = server.requests;

requests
  .filter(function (data) { return data.request.url === &quot;/&quot;; })
  .subscribe(function(data) {
    /* The root, returns a simple HTML page */
  });

requests
  .filter(function (data) { return data.request.url === &quot;/capture&quot;; })
  .subscribe(function(data) {
    /* Here we will perform our screencapture stuff */
  });

requests
  .filter(function (data) { return data.request.url.indexOf(&quot;/assets&quot;) === 0; })
  .subscribe(function(data) {
    /* Simple handler for static content */
  });

requests
  .filter(function (data) { return data.request.url === &quot;/time&quot;; })
  .subscribe(function(data) {
    /* Returns the server time */
  });

server.listen(8080);
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;By writing four different filters and four different subscribe handlers, we have created a basic routing mechanism.&lt;/p&gt;

&lt;p&gt;Requests for the root URL will get back a basic HTML page that include a (clientside) JavaScript file with the following code:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;#js
(function () {
  var requestTime = function () {
    var req = new XMLHttpRequest();
    req.open(&quot;GET&quot;, &quot;/time&quot;);
    req.onreadystatechange = function (oEvent) {
      if (req.readyState === 4) {
        if (req.status === 200) {
          document.getElementsByTagName(&quot;span&quot;)[0].innerText = req.responseText;
        } else {
          document.getElementsByTagName(&quot;span&quot;)[0].innerText = req.statusText;
        }
        requestTime();
      }
    };
    req.send(null);
  };
  requestTime();
})();
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Basically, this fetches the time of the server and shows it in an element. This fetching is done continuously, so when we block the event loop, the time will fall behind and start to lag. Along with this time polling, I will start the &lt;a href=&quot;http://httpd.apache.org/docs/2.2/programs/ab.html&quot;&gt;ab executable&lt;/a&gt; to do some concurrent requests for the screenshot (/capture).&lt;/p&gt;

&lt;iframe width=&quot;560&quot; height=&quot;315&quot; src=&quot;//www.youtube.com/embed/cubOIq-ak_0&quot; frameborder=&quot;0&quot; allowfullscreen=&quot;allowfullscreen&quot;&gt;
&lt;/iframe&gt;

&lt;p&gt;As one can see in the video, the timer keeps running and is not blocked by the concurrent requests for the screencapture. This basically shows that our screencapture does not block the event loop.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;There is another problem: the phantomjs bridge spawns new processes and those are limited. So we need to build a request queue and allow people to poll for their screencapture (or use socket.io to apply some realtime web).&lt;/em&gt;&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ ab -n 10 -c 1 http://127.0.01:8080/capture
  Time taken for tests:   15.673 seconds

$ ab -n 10 -c 2 http://127.0.01:8080/capture
  Time taken for tests:   9.555 seconds

$ ab -n 10 -c 5 http://127.0.01:8080/capture
  Time taken for tests:   7.379 seconds
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The results from ab show fine numbers, I guess. I am not sure yet how to read this, but hopefully, that will come later on.&lt;/p&gt;

</content>
	</entry>
 
    <entry>
	    <title>Some node concepts explained</title>
	    <link href="https://www.movereem.nl/some-node-concepts-explained"/>
        <updated>2014-01-19T00:00:00+00:00</updated>
 	    <id>https://www.movereem.nl/some-node-concepts-explained</id>
		<content type="html">&lt;p&gt;The project GrapNode is my attempt to get some experience with node.js and understand the key concepts and benefits. This short post will allow me to touch on these a little. By no means is this to be seen as the best explanation of these concepts. These are just my thoughts, and summaries of other explanations.&lt;/p&gt;

&lt;h3 id=&quot;modules&quot;&gt;Modules&lt;/h3&gt;

&lt;p&gt;Node.js uses a simple module system, files are modules and modules are files. A module can be loaded through the function require. In the first post this function was used to require the http module:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;#js
var http = require(&apos;http&apos;);
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This call will look for the module (or file) &lt;em&gt;http&lt;/em&gt; and load it. Where will it look? The &lt;a href=&quot;http://nodejs.org/api/modules.html#loading_from_node_modules_Folders&quot;&gt;documentation&lt;/a&gt; explains that it will do a couple of things:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Is there a core module with this name (which there is in the case of &lt;em&gt;http&lt;/em&gt;).&lt;/li&gt;
  &lt;li&gt;If the argument starts with ‘/’, it is an absolute path and the file is searched for on disc.&lt;/li&gt;
  &lt;li&gt;If the argument starts with ‘./’, the path is relative to the current folder.&lt;/li&gt;
  &lt;li&gt;If the argument has no leading ‘./’ or ‘/’, node.js will look in the node_modules folder. This is the folder that is created by npm when a dependency is added.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This last step has some really smart rules which allow you to create a hierarchy of folders and dependencies. I suggest that you read the docs for more info!&lt;/p&gt;

&lt;h3 id=&quot;the-event-loop&quot;&gt;The event loop&lt;/h3&gt;

&lt;p&gt;The code that is written in node.js, runs single threaded. You do not need any lock or synchronize constructs to prevent concurrency problems. Better yet, there are no locks! However, the runtime itself offers asynchronousity. When we do a http request, or a database call, or some IO, the node.js runtime will execute that task on another thread. You cannot interact with that thread, but you are allowed to give a callback function, that is executed when the work is done. How does this work in a single threaded runtime? When will that callback be executed? The &lt;em&gt;event loop&lt;/em&gt; takes care of that.&lt;/p&gt;

&lt;p&gt;Basically, the event loop is an ever running while loop that executes code. When a callback should be executed, the runtime puts it in a queue (the following code snippets are copied from &lt;a href=&quot;http://stackoverflow.com/a/19823583/5043&quot;&gt;this stackoverflow answer&lt;/a&gt;):&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;#js
lock (queue) {
  queue.push(event);
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The event loop itself will take this queue and execute the functions on every &lt;em&gt;tick&lt;/em&gt;:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;#js
while (true) {
  // this is the beginning of a tick

  lock (queue) {
    // copy the current queue items into thread-local memory
    var tickEvents = copy(queue); 
    // ..and empty out the shared queue
    queue.empty(); 
  }

  for (var i = 0; i &amp;lt; tickEvents.length; i++) {
    InvokeJSFunction(tickEvents[i]);
  }

  // this the end of the tick
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;So on every thick, the queue is emptied and executed. All callbacks triggered while executing those functions are put in the queue, and executed on the next tick.&lt;/p&gt;

&lt;p&gt;Scheduling stuff with setTimeout or setInterval actually means that the given callback is &lt;em&gt;queued&lt;/em&gt; after the given timeout or interval, not executed. That is why you should never block the event loop with cpu intensive or long running tasks! This will prevent the event loop of executing queued callbacks and thus firing events.&lt;/p&gt;

&lt;h3 id=&quot;other-posts-in-this-serie&quot;&gt;Other posts in this serie&lt;/h3&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;/presenting-GrapNode/&quot;&gt;Presenting GrapNode&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</content>
	</entry>
 
    <entry>
	    <title>Presenting GrapNode</title>
	    <link href="https://www.movereem.nl/presenting-GrapNode"/>
        <updated>2014-01-18T00:00:00+00:00</updated>
 	    <id>https://www.movereem.nl/presenting-GrapNode</id>
		<content type="html">&lt;p&gt;I’m like &lt;a href=&quot;http://devopsangle.com/2013/04/01/the-birth-of-node-where-did-it-come-from-creator-ryan-dahl-shares-the-history/&quot;&gt;a couple of years late&lt;/a&gt; to the party, but finally started a node.js project. The plan is to log my progress on the blog, by writing about different aspects and maybe do some explaining of the core concepts (mostly for me, but maybe some others see benefit from it). The project will combine a couple of things. First of all node.js. I love JavaScript, and hope to learn more about using it on the server. Along with node.js, the project will use &lt;a href=&quot;https://github.com/Reactive-Extensions/RxJS&quot;&gt;RxJS&lt;/a&gt;, the reactive programming library for JavaScript. After following the &lt;a href=&quot;https://www.coursera.org/course/reactive&quot;&gt;Principles of Reactive Programming on coursera&lt;/a&gt; a project to get some real life experience was needed! And of course, the project might catch up on other cool stuff as well.&lt;/p&gt;

&lt;p&gt;In this series, I will try to take (baby)-steps in developing a system to take screenshots from given urls. &lt;a href=&quot;http://phantomjs.org&quot;&gt;PhantomJS&lt;/a&gt; will be used to take those screenshots, as I am in no way looking to build a browser environment myself. The website will allow you to enter an url, and maybe a screen size. The result will be a png of the website at the given url. The code will be online of course, at &lt;a href=&quot;https://github.com/overeemm/GrapNode&quot;&gt;github&lt;/a&gt;.&lt;/p&gt;

&lt;h3 id=&quot;getting-started&quot;&gt;Getting started&lt;/h3&gt;

&lt;p&gt;We start with npm, the Node Package Manager. The packages that are needed are &lt;a href=&quot;https://npmjs.org/package/rx&quot;&gt;rx&lt;/a&gt; and &lt;a href=&quot;https://npmjs.org/package/node-phantom&quot;&gt;node-phantom&lt;/a&gt;. Installing is easy:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;npm install rx
npm install node-phantom
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;After that we will want to create a package.json with:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;npm init
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This will ask you lots of questions, but will give you a package.json that can be used to restore dependencies and tell lots of things about your application. I am not sure what the other uses are yet, but I hope to find out later on. So now we got some dependencies and an application definition.&lt;/p&gt;

&lt;h3 id=&quot;write-some-code&quot;&gt;Write some code&lt;/h3&gt;

&lt;p&gt;Let’s get a node.js server up and running. We create an index.js file and put the following lines of code in it:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;#js
require(&apos;http&apos;).createServer(function handleRequest(req, res) {
  res.writeHead(200, { &apos;content-type&apos;: &apos;text/plain&apos;});
  res.end(&apos;Hello World!&apos;);
}).listen(8080);
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This will give us a nice “Hello World!”, but in the plain node.js way. We want to rx-ify it. For now we will install a new dependency, &lt;a href=&quot;https://npmjs.org/package/rx-http-server&quot;&gt;rx-httpserver&lt;/a&gt;:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;npm install rx-http-server --save
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This will allow us to change the code to&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;#js
var RxServer = require(&quot;rx-http-server&quot;);

var server = new RxServer();

server.requests.subscribe(function(data) {
    data.response.writeHead(200, {&quot;Content-Type&quot;: &quot;text/plain&quot;});
    data.response.end(&quot;Hello from Rx!&quot;);
});

server.listen(8080);
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Much nicer, right? I might change that dependency later on to a custom written library, so that I can learn more about the internals.&lt;/p&gt;

&lt;p&gt;That’s all for now. Lets hook up PhantomJS the next time. Feedback is welcome at anytime, just send a message through twitter or google+!&lt;/p&gt;

</content>
	</entry>
 
    <entry>
	    <title>JavaScript architecture - some lessons learned</title>
	    <link href="https://www.movereem.nl/javascript-architecture"/>
        <updated>2013-02-22T00:00:00+00:00</updated>
 	    <id>https://www.movereem.nl/javascript-architecture</id>
		<content type="html">&lt;blockquote&gt;
  &lt;p&gt;The secret to building large apps is NEVER build large apps. Break up your applications into small pieces. 
Then, assemble those testable, bite-sized pieces into your big application. &lt;a href=&quot;http://bitovi.com/blog/2010/11/organizing-a-jquery-application.html&quot;&gt;Brian Moschel&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;In the past year, I’ve been busy with researching architecture in JavaScript.
And there are a few things that I’ve found and learned during this year.
Now, I am nowhere near being an expert, I’m just someone that loves the language and the platform it offers.
I happen to like the fact that it opens up so much possibilities, because JavaScript is everywhere!&lt;/p&gt;

&lt;p&gt;I would like to list some principles and observations that follow from my learning.&lt;/p&gt;

&lt;h3 id=&quot;create-little-parts-and-not-one-big-application&quot;&gt;Create little parts and not one big application&lt;/h3&gt;

&lt;p&gt;Now, JavaScript is a language that misses some features when you compare it with more mature and better designed language. There are no modules or namespaces, and there is only function-scope. When you do not look for a solution for this missing, you end up with spaghetti code. One of the things I’ve learned is that a module framework is one of the most important parts of your application.&lt;/p&gt;

&lt;p&gt;I myself are only in depth familiar with &lt;a href=&quot;http://requirejs.org&quot;&gt;RequireJS&lt;/a&gt;, but there are more. A module framework forces you to break up your app in little parts that have their own scope and clearly export what others can use.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;#js
define(&quot;moduleNam&quot;, [/* list of dependencies*/], 
  function ( /* dependencies */ ) {
  
    /* place for private code */
  
    return {
      /* your contract with the outside */
    }
  }
);
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;You see, a module has clear definition of what it needs and what it delivers. This way, you are forced to let go of easy global variables.&lt;/p&gt;

&lt;h3 id=&quot;create-abstractions-for-changing-things-that-you-cannot-control&quot;&gt;Create abstractions for changing things that you cannot control&lt;/h3&gt;

&lt;p&gt;One of the really hard points that I discovered is working with a quickly changing environment. The third party libraries are developing fast. And it makes it hard to plan for the future. Of course no one wants to right code that we do not need.
But last year, the &lt;a href=&quot;http://jqueryui.com&quot;&gt;jQuery UI library&lt;/a&gt; was widely used. Nowadays, it is &lt;a href=&quot;http://twitter.github.com/bootstrap/&quot;&gt;Twitter Bootstrap&lt;/a&gt; everywhere. 
How do you deal with this? Do you choose and never look back? Or do you try to abstract it? Or do you write your own code?&lt;/p&gt;

&lt;p&gt;Unfortunately there are no easy answers here. I found it to be possible to abstract some of these choices. But your situation might be different. But it is important to choose widely what you depend on. The JavaScript world is moving fast. Depending on something that is hard to change might be a mistake.&lt;/p&gt;

&lt;h3 id=&quot;be-careful-with-accessing-the-dom&quot;&gt;Be careful with accessing the DOM&lt;/h3&gt;

&lt;p&gt;The DOM is what your environment looks like in JavaScript running in the browser. You will need it. But you do not want it to be everywhere. JavaScript code is not compiled. Unit tests are more important then ever. Nobody likes script errors that make a web application become useless. So testing is required. But using the DOM everywhere makes your code untestable. Writing code that is modular and testable is a must!&lt;/p&gt;

&lt;p&gt;There are more lessons and more paths to follow. But these three items are key to success in my opinion.&lt;/p&gt;

</content>
	</entry>
 
    <entry>
	    <title>Side project - drawing signatures in HTML5</title>
	    <link href="https://www.movereem.nl/side-project-drawing-signatures-in-html5"/>
        <updated>2013-02-03T00:00:00+00:00</updated>
 	    <id>https://www.movereem.nl/side-project-drawing-signatures-in-html5</id>
		<content type="html">&lt;p&gt;This weekend I worked on another little side project. This time it consisted of a little HTML5 and JavaScript to use the power of a small tablet (&lt;a href=&quot;http://www.apple.com/ipad-mini/overview/&quot;&gt;iPad mini&lt;/a&gt; in this case). And it amazes me again how easy it is to put some open source projects together and get something working. Of course the proof-of-concept is no big deal, and it is not production ready. But all these little machines that we have give us so many possibilities.&lt;/p&gt;

&lt;p&gt;The requirements are easy: enter information about work done at a customer and get a signature of someone. This will then by e-mailed to both the company and the customer, forming the basis of the bill that needs to be payed at the end. The tablets where chosen easily: iPads where already available. The code will hopefully be build in such way that we can easily expand support to other platforms, but for now we will stick with iPads. They come with a modern browser and support most of the HTML5 features. Important is the touch of course, because we will use that to get a signature.&lt;/p&gt;

&lt;p&gt;The input of information is easy: put some input elements in the body and write some PHP script to turn it into an e-mail. We need a signature. It will be the official approval of the customer, and we do not want to put it on paper. HTML5 comes with the canvas element. That allows us to get some drawing input. But this is a side project and I do not want to write my own drawing code if it is not necessary. So I turned to Google. There I found &lt;a href=&quot;http://thomasjbradley.ca/lab/signature-pad/&quot;&gt;Signature Pad&lt;/a&gt;, and let me tell you, using it is easy. With some configuration I managed to get a good size canvas displayed on the iPad. The PHP script transforms it to an image and with &lt;a href=&quot;http://swiftmailer.org&quot;&gt;swiftmailer&lt;/a&gt; we build a beautiful HTML mail and send it off.&lt;/p&gt;

&lt;p&gt;Follow progress on &lt;a href=&quot;https://github.com/overeemm/werkbon.overeemtelecom.nl&quot;&gt;github&lt;/a&gt;!&lt;/p&gt;

</content>
	</entry>
 
    <entry>
	    <title>JavaScript and the flexibility that is sometimes needed</title>
	    <link href="https://www.movereem.nl/javascript-and-the-flexibility-that-is-sometimes-needed"/>
        <updated>2013-01-16T00:00:00+00:00</updated>
 	    <id>https://www.movereem.nl/javascript-and-the-flexibility-that-is-sometimes-needed</id>
		<content type="html">&lt;p&gt;Integration of third part libraries. The promises that a library makes often force you to delete your own code right away and start integrating. Finally, ripping out code and replacing it with a tool, framework or library that is developed by a team instead of you. Developed over a couple of months, maybe even years. And all is good.&lt;/p&gt;

&lt;p&gt;But is it? Because using a third party library comes at a price. What if integration is not that easy. Or what if some parts are not that stable. What if the demands from your customers are a bit different. Of course, as good developers we start with analyzing, prototyping, proofing that the library does what it needs. And of course, every manager, or stakeholder, approves and gives you the green light. Until a new requirement is found, that was not known at that time. Or maybe just not told to you. And now what to do?&lt;/p&gt;

&lt;p&gt;There are a lot of discussions about JavaScript. About it being a language that is bad designed. About &lt;a href=&quot;http://www.sig.eu/en/News_and_publications/TechnologyRiskReview/997/__JavaScript:_flexibility_can_come_at_a_price__.html&quot;&gt;the risks&lt;/a&gt; in large enterprises. Microsoft started to design &lt;a href=&quot;http://www.typescriptlang.org&quot;&gt;a better version&lt;/a&gt;. But there is great power in this language. At least, that is my experience. You can shoot yourself in the foot. Sure, you can also hit yourself with a hammer. In a perfect world, we might want to have static analysis that finds all the errors before we release stuff in the world. But that is not going to happen.&lt;/p&gt;

&lt;p&gt;If you want to program for the web, there is only one option: JavaScript. And sure, you can use &lt;a href=&quot;http://coffeescript.org&quot;&gt;CoffeeScript&lt;/a&gt;, &lt;a href=&quot;http://www.typescriptlang.org&quot;&gt;TypeScript&lt;/a&gt; or &lt;a href=&quot;https://github.com/clojure/clojurescript&quot;&gt;ClojureScript&lt;/a&gt;. But still, at one point you will hit JavaScript. I do not believe that we are already arrived at the point that &lt;a href=&quot;http://www.hanselman.com/blog/JavaScriptIsAssemblyLanguageForTheWebSematicMarkupIsDeadCleanVsMachinecodedHTML.aspx&quot;&gt;JavaScript is only the assembly language&lt;/a&gt; underneath it all. I think that you still need to have some knowledge of the underlying core. Of course you can use tools that compile into JavaScript. But at least learn some, I think you will need it when debugging.&lt;/p&gt;

&lt;p&gt;Back to integrating third party libraries. One thing that JavaScript stands out in, is the flexibility. The fact that you can change any object after creation makes it super easy to alter behavior of libraries. And you can mimic any object, without a type-system that will not allow it.&lt;/p&gt;

&lt;p&gt;Sometimes it feels wrong to do this kind of stuff. And my computer science background screams for type-systems, proves of correctness and a high level of maintainability. But the maintainability of an application does not need to suffer from JavaScripts flexibility. You will need discipline. Maybe some unit tests. Even a little documentation.&lt;/p&gt;

&lt;p&gt;But most important, we as developers need to get the job done and deliver what our customers want. Because in the end, all they care about is working applications that do the job for them in the best possible way.&lt;/p&gt;

</content>
	</entry>
 
    <entry>
	    <title>Best tech books in 2012</title>
	    <link href="https://www.movereem.nl/best-tech-books-in-2012"/>
        <updated>2012-12-27T00:00:00+00:00</updated>
 	    <id>https://www.movereem.nl/best-tech-books-in-2012</id>
		<content type="html">&lt;p&gt;The year 2012 is almost done, and while enjoying my holiday I thought it would be nice to take a look back and see what books I have read and which of them I still would recommend. On looking at the list of books that I have read in 2012 (yes, I do keep a list) I saw that it weren’t that much tech books. I read more then 45 books in 2012, but only seven of them I can call tech or tech-related books.&lt;/p&gt;

&lt;p&gt;On the tech side, the book reading was a bit quiet this year. It was my first full year at &lt;a href=&quot;http://www.afas.nl/&quot;&gt;AFAS Software&lt;/a&gt; as a Software Architect, but that did not really drive my into more book reading. I also became a dad for the second time, so reading time is heavily cut down :)&lt;/p&gt;

&lt;p&gt;So on to the books that I did manage to read, and after that, maybe a little bit of a wish list.&lt;/p&gt;

&lt;h4 id=&quot;thomas-myer---beginning-phonegap&quot;&gt;&lt;a href=&quot;http://www.movereem.nl/bookreview-beginning-phonegap/&quot;&gt;Thomas Myer - Beginning PhoneGap&lt;/a&gt;&lt;/h4&gt;

&lt;p&gt;A book that I reviewed for the O’Reilly blogger program. I was mildly positive about the book. Pure tech books are becoming less relevant, because stuff is moving hard. Jeff Atwood &lt;a href=&quot;http://www.codinghorror.com/blog/2007/10/do-not-buy-this-book.html&quot;&gt;said&lt;/a&gt; it better:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;Do highly technical books tied to a specific technology have any reason to exist in an era of ubiquitous, high speed Internet access? I wonder. I think they’re increasingly irrelevant, and almost by definition out of date by the time they manage to hit bookshelves.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;But I did like to book as an entry into PhoneGap. And PhoneGap still looks very cool. I should make it a goal for 2013, to finally get something into the App Store…. I should, really…&lt;/p&gt;

&lt;h4 id=&quot;clay-johnson---the-information-diet&quot;&gt;&lt;a href=&quot;http://shop.oreilly.com/product/0636920019978.do&quot;&gt;Clay Johnson - The information diet&lt;/a&gt;&lt;/h4&gt;

&lt;p&gt;This book was a gift from the O’Reilly blogger program and not really technical. But it did touch on something that I recognized in my life. There is so much information coming from Twitter, Blogs and other sources that it is becoming more important to actively decide on what to read and what to ignore. Important stuff!&lt;/p&gt;

&lt;h4 id=&quot;jordan-mechner---the-making-of-prince-of-persia&quot;&gt;&lt;a href=&quot;http://www.amazon.com/dp/1468093657/ref=cm_sw_r_tw_dp_Zde3qb0J7DYG4&quot;&gt;Jordan Mechner - The making of Prince of Persia&lt;/a&gt;&lt;/h4&gt;

&lt;p&gt;This book read more like a biography then a tech book, but the topic of course being very much tech. I remember playing Prince Of Persia when I was a kid, so it was really fun to read about the creative process behind it. And being a programmer in current modern times, it is really useful to read about problems like memory management and CPU limitations.&lt;/p&gt;

&lt;h4 id=&quot;nicholas-zakas---maintainable-javascript&quot;&gt;&lt;a href=&quot;http://www.amazon.com/dp/1449327680/ref=cm_sw_r_tw_dp_Phe3qb1DHFVGW&quot;&gt;Nicholas Zakas - Maintainable Javascript&lt;/a&gt;&lt;/h4&gt;

&lt;p&gt;My first six months at AFAS mostly consisted of working on JavaScript and the architecture of a JavaScript application. &lt;a href=&quot;http://www.nczonline.net&quot;&gt;Nicholas Zakas&lt;/a&gt; was a big source of inspiration, so this book was a must have. It is a nice overview and summary of knowledge.&lt;/p&gt;

&lt;h4 id=&quot;marty-cagan---inspired&quot;&gt;&lt;a href=&quot;http://www.amazon.com/dp/0981690408/ref=cm_sw_r_tw_dp_Xie3qb19J486F&quot;&gt;Marty Cagan - Inspired&lt;/a&gt;&lt;/h4&gt;

&lt;p&gt;This book was a little disappointing because it did not talk about inspiration, but more about the job of a Product Manager. It was nice read, but it was not what I was looking for…&lt;/p&gt;

&lt;h4 id=&quot;donald-norman---living-with-complexity&quot;&gt;&lt;a href=&quot;http://www.amazon.com/dp/0262014866/ref=cm_sw_r_tw_dp_jke3qb011PMKH&quot;&gt;Donald Norman - Living with complexity&lt;/a&gt;&lt;/h4&gt;

&lt;p&gt;Donald Norman is well known for his books on design. And this book is no exception. This one really goes into the problems around complexity and complicated software. There is in fact a difference between complex and complicated software. Something that I was not aware of.&lt;/p&gt;

&lt;h4 id=&quot;sander-hoogendoorn---dit-is-agile&quot;&gt;&lt;a href=&quot;http://www.ditisagile.nl/&quot;&gt;Sander Hoogendoorn - Dit is agile&lt;/a&gt;&lt;/h4&gt;

&lt;p&gt;Last but not least is a dutch book about agile software development. At my previous job I was a scrum master and implemented agile with a colleague of mine. Agile stuff is still very interesting, but often it is used more like a religion then a useful way of developing software. Sander Hoogendoorn is very pragmatic in his thinking about agile, and therefore this book is highly recommended! A German translation is already finished, and an English version is planned. Visit &lt;a href=&quot;http://www.ditisagile.nl/&quot;&gt;the website&lt;/a&gt; for more information!&lt;/p&gt;

&lt;p&gt;So far for the books that I have read. What is next? What will follow next year? … I hope to continue diving into the world of JavaScript, HTML5 and front-end architecture and design. Maybe some UX. And for books? The list keeps growing, but on it are&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;http://www.nczonline.net/blog/2012/12/18/now-available-principles-of-object-oriented-programming-in-javascript-beta/&quot;&gt;Nicholas Zakas - Principles of Object-Oriented Programming in JavaScript&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://www.amazon.com/Design-Essays-Computer-Scientist/dp/0201362988&quot;&gt;Frederick Brooks - The Design of Design&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://www.amazon.com/Fearless-Change-Patterns-Introducing-Ideas/dp/0201741571&quot;&gt;Mary Lynn Manns - Fearless Change&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://www.manning.com/resig/&quot;&gt;John Resig - Secrets of the Javascript Ninja&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://www.amazon.com/The-Clean-Coder-Professional-Programmers/dp/0137081073/ref=sr_1_1?ie=UTF8&amp;amp;qid=1356613307&amp;amp;sr=8-1&amp;amp;keywords=the+clean+coder&quot;&gt;Robert C Martin - The Clean Coder&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Which books should I add? Let me know on &lt;a href=&quot;http://www.twitter.com/michielovereem&quot;&gt;twitter&lt;/a&gt;!&lt;/p&gt;

&lt;h4 id=&quot;suggested-books&quot;&gt;Suggested books&lt;/h4&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;http://shop.oreilly.com/product/0636920013754.do&quot;&gt;Clojure Programming by Chas Emerick, Brian Carper, Christophe Grand&lt;/a&gt; via &lt;a href=&quot;http://www.twitter.com/borkdude&quot;&gt;@borkdude&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</content>
	</entry>
 
    <entry>
	    <title>The rise of CSS Frameworks and some thoughts on how to use them</title>
	    <link href="https://www.movereem.nl/the-rise-of-css-frameworks"/>
        <updated>2012-10-06T00:00:00+00:00</updated>
 	    <id>https://www.movereem.nl/the-rise-of-css-frameworks</id>
		<content type="html">&lt;p&gt;The advance of HTML5, CSS3 and responsive design has given rise to a whole new type of (open source) projects: &lt;a href=&quot;http://en.wikipedia.org/wiki/CSS_frameworks&quot;&gt;CSS frameworks&lt;/a&gt;. The first time I saw these kind of projects I found it rather strange. I am used to frameworks in terms of reusable libraries giving some functionality. Like ASP.NET MVC, helping you serve content over HTTP. CSS however consists of rules and style definitions, there is no code, there is no functionality. These definitions can be reused of course, but it often becomes a pain to maintain large CSS files. The language itself does not have constructs to deal with reuse in a way like programming languages.&lt;/p&gt;

&lt;p&gt;My first initial reaction was to view these frameworks not as ordinary frameworks, but rather as bootstraps: a basic starting point for your CSS design. Much like &lt;a href=&quot;http://stackoverflow.com/questions/116754/best-css-reset&quot;&gt;CSS resets&lt;/a&gt;. Such a bootstrap file gives you a certain amount of basic rules to build your layout. This approach does comes with some warnings.&lt;/p&gt;

&lt;h3 id=&quot;bootstrapping-your-project&quot;&gt;Bootstrapping your project&lt;/h3&gt;

&lt;p&gt;Let us look at the relation between CSS and HTML and then how a bootstrap file can go wrong. CSS stylesheets consists of style definitions. These style definitions are annotated with selectors. These selectors link the style to your HTML file. In this way you get a clean separation: the HTML tells you what you are presenting and the CSS tells you how to present it. But they do have a stricter relationship then simple a separation of concerns. This relationship can go two ways. The selectors used in CSS can use some basic constructs: HTML tag names, CSS classes, ID attributes and some special cases (like hover, when a cursor is over an element). These constructs can be combined to match the structure of your HTML. The CSS file can use your nesting of HTML tags to link style definitions, but then the relationship becomes very fragile: a change in nesting can mess up your style. The other way around is also possible: you can annotate the HTML with class names and id attributes, but then you can wound up with to much knowledge about your CSS file in your HTML.&lt;/p&gt;

&lt;p&gt;The two ways to use a CSS bootstrap are to use only the style definitions and not the selectors. This gives you freedom in both your HTML and CSS selector structure. However, it is lots of work and to be honest: you would only use the knowledge of the CSS in the bootstrap file and not the file itself. Another approach is to use the bootstrap file as is and change your HTML structure to match the file.&lt;/p&gt;

&lt;p&gt;In the last approach, you get the extra benefit that it is possible to update the bootstrap file to incorporate bug fixes. But the usage of class names from the CSS file does violate the principle of separation: HTML tells what, and CSS tells how. These class names do not carry semantics for your project. They carry knowledge about what the rule definition does (for instance how much columns wide an element is presented).&lt;/p&gt;

&lt;h3 id=&quot;extending-css-to-gain-reuse&quot;&gt;Extending CSS to gain reuse&lt;/h3&gt;

&lt;p&gt;This is where two popular languages that extend CSS come into play: &lt;a href=&quot;http://lesscss.org&quot;&gt;LESS&lt;/a&gt; and &lt;a href=&quot;http://sass-lang.com&quot;&gt;SASS&lt;/a&gt;. These languages add extra features on top of CSS to make the language more flexible; they add constructs for re-usability. They both add variables and &lt;a href=&quot;http://en.wikipedia.org/wiki/Mixin&quot;&gt;mixins&lt;/a&gt; to the language.&lt;/p&gt;

&lt;p&gt;Variables allow you to reuse certain key values, like colors or sizes. This makes it easy to change the color palette in one place, instead of throughout your CSS rules. Mixins on the other hand allow you to reuse a set of style definitions inside other definitions. This allows you to reuse for instance a set of prefix specific definitions without writing them out every time.&lt;/p&gt;

&lt;p&gt;These language allow you to distribute a CSS framework in terms of mixins and variables. That way you can set up your CSS file and HTML file in the cleanest way, but use the already defined style definitions and gain development speed.&lt;/p&gt;

&lt;h3 id=&quot;reflection&quot;&gt;Reflection&lt;/h3&gt;

&lt;p&gt;So far I’ve used two CSS frameworks: &lt;a href=&quot;http://www.getskeleton.com&quot;&gt;Skeleton&lt;/a&gt; and &lt;a href=&quot;http://foundation.zurb.com&quot;&gt;Zurb Foundation&lt;/a&gt;. I like the Zurb framework because of the easy responsiveness that it adds. My approach is to add the Zurb class names throughout my HTML. Yes, this is not really clean, but the projects sizes are small and the likeliness of switching a framework or updating to a newer version are small. I am not sure of a larger project would succeed with such an approach. In such a project I would switch to just using the knowledge and style definitions, but not the actual code.&lt;/p&gt;

&lt;p&gt;I am not sure if the LESS/SASS approach is any better. In my opinion, CSS and HTML are in a very strict relation, enforced by the language capabilities. Positioning and sizing within style definitions are depended on context of parent elements, and often you cannot view the CSS separate from the HTML. No language extension or framework will fix that problem.&lt;/p&gt;

&lt;p&gt;But without the CSS frameworks, LESS/SASS do add better maintainability to your stylesheets. There are multiple tools to integrate it with your IDE. LESS even comes with a client-side library that transforms it on the fly to CSS. Performance would keep me from going that way, but it adds speed to the development process.&lt;/p&gt;

&lt;p&gt;Depending on the size of a project, I would choose to learn from the CSS frameworks and write my own code or integrate them into the projects like any third party library.&lt;/p&gt;

</content>
	</entry>
 
    <entry>
	    <title>Fall 2012 update on projects</title>
	    <link href="https://www.movereem.nl/fall-2012-update-on-projects"/>
        <updated>2012-10-04T00:00:00+00:00</updated>
 	    <id>https://www.movereem.nl/fall-2012-update-on-projects</id>
		<content type="html">&lt;p&gt;I thought it would be nice to give an update on some of the side projects that I’m working on. Reflecting on those I see that I currently am focussed on design, CSS3, responsiveness and less on core programming.&lt;/p&gt;

&lt;p&gt;The first side project is very simple and plain informative website. I’ve started using &lt;a href=&quot;http://foundation.zurb.com/&quot;&gt;Zurb Foundation&lt;/a&gt; as a CSS bootstrap and worked with &lt;a href=&quot;https://github.com/mojombo/jekyll/&quot;&gt;Jekyll&lt;/a&gt; as a templating engine. There is no server-side stuff in this website but a simple mail form. I could really focus on (responsive) design on this one and I think it worked out nice.&lt;/p&gt;

&lt;p&gt;The second project is a larger website build using ASP.NET MVC. Originally it was a website build on &lt;a href=&quot;http://www.joomla.org/&quot;&gt;Joomla&lt;/a&gt; but I got fed up with it, because it feld limitting. Any CMS will force you in setting up pages a certain way. And styling or plugins are also limited in a way. I wanted more flexibility, so choose to build something from scratch.&lt;/p&gt;

&lt;p&gt;I started with the design of the frontpage, again using &lt;a href=&quot;http://foundation.zurb.com/&quot;&gt;Zurb Foundation&lt;/a&gt;. After the frontpage I started to add dynamic pages to move the current content. As back-end storage it used a mix of plain text files: csv, xml and markdown files. This allows me to manage the content through FTP and also to easily backup the content. There will be an administrative part, but it can wait because I am the sole maintainer.&lt;/p&gt;

&lt;p&gt;Another reason to rebuilt this one is that I want to build a &lt;a href=&quot;http://phonegap.com/&quot;&gt;Phonegap/Cordova&lt;/a&gt; app that builds on stuff in the website. By designing the website in a mobile-ready way, I hope that the app will be easier.&lt;/p&gt;

&lt;p&gt;This project is on the edge of ready for release, but I need to get approval from certain people first.&lt;/p&gt;

&lt;p&gt;The last project is not really started yet, but I am researching the design currently. Again a simple website, but with a larger backend. Multiple roles will need to login and do their stuff. This one is constrained by the hosting platform. Therefor it will be written in PHP, and of course HTML5 and CSS3. I haven’t written PHP in years, so I am curious on the current state. Hopefully some blog posts will come from that project.&lt;/p&gt;

&lt;p&gt;The last project is of course this blog. I hope to get to writting some posts soon. There is enough to write about, but time is limited.&lt;/p&gt;

</content>
	</entry>
 
    <entry>
	    <title>Sharing that what we have received</title>
	    <link href="https://www.movereem.nl/sharing-that-what-we-have-received"/>
        <updated>2012-06-22T00:00:00+00:00</updated>
 	    <id>https://www.movereem.nl/sharing-that-what-we-have-received</id>
		<content type="html">&lt;p&gt;Last week the new MacBooks arrived. And what a gorgeous new model was introduced, with a Retina Display.
I myself was waiting for the new models because the old laptop needed to be replaced.
The Retina version was a little to high priced for me, but I got a beautiful 13” instead.&lt;/p&gt;

&lt;p&gt;While reviewing and researching a new laptop, I also read some books about poverty and how
we have a responsibility in al of that. We (at least my readers from The Netherlands) are living
in one of the richest countries in the world. We are in a financial crisis, but still we have plenty of everything.
And so I made the decision (again) to share from that what I have received.&lt;/p&gt;

&lt;p&gt;There are a lot of possibilities if you want to share. You could give money, you could give time, etc.
But in the book &lt;a href=&quot;http://www.theholeinourgospel.com/&quot;&gt;The hole in our Gospel&lt;/a&gt;, Rich Stearns makes the case for using peoples abilities
and giving them a platform to work on their own poverty. Yes, we are talking about microfinance here.
So that is what I have done. I’ve gone over to &lt;a href=&quot;http://www.kiva.org/&quot;&gt;kiva&lt;/a&gt; and lend some money to people that have far less than me.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/kiva.png&quot; alt=&quot;Kiva&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Now, I normally blog about tech stuff and software development. The whole microfinance thing has got me thinking: why are we spending money on &lt;a href=&quot;http://www.kickstarter.com/&quot;&gt;kickstarter&lt;/a&gt; stuff that are run by people that have access to far more resources than those in third world countries? Would it not be cool if we as tech people could help fellow tech people all over the world to use their talents and fight poverty?&lt;/p&gt;

</content>
	</entry>
 
    <entry>
	    <title>Developing, previewing and debugging on mobile devices - how to make your blog beautiful across devices</title>
	    <link href="https://www.movereem.nl/how-to-make-your-blog-beautiful-across-devices"/>
        <updated>2012-03-11T00:00:00+00:00</updated>
 	    <id>https://www.movereem.nl/how-to-make-your-blog-beautiful-across-devices</id>
		<content type="html">&lt;p&gt;This week I spotted &lt;a href=&quot;http://labs.adobe.com/technologies/shadow/&quot;&gt;Adobe Shadow&lt;/a&gt;: a tool for developing, 
previewing and debugging websites on mobile devices. 
The tool consists of a server component, installed on your development machine, 
a Google Chrome plugin and client apps (both iOs and Android). 
But before I tell you my experience, watch this demo video:&lt;/p&gt;

&lt;iframe title=&quot;AdobeTV Video Player&quot; width=&quot;515&quot; height=&quot;296&quot; src=&quot;http://tv.adobe.com/embed/877/12009/&quot; frameborder=&quot;0&quot; allowfullscreen=&quot;allowfullscreen&quot; scrolling=&quot;no&quot;&gt;
&lt;/iframe&gt;

&lt;p&gt;Pretty amazing, don’t you think? So I installed it to preview my blog. 
The connection was not without problems, but I managed to get it working on my iPhone and iPad. 
And of course, there were some problems to fix. 
So let me give you some things that I did to get a nice blog for mobile devices.&lt;/p&gt;

&lt;h3 id=&quot;start-with-a-responsive-desing&quot;&gt;Start with a responsive desing&lt;/h3&gt;

&lt;p&gt;According to &lt;a href=&quot;http://en.wikipedia.org/wiki/Responsive_Web_Design&quot;&gt;Wikipedia&lt;/a&gt;, responsive desing is:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;Responsive Web Design (RWD) essentially indicates that a web site is crafted 
to use W3C CSS3 media queries with fluid proportion-based grids, 
to adapt the layout to the viewing environment, 
and probably also flexible images.
As a result, users across a broad range of devices and browsers 
will have access to a single source of content, 
laid out so as to be easy to read and navigate with a minimum of resizing, 
panning and scrolling.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;So the key is to use CSS3 features to get one design that scales nicely
on different screen sizes. Personally, I started with a free CSS framework: 
&lt;a href=&quot;http://www.getskeleton.com/&quot;&gt;skeleton&lt;/a&gt;. But there are many more. Pick the one that matches your style best. 
And of course, adapt to get your own style. I’ve choosen to let my blog be
basic black and white, 
because I did not yet find a nice design that fits my personal style. 
To be honest, I like the black and white simplicity, so I might keep it longer.&lt;/p&gt;

&lt;h3 id=&quot;use-your-media-queries&quot;&gt;Use your media queries&lt;/h3&gt;

&lt;p&gt;These things are key, because it let you define custom CSS rules, matching different screen sizes. It is far better then browser sniffing, or other conditional things, because it focusses on features and device-types and not on brands or other vendor specific things. A concrete example is the scaling of images to keep them in the main content.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;!css
@media only screen and (min-width: 480px) and (max-width: 767px) {
    .container img {
        max-width: 400px;
    }
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;My blog on iPhone and iPad:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/blog-iphone.png&quot; alt=&quot;blog on iPhone&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/blog-ipad.png&quot; alt=&quot;blog on iPad&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Any more tips on CSS3, mobile web and responsive design? Let me know on &lt;a href=&quot;http://www.twitter.com/michielovereem/&quot;&gt;twitter&lt;/a&gt;!&lt;/p&gt;

</content>
	</entry>
 
    <entry>
	    <title>Building and distributing an iOS app with PhoneGap - part 1</title>
	    <link href="https://www.movereem.nl/building-and-distributing-an-ios-app-with-phonegap-part-1"/>
        <updated>2012-02-19T00:00:00+00:00</updated>
 	    <id>https://www.movereem.nl/building-and-distributing-an-ios-app-with-phonegap-part-1</id>
		<content type="html">&lt;p&gt;I’ve started working on an iOS app. Finally. The goals for this app are multiple. First of all, I wanted to work with PhoneGap, to see what the platform looked like. Second, I found a nice case for an app that I could build and put into production. I try to write up the experience and other stuff that I encounter. This first blog post marks some sources that I found to be useful.&lt;/p&gt;

&lt;p&gt;The application will be build with &lt;a href=&quot;http://phonegap.com/&quot;&gt;PhoneGap&lt;/a&gt; and &lt;a href=&quot;http://jquerymobile.com/&quot;&gt;jQuery mobile&lt;/a&gt;. Not because I think that PhoneGap is the way to go, but because I want some experience about the edge cases.&lt;/p&gt;

&lt;p&gt;After a day, I had something working and wanted it to deploy. Being new to iOS development, I found &lt;a href=&quot;http://mobile.tutsplus.com/tutorials/iphone/iphone-sdk-install-apps-on-iphone-devices-for-development/&quot;&gt;this blogpost&lt;/a&gt; useful in all the steps. A tweet let me to &lt;a href=&quot;https://testflightapp.com/&quot;&gt;TestFlight&lt;/a&gt;, a useful service for distributing test versions to a group of people.&lt;/p&gt;

&lt;p&gt;So the first one is small, but I hope to write some more about the experience.&lt;/p&gt;

</content>
	</entry>
 
    <entry>
	    <title>Javascript sources, a summary</title>
	    <link href="https://www.movereem.nl/JavaScript-sources"/>
        <updated>2012-02-18T20:00:00+00:00</updated>
 	    <id>https://www.movereem.nl/JavaScript-sources</id>
		<content type="html">&lt;p&gt;I decided to summarize some JavaScript sources that I use, have used and want to share with others. This is by no means complete, but it might serve as a good starting point. Please, send my anything that I have missed :-)&lt;/p&gt;

&lt;h3 id=&quot;books&quot;&gt;Books&lt;/h3&gt;

&lt;p&gt;This is a short list of all the books that are available on JavaScript. I only wanted to list the books that I have read. I cannot recommend others.&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;http://www.amazon.com/JavaScript-Good-Parts-Douglas-Crockford/dp/0596517742/&quot;&gt;The Good Parts&lt;/a&gt; , by Douglas Crockford&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://www.amazon.com/JavaScript-Definitive-Guide-Activate-Guides/dp/0596805527/&quot;&gt;JavaScript: the definitive guide&lt;/a&gt;, by David Flanagan&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://jspro.org/&quot;&gt;Pro JavaScript techniques&lt;/a&gt;, by John Resig&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;img src=&quot;/images/javascript-the-good-parts-the-definitive-guide.jpg&quot; alt=&quot;The Good Parts vs the definitive guid&quot; /&gt;&lt;/p&gt;

&lt;h3 id=&quot;people-with-weblogs-twitter-accounts&quot;&gt;People with weblogs, twitter accounts&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;Douglas Crockford&lt;/em&gt;&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;http://www.crockford.com/&quot;&gt;http://www.crockford.com/&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;Inventor of &lt;a href=&quot;http://www.json.org/&quot;&gt;JSON&lt;/a&gt; and &lt;a href=&quot;http://www.jslint.com/lint.html&quot;&gt;JSLint&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;Brendan Eich&lt;/em&gt;&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;http://brendaneich.com&quot;&gt;http://brendaneich.com&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://twitter.com/BrendanEich&quot;&gt;http://twitter.com/BrendanEich&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;Inventor of &lt;a href=&quot;http://nl.wikipedia.org/wiki/JavaScript&quot;&gt;JavaScript&lt;/a&gt;, currently CTO of &lt;a href=&quot;http://mozilla.org&quot;&gt;Mozilla&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;Nicholas Zakas&lt;/em&gt;&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;http://www.nczonline.net/&quot;&gt;http://www.nczonline.net/&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://www.twitter.com/slicknet/&quot;&gt;http://www.twitter.com/slicknet/&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;Front-end tech lead for &lt;a href=&quot;http://www.yahoo.com/&quot;&gt;Yahoo!&lt;/a&gt;, 
author of &lt;a href=&quot;http://www.amazon.com/Professional-JavaScript-Developers-Nicholas-Zakas/dp/1118026691/&quot;&gt;Professional JavaScript for Web Developers (Wrox, 2012)&lt;/a&gt;, &lt;a href=&quot;http://www.amazon.com/gp/product/0470109491&quot;&gt;Professional Ajax (Wrox, 2007)&lt;/a&gt;, and &lt;a href=&quot;http://www.amazon.com/gp/product/059680279X&quot;&gt;High Performance JavaScript
(O’Reilly, 2010)&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;John Resig&lt;/em&gt;&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;http://ejohn.org/&quot;&gt;http://ejohn.org/&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://twitter.com/jeresig&quot;&gt;http://twitter.com/jeresig&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;Inventor of &lt;a href=&quot;http://www.jquery.com/&quot;&gt;jQuery&lt;/a&gt;, worked at Mozilla, currently head of JavaScript development at &lt;a href=&quot;http://www.khanacademy.org/&quot;&gt;Khan Academy&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;David Flanagan&lt;/em&gt;&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;http://www.davidflanagan.com/&quot;&gt;http://www.davidflanagan.com/&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://www.twitter.com/__DavidFlanagan&quot;&gt;http://www.twitter.com/__DavidFlanagan&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;projects-and-libraries&quot;&gt;Projects and libraries&lt;/h3&gt;

&lt;p&gt;There are a number of cool projects, build in JavaScript that I try to follow.&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;http://c9.io&quot;&gt;Cloud9 IDE&lt;/a&gt;: a new IDE for JavaScript build in JavaScript. A very cool project, showing what can be done with JavaScript.&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://www.google.com/docs/&quot;&gt;Google docs&lt;/a&gt;: what Google has build into docs is awesome.&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://www.jquery.com/&quot;&gt;jQuery&lt;/a&gt;: one of the many cool DOM manipulation libraries.&lt;/li&gt;
&lt;/ul&gt;

</content>
	</entry>
 
    <entry>
	    <title>bookreview - Beginning PhoneGap</title>
	    <link href="https://www.movereem.nl/bookreview-beginning-phonegap"/>
        <updated>2012-02-18T16:00:00+00:00</updated>
 	    <id>https://www.movereem.nl/bookreview-beginning-phonegap</id>
		<content type="html">&lt;p&gt;&lt;strong&gt;Beginning PhoneGap&lt;/strong&gt; by &lt;em&gt;Thomas Myer&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Beginning PhoneGap aims to give the reader a push in the right direction when using PhoneGap. PhoneGap is a platform for writing mobile applications that can run on iPhones, Blackberry’s, Androids and more. By using HTML5 and JavaScript inside a native app users get the benefits of native apps, while developers get the benefits of code sharing and reusing. Of course by abstracting away the native platform you also loose something.&lt;/p&gt;

&lt;p&gt;The author starts by giving a very practical tutorial explaning how to start with PhoneGap. Screenshots and hyperlinks explain every step from downloading to installing. After that the key API’s are explained: media, camera, storage and more. The author goes into great dept to show all details. Every chapter describes the key elements for iPhone, Android and BlackBerry development. The other platforms are also mentioned, but in less detail.&lt;/p&gt;

&lt;p&gt;The book itself was good to read, and it showed that the author did everything he could to be as precise as possible. However, I am not sure if the content justifies a book. Some chapters (like chapter 7 “Compass”) feel more like a large blog post. The web is stuffed with blog posts about these techniques. Although it is nice to have everything combined, a book suffers from the speed of development. During writing PhoneGap released a new version, the author updated everything. But what if PhoneGap releases a new version next week? Or maybe tomorrow? To justify a book, I would expect eloboration about the technique and platform, not screenshots of applications using a compass. But that would also need another title, not &lt;em&gt;Beginning&lt;/em&gt; PhoneGap.&lt;/p&gt;

&lt;p&gt;Find the book at &lt;a href=&quot;http://shop.oreilly.com/product/9781118156650.do&quot;&gt;http://shop.oreilly.com/product/9781118156650.do&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Disclaimer: I have joined the O’Reilly Blogger Review Program (&lt;a href=&quot;http://oreilly.com/bloggers/&quot;&gt;http://oreilly.com/bloggers/&lt;/a&gt;). It means that I receive free books that I review. I am not forced to write nice things, so this review is an honest one.&lt;/em&gt;&lt;/p&gt;

</content>
	</entry>
 
    <entry>
	    <title>Moved to Github Pages</title>
	    <link href="https://www.movereem.nl/moved-to-github-pages"/>
        <updated>2012-02-08T00:00:00+00:00</updated>
 	    <id>https://www.movereem.nl/moved-to-github-pages</id>
		<content type="html">&lt;p&gt;&lt;img src=&quot;/images/moving.jpg&quot; alt=&quot;Moved&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Yep, that’s right, I have moved my blog. I thought that &lt;a href=&quot;http://www.posterous.com/&quot;&gt;posterous&lt;/a&gt; was the place to be. And the &lt;a href=&quot;https://www.gdocerous.com/&quot;&gt;integration&lt;/a&gt; with &lt;a href=&quot;http://www.google.com/docs/&quot;&gt;google docs&lt;/a&gt; worked nice. But I wasn’t satisfied. I missed some control, and posterous was growing into a social media platform instead of a blogging platform. I missed some features, like good syntax highlighting and markdown support.&lt;/p&gt;

&lt;p&gt;So, why did I go with &lt;a href=&quot;http://pages.github.com/&quot;&gt;Github Pages&lt;/a&gt;? Well, first I thought let’s write this myself. But there are already so many blogging platforms, and to be honest: I wouldn’t know when to build this. Now I have something that I can easily port or host myself. The posts are easily maintained in markdown.&lt;/p&gt;

&lt;h3 id=&quot;what-is-github-pages-and-how-do-my-posts-look-like&quot;&gt;What is Github Pages and how do my posts look like?&lt;/h3&gt;

&lt;p&gt;Github Pages is a simple way to host static html files. There is no dynamic pages support. But the pages are run through &lt;a href=&quot;https://github.com/mojombo/jekyll/&quot;&gt;Jekyll&lt;/a&gt; before being hosted. Jekyll converts markdown files and … to html files and copies everything else over. The files are pulled from a github repository. This means that everything is under version control, you can create branches and you can fork someone else’s website. Go ahead, &lt;a href=&quot;https://github.com/overeemm/overeemm.github.com&quot;&gt;fork my blog&lt;/a&gt; :-)&lt;/p&gt;

&lt;p&gt;The moving itself was just a lot of work, but that is because I did this manually. I wanted all my posts to be converted to markdown, and not simply copy the html files. There are converters, but I didn’t try that out.&lt;/p&gt;

&lt;p&gt;I really like the concept of generated files. I allows me to maintain the templating seperate from the actual content, but doesn’t lay any requirements on the hosting so moving again is easy. Downside is that hosting comments on your own blog is impossible. There are comment-services, but I decided to redirect feedback to &lt;a href=&quot;https://profiles.google.com/overeemm&quot;&gt;google+&lt;/a&gt; or &lt;a href=&quot;http://twitter.com/michielovereem&quot;&gt;twitter&lt;/a&gt;. That way reacting for me is easier.&lt;/p&gt;

&lt;p&gt;The autoposting to my twitter account is done through &lt;a href=&quot;http://ifttt.com/&quot;&gt;if this then that&lt;/a&gt;. I hope that they will add google+ support in the near future.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Let the posts start flowing!&lt;/strong&gt;&lt;/p&gt;

</content>
	</entry>
 
    <entry>
	    <title>JavaScript and the runaway timer</title>
	    <link href="https://www.movereem.nl/javascript-and-the-runaway-timer"/>
        <updated>2012-01-26T00:00:00+00:00</updated>
 	    <id>https://www.movereem.nl/javascript-and-the-runaway-timer</id>
		<content type="html">&lt;p&gt;One of the things that you probably will run into when creating a JavaScript application is the runaway timer. The runaway timer? Yes, the runaway timer. Ever seen this message?&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/runaway_ie.gif&quot; alt=&quot;IE message&quot; /&gt;&lt;/p&gt;

&lt;p&gt;or this one?&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/runaway_chrome.png&quot; alt=&quot;Chrome message&quot; /&gt;&lt;/p&gt;

&lt;p&gt;That is &lt;a href=&quot;http://www.nczonline.net/blog/2009/01/05/what-determines-that-a-script-is-long-running/&quot;&gt;the runaway timer&lt;/a&gt; telling you that something is running out of control. It is the thing that keeps your browser from crashing or not responding because of a long running script. JavaScript in browsers is executed in a single thread. But, any DOM manipulation or event handling is also done on this single thread (yes I’m ignoring &lt;a href=&quot;http://en.wikipedia.org/wiki/Web_worker&quot;&gt;web workers&lt;/a&gt; in this post). When your script runs for seconds, no other thing can be done thus making your browser unresponsive. Clicks on buttons or hyperlinks will not be executed, hovers or other effects will do nothing. You should be timing your JavaScript code and split everything that takes more than 100 ms. Why 100 ms? The different runaway timers have enforce limits of multiple seconds. &lt;a href=&quot;http://www.useit.com/papers/responsetime.html&quot;&gt;Usability research&lt;/a&gt; however shows that humans find a User Interface responsive when it reacts within 100 ms.&lt;/p&gt;

&lt;p&gt;I myself ran into problems with the runaway timer when implementing the Mandelbrot figure using JavaScript and the Canvas element. The basis of the mandelbrot figure is an algorithm that calculates a color for every pixel on the canvas. A nested for-loop that is, visiting every pixel and doing some calculation. With a 400 by 400 pixel canvas, I was already running into problems.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;#js
var paint = function () {
    for (var screenX = startpoint_x; screenX &amp;amp;lt; endpoint_x ; screenX++) {
        for (var screenY = startpoint_y; screenY &amp;amp;lt; endpoint_y ; screenY++) {
            var xynumber = getNumber(screenX, screenY, center_x, center_y);
            var color = getColor(xynumber);
            setColor(color);
            canvascontext.fillRect(screenX + canvas_half_width, screenY + canvas_half_height, 1, 1);
        }
    }
};
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The solution was to split this up in parts that run within the 100 ms limit (actually I choose 50 ms blocks to stay on the safe side).&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;#js
var paint = function () {
    paintPart(startpoint_x);
};

var paintPart = function(start_x) {
    var start = new Date();
    for (var screenX = start_x; screenX &amp;amp;lt; endpoint_x &amp;amp;amp;&amp;amp;amp; (new Date() - start) &amp;amp;lt; 50 ; screenX++) {
        for (var screenY = startpoint_y; screenY &amp;amp;lt; endpoint_y ; screenY++) {
            var xynumber = number.getNumber(screenX, screenY, center_x, center_y);
            var color = number.getColor(xynumber);
            setColor(color);
            canvascontext.fillRect(screenX + canvas_half_width, screenY + canvas_half_height, 1, 1);
        }
    }    
    if(screenX &amp;amp;lt; endpoint_x) {
        setTimeout(function() { paintPart(screenX); }, 25);
    }
};
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The effect of applying this pattern is that the browser stays responsive. Of course, the splitting also gives some overhead. But the site and the browser stay usable, and that is key in every good UI.&lt;/p&gt;

&lt;p&gt;Want to more about creating responsive JavaScript applications? &lt;a href=&quot;http://www.slideshare.net/nzakas/responsive-interfaces&quot;&gt;This presentation&lt;/a&gt; by Nicholas Zakas is a must see.&lt;/p&gt;

</content>
	</entry>
 
    <entry>
	    <title>Inheritance and reuse in a prototype world</title>
	    <link href="https://www.movereem.nl/inheritance-and-reuse-in-a-prototype-world"/>
        <updated>2012-01-12T00:00:00+00:00</updated>
 	    <id>https://www.movereem.nl/inheritance-and-reuse-in-a-prototype-world</id>
		<content type="html">&lt;p&gt;One of the things that I struggled with writing JavaScript, is the &lt;a href=&quot;http://en.wikipedia.org/wiki/Prototype-based_programming&quot;&gt;prototype-based programming&lt;/a&gt;. Coming from a Java and C# background, it is hard to let go of classes, interfaces and &lt;em&gt;normal&lt;/em&gt; inheritance. In a Class-based object-oriented language the classes define how objects behave. An object is an instance of a class. Classes can inherit from other classes and interfaces. In JavaScript (and other prototype-based languages like &lt;a href=&quot;http://iolanguage.com/&quot;&gt;IO&lt;/a&gt;) there are no classes. There are objects, constructors and prototypes.&lt;/p&gt;

&lt;p&gt;The prototype way in JavaScript is simply shown in the following example.
Let us first define a constructor:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;#js
function Vehicle() {
  this.speed = 10;
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Now you shouldn’t think to much of this constructor. It is a normal function in JavaScript, but by convention we let it start with a capital letter. The important thing is that you use it in combination with the &lt;strong&gt;new&lt;/strong&gt; keyword.&lt;/p&gt;

&lt;p&gt;The next step is to define functions on the prototype object of this constructor:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;#js
Vehicle.prototype.setMaxSpeed = function (speed) {
  this.speed = speed;
};

Vehicle.prototype.maxSpeed = function () {
  return this.speed;
};
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;When we construct a new object, we can use the constructor to create an instance:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;#js
var myVehicle = new Vehicle();
var isVehicle = myVehicle instanceof Vehicle; 
// isVehicle is true
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The constructor makes sure that the new object is based on the prototype. This makes all defined functions available in the prototype chain. There are two advantages of this approach: we can inherit from this object, and we can use the &lt;strong&gt;instanceof&lt;/strong&gt; operator.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;#js
function Car() {
}
Car.prototype = new Vehicle();

var myCar = new Car();
var isVehicle = myCar instanceof Vehicle;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Now we have an instance that is more specific then our Vehicle object, but can be used as a Vehicle none the less. As one might notice, the inheritance is achieved by setting the prototype of a constructor. But it is not set to another constructor, but to the instance of an object. The inheritance chain is thus build on instances and not on classes.&lt;/p&gt;

&lt;p&gt;There are other approaches possible to share code between objects. One of them is object augmentation. Because we can alter the JavaScript objects at any moment, we can augment objects with functionality.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;#js
function makeVehicle(o) {
    var speed = 10;
    o.maxSpeed = function() {
       return speed;
    };
    o.setMaxSpeed = function(s) {
       speed = s;
    };
    return o;
}

var myVehicle = makeVehicle({});

function makeCar(o){
    o = makeVehicle(o);
    // add extra functionality
    return o;
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;We cannot use &lt;strong&gt;instanceof&lt;/strong&gt; anymore, but we can easily create objects with the same functionality. Of course there are some (subtle) difference with the prototype approach. If we decide that vehicles need more functions later on, we cannot alter all instances by changing the prototype. As a positive gain, we can use a &lt;a href=&quot;http://en.wikipedia.org/wiki/Mixin&quot;&gt;Mixin&lt;/a&gt; pattern to get more flexibility.&lt;/p&gt;

&lt;p&gt;The prototype approach can also be used without constructors and the &lt;strong&gt;new&lt;/strong&gt; keyword. &lt;a href=&quot;https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object/create&quot;&gt;ECMAScript 5th Edition&lt;/a&gt; added a new function, Object.create. This function creates a new object using the given object as prototype.&lt;/p&gt;

&lt;p&gt;Douglas Crockford has some nice articles (&lt;a href=&quot;http://javascript.crockford.com/prototypal.html&quot;&gt;this&lt;/a&gt; and &lt;a href=&quot;http://www.crockford.com/javascript/inheritance.html&quot;&gt;this&lt;/a&gt;) about inheritance and reuse in JavaScript. Because objects in JavaScript are soft and can be changed at any moment, he hardly sees use for the Classical Inheritance approach.
Peter Michaux also &lt;a href=&quot;http://michaux.ca/articles/javascript-oop-encapsulation-durable-objects-parasitic-inheritance-and-the-decorator-pattern&quot;&gt;writes&lt;/a&gt; about the augmentation approach, seeing the Decorator Pattern in it.&lt;/p&gt;

&lt;p&gt;Another discussion raised by looking at the &lt;a href=&quot;http://freshbrewedcode.com/derekgreer/2011/12/31/solid-javascript-the-liskov-substitution-principle/&quot;&gt;SOLID principles&lt;/a&gt; is the usage of inheritance. Most of the time, inheritance is used for method overloading and polymorphic methods. The Liskov Substitution Principle states that&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;Subtypes must be substitutable for their base types.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;But JavaScript is not statically typed. This gives us the freedom to do more dynamic typing. Instead of looking at inheritance, we can look at behavior. By checking if certain functions are present we can be much more flexible in the range of objects that we can act on.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;#js
function move(vehicle){
    if(!vehicle instanceof Vehicle)
        throw Error(&apos;not a vehicle&apos;);
    // ...
}

function moveDynamic(vehicle){
    if(!vehicle.move)
        throw Error(&apos;move function not present&apos;);
    // ...
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The &lt;strong&gt;moveDynamic&lt;/strong&gt; function shows that we can move any object that has a move function. The move function only works on instances of our constructor function. The last fits the dynamic model and gives more flexibility.&lt;/p&gt;

</content>
	</entry>
 
    <entry>
	    <title>Things learned from the Game of Life</title>
	    <link href="https://www.movereem.nl/things-learned-from-the-game-of-life"/>
        <updated>2011-12-24T00:00:00+00:00</updated>
 	    <id>https://www.movereem.nl/things-learned-from-the-game-of-life</id>
		<content type="html">&lt;p&gt;&lt;em&gt;I mentioned in the &lt;a href=&quot;http://www.movereem.nl/evolving-technology-javascript&quot;&gt;previous blog post&lt;/a&gt; that I am digging deeper into JavaScript lately. This post is the second in a series about JavaScript.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;I love mathematical stuff. Things like &lt;a href=&quot;http://en.wikipedia.org/wiki/Fractal&quot;&gt;fractals&lt;/a&gt;, but also &lt;a href=&quot;http://en.wikipedia.org/wiki/Conway%27s_Game_of_Life&quot;&gt;Conway’s Game of Life&lt;/a&gt; are amazing. So I started implementing the Game of Life using JavaScript (&lt;a href=&quot;https://github.com/overeemm/ConwaysScriptOfLife&quot;&gt;github&lt;/a&gt; and &lt;a href=&quot;http://samples.movereem.nl/conwaysscriptoflife/&quot;&gt;a running example&lt;/a&gt;). While implementing, I used a number of patterns and techniques that are worth explaining. These patterns are useful because they let you work more effective with the language.&lt;/p&gt;

&lt;p&gt;But let me first explain two differences between JavaScript and traditional object-oriented languages.&lt;/p&gt;

&lt;h3 id=&quot;scope&quot;&gt;Scope&lt;/h3&gt;

&lt;p&gt;JavaScript only knows two scopes: the global scope and the function scope. This is different then for example C#. In C# block structures also start a new scope. So when you use a conditional or a loop structure, you know that you enter a new scope. This gives advantages in reuse variable names, but it also means that the garbage collector can free up memory when your done. The next example shows how this works in C#.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;#java
if(condition) {
    int i = 9 + 8;
    // do something with i
}
return i; // error, because i is out of scope
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;If we would try the same in JavaScript, it would lead to different results.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;#js
if(condition) {
    var i = 9 + 8; 
    // do something with i
}
return i; // fine, i is in scope
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This can really fool you. Because these are the only two scopes we have, libraries that define global variables (like jQuery does) can conflict with each other easily. So you want and should be careful to not pollute the global scope. That is also why you should always use the &lt;strong&gt;var&lt;/strong&gt; keyword to declare your variables. Declarations without this keyword cause global variables, even if you only use them inside of a function.&lt;/p&gt;

&lt;h3 id=&quot;access-modifiers&quot;&gt;Access modifiers&lt;/h3&gt;

&lt;p&gt;One of the first things that we learn in object-oriented languages is the usage of &lt;strong&gt;private&lt;/strong&gt; and &lt;strong&gt;public&lt;/strong&gt; modifiers. With those modifiers it possible to hide information inside of object instances. It is one of the core principles of good code design: information hiding.&lt;/p&gt;

&lt;p&gt;In JavaScript there is no such thing as access modifiers. 
So we are left with two choices: give away our implementation details, or come up with some clever way to hide them anyway.&lt;/p&gt;

&lt;p&gt;These two key differences between JavaScript and other object-oriented languages make that we should come up with some clever way’s to structure and design our code. There are three things that I would like to point out.&lt;/p&gt;

&lt;h3 id=&quot;namespaces&quot;&gt;Namespaces&lt;/h3&gt;

&lt;p&gt;The first thing that I choose to do is adding namespaces to my code. Namespaces are used to create unique names within a certain naming scope. C# has them, and so does XML. Unfortunately, JavaScript doesn’t know namespaces. But you can still simulate them by using object properties.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;#js
// create the first level
var overeemm = window.overeemm || {}; 
// create a subnamespace
overeemm.conway = overeemm.conway || {}; 
// continue creating as many levels as you would like
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;What happens is actually very simple: we just create empty objects to simulate a namespace level. By using the OR notation I am sure not to redefine another namespace and thus clearing functions and objects created on that level. By putting this into every file, I know that the namespace that I will use is available.&lt;/p&gt;

&lt;p&gt;With this simple technique we prevent naming conflicts with other libraries.&lt;/p&gt;

&lt;h3 id=&quot;hiding-your-private-stuff&quot;&gt;Hiding your private stuff&lt;/h3&gt;

&lt;p&gt;We want to prevent all of our internal implementation details to leak out of our objects. &lt;em&gt;At least I would.&lt;/em&gt; So we need some clever way to do this. There are a couple of things that you could do, I have been using closures to achieve this.&lt;/p&gt;

&lt;p&gt;A &lt;a href=&quot;http://en.wikipedia.org/wiki/Closure_(computer_science)&quot;&gt;closure&lt;/a&gt; is a function stored together with his environment (the variable bindings). When you execute this function, it has access to the variable bindings from the stored environment. It is said that the function is closed over the free variables. Because the function keeps access to all those variables, it is possible to create an hidden environment. This hidden environment is only accessible by the functions defined in this environment.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;#js
var f, g;
function doSomething(x, y) {
    var z = x + y;
    f = function () { return z++; };
    g = function () { return z--; };
}
doSomething(1, 4);
// f and g are free to use
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;After calling &lt;strong&gt;doSomething&lt;/strong&gt; we can use the functions &lt;strong&gt;f&lt;/strong&gt; and &lt;strong&gt;g&lt;/strong&gt;. But they are defined within the scope of &lt;strong&gt;doSomething&lt;/strong&gt;! Because they are defined in the same scope, they both have access to the same variable &lt;strong&gt;z&lt;/strong&gt;. This variable is not available outside of &lt;strong&gt;doSomething&lt;/strong&gt;, making it a private variable.&lt;/p&gt;

&lt;p&gt;If we change the code snippet a little bit, we can create an object with his own private scope.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;#js
function createObject(x, y) {
    var z = x + y;
    return {
        f : function () { return z++; },
        g : function () { return z--; }
    }
}
var o = createObject(1, 4);
// o.f and o.g are free to use
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;With this technique we actually achieved two things:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;we created an object &lt;strong&gt;o&lt;/strong&gt; with a private state.&lt;/li&gt;
  &lt;li&gt;we did not pollute the global namespace with &lt;strong&gt;f&lt;/strong&gt; and &lt;strong&gt;g&lt;/strong&gt;, but only with &lt;strong&gt;o&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;singletons-through-self-executing-functions&quot;&gt;Singletons through self executing functions&lt;/h3&gt;

&lt;p&gt;But what if we have a library with utilities. Or we want to create a singleton object? We can use the same technique, but place it in a different context.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;#js
var singleton = (function(x, y) {
    var z = x + y;
    return {
        f : function () { return z++; },
        g : function () { return z--; }
    }
})();
// singleton.f and singleton.g are free to use
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;We change the create-function to an anonymous function that is directly executed. Because of the object that we return, we have created a private scope. And by executing the anonymous function, we make sure that nobody can create a second instance.&lt;/p&gt;

&lt;p&gt;For me, these examples show a nice and elegant side of JavaScript. One could argue that they are solution around problems in a bad designed language. However, we have to deal with our inheritance even if we do not like it. And to me, these techniques show creativity and possibilities.&lt;/p&gt;

&lt;h3 id=&quot;singleton-revisited&quot;&gt;Singleton revisited&lt;/h3&gt;

&lt;p&gt;After a twitter discussion I wanted to revisite the singleton pattern a bit. One of the aspects of the singleton pattern is the fact that you can ask for the thing you want and get the same instance back, no matter how often you ask for it. That is something that was not captured in my code example.&lt;/p&gt;

&lt;p&gt;On stackoverflow &lt;a href=&quot;http://stackoverflow.com/a/1895669&quot;&gt;a nice example&lt;/a&gt; is given. The principle is that you redefine the creation function and let it return the same instance. I thought it was a creative solution, and again I am amazed by the things you can do :-)&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;#js
function singleton() {
  var instance = (function() {
    var privateVar;

    function privateMethod () {
      // ...
    }

    return { // public interface
      publicMethod1: function () {
          // private members can be accessed here
       },
      publicMethod2: function () {
        // ...
      }
    };
  })();

  singleton = function () { // re-define the function for subsequent calls
    return instance;
  };

  return singleton(); // call the new function
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

</content>
	</entry>
 
    <entry>
	    <title>The rise of JavaScript</title>
	    <link href="https://www.movereem.nl/evolving-technology-javascript"/>
        <updated>2011-12-22T00:00:00+00:00</updated>
 	    <id>https://www.movereem.nl/evolving-technology-javascript</id>
		<content type="html">&lt;p&gt;&lt;em&gt;I’m digging deeper into JavaScript lately, and I like what I find, see and try.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;I remember that when I first saw JavaScript I was building a website for our graduating class in high school, it was around 2001. It was the period that JavaScript was used in the marketing term &lt;a href=&quot;http://nl.wikipedia.org/wiki/Dynamic_HTML&quot;&gt;DHTML&lt;/a&gt;. It was primarily used for dynamic menu’s with overlays and for the snow effects during winter. And yes, I am guilty for doing that too.&lt;/p&gt;

&lt;p&gt;During college, fast forward three years, we used JavaScript for client-side validation. It was still advertised as a scripting language, useful for dynamic HTML.&lt;/p&gt;

&lt;p&gt;Then during my first full-time job, the rise of &lt;a href=&quot;http://nl.wikipedia.org/wiki/Asynchronous_JavaScript_and_XML&quot;&gt;AJAX&lt;/a&gt; happened. Microsoft added dynamic capabilities through various WebControls (like the UpdatePanel). Prototype.js was the first major library. Everything and everybody that used AJAX was hot. People started pointing out the downsides: JavaScript could be disabled, so websites should work without it. The battle of browser compatibility began, Internet Explorer 6 was still mainstream.&lt;/p&gt;

&lt;p&gt;And then, slowly it all evolved from sprinkling extra’s into an HTML environment to full web applications build in JavaScript. Great examples are of course gmail, google docs and &lt;a href=&quot;http://c9.io/&quot;&gt;Cloud 9 IDE&lt;/a&gt;. JavaScript has grown into a serious programming language, that people should know and care about. With &lt;a href=&quot;http://nodejs.org/&quot;&gt;Node.js&lt;/a&gt; it even became possible to write your web application’s server-side in JavaScript. Microsoft is enabling you to use it for desktop applications on &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/windows/apps/br229565%28v=VS.85%29.aspx&quot;&gt;Windows 8&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Some saw this evolution, thought about it and stated bold things ( &lt;em&gt;Yes, it was written in 2007, I know that I’m late to the game.&lt;/em&gt; ):&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;Any application that can be written in JavaScript, will eventually be written in JavaScript. (&lt;a href=&quot;http://www.codinghorror.com/blog/2007/07/the-principle-of-least-power.html&quot;&gt;Atwood’s Law&lt;/a&gt;).&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;and&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;JavaScript is an assembly language. The JavaScript + HTML generate is like a .NET assembly. The browser can execute it, but no human should really care what’s there.(&lt;a href=&quot;http://www.hanselman.com/blog/JavaScriptIsAssemblyLanguageForTheWebSematicMarkupIsDeadCleanVsMachinecodedHTML.aspx&quot;&gt;Erik Meijer on hanselman.com&lt;/a&gt;)&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Atwood’s Law is getting confirmed every day: real life web applications and games are written in JavaScript, not only for fun! Hanselman’s statement is seen in things like the Google Web Toolkit and the Cappuccino framework. But also in ClojureScript and CoffeeScript. They all try to lift some of the problems in JavaScript by using other languages or creating new languages that compile into JavaScript.&lt;/p&gt;

&lt;p&gt;I am not sure if that is the way to go. I like JavaScript. I’ve read some great books by &lt;a href=&quot;http://shop.oreilly.com/product/9780596517748.do&quot;&gt;Douglas Crockford (JavaScript The Good Parts)&lt;/a&gt;, &lt;a href=&quot;http://jspro.org/&quot;&gt;John Resig (Pro JavaScript Techniques)&lt;/a&gt; and &lt;a href=&quot;http://shop.oreilly.com/product/9780596101992.do&quot;&gt;David Flanagam (JavaScript The Definitive Guid)&lt;/a&gt;. Still I think that I scratched nothing but the surface. There are so many tools, libraries and frameworks from which I can learn. However, I can also see where those abstraction are coming from. I never learned C or C++. It is great that we have C#, Java, Ruby and so on on top of those languages to make development easier, faster and less error prone. But is JavaScript already in that stage? I am not sure… only time will tell.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;I hope to digg into JavaScript and some libraries in the next couple blog posts.&lt;/em&gt;&lt;/p&gt;

</content>
	</entry>
 
    <entry>
	    <title>First steps in a new language</title>
	    <link href="https://www.movereem.nl/first-steps-in-a-new-language-73031"/>
        <updated>2011-11-03T00:00:00+00:00</updated>
 	    <id>https://www.movereem.nl/first-steps-in-a-new-language-73031</id>
		<content type="html">&lt;p&gt;One of my all time favorite books on software development is The Pragmatic Programmer: From Journeyman To Master. I highly recommend it. You do not have it? You didn’t read it yet? Go buy it!&lt;/p&gt;

&lt;p&gt;One of the tips given in the book is&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;Learn at least one new language every year. Different languages solve the same 
problems in different ways. By learning several different approaches, you can 
help broaden your thinking and avoid getting stuck in a rut. Additionally, 
learning many languages is far easier now, thanks to the wealth of freely 
available software on the Internet.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Although I read through the seven languages in seven days book and the book of Ruby this year, I was still not comfortable enough with Ruby to use it when necessary. So one of my goals was to really learn Ruby. And the best way to learn is by using it. Like Knuth already said in his classic The Art Of Computer Programming:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;It is difficult, if not impossible, for anyone to learn a subject purely by
reading about it, without applying the information to specific problems and
thereby begin encouraged to think about what has been read. Furthermore, we all
learn best the things that we have discovered for ourselves.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This write-up is a summary of my first (baby) steps in Ruby.&lt;/p&gt;

&lt;p&gt;I started out with doing some katas from the pragmatic programmers. I quickly found out that although they are good exercises, they did not interest me. And because of that I was not really motivated in doing them.&lt;/p&gt;

&lt;p&gt;The second exercise was a rewrite of some tool that I build in C# to encode, upload and publish mp3 files to a Joomla-website. The .NET tool is a WinForms executable, using lame to encode, using ftp to upload and using XML-RPC to publish the post. The Ruby version is one script, doing all those things in sequential steps. This exercise was more fun, because I needed it (the .NET tool didn’t work on my MacBook).&lt;/p&gt;

&lt;p&gt;My scripts can be found on &lt;a href=&quot;https://github.com/overeemm/LanguageExperiments/tree/master/ruby&quot;&gt;github&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;So far so good. I like the language, but I do realize that these are just scripts. And by no means they are building a real life system. So the next exercise should be bigger, forcing me to use more advanced features. Maybe I should rewrite the Joomla-website in a simple RoR version?&lt;/p&gt;

&lt;p&gt;How do you learn a new language?&lt;/p&gt;

</content>
	</entry>
 
    <entry>
	    <title>Using Google APIs through OAuth 2.0</title>
	    <link href="https://www.movereem.nl/using-google-apis-through-oauth-20"/>
        <updated>2011-09-09T00:00:00+00:00</updated>
 	    <id>https://www.movereem.nl/using-google-apis-through-oauth-20</id>
		<content type="html">&lt;p&gt;Lately I’ve been working on a web application that connects to Google docs: &lt;a href=&quot;https://www.gdocerous.com/&quot;&gt;gdocerous&lt;/a&gt;. During the development I’ve stumbled up on OAuth and other authorization protocols. This blog post is a small write-up of the experience.&lt;/p&gt;

&lt;p&gt;As the major cloud provider, Google has lots of content available through their applications. Fortunately, they also have a nice API with lots of support and samples. But also lots of ways to connect and authenticate. They support AuthSub (their own proprietary protocol), OAuth 1.0 and OAuth 2.0 (still in beta), but also a plain user name and password connection. They do recommend that you use OAuth, and because the specs for OAuth 2.0 seem stable enough, I would recommend to use the 2.0 version. This post shares some example code on how to use it in a .NET web application.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/oauth.png&quot; alt=&quot;OAuth logo&quot; /&gt;&lt;/p&gt;

&lt;h3 id=&quot;oauth-20-in-short&quot;&gt;OAuth 2.0 in short&lt;/h3&gt;

&lt;p&gt;The OAuth 2.0 protocol is an evolution from OAuth 1.0 (really? yes it is!). If you are interested in knowing why a new version was necessary, I suggest that you read the following article from &lt;a href=&quot;http://hueniverse.com/&quot;&gt;Eran Hammer-Lahav&lt;/a&gt;: &lt;a href=&quot;http://hueniverse.com/2010/05/introducing-oauth-2-0/&quot;&gt;Introducing OAuth 2.0&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The global idea is that you redirect a user to the OAuth-server. There he can authenticate and grant access to the application that redirected him in the first place. The user gives access for a certain scope. In the case of Google, this scope can be Google docs, gmail or some other application. It is of course important that the scope for which access is requested is as narrow as possible. After the user has authorized the application, the OAuth-server redirects to the application, giving an authorization code along. This code can be used to request an access token. And finally, the token can be used to access APIs and resources.&lt;/p&gt;

&lt;p&gt;The main advantage is that the user does not have to give his user name and password to the application. Instead the application requests access and receives a short-lived access token. This makes it easy to revoke the access in a later stage, without having to change any credentials.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Is all good in the Google OAuth 2.0 world? No, not really. Some things remain hard. For instance using Google’s IMAP or SMTP. Although the &lt;a href=&quot;http://code.google.com/apis/gmail/oauth/protocol.html&quot;&gt;protocol documentation&lt;/a&gt; is clear, there is no easy way to use this from .NET.&lt;/em&gt;&lt;/p&gt;

&lt;h3 id=&quot;show-me-the-code&quot;&gt;Show me the code!&lt;/h3&gt;

&lt;p&gt;So how do you get started with these APIs? Let me walk you through the basic steps.&lt;/p&gt;

&lt;p&gt;First, register your app in the &lt;a href=&quot;https://code.google.com/apis/console/&quot;&gt;Google APIs console&lt;/a&gt;. This gives you a clientid and clientsecret. It also allows you to give your application more trust by supplying a description and logo. This way users can recognize the application that asks for trust.&lt;/p&gt;

&lt;p&gt;On requesting authorization, your application starts with redirecting the user to &lt;a href=&quot;https://accounts.google.com/o/oauth2/auth&quot;&gt;https://accounts.google.com/o/oauth2/auth&lt;/a&gt;, following the description of &lt;a href=&quot;http://code.google.com/apis/accounts/docs/OAuth2.html#SS&quot;&gt;Using OAuth 2.0 to Access Google APIs&lt;/a&gt;. This part is not that hard. Users are shown a recognizable Google page on which they grant access for your application.&lt;/p&gt;

&lt;p&gt;After these two steps we need to write some real code. First retrieve the code from the request en get an access token from Google.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;#csharp
string queryStringFormat = @&quot;code={0}&amp;amp;client_id={1}&amp;amp;client_secret={2}&amp;amp;redirect_uri={3}&amp;amp;grant_type=authorization_code&quot;;
string postcontents = string.Format(queryStringFormat
                                   , HttpUtility.UrlEncode(code)
                                   , HttpUtility.UrlEncode(clientid)
                                   , HttpUtility.UrlEncode(clientsecret)
                                   , HttpUtility.UrlEncode(redirect_url));
HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(&quot;https://accounts.google.com/o/oauth2/token&quot;);
request.Method = &quot;POST&quot;;
byte[] postcontentsArray = Encoding.UTF8.GetBytes(postcontents);
request.ContentType = &quot;application/x-www-form-urlencoded&quot;;
request.ContentLength = postcontentsArray.Length;
using (Stream requestStream = request.GetRequestStream())
{
    requestStream.Write(postcontentsArray, 0, postcontentsArray.Length);
    requestStream.Close();
    WebResponse response = request.GetResponse();
    using (Stream responseStream = response.GetResponseStream())
    using (StreamReader reader = new StreamReader(responseStream))
    {
        string responseFromServer = reader.ReadToEnd();
        reader.Close();
        responseStream.Close();
        response.Close();
        return SerializeToken(responseFromServer);
    }
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The result is a JSON string that, with the help of &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/system.runtime.serialization.json.datacontractjsonserializer.aspx&quot;&gt;DataContractJsonSerializer&lt;/a&gt;, can be serialized into&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;#csharp
public class GoogleOAuthToken
{
    public string access_token;
    public string expires_in;
    public string token_type;
    public string refresh_token;
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The given access token comes with an expiration time. To extend your timeperiod, you can use the refresh token to request a new access token. The code to do this is similar to the example above.&lt;/p&gt;

&lt;p&gt;After this we can finally get to work. Let’s get a list of all folders from google docs.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;#csharp
var settings = new RequestSettings(&quot;your appname&quot;, &quot;oauth access token&quot;);
var request = new DocumentsRequest(settings);
foreach (Document doc in request.GetFolders().Entries)
{
    /* do something */
}    
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This snippet uses the Google Data Protocol, using the C# library available from &lt;a href=&quot;http://code.google.com/p/google-gdata/&quot;&gt;google code&lt;/a&gt;. The Data Protocol it self is REST-inspired, but the library gives a nice object-oriented wrapper around that.&lt;/p&gt;

&lt;p&gt;The library wraps all major APIs from Google, so anything is possible.&lt;/p&gt;

&lt;p&gt;Have fun coding!&lt;/p&gt;

</content>
	</entry>
 
    <entry>
	    <title>Blogging in the cloud through gdocerous</title>
	    <link href="https://www.movereem.nl/blogging-in-the-cloud-through-gdocerous"/>
        <updated>2011-08-21T00:00:00+00:00</updated>
 	    <id>https://www.movereem.nl/blogging-in-the-cloud-through-gdocerous</id>
		<content type="html">&lt;p&gt;I’m trying to find more time and topics to blog about. While doing that, I reviewed the work flow that I have for blogging. My blog is hosted on &lt;a href=&quot;http://posterous.com/&quot;&gt;posterous.com&lt;/a&gt;, a great service (although they do have some downtime-issues). It makes posting a blog easy: just send a mail to &lt;a href=&quot;posterous@posterous.com&quot;&gt;posterous@posterous.com&lt;/a&gt; and your done. The sender e-mail is recognized and the e-mail is converted to a blog post. They automatically convert images to galleries, embed youtube links and so on. If you are working on multiple blog posts at a time, you could store your mail as a draft or store it somewhere else. Somewhere else is no fun, because it means that you will have to have some other intermediate form. Storing it as a draft means that you do not have history on your blog post.&lt;/p&gt;

&lt;p&gt;Lately I’ve started to use &lt;a href=&quot;http://docs.google.com/&quot;&gt;google docs&lt;/a&gt; more and more. And it looked like a great place to store my draft-blog posts. But about posting the final version? In that case you had to copy-paste it over to your e-mail and reformat it. Not that easy and fun anymore.&lt;/p&gt;

&lt;p&gt;And then I got this great idea: wouldn’t it be great if you could choose your google document and post it to posterous? Of course it would be :) So that became my weekend-project: &lt;a href=&quot;http://www.gdocerous.com/&quot;&gt;gdocerous&lt;/a&gt;. ( &lt;em&gt;the domain is not yet active, it should be this week&lt;/em&gt; ).&lt;/p&gt;

&lt;p&gt;I have a working version, but unfortunately it is not open for public yet. I still have some things to finish before opening it up:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;I want to use the OAuth API instead of the AuthSub version&lt;/li&gt;
  &lt;li&gt;I still need to figure out how to use gmail’s smtp through OAuth&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The whole thing is pretty simple, but I think useful. One of the things is that I do not want to store sensitive data or user accounts. That’s why the posterous API is not usable. Another thing is that I only want to select and post, no mutation of articles and such. Last is that the &lt;a href=&quot;https://github.com/overeemm/gdocerous&quot;&gt;complete source code&lt;/a&gt; is open for everyone to look at.&lt;/p&gt;

</content>
	</entry>
 
    <entry>
	    <title>Reading != learning</title>
	    <link href="https://www.movereem.nl/reading-learning"/>
        <updated>2011-08-07T00:00:00+00:00</updated>
 	    <id>https://www.movereem.nl/reading-learning</id>
		<content type="html">&lt;p&gt;I think that I have always been a &lt;a href=&quot;http://www.movereem.nl/two-years-of-reading-summarized&quot;&gt;reader&lt;/a&gt;. There is a box with books from my childhood, and now I have shelves full of books. A great number of them are technical. But there are also novels and history related books. I even signed up to review books for &lt;a href=&quot;http://oreilly.com/bloggers/&quot;&gt;O’Reilly&lt;/a&gt;. I already did &lt;a href=&quot;http://www.movereem.nl/topic.html#bookreview&quot;&gt;a number of them&lt;/a&gt; (including two reviews that were not for O’Reilly).&lt;/p&gt;

&lt;p&gt;But you know what, I did not really learn anything from them yet. The problem with technical books, programming books is that you have to do something with the knowledge. Otherwise it will not stick. So I’m taking a break from the reviewing stuff. I’m going to set two goals for myself, after which I can pick up the reviewing again. What are those goals?&lt;/p&gt;

&lt;h3 id=&quot;1-build-an-ipadiphone-app-and-release-it-to-the-appstore&quot;&gt;1. Build an iPad/iPhone app and release it to the Appstore&lt;/h3&gt;

&lt;p&gt;After the &lt;a href=&quot;http://www.movereem.nl/bookreview-head-first-iphone-ipad-development&quot;&gt;iOS book&lt;/a&gt; I was eager to write something, but then again another book came by and the app is left unfinished. So I’m going to finish it and release it. I have an idea and already started on it. It is time to focus and finish it. Probably will take a couple of months though.&lt;/p&gt;

&lt;p&gt;Progress will be visible in my &lt;a href=&quot;https://github.com/overeemm/iArk&quot;&gt;github repo&lt;/a&gt;.&lt;/p&gt;

&lt;h3 id=&quot;2-learn-ruby-and-change-my-default-language-for-a-certain-period&quot;&gt;2. Learn Ruby and change my default language for a certain period&lt;/h3&gt;

&lt;p&gt;I have just finished &lt;a href=&quot;http://www.movereem.nl/bookreview-the-book-of-ruby&quot;&gt;the book of Ruby&lt;/a&gt; and before that touched on Ruby while reading &lt;a href=&quot;http://www.movereem.nl/bookreview-seven-languages-in-seven-weeks-by&quot;&gt;the seven languages book&lt;/a&gt;. But again I’m lacking some real experience.
So I will change my default script/tool language for a certain period and see where that will take me.
I hope to get some fluency in Ruby and try on &lt;a href=&quot;http://ironruby.net/&quot;&gt;IronRuby&lt;/a&gt; and &lt;a href=&quot;http://www.macruby.org/&quot;&gt;MacRuby&lt;/a&gt;. That will give me some flexibility in developing on my MacBook or on my Windows laptop. I’m planning of working through some of &lt;a href=&quot;http://codekata.pragprog.com/2007/01/code_kata_backg.html&quot;&gt;the coding Katas&lt;/a&gt; as described here. That will give me some guidance as I’m trying stuff.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/ruby.gif&quot; alt=&quot;Ruby, a programmer&apos;s Best Friend&quot; /&gt;&lt;/p&gt;

&lt;p&gt;The big eye-opener here is that I have to stop reading technical books, but I have to start doing them. Let’s see how I will do.&lt;/p&gt;

</content>
	</entry>
 
    <entry>
	    <title>bookreview - the book of Ruby</title>
	    <link href="https://www.movereem.nl/bookreview-the-book-of-ruby"/>
        <updated>2011-08-07T00:00:00+00:00</updated>
 	    <id>https://www.movereem.nl/bookreview-the-book-of-ruby</id>
		<content type="html">&lt;p&gt;&lt;strong&gt;The book of Ruby&lt;/strong&gt; by &lt;em&gt;Huw Collingbourne&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;This book covers every part of Ruby that a newbie Ruby developer should know. It starts out with the basics around classes, objects, collections and moves over to more advanced stuff like threads and marshaling. Not only the language is covered: developing, debugging and the framework Rails are also explained to the reader. The book is full of example code snippets and good explanation. For the more experienced developers the author has added ‘digging deeper’ sections, that take you to more advanced topics. The book finishes of with more reading material and guidance around development tools.&lt;/p&gt;

&lt;p&gt;The book has a subtitle telling us that this is ‘a hands-on guide for the adventurous’. That sure does sound promising. Unfortunately, the book does not read as a ‘hands-on guide’. It reads more like a reference manual. There are no assignments to practice the language and the examples are short. It misses a real life example that is build from start to end. You would expect some real application coming from a hands-on guide. The book self is well written and reads very easily, but the ‘reference manual’ style makes it somewhat boring.&lt;/p&gt;

&lt;p&gt;I definitely recommend this book to people starting in Ruby, but not as a first book. Start with a real hands-on book that walks you to the creation of a basic application. Then pick up this book and walk to all the different topics. That will give you a good understanding of Ruby.&lt;/p&gt;

&lt;p&gt;Find the book at &lt;a href=&quot;http://oreilly.com/catalog/9781593272944/&quot;&gt;http://oreilly.com/catalog/9781593272944/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Disclaimer: I have joined the O’Reilly Blogger Review Program (&lt;a href=&quot;http://oreilly.com/bloggers/&quot;&gt;http://oreilly.com/bloggers/&lt;/a&gt;). It means that I receive free books that I review. I am not forced to write nice things, so this review is an honest one.&lt;/em&gt;&lt;/p&gt;

</content>
	</entry>
 
    <entry>
	    <title>bookreview - Head First iPhone &amp; iPad Development, 2nd Edition</title>
	    <link href="https://www.movereem.nl/bookreview-head-first-iphone-ipad-development"/>
        <updated>2011-07-16T00:00:00+00:00</updated>
 	    <id>https://www.movereem.nl/bookreview-head-first-iphone-ipad-development</id>
		<content type="html">&lt;p&gt;&lt;strong&gt;Head First iPhone &amp;amp; iPad Development, 2nd Edition&lt;/strong&gt; by &lt;em&gt;Dan Pilone &amp;amp; Tracey Pilone&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The Head First series are always a great way to get started in some new technology. This book is no exception to that. This second edition is completely rewritten to match the new iOS and Xcode versions. The authors take the reader with them on a path to learn these new technologies. Every aspect of developing for the iDevices is shown and discussed. Real life examples are used to build complete applications that can be submitted to the App Store. The book starts out with a simple iPhone application which is then expanded to incorporate more advanced stuff such as iPad support, device orientation, Core Data and usage of the Camera. Every part is explained in detail with code samples and screenshots.&lt;/p&gt;

&lt;p&gt;Overall the book is a great way to get introduced to development for iOS. The authors try to cut lose from boring introductions. Code samples are alternated with screenshots, in dept explanations and silly interviews. This way the book stays fun and interesting. However, I found the style a bit to childish from time to time. Interviews with GUI controls are not the content that I would expect. It does make this book useful for teenagers that want to get started. I think the content could be made a little more dense and less childish.&lt;/p&gt;

&lt;p&gt;Find the book at &lt;a href=&quot;http://oreilly.com/catalog/9781593272944/&quot;&gt;http://oreilly.com/catalog/9781449387822/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Disclaimer: I have joined the O’Reilly Blogger Review Program (&lt;a href=&quot;http://oreilly.com/bloggers/&quot;&gt;http://oreilly.com/bloggers/&lt;/a&gt;). It means that I receive free books that I review. I am not forced to write nice things, so this review is an honest one.&lt;/em&gt;&lt;/p&gt;

</content>
	</entry>
 
    <entry>
	    <title>bookreview - JavaScript, The Definitive Guide, 6th edition by David Flanagan</title>
	    <link href="https://www.movereem.nl/bookreview-javascript-the-definitive-guide-6t"/>
        <updated>2011-05-15T00:00:00+00:00</updated>
 	    <id>https://www.movereem.nl/bookreview-javascript-the-definitive-guide-6t</id>
		<content type="html">&lt;p&gt;&lt;strong&gt;Javascript, The Definitive Guide, 6th Edition&lt;/strong&gt; by &lt;em&gt;David Flanagan&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;This book is called ‘the definitive guide’ for a reason: it is by far the most complete book on Javascript that you can buy. Every subject, from syntax to popular libraries is covered. The 6th edition is completely updated to reflect the latest standard, ECMAscript 5. The newest features such as localstorage and geolocation are explained in this new edition. The book follows a clear outline. It starts by explaining the language and it’s syntax, followed by it’s features. Next is the usage of the language, both as a client-side language and as a server-side language. The book also covers the most popular Javascript library: jQuery.&lt;/p&gt;

&lt;p&gt;I found the book, although it is written as a reference, easy and entertaining to read. The book is a great resource to use while developing Javascript, because every little detail is covered. A good indication of its quality is that the book survived five editions and is still going strong! What I did miss is some guidance around real world Javascript development and tooling. The book does not explain anything around unit testing, development environments and other useful tooling. That would be a welcome addition for the 7th edition!&lt;/p&gt;

&lt;p&gt;Find the book at &lt;a href=&quot;http://oreilly.com/catalog/9780596805531/&quot;&gt;http://oreilly.com/catalog/9780596805531/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Disclaimer: I have joined the O’Reilly Blogger Review Program (&lt;a href=&quot;http://oreilly.com/bloggers/&quot;&gt;http://oreilly.com/bloggers/&lt;/a&gt;). It means that I receive free books that I review. I am not forced to write nice things, so this review is an honest one.&lt;/em&gt;&lt;/p&gt;

</content>
	</entry>
 
    <entry>
	    <title>Two years of reading summarized</title>
	    <link href="https://www.movereem.nl/two-years-of-reading-summarized"/>
        <updated>2011-05-05T00:00:00+00:00</updated>
 	    <id>https://www.movereem.nl/two-years-of-reading-summarized</id>
		<content type="html">&lt;p&gt;So I like to read… a lot. And not just books about &lt;a href=&quot;http://pragprog.com/titles/btlang/seven-languages-in-seven-weeks&quot;&gt;programming&lt;/a&gt; or &lt;a href=&quot;http://www.amazon.com/G%C3%B6del-Escher-Bach-Eternal-Golden/dp/0465026567&quot;&gt;computer science&lt;/a&gt;, &lt;a href=&quot;http://www.amazon.com/SuperFreakonomics-Cooling-Patriotic-Prostitutes-Insurance/dp/0060889578&quot;&gt;but&lt;/a&gt; &lt;a href=&quot;http://www.amazon.com/Know-All-Humble-Become-Smartest/dp/0743250605&quot;&gt;like&lt;/a&gt; &lt;a href=&quot;http://www.amazon.com/Soul-Survivor-Thirteen-Unlikely-Mentors/dp/0385502753&quot;&gt;everything&lt;/a&gt;. 
Exactly two years ago, I started to use &lt;a href=&quot;http://deboekenlijst.ixmucane.nl/&quot;&gt;@deboekenlijst&lt;/a&gt;. It is a twitter service that builds a list of the books that you have read. So every time you have read a book, you tweet the information to that account. Once a week (or less), a website is build with statistics and an overview. This week I thought, let’s see &lt;a href=&quot;http://deboekenlijst.ixmucane.nl/tweep/michielovereem.htm&quot;&gt;how much I read&lt;/a&gt;. I’m currently in the top 10 of the most active readers:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/deboekenlijsttop.png&quot; alt=&quot;Toplist deboekenlijst&quot; /&gt;&lt;/p&gt;

&lt;p&gt;I started on May 3 2009, the last book was entered on &lt;a href=&quot;http://twitter.com/#!/michielovereem/status/63690935443259393&quot;&gt;April 28 2011&lt;/a&gt;. In that period I’ve read 108 books in 104 weeks.&lt;/p&gt;

&lt;p&gt;The analysis of my reading started with getting the information from the website, parsed it to JSON and expanded the list with books that weren’t yet analysed. After that, I added information about language and type (ebook vs dead-tree). With &lt;a href=&quot;http://code.google.com/apis/chart/image/&quot;&gt;google charts&lt;/a&gt;, I build some nice charts.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/ebookvsdeadtreechart.png&quot; alt=&quot;ebooks vs dead tree&quot; /&gt;&lt;/p&gt;

&lt;p&gt;44 books are ebooks, 64 are paper books. The ebooks are in ePub, Kindle and PDF format. They were read on &lt;a href=&quot;http://www.sony.nl/product/rd-reader-ebook/prs-300&quot;&gt;sony’s PRS-300&lt;/a&gt; and on &lt;a href=&quot;http://www.apple.com/ipad&quot;&gt;Apple’s iPad 1&lt;/a&gt;. And although eInkt is very nice to read, I like the iPad more. The screen is larger and it supports more formats. Downloading and reading without the need to link it to my laptop is also very nice.&lt;/p&gt;

&lt;p&gt;I think that ebooks are the future, and I try to buy and read them as much as possible. &lt;a href=&quot;http://www.movereem.nl/ebooks-uitlenen&quot;&gt;I do not like DRM however&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/dutchvsenglishchart.png&quot; alt=&quot;Dutch vs English&quot; /&gt;&lt;/p&gt;

&lt;p&gt;I’ve read 31 English books, the rest is in Dutch. The English books are mostly technical, although I buy some non-technical books in English too.
Number of books per month&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/nrofbookspermonthchart.png&quot; alt=&quot;Number of books per month&quot; /&gt;&lt;/p&gt;

&lt;p&gt;On average, I read 4 books per month. Some months were more productive, reading wise. How come?&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;July 2009: two week holiday&lt;/li&gt;
  &lt;li&gt;May 2010: two week holiday&lt;/li&gt;
  &lt;li&gt;October 2010: the service went down (due to twitter errors), so I re-added a number of books at once&lt;/li&gt;
  &lt;li&gt;March/April 2011: became father and had two weeks holiday&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;On to some more reading!&lt;/p&gt;

</content>
	</entry>
 
    <entry>
	    <title>bookreview - Seven Languages in Seven Weeks by Bruce Tate</title>
	    <link href="https://www.movereem.nl/bookreview-seven-languages-in-seven-weeks-by"/>
        <updated>2011-04-29T00:00:00+00:00</updated>
 	    <id>https://www.movereem.nl/bookreview-seven-languages-in-seven-weeks-by</id>
		<content type="html">&lt;p&gt;&lt;strong&gt;Seven Languages in Seven Weeks&lt;/strong&gt; by &lt;em&gt;Bruce Tate&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;I love to try out new programming languages and different to ways to develop software. But my time is limited. So it is hard to really learn new languages and keep up with what happens outside of my comfort zone (I develop mostly in C# and JavaScript). So a book that promisses to learn you seven languages in a short period makes me curious.&lt;/p&gt;

&lt;p&gt;The concept of this book is great: show you enough of a language to give you an idea, but keeps it short enough to not make you bored. Programming language books often become lists of syntax rules and library calls. This book gives you enough to become interested and curious, but moves on before you become bored.&lt;/p&gt;

&lt;p&gt;My reaction on every one of the seven languages:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Ruby&lt;/strong&gt;: The language for cool web developers. What I like is the dynamic aspect: quick prototyping and developing of software. Together with the Rails framework it really blends well with the client-side aspect.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Io&lt;/strong&gt;: Prototype based, so you recognize JavaScript aspects. Not really useful in a commercial environment, but great to learn the prototype based stuff. Hard to find stuff about this language through google :)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Prolog&lt;/strong&gt;: I already learned this during college, but it is nice to revisit. Prolog really makes you think about programming. Solutions become more declarative, instead of imperative.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Scala&lt;/strong&gt;: The new language for Java developers. I like how it blends functional and object-oriented. But with C# becoming more functional, it didn’t capture my interest.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Erlang&lt;/strong&gt;: A functional programming language. It strength is in the concurrency library. Didn’t trigger my curiosity.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Clojure&lt;/strong&gt;: Awkward syntax because of the prefix notation. Lots of parentheses. Looks a bit to academic.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Haskell&lt;/strong&gt;: Did not really put a lot of time into this chapter. During college we did a lot of Haskell, so nothing new for me in this chapter. The language still looks to academic, but seeing a number of dutch startups using it (&lt;a href=&quot;http://tupil.com/&quot;&gt;http://tupil.com/&lt;/a&gt;, &lt;a href=&quot;http://www.silkapp.com/&quot;&gt;http://www.silkapp.com/&lt;/a&gt;), it still triggers interest.&lt;/p&gt;

&lt;p&gt;The downside of this book is that it doesn’t show you how to use these languages in real world problems. You should develop larger applications with these languages to really get the feeling. What’s next? I hope to dive into Ruby and Clojure, because these did trigger something. Not so much with Io, because I do enough JavaScript programming. Scala and Erlang do not really have my interest either. Haskell and Prolog are out, because I did that in college already.&lt;/p&gt;

</content>
	</entry>
 
    <entry>
	    <title>Notes from the class Advanced Agile Development</title>
	    <link href="https://www.movereem.nl/notes-from-the-class-advanced-agile-developme"/>
        <updated>2011-04-01T00:00:00+00:00</updated>
 	    <id>https://www.movereem.nl/notes-from-the-class-advanced-agile-developme</id>
		<content type="html">&lt;p&gt;Last week I attended the Advanced Agile Development class, organised by Xebia and given by Alistair Cockburn. With this post, I try to make my notes persistent for future reference.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;these are my notes. they are far from complete. as seen from this tweet, the class was really advanced :)&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/totheralistairtweet.png&quot; alt=&quot;Survived the class&quot; /&gt;&lt;/p&gt;

&lt;p&gt;But I did survive!&lt;/p&gt;

&lt;blockquote class=&quot;twitter-tweet&quot;&gt;&lt;p&gt;I survived @&lt;a href=&quot;https://twitter.com/TotherAlistair&quot;&gt;TotherAlistair&lt;/a&gt; :)&lt;a href=&quot;http://t.co/az8oIkT&quot; title=&quot;http://moby.to/z4s4u2&quot;&gt;moby.to/z4s4u2&lt;/a&gt;&lt;/p&gt;&amp;mdash; Michiel Overeem (@michielovereem) &lt;a href=&quot;https://twitter.com/michielovereem/status/53120793072242688&quot; data-datetime=&quot;2011-03-30T15:45:58+00:00&quot;&gt;March 30, 2011&lt;/a&gt;&lt;/blockquote&gt;

&lt;h3 id=&quot;content&quot;&gt;Content&lt;/h3&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;craft&lt;/strong&gt;; deepening (life long learning) skills in a medium (for instance a progr language); shu-ha-ri&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;cooperative game&lt;/strong&gt;; all about strategies (invent, decide, communicate)&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;flow management&lt;/strong&gt;; manufacturing lines; palette size&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;self awareness/ personalities&lt;/strong&gt;; everybody is different, look at the personalities in your team&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;design as a knowledge acquisition&lt;/strong&gt;; try to get as much knowledge as you can with every step&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;img src=&quot;/images/advancedagile-pent.png&quot; alt=&quot;The pentagram&quot; /&gt;&lt;/p&gt;

&lt;h3 id=&quot;craft&quot;&gt;Craft&lt;/h3&gt;

&lt;p&gt;Learning takes place in three stages:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;SHU&lt;/strong&gt; - learn a skill; copying a technique step by step&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;HA&lt;/strong&gt; - collect techniques; search for other techniques to try.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;RI&lt;/strong&gt; - blend and invent techniques; knowledge and experience are combined into something new&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;img src=&quot;/images/shu-ha-ri.png&quot; alt=&quot;The Shu-Ha-Ri stairs&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Do not try to become &lt;strong&gt;RI&lt;/strong&gt; without really archiving that level. Otherwise you are just picking techniques and doing something that you do not understand.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;good trick &amp;gt; technique &amp;gt; process &amp;gt; dogma&lt;/strong&gt;
It starts with a ‘good trick’, that becomes a technique, which is formulated into a process and that becomes a dogma. You have to bring everything back to a ‘good trick’. There are no rules. Master agile and reach RI level.&lt;/p&gt;

&lt;h2 id=&quot;cooperative-game&quot;&gt;Cooperative game&lt;/h2&gt;
&lt;p&gt;The speed of the project is the speed at which ideas move between minds&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;what are conditions to facilitate speed: colocation, …&lt;/li&gt;
  &lt;li&gt;attitude: ego, fear, self preservation, …&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Programming is Community Theory Building
Communication is touching into shared experiences&lt;/p&gt;

&lt;p&gt;Development is a cooperative game: Invent, Decide, Communicate
primary goal: deliver working software
secondary goal: set up for the next game (maintenaince, new release)&lt;/p&gt;

&lt;h3 id=&quot;flow-management&quot;&gt;Flow management&lt;/h3&gt;
&lt;p&gt;Design looks like manufacturing if we use ‘decisions’ as inventory. Let the decisions flow through the team. Find the bottleneck and fix the process.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Remove waste. Example: tracking bugs is waste, we need to fix them.&lt;/em&gt;&lt;/p&gt;

&lt;h3 id=&quot;design-is-knowledge-acquisition&quot;&gt;Design is knowledge acquisition&lt;/h3&gt;

&lt;p&gt;Software development is like knowledge acquisition. Eliminate risks early on.&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;business risk&lt;/strong&gt;: are we building the right thing&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;social risk&lt;/strong&gt;:  can they/we build it&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;technical risk&lt;/strong&gt;: performance, compatibility&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;cost schedule risk&lt;/strong&gt;: see if features change the costs of other parts of the project.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;trim the tail: first do risk, then do value, then do the fine-tuning/glossy/polishing
slicing helps with trimming the tail; build complete vertical-slices of user stories.&lt;/p&gt;

&lt;h3 id=&quot;properties-of-success-projects&quot;&gt;Properties of success projects&lt;/h3&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;frequent delivery&lt;/strong&gt;; quick visible progress; stakeholders can give feedback; little steps so little errors&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;reflective improvement&lt;/strong&gt;; evaluate to improve&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;close/osmotic communication&lt;/strong&gt;; communication should be easy, everybody should be involved&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;personal safety&lt;/strong&gt;; willing to listen to others &amp;amp; ability to speak without fear to be damaged; trust for everybody to be part of the team&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;focus&lt;/strong&gt;; knowing what to work on, having time to work on it; distraction&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;easy access to expert users&lt;/strong&gt;; quick and better feedback on decisions&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;technical environment&lt;/strong&gt;; trust to try stuff out; unit tests/ CI/ version control&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;sunshine/visibility&lt;/strong&gt;; transparency; be honest when failing; motivation&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Some aha’s&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/agile-aha1.png&quot; alt=&quot;Aha 1&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/agile-aha1.png&quot; alt=&quot;Aha 2&quot; /&gt;&lt;/p&gt;

&lt;p&gt;More reading: &lt;a href=&quot;http://www.agileproductdesign.com/&quot;&gt;Jeff Patton website&lt;/a&gt;, &lt;a href=&quot;http://www.amazon.com/Agile-Software-Development-Cooperative-Game/dp/0321482751&quot;&gt;Book Agile Software Development, the cooperative game&lt;/a&gt;&lt;/p&gt;

</content>
	</entry>
 
    <entry>
	    <title>bookreview - Gamestorming by Gray, Brown, Macanufo</title>
	    <link href="https://www.movereem.nl/bookreview-gamestorming-by-gray-brown-macanuf"/>
        <updated>2011-03-22T00:00:00+00:00</updated>
 	    <id>https://www.movereem.nl/bookreview-gamestorming-by-gray-brown-macanuf</id>
		<content type="html">&lt;p&gt;&lt;strong&gt;Gamestorming, A Playbook for Innovators, Rulebreakers, and Changemakers&lt;/strong&gt; by &lt;em&gt;Dave Gray, Sunni Brown, James Macanufo&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Gamestorming is all about using games to bring up ideas and solutions in your team. The games are used to give a creativity boost. The book starts out with an explanation of the different concepts that are used in gamestorming. The essentials are explained to give a better understanding of using games in business. A game is split up in three parts: an opening, an exploration and a closing phase. During the exploration phase the team should produce nodes. This can be done by sketching and modeling. Important things during this phase are allowing randomness and improvisation. In the closing phase it is important that an artifact is produced. Through selection the best results can be taken out of the game. The book also points out some important skills; for example asking questions, visual language and improvisation. After the more theoretical part the authors give a list of games that can be used in gamestorming. These games can be used as a reference list that can be used to guide a team in producing new ideas and solutions.&lt;/p&gt;

&lt;p&gt;The book is a fun read. The authors are clearly speaking from a lot of experience. The theoretical part gives a solid understanding of the different parts and gives body to the book. The larger part of the book is a list of games that can be used. This is somewhat disappointing, because it makes it more of a reference book. After the first part I was tempted to put the book away and leave it there until I could use the games. That is a shame, because there is a lot to learn from those games. The authors could have taken more information from the game-descriptions to make the theoretical part larger. I cannot wait to try these new ideas in real life.&lt;/p&gt;

&lt;p&gt;Find the book at &lt;a href=&quot;http://oreilly.com/catalog/9780596804183/&quot;&gt;http://oreilly.com/catalog/9780596804183/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Disclaimer: I have joined the O’Reilly Blogger Review Program (&lt;a href=&quot;http://oreilly.com/bloggers/&quot;&gt;http://oreilly.com/bloggers/&lt;/a&gt;). It means that I receive free books that I review. I am not forced to write nice things, so this review is an honest one.&lt;/em&gt;&lt;/p&gt;

</content>
	</entry>
 
    <entry>
	    <title>My photo library over the years</title>
	    <link href="https://www.movereem.nl/my-photo-library-over-the-years"/>
        <updated>2011-01-06T00:00:00+00:00</updated>
 	    <id>https://www.movereem.nl/my-photo-library-over-the-years</id>
		<content type="html">&lt;p&gt;After reading &lt;a href=&quot;http://www.hanselman.com/blog/ReviewingADecadeOfDigitalLifeTheSizeAndTheDirectionOfPersonalMedia.aspx&quot;&gt;Hanselmans blog&lt;/a&gt; I became curious. How does my photo library look?&lt;/p&gt;

&lt;p&gt;The journey, or better adventure, started with seeing if I could get those statistics from my library. I use iPhoto to manage all my photo’s, but it doesn’t come with these kind of statistics. I does have some .xml file, so I thought lets use XSLT. But no, the necessary information (like resolution) is not in this .xml file.
Next step was to do it myself. So after copying everything to a Windows environment (yes, I do use Windows and I like Visual Studio and C#) I started to do some gathering. The opensource library &lt;a href=&quot;http://jpegdata.codeplex.com/&quot;&gt;jpegdata&lt;/a&gt; came to the rescue.&lt;/p&gt;

&lt;p&gt;But then you also want to view charts, right? Nobody wants to look at some numbers. So I dove into &lt;a href=&quot;http://code.google.com/apis/chart/&quot;&gt;google charts&lt;/a&gt; to generate some nice pictures. And the result is:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/photosperyear.png&quot; alt=&quot;Photo&apos;s per year&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/photosperresolution.png&quot; alt=&quot;Photo&apos;s per resolution&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/averageresolutionperyear.png&quot; alt=&quot;Average resolution per year&quot; /&gt;&lt;/p&gt;

&lt;p&gt;So what does this tell me?&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;I don’t invest a lot in camera’s (I often make photo’s with my iPhone), so the resolution does not increase a lot.&lt;/li&gt;
  &lt;li&gt;I probably need to clean up my library, because there was a lot of garbage in it :-)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Again, not very interesting, but a fun exercise.&lt;/p&gt;

</content>
	</entry>
 
    <entry>
	    <title>bookreview - Continuous Integration in .NET by Marcin Kawalerowicz and Craig Berntson</title>
	    <link href="https://www.movereem.nl/book-review-continuous-integration-in-net-by"/>
        <updated>2010-09-27T00:00:00+00:00</updated>
 	    <id>https://www.movereem.nl/book-review-continuous-integration-in-net-by</id>
		<content type="html">&lt;p&gt;&lt;em&gt;Disclaimer: I responded to a tweet of Manning (&lt;a href=&quot;http://www.twitter.com/manningbooks&quot;&gt;http://www.twitter.com/manningbooks&lt;/a&gt;) and received a free copy of the e-book to review it. I reviewed chapter 1 to 11 released to the MEAP.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href=&quot;http://www.manning.com/kawalerowicz/&quot;&gt;Continuous Integration in .NET&lt;/a&gt;&lt;/strong&gt; by &lt;em&gt;Marcin Kawalerowicz and Craig Berntson&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;A bit about my background: I am a .NET developer for almost 5 years (3 of them full time). I am familiar with Visual Studio 2003 up to 2010, TFS 2005 and 2008, SVN and SourceSafe. I am very interested in using the right tools to speed up development and increase software quality.&lt;/p&gt;

&lt;p&gt;Continuous Integration is getting more and more attention from the .NET community. With Microsoft focusing on ALM tooling and releasing new and better versions of Team Foundation Server, CI is getting a place in the spotlights. However, the barrier for starting with CI is still high. There are lots of tools, and starting with CI can be overwhelming. Many aspects and things need to be thought out. This book brings a lot of information about starting with CI to the .NET community. The book doesn’t presume any knowledge except for some basic .NET and Visual Studio things.&lt;/p&gt;

&lt;p&gt;The book is very pragmatic and practical. The authors take you through the complete process of installing and configuring a CI server, visualizing this process even more with an example project. The strong part of this book is that the authors aren’t focusing on one technology by forcing Microsoft tools on the reader. They show different approaches, and give you the pros and cons of Microsoft tools, open source tools and commercial third party tooling. So the reader can make a solid choice based on functionality, complexity and pricing.&lt;/p&gt;

&lt;p&gt;Although the book gives a lot of information, there are also some downsides to the book. One of those downsides is the current collection of blogs, twitter accounts and other resources that are available through the Internet. Many pieces of the information found in the book can be found online. The danger is that the book becomes outdated very fast.&lt;/p&gt;

&lt;p&gt;By making the book very practical, the writers have made the book also less readable. The content forces you to read the tutorial steps one by one, because sometimes good information is hidden between those steps. Not all readers are interested in every technology, so it could be wise to split up the content into different parts. In that way readers can decide to skip some parts of the book. By splitting up the book, it can also become more of a timeless resource. Readers interested into the concepts and the big picture can focus on the main content part, while readers wanting to get started on implementing CI into their organization can go to the tutorial section.&lt;/p&gt;

&lt;p&gt;A piece of information that I missed is the fact that most of the readers probably aren’t starting with a fresh project. Many developers are already maintaining pieces of software that could really benefit from CI. However, how does someone start with CI on an existing piece of software? That could really be a valuable addition to the book. A smaller piece that is missing if a little bit of information about Mono and how to make sure that you software is compatible with Mono. I would be nice to spend a chapter on that part as well.&lt;/p&gt;

&lt;p&gt;To summarize this review: I would recommend this book to any one who is starting fresh on the CI process. It is a very good starting point with practical guides on the implementation of CI. For people already familiar with CI and using it to some extend, the book can be a next step. Experienced developers familiar with CI and the different steps will probably find little new information in this book.&lt;/p&gt;

</content>
	</entry>
 
    <entry>
	    <title>ebooks uitlenen (dutch)</title>
	    <link href="https://www.movereem.nl/ebooks-uitlenen"/>
        <updated>2009-10-08T00:00:00+00:00</updated>
 	    <id>https://www.movereem.nl/ebooks-uitlenen</id>
		<content type="html">&lt;p&gt;Zoals de meeste die mij volgen op &lt;a href=&quot;http://twitter.com/michielovereem&quot;&gt;twitter&lt;/a&gt; wel weten lees ik nogal veel boeken (zie bijvoorbeeld &lt;a href=&quot;http://deboekenlijst.ixmucane.nl/michielovereem.html&quot;&gt;mijn pagina&lt;/a&gt; op &lt;a href=&quot;http://twitter.com/deboekenlijst&quot;&gt;@deboekenlijst&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;Wat mij betreft zijn ebooks dan ook helemaal geweldig. Ik koop mijn boeken toch al, dus waarom niet op een formaat dat ik ook makkelijk mee kan nemen. In plaats van 10 keer een boek van 3 a 4 centimeter dik heb ik nu alleen mijn reader nodig op vakantie. Maar, het moet natuurlijk wel net zo gemakkelijk zijn als een boek. Als het even kan wil ik mijn boeken kunnen uitlenen en wil ik boeken van vrienden en familie lenen. En dat laatste bleek toch iets lastiger…&lt;/p&gt;

&lt;p&gt;Ik heb &lt;a href=&quot;http://www.bol.com/nl/p/elektronica/sony-reader-pocket-edition-zilver/9000000006931121/index.html&quot;&gt;een reader van bol.com&lt;/a&gt; en heb daar inmiddels ook een aantal boeken gekocht. Bol.com gebruikt het &lt;a href=&quot;http://en.wikipedia.org/wiki/EPUB&quot;&gt;epub&lt;/a&gt; formaat, wat betekent dat je je boeken moet registreren met &lt;a href=&quot;http://en.wikipedia.org/wiki/Adobe_Digital_Editions&quot;&gt;Adobe Digital Editions&lt;/a&gt;. Je autoriseert je computer, je reader en daarna het ebook. Zolang het 1 reader betreft is er niks aan de hand. Maar nu wil ik mijn ebook uitlenen. Dus ik stuur het .acsm bestand op dat je krijgt van &lt;a href=&quot;http://nl.bol.com/&quot;&gt;bol.com&lt;/a&gt;. Ze adverteren immers met het feit dat je boeken kan uitlenen (Het lijkt erop dat dit terug gedraaid is? Ik kan dit niet meer op de website vinden). Helaas kan het ebook bestand niet met een ander Adobe ID geregistreerd worden. Dus dan maar proberen het boek met mijn ID registreren voor een andere reader. En weer helaas: een reader kan maar aan 1 ID gelinkt zijn! Oftewel: wil je boeken (uit)lenen? Dan moet je 1 Adobe ID gebruiken. Dat is natuurlijk niet handig.&lt;/p&gt;

&lt;p&gt;Daarom ben ik maar op zoek gegaan om de &lt;a href=&quot;http://nl.wikipedia.org/wiki/Digital_Rights_Management&quot;&gt;DRM&lt;/a&gt; van de epub files te slopen. Let op, niet met het doel om al mijn boeken te verspreiden. Ik verspreid ze alleen maar naar vrienden en familie, met daarbij natuurlijk de voorwaarde dat zij het niet weer verder verspreiden. Lijkt mij geen echt probleem, ik koop immers al mijn boeken nog steeds… (overigens zijn er via Google en Projet Gutenberg ook gratis boeken te downloaden).&lt;/p&gt;

&lt;p&gt;Het verwijderen van DRM is eigenlijk vrij simpel (Dit is alleen voor Windows, ik heb niet verder gezocht naar een MacOSX handleiding). Even googlen levert al snel 2 links op:
&lt;a href=&quot;http://rapidfind.org/upload/showthread.php?p=1035319&quot;&gt;http://rapidfind.org/upload/showthread.php?p=1035319&lt;/a&gt;
&lt;a href=&quot;http://klungvik.com/index.php/2008/how-to-remove-drm-from-ebooks/&quot;&gt;http://klungvik.com/index.php/2008/how-to-remove-drm-from-ebooks/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Wat heb je nodig?&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;http://www.python.org/download/releases/2.6.3/&quot;&gt;Python voor Windows (versie 2.6)&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://www.voidspace.org.uk/python/modules.shtml#pycrypto&quot;&gt;De library Pycrypto&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://www.adobe.com/products/digitaleditions/&quot;&gt;Adobe Digital Editions&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;Een tweetal scripts: ineptkey.pyw en ineptepub.pyw - deze zet ik niet ter download hier, maar even &lt;a href=&quot;http://www.google.nl/search?hl=nl&amp;amp;rlz=1C1GGLS_nlNL343NL343&amp;amp;q=ineptkey.pyw+ineptepub.pyw&amp;amp;btnG=Zoeken&amp;amp;meta=&quot;&gt;googlen&lt;/a&gt; levert ze al snel op.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Nu begint het echte werk:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;Eerst moet je een ebook bij &lt;a href=&quot;http://nl.bol.com/&quot;&gt;bol.com kopen&lt;/a&gt;. Dit levert een .acsm file op.&lt;/li&gt;
  &lt;li&gt;Deze open je met Adobe Digital Editions, unlock hem met je Adobe ID.&lt;/li&gt;
  &lt;li&gt;Zoek nu de map ‘My Digital Editions’ op. Hierin staat het echte .epub bestand.&lt;/li&gt;
  &lt;li&gt;Kopieer het .epub bestand naar de map met python scripts.&lt;/li&gt;
  &lt;li&gt;Run eerst het script ineptkey.pyw. Dit levert een adeptkey.der bestand op.&lt;/li&gt;
  &lt;li&gt;Run het script ineptepub.pyw. Je krijgt een schermpje dat vraagt naar het key bestand (zie vorige stap) en het .epub bestand. Specifieer het output bestand en runnen maar.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Het bestand zelf kan nu met bijvoorbeeld &lt;a href=&quot;http://calibre.kovidgoyal.net/&quot;&gt;Calibre&lt;/a&gt; omgezet worden naar andere formaten, of op de reader geplaatst worden.&lt;/p&gt;

</content>
	</entry>
 

</feed>
