Thursday, October 04, 2007

Dealing with tedious job

So, You are stuck with the wrong job and want to do something different to get your inner-geek rolling. Well, my friend let me tell you what I've done so far when I'm in such situation, I get frustrated initially with all that chore and boredom, naturally. I know it makes you feel bad to do stupid work, but then you can be creative in that too!

I was supposed to work on completing a framework which was designed by senior team, what I'd been asked was to do all repetitive soporiferous work (I'm serious..Zzz..). Well I completed it pretty quickly but by then I thought I would do something interesting to take revenge and I jot down an automated test framework to test entire framework, now thaatt was pretty challenging. "Developer testing" makes you think wise, and I was able to understand framework quite easily. With all that fancy techniques put in the test framework, the "original" framework extensions are effortless to test now.

Well that was one thing, but sometimes you just get enterprise-world-weary to write data centric service layers with focus on all those if/else business requirements. Man, you know you've gotta a chance to show how creatively you can utilize design patterns to satisfy those requirements. Reuse your code - stop copying/pasting it, refactor it - clean it up a bit, you know sometimes you can be so creative, for example replacing repeating loop and other redundant Java statements with template methods and anonymous class like this(or if your language is pretty, use lamda forms):

public class IMWhateverClass {
public abstract class IMDoer {
private final Set elements;
public IMDoer(Set elements){
this.elements = elements;
}
public void process() {
while (elements.iterator().hasNext()) {
Z var = elements.iterator().next();
if(!doProcess(var))break;
}
}
abstract public boolean doProcess(Z arg);
}
public void doSomething() {
new IMDoer(new HashSet()) {
public boolean doProcess(String str) {
return str.matches("any");

}
};
new IMDoer(new HashSet()){
public boolean doProcess(Set arg) {
return arg != null;
}
};
}
}
I know it's uselessly verbose in Java but isn't that cool compared to copying and pasting it around? And over-engineering is sometimes fun..

So what I would suggest is, if you're at the place where you don't have enough challenges in your daily assignments and you can't switch job ;), you can always create some excitement on your own. Heh, if you think how will you get time for this, Man forget all these, you're 9-5 laborer.,

But, If you've done something interesting in such situation then I would be glad to know and try it.

2 comments:

Sriram Narayanan said...

I hear you loud and clear. I too have invented challenges to keep my mind stimulated.

When arguing a point, I'd say "there are three ways to do this thin", and then challenge myself to come up with three different ways all during a conversational pace.

The problem with such a "self-help" approach is that one is limited by one's imagination.

Today, I'm no longer the ultra-competent developer that I once was.

Leave a job that's not keeping you intellectually stimulated - in the long run, such jobs drain us, rob us of our self-respect, and leave us empty and void within. It's not worth it.

Nirav Thaker said...

I understand what you are saying but yeah, I can't leave it at this time though....