views:

277

answers:

7

I'm just curious as to what other developers do to make the best of a sub-optimal situation. I'm currently contracting on a project where there is lots of room for improvement particularly when it comes to cut and pasted code. However I'm a mere developer, and although I've approached both the project lead, and the manager himself, with a number of ideas for improvements, I've also gotten the speech about consistency.

So I've tried, and my contract may be coming to an end in a week or so, so I'm not going to grapple with it anymore.

However, when I was given a typical cut-and-paste assignment yesterday, I decided to do as much as possible using sed. And so the way I've made lemonade out of the lemons of cutting and pasting, is to improve my sed abilities.

So I'm wondering what other developers do in these types of situations? I even had another one about 1.0-1.5 years ago, developing on a (Linux) embedded device that Perl wasn't deployed on. So I made the best of it and really improved my awk skills.

PS....would like some help coming up with better tags for this question

+1  A: 

Be grateful you are only contracting in such a situation. Do what you have to and move on as soon as you can to something that will make you a better dev. Some people are stuck in similar situations in perm roles! (in which case the advice might be different.)

UpTheCreek
+2  A: 

But don't stop your thinking on how to better any code. It makes me feel better everytime I better any code. May be your leads/managers aren't too much worried about coding standards or performance, may be your project can do without it. But it's not the case everywhere.

Vijay
+1  A: 

Wht am saying is my view. When ever one get stuck and find the flaws and cant do anything about it just because people at above level are not taking keen interest its better to show them wht the problem is in practical way and if thn also it doesn't work. Dont let your self to work on that thing move out. There are many other opportunities that are much better. Don't let your self work for the people who cannot take best out of you. That will degrade you.

asb
+1  A: 

If I've tried to make improvements that got shot down, I typically tend to withdraw and make sure I know a couple of things:

  • What is wrong with where I am - For example, if the code is cut-and-pasted, does this mean the other developers don't know what bugs are in it? Is this common for everyone or is it just a few that are more notorious for doing this. The key here isn't assigning blame as much as it is identifying what is done, why is it bad, and what kinds of interview questions can this produce for my next position/contract?

  • What is good with where I am - This is the flip side and may get ignored even though it shouldn't. This is just as usual as the other point in that you want to find somewhere where these things are still done and done well. Is that a big challenge? Quite possibly, but if you can find somewhere where the negatives are a small part and the pluses are rather numerous, working can be much more tolerable.

Another part is seeing if anything bad is a deal-breaker which may pop up if you get super sour lemons.

JB King
+10  A: 

My tricks have been:

  • Improve soft skills - This can be internal team soft skills - like being a mentor or a good collaborator - or it can be to management or to other groups. In some cases, this can result in job offers for better positions! One particular example I often repeat is writing really good bug reports for really bad products. I can't fix another team's product, but I can write a bug report that is so clear and so cogently tied to business value, that the team can't avoid having to fix it...
  • Script myself out of a job - when asked to do boring or repetive work, I've developed scripts (like the sed example) to do my work for me. This should be carefully balanced - scripting boring, mindless work is only beneficial when the work is truly repetitive. If this is a one-time thing, it's usually better to just do it. It's important to show good judgement here, if you are ever going to win the respect of those around you.
  • Put energy into other technology - stop trying to do a 150% on the job. Spend the appropriate amount of time working, but spend your passion on other technology and personal projects. Also, advanced degrees, certifications or non-tech volunteer work. It's probably more important to find a venue that motivates you, than any specific project.
  • Met new people - not an on the job activity, but get to know other people in other groups in the company. If they turn out to be smart and interesting - you may find other, better groups to work for. If they aren't smart or interesting, it's a good indication that perhaps it's time for a job search.
bethlakshmi
+1  A: 

I agree with @bethlakshmi's answer, particularly about putting your energy into personal projects. But I've also come to understand that it's important to get yourself out of there as quickly as possible.

Intellectually, you can look at the situation and say "this is not my preferred mode of working." But subconsciously, because you keep going back and doing it day after day, you're ingraining that mode of work as "normal." This is how people get into ruts that they don't even recognize they're in.

There are of course situations in which it's best to wait out a bad working environment, and if you find yourself in one, the most important thing is to keep your eyes on the prize: a better job. Everything you do should be seen through that lens.

  • Visualize the things you'd do differently so you can talk about them (in the abstract) at interviews.
  • Do side projects that push your boundaries and let you do the stuff you can't do at work, so that you stay current.
  • Keep your network active by going to user groups and conferences, blogging, etc.
Sarah Mei
+1  A: 

Here's one of my awk one-liners for creating a CSV (that can be opened in Excel by managers) out of one of our log files. This is the kind of skill that I've been developing, I only wish it were as highly valued as some others, particularly for finding a new gig:

$ grep action_duration yms_web.log.1 | grep search_unpaged | awk '{split($4, class, ".");print $1","substr($2,0,5)","class[length(class)]","$7","$8","$9}' > /cygdrive/c/opt/yardmgr_search_unpaged_0821.csv

Here's some of the data the above acts on:

2009-08-21 03:42:49,451  INFO  com.example.struts.actions.ExampleAction - action_duration CD460E21D45AE1EA98629B42B0A18FAE search_unpaged 62,1
2009-08-21 03:43:19,204  INFO  com.example.struts.actions.ExampleAction - action_duration F158A8E28FBA95F8C73896ECF3210193 search_unpaged 47,1

Here's some output:

2009-08-21,03:42,ExampleAction,CD460E21D45AE1EA98629B42B0A18FAE,search_unpaged,62,1
2009-08-21,03:43,ExampleAction,F158A8E28FBA95F8C73896ECF3210193,search_unpaged,47,1
George Jempty