Ask HN: How clean is your startup code?
So we all know it's important to go public as fast as possible. I was wondering.. how clean is your code?
Do you have 10 php files with 5000 lines each? Or some ruby codes with lots of tests? Do you comments a lot? How is your inter documentation? What if someone joins your startup.. how easy will it be for him/her to catch up and understand the code?
10 comments
[ 3.3 ms ] story [ 42.1 ms ] threadThat makes it all the more important to write clean, well-documented code. I'm an OO PHP developer, I use an MVC framework I developed myself (similar to Symfony, based on the Doctrine ORM, using Smarty for templates). I tend to write self-documenting code, e.g. Website::listAllByUser($id), but I comment extensively anyway. It would be very easy to get a decent programmer up to speed on any of my projects in under an hour.
Do you think it would be cleaner if it was in perl?
I think a great code base is essential to being able to pivot and iterate. I don't think a startup can afford much technical debt unless you are using the VC rocketship model and taking on tonnes of real debt / loss of equity anyway.
When product proofs itself, it is time to refactor and maintain perfect code base.
By the way, comments are crap in any kind of software. They are out of date and useless like a minute after they are written. 9 times out of 10 when I come across one in other code I delete it.
Pretty clean: this is stuff that has actual people using it and is critical to the business.
Not so clean: stuff that is new, tangential, or experimental. I don't bother refactoring this type of code for one reason - it may end up in the third category...
Deleted: This is stuff that didn't work and isn't worth keeping or is obsolete for one reason or another.
So in a nutshell: launch before you refactor, refactor before it breaks. Lots of great coders hate this.