Blogging, Programming

CSS learnings from 2013

I don’t do masses of CSS in my work but this year was an interesting one because there was acres of CSS being created due to the general acceptance that we just need to get on with implementing the responsive web. Leaving the fixed-width grid also meant having to rethink the structure and architecture of CSS and modernise the legacy styling which if we’re all honest is actually created organically and piecemeal as requirements drift in.

CSS Architecture

I struggled and fought with SMACSS but I’m now over it and think that the result in practice has shown that it is the most sensible way to do things today.

BEM felt overly complex and fussy while covering pretty much the same ideas as SMACSS. OOCSS was off-putting due to its weird appropriation of object-orientated programming concepts.

I did like its idea of using multiple classes to allow for composition of styles. But using the idea of multiple inheritance as a metaphor for this seemed to be bizarre. Don’t these people know how painful inheritance is?

Isolation

One of the big things I took from SMACSS is that isolation is more valuable than re-use. Using a system that guarantees that your styling rules are not going to have side-effects is massively powerful.

When you then try to abstract components and share rules between them you lose some of that isolation and you begin to recouple components.

Seeing CSS as a conflict between isolation and duplication was a powerful metaphor for making decisions as to how to structure things.

Pre-compilers

I’m pretty sure that when we look back at 2013 the invention of Turing-complete CSS pre-compilers is not going to be a high-point. The CSS generation languages have been important as a way of pushing the CSS specification forward and of proving ideas in practice. I’ve certainly been grateful to be able to use Less in prototyping for example.

The agreement of the need for CSS variables and for being able to do calculations with those variables is a credit to the pre-compilers. The problem they create is the complexity of their abstraction. Turning a declarative language into something more programmatic is problematic for all the reasons that programming languages have problems. DRY is good but compilation errors in your CSS doesn’t feel like progress to me.

Just as with user agent extensions I think that pre-compilers are a great test bed for innovation but what they need to lead to is a better syntax for declaring intention rather than a new language.

Migration

Having new ideas for organising and structuring CSS is great but we also need to reflect our new ideas in our old work. Well, that’s easy right? Now we have new ideas we’ll just call all our existing assets legacy and re-write the whole thing. It’ll probably only take three months or more…

For the project I worked most on I applied a rule of thumb that seemed to serve pretty well. All the new CSS architectures organise themselves around a concept of components or modules. If your existing CSS is more or less built around the same concept you should be able to adapt whatever structure you choose and retroactively apply it to your existing code.

If your existing code though is designed more around concepts of pages or tag styling then you need to rebuild it piecemeal. Introduce the new component with its styling build on the new standard and then go back and

Hacks and shame

I was quite taken by the idea of having the file of shame. However in practice developers preferred to have commented sections of the files with hacks in. And before long we had people accidentally adding non-hack rules after the hack commment-line and we also have hacks liberally sprinkled all over the place.

I lost the battle but the result has convinced me that you want one place for the hackery and you want it right at the bottom of the cascade.

The incentive should be to one day delete the file of shame.

Simplicity

Clearly this year the only person who was talking any sense in CSS (apart from Jonathan Snook) was Harry Roberts as I also liked the presentation where he pointed out that design needs to be regularised in the name of sanity. If we have some components that have a margin of 1rem and and some with a margin of 1.1rem because it looks better we need to be taking into account the cognitive burden of having those additional rules.

Creating independent components encouraged me to allow every one to be a special snowflake. It was good to have a counter-balancing principle to make sure that principal of least surprise applied.

Harry also made the sensible suggestion (in 2012!) that padding and margins be defined in just one vertical and horizontal direction. Thing about flow from top to bottom and left to right also helped me to stop make special cases and look for a more general declaration of what I was trying to describe.

Standard
Blogging

Baby Punching or Not Loving Enough

One of things that kind of pisses me off about blogging is that when you discuss something that is inherently your view of a subject, particularly a technical one, the most common comments are: a) have you tried doing something else entirely (yes, but y’know the point of the post was talking about this thing) and b) how can you say X about Y?

The weird thing is that sometimes in the latter case you can say all this positive stuff and what gets commented on is the couple of things you didn’t like. Evanglists or just frothing converts can’t seem to consider that the thing they support is anything less than perfect. I’ve decided to call this Baby Punching. Every parent considers their baby to be the most special thing in existence; any kind of negative feeling is like punching that baby in the face.

These parental feelings are strongest early on when perhaps people are concerned that any kind of negative feedback from early adopters will kill their favourite outright. Which is a ridiculous attitude, feedback from early adopters is a chance to change things before it gets out to the wider public. The truth is that once something is established no-one goes back to look at what the early adopters thought.

Look at Steam, today its an invaluable tool that trys to balance the needs of game developers and gamers. Who remembers how awful it was initially? It was slow, Half-Life 2 took forever to decrypt and authorize and if you didn’t have always-on broadband then it was a pain to play, authorisation for other games was broken. It was not fun. Steam has improved over the years and not because it tried to stomp on the complaints of the early adopters.

So please, just because I don’t think your baby is as perfect as you do, don’t think I’m punching it.

Standard
Blogging

Experimenting with Tumblr

I have recently hived off a few bits of posting that used to be in this blog to Tumblr, a startup that ValleyWag described as being, like Twitter, “unencumbered by revenue”. It’s been an interesting experience.

As this blog has become a bit more work-focussed and more formal I was feeling like writing about Doctor Who wasn’t quite the right thing to mix with the more esoteric tech stuff. I like WordPress a lot and I thought about starting up a second blog here. However I did feel that I wanted something that was a little bit lighter and light-hearted as the topics were going to be relatively trivial.

Signing up was easy (all very Web2.0: massive fonts, custom urls, etc.) but when I saw that you could use Markdown to write up posts rather than WSIWYG editors I was sold. Since I know it anyway it saves me a lot of time not frigging around with generated HTML. I also liked the AJAX UI that made it seem quite easy to just post a few thoughts.

In my mind Tumblr fits a kind of position between Twitter and WordPress. Where you have something to say that is more than a sentence but it isn’t a whole lot more than a paragraph. It is the kind of thing that Blogger should have become after it was clear that WordPress had completely whupped it on almost every front.

I have found Tumblr to be fun and also something that entices you into just jotting down a few thoughts. In terms of the experience it is all light, responsive and dynamic up front but you can dig around behind the scenes to take control of the visual aspects of your site via CSS and HTML (something that is paid for in WordPress) as well as get more options for posting.

So what do I miss from WordPress? Well the first thing is the Stats crack, obviously. WordPress has a killer feature in telling you exactly how many people are reading your articles and how they came to read them. There are also a lot of features that surround this like auto-promotion of articles to Google, the related articles list and the Blogs of the Day. Publishing something in WordPress feels like launching it into the world, by comparision Tumblr posts are a much more muted affair. It feels more like a secret club. I know Tumblr does the promotion as well but I guess WordPress does a better job of closing the feedback loop.

Not having comments on Tumblr is also part of that. Given that comments on your blog can be a very mixed bag I was surprised to find myself missing them. Somehow I must have gotten used to them and their lack now feels like silence. I know some people have used Intense Debate to add in comments but if I was really that bothered about it then I would probably have gone back to WordPress.

So I’m enjoying Tumblr but I am also hoping that they keep it simple and don’t get tempted to add every feature there is from other blogging software.

Standard
Blogging

How many microblogging sites can there be?

Last time I was on Identi.ca I noticed that most of the messages were being posted from Ping.fm. This means that people are effectively are broadcasting there but who is listening? Possibly no-one.

Tomorrow the Today Programme on Radio 4 is going to ask whether Twitter is replacing blogging. I know that because they Tweeted about it.

Twitter might not be the best service or the first but it certainly seems to have hit some critical mass where it is now crossing over into the mainstream and before long it seems likely that it will be synonymous with microblogging in the way that Flickr and online photos are.

I’m currently following Stephen Fry’s wildlife documentary making on Twitter and even John Cleese is on there. When you have that kind of penetration I think most of your rivals can run up the white flag and retreat to the niche areas where they excel.

Standard
Blogging

2LDNR

How long should a blog post be? The consensus is pretty clear: damnably short. My previous article about microblogging was meant to be a quick review of current state of play in microblogging but as I was writing it I was constantly aware of how long it is.

One thing that has changed blogging a lot is that more often than not no-one is subscribing to your newsfeed. Instead they arrive at your site through Google search, link sharing sites or (in the case of WordPress) tagging. If someone hits your site because they were searching for “cool insects in a hot tub” then they want to read some stuff about insects in boiling water.

So for the benefit of those people the next couple of articles have been broken down into individual topics rather than being grouped together as a review of “the new hotness”.

Since I am on the topic though, 2LDNR is serious the most annoying chatspeek (not chatspeak) acronym around. Why waste my time telling me what you haven’t done? Just smash your face into your keyboard and hit post like you would have done anyway.

Standard
Blogging

Microblogging

I was annoyed at the Twitter outage last night (apparently caused by IM’ing) as I wanted to gripe about Play Greenhouse (they only allow passwords between 4 and 10 characters long, preventing me from using a passphrase style password). Of course that outage was followed by a database crash today. While I appreciate the good communication the Twitter folks have via their blog the service is extremely prone to outages.

I have only been using Twitter for a month (if that) and already it is already a really useful service for me. It’s handy for keeping up with what’s happening in a “distributed” (or perhaps just disorganised) company. But it also useful for publishing stuff too.

There are a lot of times where you want to make an observation or just note something interesting rather than getting into a detailed description of something. To date that kind of thing has gone into a note-taking program like Google Notebook, Sites or BasKet. Now with Twitter if something doesn’t seem personal or esoteric I might as well throw it out there. It also works the other way round, if something doesn’t fit into the Twitter limit then it probably is worth a paragraph in its own right in a “proper” blog post.

While Twitter was down I went to have a look at the alternatives: Jaiku has been bought by Google and is in one of those awful please wait while we spend months silently integrating modes. Pownce seems like a whole different service, the ability to transfer file links etc. strikes me as being more akin to Google Chat and certainly more than I need for microblogging.

If Jaiku had been available from my Google account at that moment I would have switched without question. Until then I guess I have to wait for Twitter to sort itself out.

Standard
Blogging, Web Applications

Twit or Twitter?

The last couple of days I have been struggling as to whether I should join Twitter or not. There’s a lot of buzz around it but how cool can your web app be when it features on the Today programme? The other issue is that I couldn’t find that many people using it.

However last week when I discovered that The Slip was available and the only place I had seen the news was in people’s Tweets (isn’t Twits more accurate though?) I knew I had to get on-board.

The secret of Twitter seems to be that you have to follow cool people’s Tweets for it to work. You also have to follow only a couple of people with twitteria, otherwise you’re going to drown in their search for meaning.

Standard
Blogging

Why I don’t Blogger much any more

On the weekend I tweaked the blog a bit and I decided to replace the useless archives widgit with the sexy new tag cloud. No-one ever used the archive links so I think it is a more helpful tool to let people find things on the blog they want. Having done that I thought I would go over to Blogger and do exactly the same with some of my older blogs.

Nothing going. Blogger has introduced blog tags (after WordPress categories but before WordPress tags) but looking through the widgits I cannot add a pre-made simple tag cloud.

It is a story of stagnation and one that makes Blogger more and more irrelevant for me. It was the first blogging site I signed up with and I love loads of other Google applications. The people who make things like GMail and Calendar should be pointing out to the guys at Blogger how quickly they are falling behind in both function and utility.

WordPress has a vast amount of information on who is visiting your blog and why, what pages and posts are popular and what people are searching for when they visit the site. Google Analytics could do exactly the same job but you have to do the hard work yourself. You have to put the Javascript into Blogger and check the stats in Analytics. Now naturally there are privacy issues in joining up these services but if I want to view an integrated set of data on my blog (as I can in the market leading software) surely it should be made easy for me to do.

Standard