Archive for the ‘Musings’ Category

Doing things right vs. doing things fast

Sunday, December 2nd, 2007

I’m encountering a very strong conflict between doing things right and doing things fast.

I want to get something working ASAP. The sync algorithm is difficult and too large to hold in my head at one time. I want to make sure all of my theory is correct. This is the push for fast.

Many of the decisions I’m making now will hurt me later on. I’m already hitting a lot of points where the existing sync algorithms just won’t work when you’re feeding in live and/or disconnected updates. And that’s before I even consider multi-way syncing (e.g. laptop/desktop/server/work computer). And so, I have a big urge to do things right.

Psychologically, doing things right is not going to work for me. I don’t work like that. I need results now and I need to think yeah, that’s cool. I don’t do well slogging away on something for long periods, especially with the technical risks that exist at the moment in this project.

I’m very much a cowboy coder: I’ll slap something together fast, and it’ll do the job, but it won’t be pretty. I get the biggest rush when something does its job for the first time. There’s a little bit that comes from incrementally adding functionality or fixing bugs - I also have a strong perfectionist streak. But I find some tasks extremely tedious - GUI programming (it’s been done a thousand times, and it’s so hard to get right) and web programming come to mind. They seem pointless - they’ve been done before, they’re uninteresting, there’s no rush that comes from seeing them come alive for the first time. They’re analogous to just drawing things on paper, and doing so on a computer is painful. I’d rather just draw them on paper.

I will tend to build up a lot of technical debt. This is why I like working for startups: they need stuff fast more urgently than they need it right. Assuming the startup survives long enough it will need stuff done right, but by that time they’ve usually hired other programmers that can do that instead of me. Usually my startup clients haven’t even known what they want to build in the beginning, so coming up with a perfect all-encompassing design and full test suites is pointless. It’ll probably just get thrown away.

It’s the same situation for my MicroISV. I will need stuff done right - eventually. But my top priority is to get enough income coming in, and that means getting a product out the door ASAP. And because I don’t yet know how this particular product is going to work - I don’t completely understand the problem - there’s an even greater incentive to ignore all of these scary problems that I can see looming (performance, cross-platform compatibility, correctness under wierd conditions). I’ll just push on and get something working well enough.

Concrete examples

I’m using an SQLite database to store file metadata. I’m a big fan of SQLite - it’s just so easy to use and implement. But it’s very complicated for what I want, which is essentially a tree of modtimes using filenames as a primary key. Oh, and with another dimension covering the ‘other machines’ data. Ordered by a journal id. Handling a million records. I don’t know of any relational database that is going to give acceptable performance under these conditions. It’s not an easy data structure to design in C, either, but I’m sure I can beat SQLite’s performance.

Thing is, there’s no need to right now. I have some horrible table joins and ORDER BY clauses, but they do the job. I haven’t run into performance problems yet, probably because:

  • I’m not doing live updates. I’m working under Unison conditions, which is ’scan for changes at the same time on both sides and sync immediately’. This simplifies things tremendously.
  • I’m not using large datasets. I have a few test directories with half a dozen files in each. Eventually, I want to be able to handle up to a million files (I have a Linux kernel tree and a Buildroot in my syncable data, for example).

I’m implementing this in Python right now. Python lets me crank out ideas fairly quickly. Eventually, I expect I’ll have to move to C for performance reasons. The amount of work that the Python implementation does every time it touches a file is enormous - it has to create an object which contains an object for each sync peer, as well as a database query or two. There’s just no need to optimize yet. Premature optimization is the root of all evil, and all that.

S&M (Sales & Marketing) and other things I swore I’d never do

Tuesday, November 13th, 2007

I used to say “I’ll never get involved with fundraising for a startup. I’ll write code, support users, write marketing material, even sell stuff. But I won’t go begging for cash.”

I’ve started begging for cash. I’ve been looking at government grants. This is just the latest in the a saga of Things I Swore I’d Never Do But Am Now Doing.

It’s a slippery slope. You start out as an elitist coder, laughing at those sales and marketing jocks and how useless they are. I mean, they speak in terms of synergies and paradigms! It’s the NEW PARADIGM that creates SYNERGIES to increase our ROI and improve RETURN RATES so we can INCREASE INVESTOR CONFIDENCE.

Oh yes. We did laugh. And now, such a statement makes perfect sense.

Why do coders start out with such a negative attitude towards sales and marketing? I recall my two big complaints being “they don’t do any real work!” and “how come they get commmissions and I don’t get squat?”

Of course, I’ve learned now. The work is just as real - it’s just in a different form.

There’s a big cultural difference. Sales, in particular, is about building relationships. Developers generally find this sort of approach disconcerting - I think we’re a distrustful bunch in general. So when sales guys come up and are all friendly for no particular reason, we’re sitting there thinking “What is this guy up to? Why is he being my friend?” The sales guy is just being a sales guy.

As for commissions, I think there are two factors here. Salespeople have always received commissions. That’s just how it is. Additionally, them reaching their goal is very easy to detect and measure - they get a purchase order (and preferably some cash). If I fix a dozen bugs, that doesn’t obviously result in increased revenues for the company.

This doesn’t work perfectly in the real world, of course. If programmers were paid by commission - say, they earn $5 for each bug that they fix - then they’d probably start writing a whole lot more bugs. Likewise, salespeople will aim to get just the incentive instead of looking at the bigger picture. They’ll start making crazy claims in order to get a sale at any cost because they’re not the ones who’ll have to make it happen. They’ll get the sale, but it’ll cost the company in the long run due to misallocated development resources.

I think for a second that maybe you could pay programmers for each external support call that they resolve - that way, they can’t just generate cash on their own. But then, they have no incentive to avoid the bugs in the first place - they’ll just ship them out, wait for the support calls to roll in and then ship out a fix. So you want to be paying them for not creating bugs - maybe start with a $500 fixed bonus and dock them $5 for each bug that comes up. Then you’ll see bugs not getting reported and some really cranky programmers. You’re now penalizing them for being imperfect. Most programmers I know already beat themselves up when a bug arises - docking their pay isn’t going to help at all.

I have seen sales commissions work against salespeople, however. It seems to be widely accepted that if you are going to get commissions you’ll also get paid less base salary. This is fine if you’re good at sales and not so fine if you’re bad at it. It also means that the quality of the product you’re selling and plain old luck has a big impact on your livelihood. Happen to find someone who already loves your product and wants to buy a thousand of them? Great! You didn’t have to do any work, but you profit just the same. Some doctor at a medical centre gets regular cash from me due to a referral she wrote a year ago - because she happened to be the first doctor available on the day. In this sense, the commission isn’t really earned.

So now I’m a developer who is familiar with the languages of sales and marketing and business. Just being able to understand what !developers are saying comes in handy, and they definitely notice. Being the optimist I am (hah!) I keep thinking “what’s the worst that could happen” with my business, and being able to communicate well with everyone in an organisation is one of the big plusses.

Planning the ideal working environment for my Micro-ISV

Saturday, October 20th, 2007

Here’s what I want. Future employers, take note!

  • Air conditioning.
  • A couch to lie on when I’m stuck on a problem. This happens a lot, and relaxing is the best way to work through it.
  • People to talk to. I’ve done the work-from-home thing. It’s OK, but it gets lonely fast.
  • Lots of desk space. Three square metres is the absolute minimum. 6-9 would be ideal.
  • An absolutely silent environment. No computer hum. No people talking. No cars revving or police sirens.
  • My lovely LSK F6 MKII speakers and permission to run them as loud as I want. Headphones are tolerable if I must.
  • Several computers, at least one of them a laptop. Probably one Linux and one Windows. An OSX machine would be ideal, too.
  • Multiple large monitors. 24″ is a good starting point.
  • Natural light. But I should be able to control the amount of natural and artificial light.
  • Plentiful food and snacks within the workplace. If I’m in the middle of something and hungry, I don’t want to have to go outside and find something.
  • Good food nearby, both cheap takeaway and nicer places for entertaining.
  • Outside the office should be quiet and pleasant. No traffic or pollution.
  • I should have a nice big window with a view.
  • To get there, a 10-15 minute walk is ideal. Less means that I don’t have proper separation between home and work. More is annoying.
  • I shouldn’t need to mention high-speed, reliable, unrestricted Internet access.
  • A source of good coffee without having to go outside.
  • I’d consider a Wii or XBox or something, but I’d be likely to abuse it. A good bookshelf would be nice, though.
  • Ooh, and a pony.

Most of these desires are merely financial. I can buy a couch, espresso machine, have a well-stocked fridge, big monitors and so on. One advantage of working from home is that a lot of these desires are taken care of already - I have the espresso machine, couch, food and so on.
Some of the desires conflict with each other and will be a compromise. For example, it’s unlikely I can have a nice quiet area with lots of good food. Good food tends to attract people, and people are noisy. Google famously solves this by providing meals.
I use a 24″ Dell monitor at home and it’s great. I really only need one of these, plus a 19″ on the side for the secondary computers. Of course, if someone was to offer me a 30″, I wouldn’t be complaining…
There are a few options I’ve considered:

  • Work from home. The big problem here is distraction and loneliness. It’s nice to separate work and relaxation instead of having them all in the one place. There’s usually no-one else around, so you have to make an extra effort to socialize. It does have the major benefits of being cheap (don’t have to pay bills twice or buy two lots of stuff), convenient (roll out of bed and flick on the computer) and relatively nice.
  • Executive suite. This seems like a good compromise - a proper office, people around, hopefully a door that closes. It is expensive, though, and unlikely to be as well equipped as a home office. You could always put the money from an executive suite into your residential rent and get a really nice place to live.
  • Share office. Great for socializing; not so great for getting work done. Less expensive than the executive suite.
  • Work in cafes and restaurants. Probably the cheapest out-of-home option, so long as you can find a venue that’s happy to have you there for eight hours per day. You can’t have things like big monitors, though - you’re stuck with a single laptop.

I suspect that a combination of the above might work well. Right now I’m attending an office four days/week for my day job and working at home for another day or two. I get some of my socializing done at the day job and get a lot of work done when I work from home.

Why software?

Thursday, October 11th, 2007

Because software is what I know

I’ve been writing software since I was five years old. Not to a particularly high standard back then, of course, but I’ve more or less devoted all of my study and work efforts to it.

Because I enjoy writing software

I don’t consider it a wage-slave job. It’s something that I can apply passion to. I don’t just do my eight hours and go home; I think about it a lot and wake up in the middle of the night when I have a great idea. It’s more than just a job.

Because I have significant competitive advantages in the software world

I’m 25 years old. I have no major ties in any particular place; no children or dependents; no requirement for a steady income. I can spend long hours at this, and I have the energy and naiivety to this it’s a good idea. I’m not completely burned on the idea of writing software for a living.

Because the barriers to entry to start a software company are almost nil

I have a computer, a high-speed Internet connection and a brain. Mix them together, bake at 300 degrees for a few months, and a software company will drop out.

Introduction

Thursday, October 11th, 2007

Hello.

My name is Ian, and I’m an alcoholic.

Wait. That’s not right. Can I start over?

My name is Ian, and I’m going to build six software products in a year.

I’m not an alcoholic. And I’m pretty sure I’m not in denial about being an alcoholic, either.

I want to build a software company that I can support myself with. I don’t need to be rich or famous; just independent. I want to be able to travel and work on the road. I want to have a good passive income source. I want to have ownership and satisfaction and find a sense of self in my work.

Here’s the blog. Enjoy.