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
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.
Tags and class names – on building flexible markup
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 …
Object-oriented Programming and Modeling the Real World
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 …
How Ryan Singer builds products →
Our company DNA at 37signals is make things we want, and to make them the way that we want them
Great interview with Ryan Singer about product design.
On the importance of knowing how to program →
Derek Sivers writes about how great it is to know the basics of an area (here, it’s programming) in order to get basic stuff done yourself, instead of relying on your colleagues/employees/contractors.
I think everybody in this business hears this now and then:
The most common thing I hear from aspiring entrepreneurs is, “I have this idea for an app or site. But I’m not technical, so I need to find someone who can make it for me.”
These “idea people” can’t create the actual product themselves, and are dependent on others in order to make their idea come true. To me, that would be really fragile and messy.
It works in the other direction as well: programmers should really read up on basic design techniques, such as colour theory, typography, layout and more. The workflow gets so much smoother if the developer himself/herself is skilled enough to do some basic design adjustments for a feature, and then ship it.
The underlying meaning of what I’m saying is basically: be wide in your knowledge. Specialize, but don’t miss out on the other areas in the business. Learning new things is a part of life, isn’t it?
Sivers has this great quote from his old guitar teacher, saying:
“You need to learn to sing. Because if you don’t, you’re always going to be at the mercy of some asshole singer.”
See also my post on “Unicorns” (designer/developer hybrids).
Signal vs. Noise →
37signals is really on fire with their blog, “Signal vs. Noise”. Lots of insightful and interesting posts about mixed subjects recently. Don’t miss it.
“The Art of Quality” →
Quality should not be confused with perfection though. A good example is the Japanese “Ensō”, a form of minimalist expressionist art in the shape of a circle. Some artists paint ensō with an opening in the circle to symbolize that imperfection is an essential and inherent aspect of existence.
Spotimood
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 …
“Learnable Programming” →
Programming is a way of thinking, not a rote skill. Learning about “for” loops is not learning to program, any more than learning about pencils is learning to draw.
Bret Victor’s essay on “Learnable Programming” is a really solid piece on how improvements can be made when creating tools and techniques to learn how to program. I love the amount of detail and work he’s put down in the article. It’s not a secret that Victor has huge insights in this area – I’m especially fond of his Tangle Javascript library and the article “Ladder of Abstraction”.
During the past month at university, I’ve acted as a help teacher in the beginner programming course (“Object Oriented Programming using Java”). I’ve tried to push for a more wider understanding for programming: that the students should learn how to think programming – not just how to create a while-loop in Java. Far too many times I’ve seen the students get stuck on petty concepts in Java which isn’t relevant at all in the big plan. The tools to learn are often embarrassingly outdated and weak, and many fail the course. Programming and computer science is a new branch in education – it’s time to start developing modern techniques for teaching it more efficiently.
Sass 3.2 Placeholders and Object-Oriented CSS →
Ian Storm Taylor on how to use Sass 3.2′s Placeholder feature together with Object-Oriented CSS (OOCSS), in order to create a clutter-free HTML presentation as well as semantic CSS classes. I immediately thought of Placeholders as the abstract classes in object-oriented programming languages, such as Java – they’re only used to inherit from.
I also like the shift from clinically clean HTML – stripped from all classes – to a more semantic thinking which tells us that a bunch of classes in our HTML aren’t that bad if they’re semantic and makes sense (boy aren’t I just tossing the word semantic around?). You can always rely on classes. HTML elements might change, but their styling will stay the same if you apply the same class on the new element, for instance.
Thanks to Sass and some planning, I think you’re able to pull off some pretty sweet reusable CSS in the end.