Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Bad conscience

by baxy77bax (Deacon)
on Feb 10, 2014 at 08:52 UTC ( [id://1074207]=perlmeditation: print w/replies, xml ) Need Help??

Hi,

Today a have a moral issue to share with you. Let say that you are coming from a country that has 25% unemployment rate (even higher for young people) and though government is saying programmers are easily employable (which is true) they are highly underpaid. Let say that you are in your late 40's and you work for this company where you are the only programmer around. Your boss knows it and though he values your work the free market allows his competitors to higher young highly motivated people that are willing to work for half what you make. You know that most of the base work is done and maintenance is the only thing you lately do. That does not require a lot of experience nor deeper understanding (my personal view) of how stuff works but just requires of your to follow latest trends. Let say that lately you noticed that company code (that you wrote) is being downloaded by your boss frequently. You try to figure out why but don't get a strait answer. What are you to assume especially if the company is not that big and you know cuts needs to be made.
My question to you guys is: Would you be willing to do a dishonest thing in order to keep your job, like for instance, write unreadable code? I know people that do that and now they are using it as a bargaining leverage for negotiating raise or keeping the job. Also my question to you is . How often this happens? How often people write hard to maintain code just to keep others away? Is it something that is done frequently (in your experience) or not?
Of course big companies do not allow you to do something like that but small ones do. What is your opinion on the subject.

thnx

baxy

Replies are listed 'Best First'.
Re: Bad conscience
by erix (Prior) on Feb 10, 2014 at 09:39 UTC

    Roedy Green famously wrote (as a joke):

    How To Write Unmaintainable Code - Ensure a job for life ;-)

    Note the smiley. It *is* very entertaining.

    Probably it sometimes happens (deliberately) but it must be very hard to distinguish between good and bad intentions.

    Many of us (probably) have felt the temptation (to obfuscate for bargaining purposes). I think generally, and in the long run, our best bet is to be honest, and in this case that means no deliberate obfuscations. I for one have decided for myself that come what may I will not *deliberately* make stuff uncomprehensible (or worse: delete or damage stuff).

    UPDATE: At the moment I'm (re)reading an old classic: John Steinbeck's The Winter of Our Discontent (1961), about a guy who is going down this slippery slope and telling himself he remains an honest person. Pretty much your (our) situation. Although inevitably some aspects are a bit out-dated, it's still a Very Good Book (and it helped Steinbeck to his nobel prize). Recommended.

      Writing unreadable code might ensure you a job for life. But that job will be maintaining unreadable code, so you might not enjoy it very much.

      use Moops; class Cow :rw { has name => (default => 'Ermintrude') }; say Cow->new->name
Re: Bad conscience
by choroba (Cardinal) on Feb 10, 2014 at 09:54 UTC
    As you probably surmise, there's no general answer to your question. It all depends on circumstances that no one here knows better than you.

    I'd probably never go the dirty way, but it might depend on what's at stake; nevertheless, I'd start with something positive first, e.g. proposing a new application/service to show I can do more than just maintain the rusty code.

    Also, I'd like to dispel the myth of big companies. I know at least one big company where developers are not allowed to refactor a horrible crinkum-crankum of old spaghetti code because the manager responsible for it is the only person who understands its topology and he knows he wouldn't be needed anymore by the company once the structure has changed.

    Whatever you decide to do, good luck!

    لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ

      I'd probably never go the dirty way ...

      How about merely wet? (come to work sleepy -- because you're worried about your job)

      I believe the OP situation is one of those when in rome situations -- light duty dirty play is the norm; all the bosses assume everybody plays, so there is no downside career-wise

      Taking the high moral road can be enormously rewarding psychologically .... but if the choice is between feeling bad, or worse, feeling bitter ... there is no real choice but to join the romans or quit

      you can live with less money or another job; safe-guard your sanity and self-esteem , no job is worth your mental health

      Best wishes to the OP

        Why didn't you quote the following clause as well?
        but it might depend on what's at stake

        Moreover, this is one of the things that can differ with the culture. I come from a post-communist country, and at my family, staying honest was considered the ultimate commandment. My parents and grandparents spent years in prisons, were not allowed to study or do the work they understood, because they did not do as the Romans. Go figure.

        لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ
Re: Bad conscience
by davido (Cardinal) on Feb 10, 2014 at 15:19 UTC

    Your manager is unlikely to know just how unmaintainable of a mess you have created until you are gone, and by then it's too late to be helpful to you. Certainly he wouldn't re-hire you to continue twenty more years of unmaintainable code. No... by the time he finds out what a mess he has, you would already be gone, and when he finds out, you will never be invited back.

    Furthermore, the new, highly motivated, cheaper salary individuals will have such a hard time figuring it all out that they too will be unproductive. But this is a global marketplace; if it becomes apparent that, whatever the reason, your geographic region is unable to provide trustworthy, well-written, maintainable code, your entire region suffers. The client comes to the realization that it turned out to be no bargain, hiring the overseas company at 1/3rd the rate of programmers they can deal with and supervise more intimately in-house or in-region. While they were paying "oursourcing" prices for the product, they are now suffering a "local-region" impact to their business, in their local-region currency. They have lost control of the code base on which their business depends.

    It is this sort of issue, I suspect, that keeps in-house, or in-region programmers highly employable.


    Dave

Re: Bad conscience
by MidLifeXis (Monsignor) on Feb 10, 2014 at 13:50 UTC

    The code is the company's, not the hypothetical emloyee's, not the hypothetical manager's. The hypothetical employee is reading the writing on the wall, and should be searching for other means of providing for him/herself and family. It is much easier for the hypothetical employee to leave on their own terms than to be scrambling to find a means of support once the cuts are made.

    Additionally, the hypothetical employee will need to live with their own conscience, no matter how quickly the cuts come.

    --MidLifeXis

Re: Bad conscience
by shmem (Chancellor) on Feb 10, 2014 at 15:20 UTC

    Well, the title says it all. Code gets replaced, your conscience not. Never.

    I never did something like that to save my ass, unless my shareable memory cheats me. I guess I'm sort of too stupid to conceive such an idea and carry it out without cheating myself.

    perl -le'print map{pack c,($-++?1:13)+ord}split//,ESEL'

      I would probably approach it this way: Sit down and have a frank discussion with the boss.

      "I've been thinking of how we can find ways to be more productive and take on more business. Are you happy with my work? Perhaps if I began supervising a team of young, new, eager developers, you would have more time to go after additional business, and my team would have more time to take on the new projects you are able to bring in. Our current clients would be happy because as issues arise in the products we've delivered, I'll still be available to bring a swift resolution. And this company would be happy because we can take on more clients. ...it's a better separation of concerns, and probably a more profitable use of my years of experience."

      But then I am not afraid of the outcome of that sort of conversation. Where I'm from, employers appreciate a little ambition. Past experience has proven to me that the "let's build this business" face to face meeting tends to work out favorably.


      Dave

Re: Bad conscience (value)
by tye (Sage) on Feb 10, 2014 at 16:42 UTC

    The best way to keep your job (and get promoted) is to be valuable. Instead of looking for ways to game the situation, you should be looking for ways to be more valuable. Figure out new ways you can contribute. Figure out new improvements that you can implement in software. Work to understand the business better so you can apply your technical knowledge more effectively to help the business and their customers.

    Speak up more so your boss and his/her bosses can become aware of how you are contributing.

    - tye        

Re: Bad conscience
by perl-diddler (Chaplain) on Feb 10, 2014 at 17:02 UTC
    First problem -- you said you work at a large company.

    If that's the case, where they do cuts will likely be done on an organizational basis -- not on a personal basis as the main weighting factor.

    The secondary factor is if you are well known as a star outside of your department (not just by your boss), then, that increases the odds one or more people might speak up for an exception in your case.

    The fact that you make 2x a less experienced replacement is peanuts. The time it would cost to bring anyone in to replace you at 50% your salary, ignores the other costs of your position -- office space, needing a computer, needing to come up to speed in company culture, and not least of all, need to come up to speed in your code -- **providing** they company will keep your position at all. If a company like HP gets out of the PC market or IBM out of the server market, and you are in one of those areas, they don't need to find someone to take over your code. It'll just be trashed.

    The third factor -- how likely do you think it is your manager would read your code and use that as a decision to keep you or not? If he looked at your code and it was spaghetti, he'd be as likely to push you out the door for being a bad coder as not -- i.e. if he kept you and he thought that was the way you normally code -- then keeping you will cost them more in the long run as you generate more of the same before you leave. I.e. the longer they keep you, they more volume of "hard to maintain" code they will have.

    Fourth factor -- if you stay, how long before your obfuscation starts biting you back -- either as you are writing new code based on stuff that -- 6-12 months later looks like hieroglyphics? What if you are given another team member? You might find yourself doing documentation, full time, just to enable them to work.

    I won't say what course you can take as there may be many variables you haven't mentioned and every situation is different, but look at the above issues -- and ask yourself -- do you really think spending energy on doing something like that would be likely to benefit you in the long term?

    Your best tactic is to try to network more with other teams and get your name known as a solution provider/problem solver (taking care not to step on other people's toes in the process -- a tricky process). That's likely to give you your best protection -- but showing such coordination skills might also get you promoted to being a manager or director that coordinates others working together full time -- a different danger entirely.

    It's hard to be appreciated as an individual contributor -- especially when you would need to be appreciated by such by multiple people -- your current manager might wonder where you are getting the free time to be so helpful to others or if they are insecure, might think you are aiming for a managerial position or positioning yourself to be moved into a higher position underneath a director or such...depends on his insecurities and position...

    Hope that gives you some ideas about what you might be facing and how your coding style may have little part in how well you are valued (or how it might have the effect opposite you were intending)...

Re: Bad conscience: wake up Code Monkey
by zentara (Archbishop) on Feb 10, 2014 at 16:16 UTC
    If they hired you, it's their work. Maybe management is running a program to see how many actual lines of code you write each day. :-) The only way they can do that, is to copy your GIT repository ( or whatever), every couple of hours, thereby allowing them to verify how much your code changes from day to day... and get an accurate code_lines_per_day average on you.

    That is how they judge programmers, by how many lines_per_day you can generate ... just like a typist used to be judged.

    And if you type purposely obfuscated code, it will be obvious, and it will harm your reputation. Furthermore, all software needs to be documented, so even if you obfuscate, you should be required to explain how it works in the docs.

    I say UNITE fellow keyboard hackers! It's time we excercise our God-given rights as code-monkeys, and have a code slowdown, you know, everyone just hanging out at the water cooler, maybe dipping to the bathroom a few extra times per day. Lets get that average code_lines_per_ day count to the low 20's. wake up Code Monkey


    I'm not really a human, but I play one on earth.
    Old Perl Programmer Haiku ................... flash japh
Re: Bad conscience
by Your Mother (Archbishop) on Feb 10, 2014 at 18:32 UTC

    If you are ethical enough to ask the questions aloud, you are ethical enough to know your own answers in your heart/mind/soul already.

Re: Bad conscience
by davies (Prior) on Feb 10, 2014 at 19:28 UTC

    It's too late to save your job by obfuscating. Your boss has downloaded the code. So you may as well do what you know to be the right thing. As soon as your boss notices you changing your style, you will be out of the door without a reference.

    But, as a moral individual who always works with the best interests of his employer at heart (stop laughing in the cheap seats), what about your boss's behaviour? Depending on who's who on the food chain, I would be very tempted to go to HIS boss (or someone higher. Do you have an internal audit department? Compliance? Even external auditors if they're due in soon anyway) and say something like "I'm sure he's just doing his job and checking my work, but you do know about all these downloads, don't you? I'd hate to think that someone was blackmailing him into betraying company secrets & we didn't help. Whenever I've asked, I've been brushed off".

    Regards,

    John Davies

Re: Bad conscience
by arkturuz (Curate) on Feb 10, 2014 at 16:52 UTC
    Personally I would never do such a thing, unless the company is really, really bad and this would be some sort of vengeance.

    People that do this are basically blackmailing their own employer. And you only have the leverage until you're replaced by a Perl script as the proverb says.

    I see there's plenty of jobs in your country (I'm currently looking for employment myself in that same country). So, try another job, or try to have the upper-hand in your company by generating good business ideas and plans.
    (At least, that's what I did at my previous company. Unfortunately, I got laid off during the cost-reducing phase they've had every few months. But my Perl code there is still running and doing good from what I see.)

      arkturuz , its nice to see a positive perspective from same locale
Re: Bad conscience
by LanX (Saint) on Feb 11, 2014 at 01:34 UTC
    Hello Irv! ;)

    Well, I did once something slightly similar and I regretted it ever since.

    If I leave a job I want to be proud of my work, I didn't chose this profession to maximize income.

    Most (all?) people I met which were indispensable because of unmaintainable code didn't care or know better. They defended their crap. And the management which allows indispensable coworkers doesn't deserve better code.

    So ask yourself which group you want to be part of. IOW: Are you a Wally?

    Talking about well payed jobs, Vienna shouldn't be more than 300km from where you live now and Croatia belongs to the EU.

    So better look for alternatives which make you feel good when working.

    Cheers Rolf

    ( addicted to the Perl Programming Language)

    update

    included Dilbert strip.

Re: Bad conscience
by karlgoethebier (Abbot) on Feb 10, 2014 at 20:28 UTC
    "Would you be willing to do a dishonest thing in order to keep your job..."

    First answer: Never! Second answer: I did it one time. And i'm sure that i will go to hell for doing so.

    "How often people write hard to maintain code just to keep others away?... How often this happens?"

    Imho this happens often. It's information hiding in it's worst sense. It happens often in a mixed environment of free lancers and permanent employees. Admins and clerks do comparable crap as well as project managers and especially executive managers.

    I don't know what i would do if i where you. I even don't it for me.

    And i think, especially in Croatia, this issue is hard to stand.

    Thoughtful regards, Karl

    «The Crux of the Biscuit is the Apostrophe»

Re: Bad conscience
by Voronich (Hermit) on Feb 10, 2014 at 14:23 UTC
    Would you be willing to do a dishonest thing in order to keep your job, like for instance, write unreadable code?

    REALLY!?!

    If someone half your age can come in and do your job for half the pay you receive, then:

    1. you're lazy and have the skills of someone half your age or the job is beneath you or
    2. you need to find a more interesting job. If you can't find a more interesting job because of your 1995 skill set, see the previous item.

      No upvote, because I don't think your point 1. is valid, V -- even assuming the premise you quoted is true.

      And I do assume the premise is OFTEN true: as someone once sang, 'the times, they are a'changin'.

      <div class="curmudgeonry">Today, getting young blood to come in for a poverty wage (or, "half the pay" if you prefer) seems to be a very standard business practice in IT related jobs (and elsewhere, see below) -- even in the U.S., and likely in other places so long as local law doesn't mitigate against the practice.

      Sorry: I feel a rant coming on.

      <span class="rant_w_rambling_anecdotal_evidence"> When I was young and first became a reporter, I got diddly for pay, but lots of bylines and airtime. I started getting well paid in my second job (the last one that I went looking for, as opposed to 'came looking for me'), and a couple years later was making more than the Deity deserves to earn. By the time I got out (the writing was on the wall)... my annual salary put my income in the top 10% or so of all U.S. incomes at the time.

      Today, except for a few network stars and major market anchors, and a very select few syndicated (print) reporters, editors and columnists, earning even a middle-income salary is just a dream for most young reporters.

      By the time they've accumulated even a few years of experience (and the thrill of being able to point at the tube, the radio or the paper and say 'Hey Mom, that's me/my story!") many are disillusioned with what (most of) our media have become: entertainment media rather than 'news' media -- i.e., media offering frivolous amusements rather than substance that bears on the reader's/viewer's freedom, local and national affairs (traffic accidents and fires aside, in the case of TV), economic interests or the education of that content-customer's kids). And they're tired of working for very close to minimum wage, even in midsized markets such as Fresno, Peoria, Baton Rouge or Manchester. The higher paying jobs in PR, advertising or even completely un-related fields become very attractive, leaving management to replace them with even less expensive folk.

      Of course, the best of those who leave the news biz ... or IT ... impoverish their field, and worse, leave their kids and grandkids to inherit a (perhaps) dysfunctional future.

      OK, stop. Full stop! </rant>
      </curmudgeonry>

      OTOH, your point two is well-taken; not necessarily with respect to the OP, but certainly in cases where the premise you quoted is actually true.


      Quis custodiet ipsos custodes. Juvenal, Satires

        What horror ...

        <div class="curmudgeonry"> ... <span class="rant_w_rambling_anecdotal_evidence"> ... </rant> </curmudgeonry>

        ... is that?! Do correctly match up your tags!

Re: Bad conscience
by hdb (Monsignor) on Feb 10, 2014 at 14:40 UTC

    Only a true Wally can get away with that strategy.

Re: Bad conscience (smogovci)
by Anonymous Monk on Feb 10, 2014 at 09:17 UTC

    Well, given your geographical location, if you can get work out of the country, that's an idea

    If your boss is connected (to gov or other mob), do you have a lawyer in the family? <-- this part joke , lawyers don't make a difference over there

    So I see two options, if you like the job, have fun refactoring :) but remember to print out some of these emails/logs... before starting to play by the same rules

    Keep it friendly and cordial

    It never hurts to send a friendly message , for example smogovci style :) ( flaming bag of poop -- what kind is up to you )

    any other kind of other action over there is just an exercise in frustration, and might earn you an enemy

    Putting the flaming bag on a tin of some sort (cookies) ensures friendlyness and fire-safety

    Cordially yours, a cynic, bum and an expat

    PS - that is about all I remember about smogovci -- too young

Re: Bad conscience
by sundialsvc4 (Abbot) on Feb 10, 2014 at 21:36 UTC

    (I mean neither to be a Preacher nor a Motivational Speaker in the following.   I’m just going to speak candidly.   Hope that’s okay ... even though I don’t seem to have a very good track-record for having done that ...)

    I suggest that you look for ways to “refactor yourself” so that your primary business-value and/or business-purpose to your company does not [merely ...] consist of “writing code,” in Perl or otherwise.   If you’ve been in this business for a substantial amount of time, as obviously you have, this is not your primary business value anyway.

    “Coders, I can hire.”   They might not (yet) be fantastic, but if I can hire three times as many of ’em, and if I standardize what I am doing mostly around what other people have done (and have given-away as Open Source ...), then I have come out ahead.

    Like every other former-craft-industry before our own, individualized skill-sets will be replaced by Eli Whitney’s “damnable interchangeable parts.”

    • Maybe the United States Army doesn’t care anymore how good you are at crafting one-of-a-kind yet serviceable firearms from scratch.
    • Maybe they never will again.
    • Your career is not over yet.
    • Therefore, deal with it.   You have no choice.

    One-of-a-kind (so-called “bespoke”) applications, in Perl or otherwise, will be superseded by things that are mass-built, or built by the Cheapest Labor Available In The World.   If your job now is anchored just on your ability to “lovingly hand-craft” anything, and/or if you naively suppose that it is now secured by such thing that you have done in the past, then you are just business road-kill waiting to happen.

    But ... it isn’t.   Your business value, by now, mostly rests upon the things that only experience can bring:   the things that you do “instinctively.”   The ability to manage a project ... the ability to triage a troubled application (that you didn’t write) and to bring it to heel ... the ability to take a business requirement and to turn it into implementable, testable work-breakdowns, even if you are not going to be the one to do the work.   Perhaps most importantly of all, the ability to articulate (and to specify exactly how to build ...) machinable test-plans that will enable all of this very-vital code to be just as “ruggedly dependable” (you can dance upon this platform without worrying that it will break beneath your weight ...) foundation as we routinely expect from, say, CPAN.

    And what is more, if you have been with your company for any length of time, you know how to do this in the context of exactly what your company now does!

    So, put your brush-salesman’s hat on.   That happens to be a very unique-to-you “value proposition.”   So, if you put your mind to it, you can sell that.™

    Friend, you have now spilled your guts to PerlMonks, and I greatly admire you for your honesty and your candor.   Now, go talk to your boss.   Express your concerns, your fears, and your uncertainty.   Clear the air about everything that, until now, has been set by uncertainty, fear, and suspicion.   After all, this is [merely ...] business.   Every worker (and for that matter, every manager ...) before you has observed “the winds of change,” and has rightly feared it.   Maybe you will find that your manager has been reluctant to talk to you, also!   (And if you have ever in your life been on that very-lonely Other side of The Desk, you know exactly what I am talking about.)   Be the one to break the ice ... without fear.   If you can show yourself to be the one who “thinks outside the box” with regard to your own career, who knows what good things might lie just outside that box?

Re: Bad conscience
by pat_mc (Pilgrim) on Feb 12, 2014 at 19:47 UTC
    Hi, baxy77bax -

    At the end of the day it's a decision on how you want to live your life. Do you steal in a shop when no one is watching? Do you want to wake up in the morning looking into that sad person's face in the mirror who writes obfuscated code just to cling on to his mediocre job?

    Have faith in your abilities. Take on the challenge. Life has unexpected turns in stock for all of us (of course, for better and worse). But don't let yourself down and turn into one of those desperate beings who make this world a bad place. You only have this one life to rise, shine and write good code. Use it. It's short enough.

    ________end of sermon________
Re: Bad conscience
by sundialsvc4 (Abbot) on Feb 14, 2014 at 06:02 UTC

    I would prefer to say the same thing this way:   “shine and do great, professional work for the company of souls that’s currently paying you,” and ... “do not take so self-restricting a view of exactly what it is that they are paying you for!”

    Are they really paying you [just ...] for your ability to jockey [just ...] Perl source-code?

    Really?   Do you really think so?

    Think outside the little career-box that you seem to have put yourself in.   A computer programming language, therefore any-and-every body of source-code written in that language, is merely:   “a for-the-moment necessary means to a business end.”   The source-code is a specific, concrete, implementation of a business(-specific) process.   It is both a product of present-day technologies and utterly governed by it.   It is business-important today only because today it is necessary.   If the technology were to change completely, tomorrow, then all of that source-code would be replaced by week’s end.   Until and unless that [never ...] happens, the source-code is valuable only because all of us are still stuck with it.

    You are not that process; nor are you a machine.   You’re not even the (only ...) keeper of the source-code.   Your value to the company is located between your ears, not between your fingernails.   You know the process.   In fact, you know the process so intimately that you are able to make your living based in part upon your ability to cause an unthinking digital machine to implement a significant part of that process, within the severe technological constrants (i.e. “Perl, etc.”) of the present day.   Tomorrow is another day.

    Hence ... go talk to your boss, immediately.   Believe it or not, you are both on the same team.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlmeditation [id://1074207]
Approved by Ratazong
Front-paged by Old_Gray_Bear
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (7)
As of 2024-04-18 14:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found