I wasn´t really sure if I wanted to continue writing blog posts. Now I have finally decided to do so and have also realized what has stopped me until now: I invested way too much time in trying to publish well written and informative blog posts. I´m already spending enough time on developing, reading blogs and experimenting with new technologies. So from now on my posts will just be way shorter (and maybe full of typos). Let´s see how that goes.
Grunt is also really easy to extend by writing custom tasks. I have already written two myself: grunt-umd to surround code with the universal module definition and grunt-reznik to integrate reznik for AMD dependency analysis. There is also an official collection of contributed grunt tasks available here.
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”.
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:
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.
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).