Category: Development

I wrote several books on web development, most notably the Smashing WordPress ones, and I’ve got decades of experience. That said, my interest in development these days isn’t necessarily tied to the web, I also enjoy, err, well, uhm. Yeah, everything’s the web these days, isn’t it?


  • Welcome to TDH Thirteen

    Welcome to TDH Thirteen

    This is, according to my limited mathematical skills, the thirteenth iteration of my site. That’s obviously not entirely true, I am a liar by trade after all, but it serves my purpose for this piece.

    The previous version of my site, by which I mean TDH.me (I’ll get to that) was the twelfth. I never liked it. It looked all right but it didn’t fit my plans for my content. Wait, let me rephrase that: It didn’t fit my plans for my content that I could and would actually produce. You see, I designed and built that particular iteration with an idea in mind, a certain frequency to my updates and quote and commentary. Alas, reality intervened and thus all my ideas and schemes were for naught.

    Well, it really wasn’t that dramatic, but I did feel as if I took a wrong turn somewhere.

    Enter TDH the Thirteenth.

    Let’s tell a story

    I like to say that I write for a living. This is true, I do – fiction and columns mostly – but it’s not the whole truth. Running Odd Alice certainly takes its time, as do my duties at BlankPage, Tech Troopers, Cylinder Labs, Pale Publishing and Monograph Books, not to mention the soon to be released Damn Fine Novels. They’re all parts of my (professional) life.

    You don’t know much about those, do you? I’ve never really told you.

    Telling a story is what I do. I try to do it even when I write technical literature, something that I’ll get back to soon, now that I’ve reacquired the rights to the Smashing WordPress books (and Tackling Tumblr, I believe, but who cares?). Writing those books about WordPress were all about teaching the basics and inspiring the reader to build something. I see it as a sort of storytelling, albeit without dragons or lasers.

    Looking at the site I had, I wanted some of that, in an overarching manner. So the new front page is a brief introduction to who I am and what I do, with links digging deeper. Said links will take you to some of the major topics I tend to cover, like tech or writing, as well as the books I’ve written, the latest posts on this very site, or just more about yours truly. This, told in a conversational manner, felt more natural than a set of links, at least to me.

    I intend to take the same manner of speaking, or introducing, as it were, to other parts of the site. If you visit the tools category you’ll get an introduction as to why I write about these things. It needs work, they all do, because I’m new at this and have a lot of content to look over, but it’s a start. I want visitors popping over to know what they read, and why I wrote it.

    This was the design principle I worked from when building the new site. The words and sentences serving as an introduction to the visitor, that was the idea and concept, so to speak. Moving on from that was pretty easy.

    The design

    I’m sure you’ve all seen how much I love typography and abhor unnecessary imagery. Well, that’s what you got this time around as well. I wanted the site to read well on all screens, because the primary content is text, plain and simple. Imagery is important but only when I deem it necessary to use it, so while I did want the site to look nice, all types of graphics came in second. In no way could any images or embeds infer with the written content. That further underlined my need to keep things simple.

    One column, almost all across the board, was obviously the way to go. Text flow better if you don’t have a side column posing as a menu or – gasp! – drawer of widgety things. None of that here, just one column and the occasional area where content gets split in two. Settling on that style made it easy to design for mobile first, something I do even for more complicated projects, but here it was essential. My readership has been mostly mobile-based for years, which also counts tablets and the odd sizes in-between. I read a lot on my iPhone, and I want you to be able to do the same while reading this. Hell, I want you to prefer this to your instapaper’d or pocket’d version of this page. Not all of you will, but it’s a nice point to start from, as a designer and developer.

    Now, with typography in place, and focus on text-based content primarily, makes the rest of the design sort of fall in place on its own. In this case it was particularly easy, because the previous two iterations were fairly close to the same paradigms. Even if we go back three iterations we’ll find a text heavy site, albeit not necessarily with mobile screens as a priority, although it did obviously work for them too. I’ve been designing responsibly for years, with responsive, or often fluid, designs. You’ll have to go further back than that to find something that wouldn’t look good on an iPhone today.

    A few words about emojis might be in order. You’ll see emojis here and there on the site, the imagery made popular by smartphones all around. I mostly use pointing fingers and magnifying glasses, but there are more hidden away. Emojis have extended our way of communicating, indeed, they have extended our alphabets, so I see no reason to not use them in my very limited imagery.

    All in all, I’m pretty happy with the new design. There are things to do, features that I want to add, and not to mention tweaks that’ll no doubt be made after some weeks of live usage, but that’s always the case. I hope you’ll like this iteration, and that you’ll tweet me any bugs you might find.

    What about TDH.se then?

    Recurring readers of TDH.me – note the .me – will no doubt wonder why they ended up on TDH.se. Likewise, people used to reading TDH.se are probably confused about the current turn of events.

    Let me explain. I used to roll my English language site on TDH.me, and its Swedish equivalent (which was by no means a translated version) on TDH.se. Now everything is on TDH.se and that’s the end of it.

    Dual domains, one for English and one for Swedish, worked well enough for a time. I started having issues with it a couple of years ago, when the updates to the Swedish site became far in-between. The ones I did post weren’t direct translations of posts from the English sites, no, they were rewrites or quote and comment pieces. While that might’ve served some purpose, it felt crummy and cheap compared to the 1,500 odd posts preceding these. I knew something was seriously wrong when all I did post on the Swedish site was promotional things – “this book is out now”, that sort of posts. Not wrong nor irrelevant, but not enough to warrant a site either.

    Meanwhile, the English site thrived. I worked with it, updated it, and so forth. The one thing I didn’t like about it was the domain name, the .me part. I’ve been trying to buy tdh.com for years, to no avail. I know that’s silly nonsense, soon to be obsolete with how the internet is evolving, but it stuck to my mind.

    Also, I’m Swedish, I’m not from Montenegro. A .com domain is global, but while it may sound like something personal, .me is a national domain, much like .io and .nu, all popular and all made big business by domain registrars across the world. I obviously already owned the .se domain and when it became clear that I wasn’t going to run two parallel TDH sites, one in Swedish and one in English, that was the way to go.

    So what happened? Well, I set up a new WordPress install and imported all the content from TDH.se. Then I imported all the content from TDH.me, added a 301 redirect to the .htaccess file on TDH.me, pointing all URLs to their equivalent on this very domain, and that’s that. If you go to http://tdh.me/book/ashen-sky/ you’ll be redirected to https://legacy.tdh.se/book/ashen-sky/ instead, which goes for search engines as well.

    As for the Swedish content (which is in Swedish), you can still find it here, URLs unchanged. If you want to browse it, there’s a specific category for it now – ?? Svenska – and all new content carries the Swedish flag emoji so you shouldn’t miss it. Or miss to skip it, if that’s your thing.

    Oh, and TDH.se is all https, which means that traffic is encrypted and you can feel more secure.

    From here on out

    I’m really happy to only have one TDH site to worry about. If you’ve read everything on the front page you probably understand why. Running two sites in tandem, the primary thing differentiating them being the language, was an unnecessary burden. There was, perhaps, technical solutions to the problem, such as multilingual variants that would let me roll one site but translate parts of it, but that never appealed to me. No, I wanted one home, one message to the world, and this is it.

    Speaking of which, I firmly believe that we need to take care of our online homes. You might spend a lot of time on Facebook or Twitter, and I do too, but they’re not your online homes. They’re places you visit, and they let you do so to turn a tidy profit. Your words posted on social media is money to these companies, because the more you write, the more they get to know about you, the more ads they may serve with your content, and the more they track you with targeted advertisements across the web. Not to mention all the people who come to said social media sites to read your words.

    I don’t like that.

    My home is free from tracking and spying on people. It’s as simple as I can make it without making it unnecessary hard to maintain. I use open source software when I can, and outside services need to play nice with whatever they might be doing. In my case, currently, that’s limited to Automattic’s Jetpack service, which is connected to WordPress.com, and it should be quite safe.

    I may tweet and facebook and instagram, but this is where I live online. If anything or anyone says otherwise, at some other place, then either I royally fucked up and lost this very place (fucking squatters!), or they’re lying.

    Welcome to my online home.


  • WordPress 4.4

    WordPress, the world’s most used publishing system, got another major update today. Version 4.4 is available in your WordPress admin interface, or as a download from wordpress.org. Among other things, 4.4 features the first half of WordPress’s REST API, which is a huge deal for developers.


  • WordPress.com is now open source

    WordPress.com is now open source, which is incredibly cool.

    The new WordPress.com codebase, codenamed “Calypso,” moves WordPress.com away from MySQL and PHP. It’s built entirely in JavaScript, and communicates with WordPress.com only using our REST API. This means the new WordPress.com is a browser-based client for our API, just like any other application built on top of it — lighter, faster, and more flexible for a mobile-focused world.

    This is just the beginning, folks. The WordPress REST API will power the web, be it in a browser or in apps, mark my words.


  • WordPress 4.3 is out now

    Get your updating done, post-haste. You can download WordPress from wordpress.org, or just update from within the admin interface.

    WordPress 4.3 updates the customiser, gets rudimentary markdown-like support, and adds a function for site icons, among other things. The launch blog post lays it out for you, but obviously you could and should just test it for yourself.


  • Safari extensions gallery now require developers to pay up

    Safari extensions from the official extensions gallery will, from Safari 9.0, be signed by Apple:

    Secure Extensions Distribution introduces improved security for Safari on OS X. All extensions in the Safari Extensions Gallery are now hosted and signed by Apple. Users can trust that the Safari Extension they install is the one you submitted.

    This means that extension developers will have to enroll in the $99 Apple Developer program if they want to update their extensions and, presumably, keep them in the official gallery. Naturally, some developers are pissed off by this, forgetting that this means better security for Safari users. I think this is a good thing.


  • Permalinks are design too

    Matt Gemmell on permalinks:

    If you’re like most people, your permalinks (the permanent links to individual posts) probably look like this:

    yourdomain.com/2015/02/24/title-of-post

    We’re all familiar with those URLs. The date of the post is explicit, so you need never wonder when it was written, or how recent it is.

    Here’s the thing, though: they’re horrible.

    Agreed. To me, the permalink structure is as a part of the design. That said, there are sometimes reasons for dates, or at least numbering, in permalinks. They’re used by services such as Google News. That’s not an excuse though.


  • WordPress 4.1

    WordPress 4.1 is out now. My favorite addition isn’t the new default theme, Twenty Fifteen, although I like it and am currently using it on Pale Publishing’s site. No, I’m more interested in this little tidbit:

    Metadata, date, and term queries now support advanced conditional logic, like nested clauses and multiple operators — A AND ( B OR C ).

    Potentially very useful.


  • WordPress 4.0.1 is an important security release

    WordPress 4.0.1 is out, and you shouldn’t wait to install the update. This is an important security release that addresses serious issues. If you’ve got automatic updates on, you’re probably already rolling 4.0.1, but if you don’t, or if the automatic install failed for some reason, then now’s the time to update.

    Older versions of WordPress are affected by the vulnerabilities as well, so make sure you update to 4.0.1 as soon as possible.


  • WatchKit's out

    Apple has released the WatchKit, which lets developer create apps for Apple Watch. The apps aren’t stand-alone though, they live on your iPhone, at least until later in 2015. If you’re not ready to jump into Apple’s developer pages, even the public ones, then check out iMore’s need to know piece.


  • Håkon Wium Lie talks about CSS

    Håkon Wium Lie is the father of CSS. Opera recently published an interview with him to commemorate CSS’s 20th birthday.

    Bert Bos reviewed my intial proposal. His background and focus was a bit different from mine, but when he wrote up his own proposal we quickly realized that two proposals could be combined into one. At that point, the web project was being kicked out of CERN and W3C was formed. I was starting up the European branch of W3C at INRIA and Bert was hired immediately. Most of CSS1 was hammered out on a whiteboard in Sophia-Antipolis in July 1995. Bert is still working for W3C in Sophia-Antipolis. Whenever I’m struggling with a difficult technical problem, I wish Bert and the whiteboard were there.

    There are some interesting tidbits in there, so check it out if you want to learn a little web history.


  • There should be local WordPress community meetups too

    Here’s a thought: There should be local WordPress community meetups too. If you have no idea what this community meetup thing is, read the announcement post on wordpress.org, and my column regarding why I think it is such a great idea.

    So, local WordPress community meetups then. They could work like this:

    • Set in key locations across the world, not just the US.
    • Every community meetup would have one or a few core members present.
    • The purpose would be to use the collective local mind to produce a short report.

    This report shouldn’t me a formal scary thing, but rather a document made to help the core team to take ideas and notions as well as criticizm and requests into account from several regions of the world. WordPress isn’t a US-centric thing, it is very much global and we all have different wants and needs. The platform will continue to grow and improve, and even more so if we can collect all this in some fashion.I think local community meetups, in conjunction with WordCamps when possible, is the key to this.

    With that in mind, I hereby offer my services to make this happen in Sweden, should the core team think that this is a good idea. Hopefully others will follow.


  • You shouldn't run too many plugins and here's why

    Ryan Imel on WPCandy is upset about people who are advising WordPress users against running a lot of plugins. He goes on a little rant, which you should read, because it definitely has a point.

    What does matter is the nature of the plugins themselves. If the plugins are properly coded and serve their individual purposes well, then it shouldn’t matter even if you have one hundred of them active. If the plugins are big, bloated, and poorly written then you could run into a problem with only two active. The key here is the number of active plugins is unimportant; only the quality matters.

    This is true, although I think you have a problem if you’re running 100 plugins, but that’s another matter.

    The thing to take away here is that you can run how many plugins you want, just make sure they are well-written, then you won’t have any problems.

    With that said, I still say you should keep your plugin count down. (more…)


  • WordPress gets admin pointers for fancy guides

    WordPress 3.3 introduces admin pointers, which basically are highlights to show how various things work. This will be great for the core features obviously, but where it can really make things easier is in plugins and themes doing fancy stuff no one’s seen before.

    The nice folks on Theme.fm have a post on admin pointers, which you should read if you’re interested in how you’ll be doing them, although you need to remember that 3.3 is still under development. They also put together this awesome video detailing how it could work.


  • Localization should be done within WordPress

    Here’s a quick thought that hit me while I was swearing over how unstable Poedit can be. The idea is to get more and better localization of themes in particular, but plugins too, by putting the localization work within WordPress admin. What we need is a plugin that in fact lets you do your localization when logged in. Ideally this plugin would then store any localization files in a directory so that others could get to them easy enough. Better yet, make it a part of the WordPress core and urge people to translate when translations are missing!

    Why? It would definitely mean an increase in localizations being made by users, and hence further add to the international WordPress ecosystem. Not everyone wants their sites in English after all.

    The lack of localization in themes and plugins is frustrating to a lot of us. We should do better.

    Update! Interesting response, read on please. (more…)


  • The Other WordPress News box needs work

    In the WordPress Dashboard, which is the summary page that greets you every time you log in to your WordPress admin area, you have a bunch of boxes. These are widgets, you can move them around and even hide them using the Screen Options tab in the top right, which is good.

    One of the default Dashboard widgets is the Other WordPress News box that pulls updates from various sites online and present links to them. It is a good idea, and a great complement to the official WordPress news feed also available.

    Unfortunately, the Other WordPress News box is flawed. There is no selection here whatsoever which means that some sites overflow the box, as well as its source being Planet WordPress. Overall that’s OK, the real problem is when non-WordPress related stuff shows up. Like the top link in the picture here, from Alex King’s blog, where he is looking for PHP developers. (more…)