The Stand Up
Filed Under Happy Numbers
Every developer has some amount of code that they feel is reusable to them, but doesn’t clear that bar to be reusable for everyone.
This is what I call Pocket Code – reusable code that does not belong in reusable libraries that is shared amongst projects and team members, but code that you keep handy somewhere to be cut-and-pasted into applicable projects (I need not bring up the now famous State enumeration).
But where do we keep this code? Do we keep just lug it around on a memory stick or do we attempt to squeeze every last ounce of worth out of it? Here are some ideas besides keeping it squirreled away:
There are tons of code snippet sites and directories out there. Some are generic, while others are very specific to language or need. Here are the few that I use frequently:
Got another one we should look at? Feel free to add a comment below to your favorite snippet website.
This is the least favorite of all the possible choices; however, it is the one I most practice.
The first thing I do when starting a new project is to create the SVN repository. The second thing I do is immediately create a “toolbox” repository for that project that I call – the junk drawer.
Anything code that does not contribute to the product but does indirectly support it (quick and dirty data migration apps, record matching apps, or that crummy State enum) gets saved for prosperity in this repository. There is no structure or rules in the junk drawer.
I have seen people attempt to organically grow “reusable” libraries from these snippets in the forms of assemblies and jars. I highly frown upon this practice – you wouldn’t keep your yeast and flour in the same jar, why are you keeping junk and clean code together? Trust me, the maintenance headache of this practice far out weighs the ROI of ever reusing that pocket code.
The majority of developers who blog create posts only around code – making their code available for the entire world.
Here are a couple of thoughts on this:
Those are just some of my ideas, and I am sure there are a few others. Where do you keep your pocket code?
After being on Twitter for many moons, I am starting to finally understand the true potential it can hold.
It is true, Twitter is huge time sucking blackhole void of time; however, Twitter does have its fantastic community aspects. For example, the other day I had a quick development question. I could have went to a forum to post the question. I could have emailed a colleague. Instead I reached for Twitter.
Quicker than IM, Email, or a forum, I reached out to over 100 of my peers and immediately started a conversation. This is a support group at the speed of light.
If you are debating on joining Twitter, my I suggest giving it a try using Twhirl, and if you aren’t already, feel free to follow me.
Max Pool - © 2025 - {codesqueeze}. Sycorr Banking Solutions