Code re-usability and knowledge of the product

It’s harder to know most of the code base than to know most of the product functionality

I do believe that would be true for most of the cases, unless the code-base we are talking about is too small. Knowing what happens where in your product, in a way gives you a handle, to be able to reach that snippet of code fast. It becomes more and more obvious, if the product is understood as collection of smaller, functional units. The more granularity in being able to break down the product into functional units, the more chances of being better able to see the similarities or the differences between those. It’s the similarities that can lead to the commonality at the code level. And exactly that’s where the possibility of code re-usability kicks in.

So though your job might not need you to play much with the product, it’s a good idea to play around and often tinker with it. It might help you to get to those reusable snippets of code, that will make you the lightning fast, smashing super coder.


If code has been written well,  functional components may very well be re-used

Well, even if you have a handle and you are able to reach to that snippet of code that makes up a functional unit, it’s crucial that the code has been well written. It literally boils down to how thoughtfully, not under pressure and not-at-all lazily, the interfaces have been written. Sometimes it might turn out to be class-level i.e. a particular class and all it’s methods are dedicated to doing one or the other task of that functional unit, such that, all the complexity is hidden. All the exposed methods have no or minimal side-effects. It takes some significant gray matter, efforts, passion and practical futuristic vision to be able to write such code and make it a habit to be able to always write such code!

It would be ok, if you spend some extra time now and make an attempt to write that re-usable piece of code. You might get a hang of it sooner than you thought you would. In the long run, it would be work done well and will make you proud.


Organic and on-going…

You might not always have the opportunity to write-up that nice, reusable piece of code. Huh? I mean, sometimes you might be adding just few lines or changing few conditionals to some existing code base. What do you do in such situations? Curse all those who wrote it so bad in the first place! Well, other than that, it’s still good to have some practical solution to this problem, that would let you – as an individual or team, to organically change the code base and make it generic. There can be many reasons, why it was not written generic in the first place. As mentioned above, one of the requirement is – practical futuristic vision, this can be broken down into 2 parts – 1. practical, that is also so closely related to common-sense and 2. futuristic vision, that’s always going to be bit vague and unpredictable. Hence, it’s not very common for you to come across not-so-re-usable code base. In fact sometimes it might happen that you would come across your own code, after couple of years, that you now can see can be clearly improved. There’s another element I would like to touch with regards to writing reusable code – time you might have on hands to finish up the job! Solution to that problem though is – habit of writing reusable code. Once you are into that habit, most of the code base should turn out to be quite decent. Still, every time you revisit those code points, the chances of you finding something that can be improved are very high.

Reusability should increase organically and should be an on-going part of coding practices.

Code re-usability and knowledge of the product

#PowerOfFocus – Hackathons

The Power Of Focus

Most of my childhood, I’ve lived in places where there was more than ample amount of sunshine. As a kid I remember playing with magnifying glass, on a sunny day, focusing a spot on a paper. Like most other kids, I found it very intriguing. It was fascinating to watch the paper burn, was like Magic!

During the summer hokaratelidays after I finished my 4th grade, I attended summer camp Karate course. I still remember watching spell-bound all the karate masters breaking multiple bricks in one blow. I got so excited that I even tried it myself, with obvious results. Finally I asked my teacher, how could those senior karate students do it? He replied – lot of determination and power of focus!

My colleague here @Krossover – Cyriel, mentioned this concept of – hackathon few weeks back. It didn’t struck me initially but later at some point of time, I came across hackathons again. It’s basically like – grouping with bright-minded programmers, decide to work on a particular project or feature, start working on it and keep working on it, till it’s almost done. Day and night. I remembered my childhood experiences about the “Power Of Focus” and then it all suddenly started making so much sense.

When the whole team (3-4 members), all focus on 1 single goal, sit together, eat together and keep working, it tends to render the same magical effects. I guess, it’s the same underlying principle of focus, thats working here too. I’ve been an amateur musician, who records once on some moon day. But I’ve always had so many ideas, compositions in my head, that have never made it. Luckily, on some occasions, when I stumble across other musicians and we jam, effect again is magical.

So, it’s not just focus (though that is what is moving the threads), it’s also doing it as a group activity. When everyone is interested in doing the same thing. Just like jamming together, hackathons have been very exciting and an enjoyable experience. We’ve started it @Krossover, it’s bit too early to say, but I am looking forward to see and experience some magic.

#PowerOfFocus – Hackathons