Clowning about with circus

Had an app that I needed to 'daemonize' on a server at work. Found circus, add gunicorn and it's pretty cool. How's how,

Install the pre-reqs

Write a config file (eg. myconfig)

Load app to circus

circus myconfig

Check it with circusctl

circusctl list

Voila! (there's a lot of circusctl options you can read up on, much like an init script)

As low as I can get.

I just came back from a week in Milan learning how to make my own bicycle frame, and it's been so much fun - making things with your hands at that level, it changes you. And so I'm going to be really busy this next few months setting up a small workshop at home - a mini lathe, big set of vintage hand files, hole saws and what not that I've been busy burning my wallet with. How is it that no one told me that a machinist is so much like being a programmer? Woo hoo, better late than never.

And while we're at the topic of getting lower and lower - I've not forgotten to type with my hands (or code that is) - say "assembly".

Here's how hello world apparently looks like,

You pass that to nasm and then to ld and test run the executable, that's it. But it was exploring how to step through the registers in gdb that was kind of fun,

The book showed the examples with KDbg but I was running these in a EC2 micro instance so I decided to go with just gdb straight up.

Curation.

Curation is life. It's the selection and preservation of your community, your friends, your work, your interests. No one can have an art gallery where you just allow any art work to make its way in, junk or not. There's a vision and direction that threads everything together. 

When I think about how I curate which language or framework I use, I inevitably also determine what the end results, the impact, the journey, the efficiency of the process I end up with. When I curate the friendships in my life, I also keep out those people who will end up pulling me down, wasting my time, influencing me in nonsensical endeavors. When I ensure I'm working on the right startup or idea, I help save myself from a spiral down the next few years, working on stuff that will not have the desired impact on people etc.

There's no way you can cruise through life without having a strong selection strategy. Especially in our current information age, where there's so much noise. Especially when the only interaction you have on a daily basis can fall to the colleagues in your workplace. Especially when sometimes that purchase plus your budget can mean only a small few choices made available. 

And you have to say no.

No - no because it's not worth it, no because it's not beneficial, no because I should/could wait for something better.

“I have the right to do anything,” you say—but not everything is beneficial.

- 1 Corinthians 10:23

Forwards may mean backwards.

It's a long weekend, and how nice to have my ankle busted during a failed wheelie attempt on my bicycle just before. That means a lot of time at home to myself - which was wisely spent reading Tezuka's Dororo, and some self reflection.

One of the things I've been thinking about is how weirdly programming has influenced and change the way I looked at life in the last few years. When you spend 10-12 hours daily looking at lines of text that your wife or mom wouldn't comprehend, it's bound to affect you in some way that well, makes you a little different. And the community you end up spending time in, whether offline or online, has a little rub off at the very least.

Chasing shiny

One of those things has to be the desire to chase after the shiny stuff. After all, aren't we all spoilt for choices? Every morning when I check in to Twitter/RSS/HN, there's all this goodness oozing out ready for the taking. Just go to Github and clone it. Study it. Read all the buzz about why this is/isn't good, and then play around with it. Some of the stuff sticks, some of it you just throw it out after 5 minutes. I have no doubt that it made me very good at skimming stuff off my monitor/display and at having short attention span. (Sometimes, when my wife catches me not listening, I blame it all on the Internet :P)

Startups are like fixed gear bicycles

If you haven't rode a fixed gear bicycle in your whole life, don't fret. There's nothing wrong with you. My parents haven't, neither has my sister, nor a huge chunk of my friends. (Most of them have their first pedals either with a BMX in their teeny weeny years or else rented some beat up mountain bike at the beach) It's not common, but no one can deny it has become trendy in recent years. And so like every trend you might observe, when it reaches it's peak, it can seem overwhelming.

And that's how I felt when I started programming. It was like riding bicycles and then observing this wave of fixed gear riders popping up everywhere. And so has startups. A good friend of mine put in this observation just a few weeks ago where we talking about just how everyone around us seem to be "starting up" - "Seems like every man and his dog wants a startup today." I worked on a campaign project for the last few years with a well known agency. Imagine my surprise when a few weeks ago, an ex-accounts person turned self-taught programmer told me he left the job to (in his exact words) starts a "startup something similar to Pinterest". And a colleague of mine shared some experiences with working for someone who did a startup listing music events and local bands. And everyday, there's plenty of stories of people you can read worldwide who wants to/has already started something. 

As an ex-artist, that's pretty cool. I always believed in the desire to create - and the need to satisfy that. But with trends, people can get a little bit over the edge, some what of an oversaturation. I realized that could probably be the case when an higher up from a previous workplace contacted me telling me he had some "fantastic" ideas for getting government funding. And then at the bi-weekly dinner with my in-laws, someone mentions about how someone created a game and made tons of $$$.

Is it a house of cards?

I've worked for a few startups in the last few years now, and still am presently in one. They have great ideas. Some of them more profitable, some of them still in the early adoption stage. Some of them might have the potential to explode into super multipliers for their investors and founders. And there's some that's just been hanging. 

Some days like these, I wonder if this trend isn't going to backfire. I mean, when everyone seems to be rushing off towards this vein of "I'm starting something like ______ (insert some pre-existing successful startup idea)", doesn't it begin to smell? At some point recently, the mention of someone starting another clone of some project management/photo sharing/service that reeks of some 1990s Geocities project repackaged in CSS3 and some MVC framework just makes me cringe. 

I think I'm getting jaded. Hah. And that despite my best efforts to avoid your typical VC/I-wanna-start-a-tech-startup-but-I-know-nuts-about-technology crowd. Or maybe I'm missing something here. Yet, talking over this funny topic with a friend over coffee, I said I'll take a wager that 80% of the stuff out there is just bull. Time will tell of course.

My favorite medium for bicycles - Steel

Among cyclists and bicycle aficionados, there's a common saying,

"Steel is real."

Most of it came in response to the recent shift from steel as a proven medium for bicycles to alumnium and carbon (in the name of technology and advancement). I have bicycles made from both steel and carbon, and while I'll say in my own personal experience that carbon bicycles have their place in cycling, steel continues to show itself as a very strong and viable material.

And in programming, I'm finding myself discovering that tried-and-tested can be just as good as break-out-of-the-box-and-try-to-be-different. Maybe I've been reading a lot of old books lately (classics on refactoring, testing, computer systems), or maybe it's the GUI on my Macbook that's starting to look stale and draggy in contrast with Linux's terminal. Maybe it's the iPad and Kindle Fire's cumbersomeness that made me re-discover the joy of holding another paperback and thumbing the pages one by one. Maybe after enough time inside this entire bubble of tech, I'm rediscovering the joys of getting back to making things physically with my hands - building a bicycle frame, tinkering with small little ideas on a hobby circuit board, learning wood crafting so I can make myself a little shelf. And in this there is no pretension that I'm making something that is "life changing" or will have "huge potential for success". Just the desire to make, and to enjoy that process.

And in it all, I'm also actually calling it a day with my current position at the startup I'm at to return to an enterprise desk. Going backwards, but I somehow find myself happier and free-er. Maybe this reflection will make you laugh at me. Or maybe it might inspire you to do the same.

Building to last

I've had a conversation with a friend lately and somewhere along the sharing about coding and what not, I posed the question of 'building to last' versus 'building fast' and if they were mutually exclusive.

Let's imagine a house

My wife and I have a flat on the way, due to receive the keys from our housing board in November. More interesting was the fact that we found a page on Facebook dedicated to the progress (from the initial balloting) of the building project right from the start. 

Through the photos, we saw how the land got cordoned off, to the first foundations being built, to the actual flats being layed level by level, to the windows, lights and finally painting etc being put on. And now that it's near to scheduled completion, there's all these inspection by both the developers, contractors and the housing board themselves before they're finally handed over to the new owners to be transformed into homes.

Now think about what do you expect to be the minimum requirements

A house can be as fancy as your imagination goes (or your pockets). But strip it to its most bare minimum, it's a roof over your head, a place to go back to after a day's work, unwind, eat, communicate with your love ones and sleep. It's meant to protect you from both the natural elements like rain, sun, wind etc. It needs to be capable of providing light when it's dark, shutting your waste down pipes and be strong and not suddenly collapse over your head.

Let's imagine your project being a house

How would you build your house? What would be your top criteria when you go about planning? Safety? Reliability? Aesthetics? I can see so many parallels between building a house and coding a project. Both involves good planning, a solid blueprint that you can refer to at the end of the day, routine checkpoints to ensure things are going as planned.

To proceed you need sufficient manpower, good supervisors as well as the best materials you can get for your budget. I would even go to say that coding is not that different from construction, and we are the hands that carry the bricks and operate that crane.

It's still important that you also meet your deadlines at building anything - we can't realistically have things that stretch to infinity without a 'light at the end of the tunnel'.

It's all about finding that balance, instead of treating "fast" and "to last" as mutually exclusive. A good team will work to get the maximum output without maximum overload. In practice, I feel the following are good to have for getting to that goal:

  • Lay the right foundation (a clear blueprint - one that is simple, logical). If you have changing requirements that change too often, please don't call it 'agile'. It just means you have no idea what you want.
  • Immersion. Often people I ask tell me testing is the most important aspect of coding these days. I don't disagree with tests being important, but I differ in the view that > testing is getting developers immersed fully in the domain and tasks they're about to approach. In more layman terms, getting the passion and touch that seperate your novice from the skilled craftsmen.
  • Testing often. It's better to write small automated tests along the way then to come back to some huge this-belongs-to-somebody-else chunk of code and have to then write tests for that.
  • Refactor often. Sometimes, management thinks that refactoring is a waste of time. And it would be rare that in this we-have-got-to-get-this-out-this-week paced era that anyone would tell you to go take a week off and refactor something. So refactor often, especially after every test iteration, where you have been 'immersed' in that function, module, code.
  • The right tool. For the right job. Maybe it's great that you got it all covered in Django. But maybe it'll be much easier for that piece of work that requires server communication to be implemented in something else. Maybe node.js. Learn to be proficient with many tools, and you will be more effective when it comes to selecting your technology.
  • Be like water. Bruce Lee says this, so we should all take note :P. Do you really need to do everything "OOP styled"? Maybe this small fix would be taken care of easily with a procedural styled script. Be flexible.

At the end of the day, I feel that when we build things that are meant to "last" - reliable, solid, and ready for real world use - we can also be "fast" - lean, efficient and effective. But it's not an easy path. Yet a little common sense, planning and teamwork can take that wish into reality more often than we'll like to believe.

Craftmanship vs chatter

I've been mused recently by people saying "I used to ____" (insert some past experience with some activity - e.g. cycling, cooking, coding).

And it was not so much about it being say, a passing mention but a statement put in a conversation in an attempt to gain credibility of some sorts. It amuses me to no end because I start to imagine myself saying similar statements,

"I used to skateboard like 8 years ago..." (which is true by the way)

Picture myself saying that to a bunch of young skateboarders and you can see what I mean. Does it really matter to them that I used to skate? Maybe, maybe not. But I know for sure that if you handed me a skateboard today, I couldn't even ollie for nuts anymore. I'll probably fumble for the first 5 minutes or so trying to stand and roll proper on it. 

And that's the hard fact about a lot of things we do - it's all about craftsmanship, and getting skilful at a craft takes practice, LOTS of it. I've been cycling for a while and I can tell you nothing beats time spent. It may not be the only factor, but no one can escape the issue of some kind of distribution law where the more time you get at something, the better your skill (yes yes, there is a cap to that thinking but follow me for a while, in this context we can put that aside for a bit)

So why do people go up to programmers and make statements like "I used to take computer science in XYZ university blah blah years again"? You know what - I bet there's more people graduating from university every year all around the world than the strands of hair on your head right now. It's like going to a high school reunion and you say,"I used to wear polo tee shirts with boring straight cut jeans". OK... but what's so special about that?

...

Nothing.

...

If you want to impress, practice. Spend time. Don't show me your resume, show me your Github profile. Show me your experiments and projects. Don't show me your bicycle, show me your cycling log. Show me you're taking the craft seriously enough to be respected when you make a statement trying to associate yourself with something I care about. Otherwise you make yourself look dumb. (no kidding bro.)

I looked at the number of hours x years since I started pursuing code as craft and I estimate that at around 12000 hours at least. And I doubt they give you that much time at any school.

What's in the pot today?

It's great to get to hang out and just chill at some UG meetings this week, having been away hidden at work and training hard for cycling events. BigData.sg was the first earlier this week, and I must say it's one of the best events I've gotten my bum to this year - Splunk, simulations in Ruby's roids (revolving around sex, money and evolution to boot) and Hadoop really stoked my geek cells. Not to mention over the fabulous wine and beer, I got to catch up with many ex colleagues from JamiQ.

And right now I sit in Hackerspace typing this while waiting for Beermates to start. It's one good week all in all. Work's still busy as ever, but I'm looking forward to clearing our version 1 out and then I get to fly to Milan for a one week getaway + framebuilding course, where I'll get my hands dirty in welding and designing my bicycle by hand.

And still busy in Python/Django, but finally I've been taking out some sizable chunks of time to dive into functional programming - in particular Clojure. And in the short future I really hope - Javascript (node.js and gang).

And I guess I'll have to continue this post later, because Sebastiaan has arrived and I need a coffee before the event.

- (post dinner/coffee and Seb has started his talk)

Back at Hackerspace, talk has started and the turnout is pretty awesome. Feels like good ol' beermates :D

I'm hiding at the back because I thought I better get some thoughts out of my mind before I forget them. I think difflib is pretty cool, like this:

This week, we started writing tests at work for Django in particular, and one thing that really helped me speed up the old MySQL+Django devserver nut is:

I was wondering off to the land of sys admin when I stumbled on the issue of race conditions and dreamt that we should all just stick to immutables. ;) 

And finally, my current hideout is hiring:

  • Django devs (junior/senior/epic)
  • UX/UI devs (also handy with CSS/HTML5/mobile-fu)

If you or anyone you know is interested, have them ping me on Twitter and I'll put you/him/her in touch with my VP.

The weekend has arrived, pleased I must be. Signing off!