Getting stuff done isn’t all about writing code or producing. It’s about delivering value and something worthwhile. I could write code all day, but if it’s of no use to anyone, then my code has been for nothing. The famous Patton quote says “A good plan violently executed now is better than a perfect plan executed next week” and I believe something along the same lines holds true for programming: “Good code deployed today, is better than perfect code deployed next week”.
Boring work is important work
Whether your starting a new project, company, job etc, you all too easily get caught up in the initial whirlwind of getting things off the ground. It’s exciting creating that new empty git repository, making your first few initial commits and hobbling together the start of what you imagine to be the next startup success story. Then a few weeks in that excitement fades and you’re faced with an ever-increasing mountain of tedious and boring things that need to be done. The project soon becomes boring and the temptation to jump ship and work on the next exciting idea rears its head like an itch that screams to be scratched.
No one will ever tell you that 90% of the work that you’ll need to put in will be boring. That you’ll have to grind out immensely boring things to move towards your goal of completing your project. That’s why so many startups fall by the way-side. That’s why there are so many projects on Github that once showed immense promise, but now just sit abandoned as a sea of issues and pull-requests mount up.
The ones who make it aren’t the ones that are doing the exciting work, it’s the ones that can face up to the challenge of seeing things through until the end.
Your project’s most boring work, will sometimes turn out to be your project’s most important work.
A year in the saddle
It was the one year anniversary of my DAS recently and I thought I should write a bit about what it’s been like riding a motorbike ever since. I’ve done pretty much exactly 5,000 miles on the Yamaha XJ6. Though wind, rain and snow I’ve ridden it, and truth be told I’ve loved nearly every second of it.
I’ve always been huge into cars. I spent untold thousands on my old 200SX making it a mean beast of a car, but riding a bike has really changed my perspective of them. I still love cars, but have a different appreciation for them now. Even on my bike with it’s measly 75BHP, open the throttle wide and it’s the most incredible sensation of speed that no car (that I’ve driven at least) can compare to. Experiencing that has shifted my perspective of cars to being less about raw speed to being more about what they are and stand for.
Thankfully I have had no accidents. The closest being a woman who pulled out and just clipped my leg and the other being when I stalled moving out of a parking bay and dropping it. I’m not ATGATT, but I wear a helmet 100% time; jacket, boots and gloves 99% of the time, but normally just jeans. If I know I’ll be on the motorway or fast moving roads I’ll kit up in the leg department.
Running costs have been pretty good. I manage about 110 miles out of a full tank. This time last year filling up cost around £15, but now seems to be more around £20. Tax is around £30 for six months. It just had its annual service which turned out to be more expensive then I anticipated as it needed new tyres. The final bill was £550 (£250 for tyres and £150 labour). In the last year I’ve also had heated grips and a tail tidy fitted which has added a bit to the total cost. A big expense has also been gear. You need gear for winter and gear for summer. You can skimp, but how good will cheap stuff perform when it comes to protecting you?
The majority of my miles have been in and around London. I haven’t gone out for a countryside blast as much I would have liked, mostly because there haven’t been any weekends nice enough to tempt me out. I’ve only done one really long motorway journey (up to Telford for i46) and that had to be the most mind numbing and boring experience ever, it didn’t help that it was freezing and raining too. Getting around London is great though, you can get pretty much anywhere in no time, without traffic and parking being an issue.
Random thoughts: Heated grips are a must, it can get blisteringly cold. Riding in the rain is nowhere near as bad as you think it would be. 70mph is comfortable, 80mph is not, there is a huge difference between the two. You will come across idiots intent on killing you every day. Bikers love to aknowledge each other, it’s like being in an exclusive gang. Scooter riders are to be looked down upon. You will miss second gear plenty of times and will feel like a fool when you do. It’s extremely easy to break the speed limit. Bikes and shopping do not mix. Riding a bike instantly makes you a badass and a hit with the ladies.
Using blocks in Ruby for lazy evaluation
I’ve been working on a templating engine recently and had the need to substitute some variables on the page with the result of an slightly expensive remote API call. The first iteration was just a simple replace on the page:
render_placeholder result,
"some_page_var",
ApiWrapper.some_expensive_call
def render_placeholder result, name, value
result.gsub! name, value
endThis “worked” but the problem is the call would be made even if the variable that needed replacing wasn’t on the page. The easy fix is to check it exists before making the substitution:
render_placeholder(result,
"some_page_var",
ApiWrapper.some_expensive_call) if has_placeholder?(result, "some_page_var")
def has_placeholder? result, name
!!result[name]
end
def render_placeholder result, name, value
result.gsub! name, value
endWhile this works, once you have a load of results you want to replace there ends up being a lot of duplication, and it’s easy to check the wrong variable compared to what you want to replace. One way to solve it is by passing the api call as a block to the substitution method. This way we can tidy up the code:
render_placeholder(result, "some_page_var") { ApiWrapper.some_expensive_call }
def has_placeholder? result, name
!!result[name]
end
def render_placeholder result, name
return "" unless has_placeholder?(result, name)
result.gsub! name", yield
endThe "Bob bug" Syndrome
A guy goes in to consult for a company and runs across a bug. He raises the issue and the boss says “Oh boy - another ‘Bob bug’ - Bob created a lot of bugs.” (Bob has moved on by now). After the guy was there for a while he comes to realise that Bob wrote most of the code while the rest of the staff wrote very little. The perception that Bob created a lot of bugs was technically correct, but an analysis of bugs per line of code written show that Bob actually made fewer mistakes than his co-workers, but since he generated the majority of the app, he had the majority of the bugs.
SEO from the start
My generic SEO strategy for a startup is a) be the best on the Internet for b) as many topics as you possibly can be that c) matter to your paying customers - Strategic SEO for Startups
Over the past couple of weeks I’ve been spending an increasing amount of time learning about SEO and how to go about applying it to our day to day business. There’s a lot of stigma attached to doing “SEO” and while a lot of it is very shady, once you learn how to do things properly, it’s not as dirty a subject as people would have you think. Personally I’ve found the whole learning experience absolutely fascinating.
It’s very easy to think that SEO is something you do to your site. Adding keywords, making sure things are tagged correctly etc, but the real meat of SEO comes before all that. Researching competitors, finding keywords to compete on and own, building trustworthy and relevant linkbacks, etc. The SEOMoz Beginners Guide is an excellent resource for learning the basics while the link at the top is a a great way of learning how to apply the concepts to your startup/site.
For anyone thinking of hiring an “SEO Expert”. Be extremely cautious. There are a lot of people out there dying to sell you their black hat techniques to drive your search engine performance up, there are also a lot of people out there who really don’t know what they’re talking about. If someone offering to give you advice doesn’t first ask to see your analytics and your content, but rather focuses on technical changes (especially things like LOC and embedded Javascript), I’d personally look elsewhere for help.
There’s no point having the best content in the world if people can’t discover it, and really SEO is all about making that content discoverable.
Iceberg features
Iceberg features are where on the surface they seem small and simple while backed by a huge un-seeable chunks of functionality and processes. Like their real counterpart they come in many different shapes and sizes. From the “Oh, just add an extra field to this form”, which in-fact impacts the business logic, to “Just copy this feature on site X”, without taking into consideration the processes that go on behind the scenes. I’m sure we’ve all experienced the first sort of “small change” problem before, but the second one is a lot more subtle and easy to miss.
A lot of sites successful implement a “invite your friends” feature, which grabs a user’s address book and messages each of them asking them to join. The simplistic way of copying the functionality is to think that the road to success is simply grabbing the needed details and messaging them, thinking that what makes the functionality successful starts with the form and stops with the initial message. That’s just the tip of the feature iceberg. Is it successful for another site as they have a planned out set of campaign emails they send out to an invited person, with timed followups and different possible campaign routes depending on a user’s reactions. It may well be that having a naive imitation of the feature is better than not having one at all, but it’s the compromise of deciding what to do. Is a poorly imitated, half implemented and thought out feature better than a smaller, but more complete and well thought out one.
Working on the edges
Imagine your business is a lovely big garden. You tend to the flowers, water the plants, and place your seeds carefully in the hope that a few months down the line they’ll blossom into a beautiful array of colours. But you don’t mow the lawn. As time goes by, your lawn gets overgrown and filled with weeds, eventually swallowing up all the hard work you put into your flower beds. Would you do this? Of course not, so why do we run our business like this then?
The lawn is the heart and soul of your garden. It’s plainest and simplest to maintain, but it is the easiest to neglect in favour of working on the things that are more attractive. Are you neglecting the core of what makes your business run, in favour of what’s more exciting? Blogs, SEO, Facebook, Twitter, Affiliates, Promotions are not your core concern. You need to be making sales. Don’t make the mistake of thinking this is how sales are made. They are fillers for an already churning sales engine. Pick up the phone, go and meet potential buyers. Start the engine of your lawn mower and mow your lawn.
User's wont do what you want them to
I spent the day at Infusionsoft’s Customer Tour Conference. It was interesting to see some of the more advanced things that are possible using their product as well as listening to how some people are using it to market and sell their products. One of the things said during the day was in regards to sequences and moving user’s through a series of steps and goals, but which applies quite heavily to programming, which was:
“Build your process assuming the user won’t do what you want them to do.”
I found this quite a succinct quote and an excellent rule of thumb for when designing pages. Once you reach a certain size, your clout allows you the freedom to get away with less than stellar design choices. For instance, personally I think the Amazon site is a mess, and this was re-affirmed to me recently while trying to show someone how to go about ordering things from it.
When it comes to Amazon their reputation means a user is more likely to jump through hoops to complete their order, but for a never heard of site, any signs of hassle and they’ll be out the window and onto the next (Unless your offering is just so amazing they can’t resist). News and unheard of sites that are successful, “reduced friction” for their users. They seamless move users from one stage of a process to the next without having to make them think or accidentally moving them onto the wrong path. A good site needs to be more than a set of CRUD pages. It needs to be an experience that helps the user achieve what they want, in the clearest way possible.
The details of technology
I dreamt last night that a load of “business” people had been suddenly injected into our company. I got into an argument over the difference between two different hosts, stating that they are the same while someone else jumped in stating that they are totally different while citing various technical reasons, that really made no difference to the delivery of the project.
A while back I turned down working on an idea some acquaintances had because I didn’t have time. It ended up that someone else I knew took up the project. When first going over it myself I remember thinking a pretty much complete MVP could be done in a month or so, but last I heard, the other developer was still working on the project backend framework a few months in, with no basic site or anything in sight.
This is a common problem with starting a new site. It’s easy to get bogged down in the technical aspects while missing out on delivering actual usable software. I always remind myself of the General Patton quote “A good plan violently executed now is better than a perfect plan executed next week” and so the same stands for programming. Better to launch something sloppy today, than something perfect in the future. If the project is successful you can alway incrementally improve the code you rushed in. If the project’s a flop, you’ll know a lot sooner.