Latest posts

I'm Johan, and I'm interested in interface design and front-end development. I freelance as web designer and developer, and study Software Engineering in Gothenburg, Sweden.

I code, design, and write. You might also want to read more about me.

Programming and communication

· Permalink · Read more posts about Development

The difference between a tolerable programmer and a great programmer is not how many programming languages they know, and it’s not whether they prefer Python or Java. It’s whether they can communicate their ideas. By writing clear comments and technical specs, they let other programmers understand their code, which means other programmers can use and work with their code instead of rewriting it. Absent this, their code is worthless. By writing clear technical documentation for end users, they allow people to figure out what their code is supposed to do, which is the only way those users can see the value in their code. Joel Spolsky

Tags and class names – on building flexible markup

· Permalink · Read more posts about Development and HTML

It is said your markup should be clean and semantic. What does that mean, exactly? As few tags as possible? The correct tags for the job? Few or no ID and class attributes? At least that’s been the main formula for a while now. Littering ID and class attributes over your markup has been frowned upon. But what does the alternative mean? During my years of coding HTML I’ve done some bad things. Some really bad things, man. I’ve coded myself into corners, made huge refactors, and so on. One of the main issues I’ve seen is that the HTML hasn’t been flexible enough. I’ve made my markup and styling too tightly coupled. Sadly, one of the factors of that has been my urge …

Read more →

Object-oriented Programming and Modeling the Real World

· Permalink · Read more posts about Development

Almost everybody begins OOP with this misconception – objects in real world directly map to OOP objects. Its maybe a good place to start but how many grow up from the initial simplistic rule – map nouns in requirements to classes. So, you end up with objects that don’t really mean anything and don’t do much. Naive use of UML diagrams also leads to this. Discovering abstractions is tricky. One needs to really live with requirements inside out before they present themselves. From a Hacker News comment on this story about Clojure programming. I’ve seen this myself in school, where we’ve gone through endless examples of OOP where the classes were a Ball, a Car, a Zebra, or other overused objects …

Read more →

Spotimood

· Permalink · Read more posts about Music

As with most of us, I love music. It’s around me all day long, in different situations and moods. Spotify has changed the way I consume music – I think it’s a wonderful and cool service. Almost all of the world’s music served for me in an application for desktop, mobile and tablets. And what’s cool with Spotify is the fun things you can do with it, if you’re a developer. I’ve created Spotimood (spotimood.johanbrook.com), which is a simple crowd-sourced web app for collecting different types of music into “activities”. I have playlists for different situations, moods and activities, such as cooking, studying, partying, and more. It’s great just being able to kick off a playlist with suitable songs for a given …

Read more →