Blog recommendation

Posted in General on May 5th, 2012 by Alex Lawrence – 1 Comment

Even though I have his blog already in my Blogroll (sounds like something to eat) I want to recommend you reading galaktor´s blawg. He is a very passionate and professional software developer and a good friend of mine. His posts are always very well written and informative, like the most recent one: On being “Senior”.

Code analysis for AMD projects

Posted in JavaScript on April 10th, 2012 by Alex Lawrence – Be the first to comment

This post is about reznik, a code analysis tool for JavaScript projects using AMD. The content is almost identical to the README on github.

Motivation

When working with AMD there are mainly two possibilities for production environments:

  1. Load modules asynchronously on demand with script loaders such as require.js
  2. Combine modules into one file or multiple bundles with build tools like r.js

Both strategies work perfectly fine. reznik was written to fit another (third) use case. The goal is to be able to resolve individual module dependencies for runtime script combining on the server side. Whenever modules are requested by an application all their dependencies can be included dynamically.

read more »

Mapper for custom user interface markup

Posted in JavaScript on March 11th, 2012 by Alex Lawrence – Be the first to comment

This post is about declarative, a mapper for custom user interface markup written in JavaScript. The content is almost identical to the README on github.

Why

When writing web user interfaces without using JavaScript we are restricted to the set of native interface elements defined in the HTML standard and thus implemented by the browser.

Every time we want to add custom elements to our interface we do this by implementing the desired functionality in JavaScript and linking the behavior to one or more DOM elements and their events. We find the elements by querying the DOM using some criteria such as IDs or classes.

read more »

Testability of DOM ready handlers

Posted in JavaScript on March 11th, 2012 by Alex Lawrence – Be the first to comment

I bet you already thought this blog was dead because I didn´t come up with something new for quite a while. You were wrong, here I am again! :) Other than the previous posts about general stuff this one is more code related. It is about the testability of jquery DOM ready handlers.

A DOM ready handler is a function that is passed to jquery and executed as soon as the DOM is fully loaded (put simplified). If the DOM is already loaded by the time registering the handler, the function is executed immediately. You can read about the details of this mechanism here. In most cases such handlers are defined as anonymous functions:

read more »

On code comments

Posted in General on January 8th, 2012 by Alex Lawrence – 2 Comments

Note: In this post I am neither talking about high level documentation nor do I cover the development of publicly used frameworks where good code comments can be very helpful.

The joy of commenting

I was introduced to code comments at the beginning of my studies while learning Java in the first semester. The explanations of our professor came along with the notice that “it is important to document your code”. I really liked the idea of writing code that everybody can understand. In the second semester after we had gotten deep into the principles of object oriented programming we learned about Javadoc. I can´t exactly say why but I was fascinated with the possibility to generate whole HTML documentations out of code comments.

read more »

Pragmatism

Posted in General on December 19th, 2011 by Alex Lawrence – 4 Comments

This is like my fifth attempt to find the right platform for expressing myself and sharing my more or less useful information with the world. A few years ago during my studies and my work at artecho I built my own website based on Drupal. Back then this was fun because I worked a lot with Drupal and could improve my skills this way. Today when I log into my old website I only see a huge cms which is too complicated for a simple thing like writing blog posts.

When I started to work as a developer at AutoScout24 (with great colleagues) I began thinking about a new project to share my ideas and opinions. I started twittering and found it quite comfortable in combination with a Firefox plugin. It is nice to have the possibility to tweet while browsing the web, but with the limitation of 140 characters there isn´t too much information I could share in one post. At the same time I started reading more blogs and feeds using Google Reader (which is a great piece of software by the way).

read more »