Anders Janmyr

Twitter: @andersjanmyr

A Responsible Programmer

Javascript Conditionals

As we all know, Javascript is a very flexible language. In the article I will show different ways to execute conditional code by using some common idioms from Javascript and general object-oriented techniques. Default values Javascript does not support default values for arguments and it is common to use an if statement or a conditional expression to set default values.

I usually prefer to use an or-expression instead. The short-circuiting or, ||, avoids the repetition of the conditional operator…

Web Workers

Index Your Database, Like a Boss

Configure Git, Like a Boss

Reasons to go to Øredev, Drew Neil

Reasons to Go to Øredev, Reginald Braithwayte

Enthusiasm, the Invisible Key to Success

Nothing great was ever achieved without enthusiasm. — Ralph Waldo Emerson The quote from Emerson is a classic but, even though it is true, we don’t put enough effort into encouraging enthusiasm. So, why do I say that enthusiasm is the key to success? There are a two reasons for this. The first is happiness, enthusiastic people are happy. Happiness Happy people are better at creative problem solving. — Martin Seligman, Authentic Happiness In positive conditions, mental images appear rapidly, with great variation and…

Good CSS Practices

Writing a Node Module

This example assumes that you have a Github account. If you don't have one, you can get one at (suprise!) Github. It also assumes that you have installed Node and npm. It will also simplify your life to have the github gem installed Create the basic structure

OK, now I have an initialized repository and I need something to put in it. I like Readme Driven Development and, in that spirit, let's create a Readme.

`sleep-sort` works by…

Braceless Programming

Finding with Git

Git is an amazing version control system that never loses anything, but sometimes it can be hard to find out where things are. Most of the time it is going to be git log that is our friend, but not all the time. Where is my file? Sometimes you know that you have a file in your repository but, you don't know exactly where it is. git ls-files is the answer.

Obviously, you can use any particular grep options…

7 Reasons to go to Øredev 2011

jQuery Changes From 1.4.2 to 1.6

Tips from Rails Anti-Patterns

Ruby, an Exceptional Language

Based on the book Exceptional Ruby by Avdi Grimm, I have developed a strategy for how I should deal with exceptions in Ruby. Being a very dynamic language, Ruby allows very flexible coding techniques. Exceptions are not an exception :). When I am developing a library in Ruby I typically create one Error module and one StdError class. The Error module is a typical tag module and does not contain any methods. Tag Module

The reason for the tag…

A Not Very Short Introduction To Node.js

Mastery

What Is New in EcmaScript 5?

High Performance Javascript

Host Specific Routing Via the iPhone on OSX

Continuous Delivery

I just finished the book, Continuous Delivery by Jez Humble and David Farley. It’s a great book, but it is a bit wordy (512 pages), so here is the gist of it. Continuous delivery builds on a simple foundation, continuous integration, automation, and version control. But in order to get it to work you must version control and automate everything. It’s that simple! Version control and automate everything! Everything means different things to different people, but to Jez and David…