KISS

"Keep It Simple, Stupid": A nice design principle, usualy forgotten in the development world.

Over the last years I've switched from the (flawed) mentality that whatever I should do must be perfect from the start to being more pragmatic and getting something build fast to then iterate. In the past, I tried doing all kind of mega-extensible pet projects, TDD-driven map generators, complex videogame attempts... and most of them lie dead in states between "not even working" and "proof of concept". Instead, I've built more "games" using only Javascript (hint: 2 dumb ones) and not caring about perfectionism. In fact, I have built quite a few things with almost or no tests, without complex design patterns or fancy language features, and aiming to have a working version in a few hours to then improve it.

This post is mainly a list of those small pet projects and tools, nothing to be proud of technically nor visually, but that really do help me optimize my time and/or ease some tasks. So, here comes the list:

  • A CSS-less web tools toolkit, using only Javascript
  • A bookmarks manager, first attempted using Javascript, later finding that mere server-side C# Arrays and StringBuilders did the job way faster... plus literally 15 lines of javascript to handle contract/expand groups
    Bookmarks web-app
  • A movies & videogames catalog, using only Javascript and the fantastic CartoDB CSV import and javascript SQL API capabilities . Just a search input and options to search games or movies
  • An internal Google-Analytics like poor-man dashboard, again using only Javascript and CartoDB's SQL API. This one has no security so I haven't even uploaded it, running instead locally (if you don't need it online, don't do it)
    Visits Dashboard web-app
  • A minimalistic Python 3 static site generator (including minimization of HTML) that outputs HTML, which I use to maintain my small portfolio site
  • A shopping lists mobile web-app, so that my girlfriend and I can "sync" what needs to be bought without writing and managing paper post-its. Pure C# in ASP.NET web forms with no code-behind and storage based on text files: files are the lists, lines inside the products, last space acts as delimiter of item state. Thanks to Bootstrap and jQuery works perfectly in mobile without any specific line
    Shopping list web-app
  • Small photos uploader, using PHP. Just some file upload inputs and items listing
  • Social media privacy housekeeping tools, using Ruby. Old tweets eraser, uploaded photos remover and other internal scripts
  • An instagram tag-based searcher that builds a crappy HTML with the results so I can quickly browse from my PC photos by tag
  • A Windows oldie but goldie batch file that performs backups (using 7zip) of local relevant folders and leaves the compressed files on an external drive. Hint: if compression is not worth the time, just store files (zip without compression), moving a few big files is way faster than many small ones.

And probably more small tools that I now don't remember, like snippets to generate base64 URLs for to embed images into HTML, hash calculators,... My goal as a developer is to make my life easier, because work already provides the challenges and hard thinking.

All of those took me between hours and less than two nights of coding to build an initial fully working version, and I sometimes evolve or improve little things, but from day 1 or day 2 I have something working. They usually are ugly as hell (and I overabuse Bootstrap) and some use jQuery while others have vanilla Javascript. Also, each is done in a different language, maybe because I wanted to toy with it, or maybe I was using it at work and wanted to train more, or I just wanted to change the language I code into often. The tool is not as important as the results.

One thing all this examples don't imply is the need to build everything from scratch, that would be dumb, it just means that for certain scenarios, you don't need to strive for perfection. I for example use a blogging platform not made from scratch but existing, but I simplified it a working but really old engine to the simpler, not DB-based BlogEngine.net it currently runs with. It has some tweaks and optimizations but maintenance is easy and a local copy for development required 3 minutes of configuring Internet Information Server at Windows.

In the end, what matters is to have something working and adding value, instead of a fancy 90% code coverage application that doesn't even have a single feature fully implemented. My "home code" won't win any award but it works great.

Posted by Kartones on 2016-03-01

Comments?

Share via: Twitter Linkedin Google+ Facebook