WordPress, Drupal or Roll Your Own?

When should you use existing CMSs as WordPress or Drupal and when should you build one yourself?

Of course, building a CMS from scratch would be insane but with emerging technologies and standards such as git (for version control), Markdown (for editing), Neo4J (for metadata) and Solr or ElasticSearch for indexing the data, you can get extremely far by putting the pieces together yourself.

Add to that the recent rise in popularity of Javascript frameworks such as AngularJS or Backbone, with which you tend to get a cleaner split between REST-API and UI, and you don’t even have to render the web pages on a server. Static HTML-files with Javascript are fine.

So maybe the time has come to say goodbye to the web CMS that tries to do everything and say hello to a toolbox of world class, open source and free components that you put together yourself to build a framework?

Posted in Software | Leave a comment

Subversion (svn) error: “containing working copy admin area is missing”

Accidentally tried to add a folder to an svn repository with files that were already added to another svn repo. This caused some confusion for subversion and I got the error message:

containing working copy admin area is missing

This SO question saved me: The solution is to do:

svn --force delete _dir_

On the directory.

Posted in Software | Tagged | Leave a comment

John Carmack on Software Engineering

A very good read here from game programming legend John Carmack.

In real­ity in com­puter sci­ence, just about the only thing that’s really sci­ence is when you’re talk­ing about algo­rithms. And opti­miza­tion is an engi­neer­ing. But those don’t actu­ally occupy that much of the total time spent pro­gram­ming. You know, we have a few pro­gram­mers that spend a lot of time on opti­miz­ing and some of the select­ing of algo­rithms on there, but 90% of the pro­gram­mers are doing pro­gram­ming work to make things hap­pen. And when I start to look at what’s really hap­pen­ing in all of these, there really is no sci­ence and engi­neer­ing and objec­tiv­ity to most of these tasks. You know, one of the pro­gram­mers actu­ally says that he does a lot of mon­key programming—you know beat­ing on things and mak­ing stuff hap­pen. And I, you know we like to think that we can be smart engi­neers about this, that there are objec­tive ways to make good soft­ware, but as I’ve been look­ing at this more and more, it’s been strik­ing to me how much that really isn’t the case.

The whole post is worth a read.

Posted in Software | Leave a comment

Drupal 7 Youtube videos as fields in content type

I have been doing quite a lot of work with Drupal 7 the last couple of months. It has its ups and downs but one thing that it always tries to do is to prevent you from having to write your own code to solve problems.
It gets quite annoying then when simple things don’t work. In my case I wanted a content type with nothing but a title and a video field that shows Youtube videos that the editor pasted the URL to. That should work, right?

Well, yes, it should, but not without problems. First, I installed the Media module and then the Media:Youtube module. I set up a content type with a field of the type Multimedia Asset.

Then comes the kicker: without doing the following things didn’t work. The videos didn’t show up at all. It took me quite some time to figure this out.

At the Manage Display tab I had to first remove the video (make it Hidden) and then add it again so that I could choose a file view mode. See screenshot below.

The display types are defined in Config > File Types > Manage file display. Here I can choose Youtube video and after making sure the content type chooses a file view mode the video was displayed. *phew!*

Posted in Software | 12 Comments

Lean Startup Books

Speaking of books, I just set up a new blog focused on books about lean startup.
In case you don’t know, a lean startup is an organization in search of a scalable business model. It is heavily influenced by the agile software movement. (I even wrote a manifesto for it! :)
So far, I’ve only added four books but I will add more later and also categorize the books into sections such as software development processes, good living, marketing etc.
These are basically the books I’m reading myself so I thought I might as well collect it all and put it on a web site.

Posted in Software | Leave a comment

Programming books

There was a thread on Hacker News about influential books for programmers. I wrote a comment which I might as well rewrite for this blog because it’s an interesting subject.

So… the answer to this question depends a lot on in what stage of programming maturity you are.

The thing is, I remember the exact moment I “got” what a class in C++ was. It was a true relevation. Even though I had been programming for a few years (on my Commodore 64 and Amiga – mostly BASIC and some assembler) it wasn’t until I was 19 that I fully understood the concept of a class.

I can definitely say that I was a different programmer after that day. It was like leveling up in an RPG.

It took me a few more years to get object oriented design…

Yeah, maybe I’m a slow learner (although I have seen enough of other people’s code to conclude that I’m not alone) but the point is that at different stages of my journey to learn the programming craft I have been open to different ideas and insights.

I don’t think there’s one book that alone would have taken me all the way. The right book at the right moment can push you over a cliff of insight but software development is truly a craft of the mind and it takes many years to be really good at. I’m not there yet.

What’s your favorite programming books?

Posted in Software | 1 Comment

Startups in Sweden

Following up on my post about working as a developer in Sweden… there was a question on Quora about hot startups in Sweden and just recently a new reply was posted with a list of a few companies. The entire thread might be worth checking out if you want to work at a cool startup.

Posted in Software | Leave a comment

Working as a programmer in Sweden

Sweden Software

This blog ranks quite high on searches related to software in Sweden (gee, I wonder why :) ) so I sometimes get email from people who’s interested in moving to Sweden to work as a programmer.

I just replied to such an email and thought that the answer might be interesting for others to read as well, so here you go.

Great to hear about your moving plans. Even though the weather here right now makes you dream of warmer places, Sweden is a great place for a career in tech.

The job market for programmers is really good at the moment – at least in the Stockholm area. I’m not so sure about the rest of the country but Gothenburg seems to be doing fine as well. The Malmö/Lund area is still suffering from layoffs at the larger companies in the area (Sony Ericsson, Astra Zeneca, Ericsson) but there is a thriving mobile business growing there. They also benefit from having Copenhagen so close. Danish salaries are higher so Swedish programmers are a bargain in Denmark.

In Stockholm there are lots of headquarters, naturally, which means quite a lot of Big Systems written in Java or .Net. This is also where most of the marketing departments are located which means quite a lot of work for web agencies, CMS vendors etc.

In southern Sweden (Malmö/Lund) as I mentioned there is a strong mobile culture with Sony Ericsson at the epicenter. Lots of smaller spinoffs but also competitors or partners that’s establishing in the area. Sony Ericsson is almost always looking for embedded C-programmers with Android development growing a lot lately.

When it comes to the spoken language that varies a lot. The bigger international companies like Ericsson I’d say it’s no problem to speak English. The same goes for smaller firms like web or mobile agencies or startups. Most people in Sweden knows English. It can, however, be a problem once you leave the tech sphere. I currently work for a consultancy business in Stockholm and Swedish is a must for some of our clients. We have clients in the insurance, finance and retail business and they’re not as international as for example the telecom business.

I will probably write more about this subject in the future. Sweden needs more good software developers so please come here! :)

Posted in Software | 3 Comments

nginx and WordPress permalinks in subfolder

I’m playing around with nginx, a light weight http server. One of the first things I tried was to get PHP and WordPress up and running on an Ubuntu 10.4 machine. To do that I followed the following instructions.

First I had to get PHP working so I followed these instructions for PHP-fpm.

The next thing is MySQL and connecting with PHP. This “just worked” after installing php5-mysql.

Finally WordPress which also worked fine – except for permalinks which in the default installation relies on Apache .htaccess redirects. After doing this things sort of worked, but I’m running WordPress in a subfolder (http://localhost/wordpress) so I had to modify the redirect to look like this:


location / {
  root /var/www;
  index index.html index.htm index.php;
  if (!-e $request_filename) {
    rewrite ^.*$ /wordpress/index.php last;
  }
}

…and now it works with any permalink structures.

Posted in Software | 1 Comment

Gotcha with jsTree

If you get the javascript error:

“$.vakata.context.cnt.delegate is not a function”

when using jsTree and jQuery you need to upgrade your jQuery to the latest version. I had 1.3.2 and got the error, upgraded to 1.4.2 and it works fine.

Posted in Software | 2 Comments