Fellow monks,

I’m working on a perl-project in close teamwork with a colleague. We’re students and doing this project for a company. I’m coding perl since maybe 3, 4 years, he’s just started (he’s more on the PHP-side of life).

before this project i never worked this close with anyone on a programming project, and if so, always with elderly, calm people. It seems to me, my colleague has a completely different attitude towards scripting and coding.

i do believe, coding means to work with problems all day. To try to solve problems. this means to me: if i do not like those problems, it’s not a good thing for me and the work i do.

he, on the other side, is often sitting next to me, cursing, getting agressive towards perl, his hardware, me and the world in general. As if the code he writes is infringing him personally. To me it looks as if he wanted to have solved every problem before it even occurs to him.

  • what’s your attitude towards the code you write? Towards the problem that happen to cross your way?
  • how do you live with the feeling of having problems all day long and need to solve them? (otherwise you get fired or whatever)
  • how do you stop this ‚virus of the mind’ crawling around in your head after a day coding? How do you manage to not even get infected?
  • one day i read in a book, that if you're coding, you're never really sure, that the thing you do is really really right. often you know it should be that way but you can't be 100% sure (at least as long as you're not one of those gods floating around in the monastery). how do you live with that feeling?

    yes, i do believe coding puts a virus into your mind. And sometimes it takes good strategy to stop it from spreading around. But nevertheless i love perl, i love coding and i love the code i write. it's just the way you put it. guess i'm more a zen-minded guy... :)

    • Comment on your attitude towards the code you write
  • Replies are listed 'Best First'.
    Re: your attitude towards the code you write
    by perrin (Chancellor) on May 07, 2004 at 22:11 UTC
      I've noticed a similar attitude in programmers who have done a lot of VisualBasic or HTML/JavaScript, especially with GUI tools and on Windows. I think it may be something about how unfathomable those tools' inner workings are -- they get people into a "keep poking at it until it seems to work" mentality, because the results don't appear to be logical. Eventually people come to distrust tools and are quick to blame all problems on bugs in the language/compiler/OS/etc.

      Most of the programmers who I enjoy working with tend to think of the whole thing as a sort of elaborate game. You try to come up with a good move, and you see what happens, and if your strategy works, you win. I think of programming more like a series of victories than a series of problems.

        Ahem. I don't think the language, the OS, the editor, or whatever else it is people like to argue about, have a relevance here. Each language was (yes really) designed and thought out by someone or someones. It may be that you need a particular mindset to understand how some of them work, or to be able to use some. There are people who get equally frustrated using * (insert typical unix language here), and are quite happy doing VB etc.

        The only problem zone is the person doing the coding, especially if they already have that mental shield which says '* (insert OS here) is horrible, * (insert language here) is yucky' etc. Maybe some languages are unlogical/unfathomable to some people, but thats not the fault of the language.

        Having said that, yes, some people are better off with some languages, and less good with others, then they should find the one they likeare good at, and get a job in it.


        NB: Im a VB/Perl/C++/SQL/.. programmer, and find them all logical in their own ways..

          Don't take it personally. I'm just saying that I have mostly seen this attitude in people who learned on tools that are somewhat higher level and hide more from the user. I don't have a statistically significant study of the correlation, just personal observation.

          Maybe some languages are unlogical/unfathomable to some people, but thats not the fault of the language.

          I think it's fairly clear that a language like VB -- GUI-driven, very high-level, closed source -- is harder for people to grasp the inner workings of than Perl. With Perl, you can always find someone who will help you understand how hidden things like memory allocation for a hash work, even if you aren't able to read the source yourself. That's why I say it's unfathomable: people seem to get into a "tips and tricks" mentality with it, rather than really understanding what it's doing.

          I'm starting to believe otherwise. Granted, the whole job always contributes to the programmer's experience, but some languages are better suited to some personality types than others. Or at least it seems that way. Why else would intelligent software engineers prefer C++ over perl? Why would some people cling tenaciously to LISP? Paul Graham thinks it's tied to the ability to program well. I don't know.
          If ... End If Sub ... End Sub Function ... End Function While .. Wend For ... Next Do ... Loop

          And you say someone designed this? Wow!

          Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live.
             -- Rick Osborne

          Edit by castaway: Closed small tag in signature

    Re: your attitude towards the code you write
    by benrwebb (Scribe) on May 07, 2004 at 20:56 UTC
      ...He who clings to his work
      will create nothing that endures.

      If you want to accord with the Tao,
      just do your job, then let go.

      Seriously. I don't feel one way or another towards my code. It isn't me, it just is. Some of it gets used, some of it doesn't. Some of what I've written has proven to be amazingly helpful, other parts have proven to be useless. Whatever, it's all the same to me. Once I've written something, I do my best to step away from it (I do still handle debugging and whatnot, but that is just maintenence on some existing code, not MY code). I don't think about it as mine any more, it takes on a life of it's own.

      That said, it sounds like your neighbor has an all together different style. If it suits him, let it go. If it doesn't suit him, he'll have to learn that on his own.

      As for the virus in the mind (I rather like that phrase) I just let it go. If I need to think about something, I think about it. It's sort of like dieting, it's better to sit down and have a meal than it is to snack around with a lot of finger food all afternoon.
    Re: your attitude towards the code you write
    by geekgrrl (Pilgrim) on May 07, 2004 at 22:11 UTC
      I know when I first started coding, I would often get frustrated. Really frustrated sometimes. It was my first real programming job, I didn't really know UNIX at all, so I had to learn all that, learn emacs, learn Java and curses and all sorts of stuff, and pretend I knew what everyone was talking about. However, I mostly hid my frustration from my colleagues - i would just go out for a 3 hour bike ride on the Burke-Gilman trail instead.

      When you don't know enough to tackle the problem at hand, sometimes one gets irritable, curses, hates the world, etc. At least I've been through that.

      I found it took lots of practice coding to get over the frustration, and also perhaps to stop wanting the code to just work, and learning to take a step back, or a long bike ride, and just step through things logically.

      One of the best things i've done for myself is to remember to just go outside and take a ten minute walk, or a tea time break with some coworkers, or gossip for an hour at starbucks, or just leave it alone for a day - and afterwards the problem becomes clear. Or it doesn't but I have a fresh attitude towards it.

      It sounds like this guy needs some mentoring perhaps. Also, it's possible he just has issues in general. Is he like this when he's not coding too?
        yeah, i'm through that, too. when i started coding, i often got mad about my code ('why the f... doesn't this f...ing piece of s... work?!') but the one evening one of my colleagues made a 'statement' before he left the office, i do not remember his words exactly. but it made me realize that this is not the way to go (for me, TIMTOWTDI).

        Is he like this when he's not coding too?

        yes, he is. he very easily gets this aggressive tone in his voice in normal discussions. i do not bother about this too much, that's the way he is and i am the way i am. (as long as i don't have to have the discussions with him i tend to avoid them (i.e. the topic PHP vs. perl, where i told him i'd love to talk about it but that i only do it as long there as well-founded argumentation).

    Coding fever
    by itub (Priest) on May 07, 2004 at 22:54 UTC

      Virus of the mind? That reminds me of a condition I often suffer, which I call "debugging fever" (or sometimes just "coding fever"). I know I have the fever when I can't stop thinking about the program and keep tracing through it in my head. Or when I'm convinced that in "just five more minutes" I'll manage to fix the bug or finish whatever I was doing, and in the end it takes hours.

      How one reacts when suffering the coding fever depends on one's personality. Some people may take it personally and get angry. I prefer to see it as a challenge, a puzzle to solve, and try to remain calm.

      The best cure is to go to sleep. I'll probably keep tracing through the code in my dreams, because usually when I wake up everything seems clearer and I know how to fix the problem.

    Re: your attitude towards the code you write
    by BrowserUk (Pope) on May 07, 2004 at 21:11 UTC

      I couldn't agree more. If coding was an assembly line process--just follow the instructions, plug this bit in here, twiddle that bit there--it would have bored me to tears, years ago.

      It's the 'problems' (coding problems, as opposed to all the ancillary stuff, like management:), that make it interesting.

      Examine what is said, not who speaks.
      "Efficiency is intelligent laziness." -David Dunham
      "Think for yourself!" - Abigail
        this reminds of that quote from the Economist:
        As for the Indian threat, “offshoring” is certainly having an effect on some white-collar jobs that have hitherto been safe from foreign competition.... And the bulk of these exports will not be the high-flying jobs of IT consultants, but the mind-numbing functions of code-writing.
        Fortunately for us coders, coding (at least the stuff we're doing) is NOT mind-numbing.
    Re: your attitude towards the code you write
    by Anonymous Monk on May 07, 2004 at 20:55 UTC

      The way I see it, if you get that frustrated with programming, then you're in the wrong industry. In such a situation, all I see is someone who is not happy with the job they're in. Everybody has their bad days where nothing works quite the way you want it; those days where you sit there all day working out one tiny problem that should have been solved within 10 minutes. It becomes a problem when each day turns into this situation: not only will the boss and co-workers not like it, chances are you're beating yourself over the head for it to (whether you are aware of it or not).

      On a second note, when was the last time this co-worker of yours got to take holidays? Maybe he needs some time off to do something other than programming. Breaks are necessary! If he's recently had holidays, then the only thing I'll point at is that he is burnt out. Or he is unhappy with his job. Or his life is too stressful and he's taking out his stress at work -- also while increasing stress levels.

      Me... I just don't let it get to me becuase there is nothing there to get at me. I love programming; it has it's frustrating moments, but it is fun to learn from them. Do I sound crazy? ;)

    Re: your attitude towards the code you write
    by castaway (Parson) on May 08, 2004 at 07:29 UTC
      If your co-worker is new to perl, maybe he's just having problems learning? I can barely remember learning my second programming language, but I do believe the 2nd one is the most difficult. You just keep thinking you *know* how to do things in the language you already know, and its 'easy', yet you have to go figure out how to do it all over again. Especlly learning while working to deadlines is very frustrating, you don't have time to stop and try things out, or explore, because there's this constant nag in the background, that you have a time limit.

      Some people also just don't like to learn generally, they're not good at new stuff, it just takes ages and lots of repeats to stick in their brains. It's not necessarily a bad thing, though they will tend to always solve similar problems the same way, and not see/understand new or better ways.

      Some of use (programmers) are just plain ornery, and get our work done better by trying to show it who's master, and that involves grumbling at it sometimes ,)

      As for me, I like solving problems, and learning new stuff, even if I take a while to be convinced of its usefulness sometimes. I hate doing it to deadlines, but thats life I guess. (Especially when the deadline has passed, and people keep finding bugs in my code, and I've gone on to other things... dumdidum..)

      Virus, what virus? Do you mean constantly niggling at how to do some bit of coding, while doing other things, like shopping or whatever? I like it, its invigorating!


        i do have to admit to you all: it's not me who came up with this phrase. a song by heather nova is called like this. and some few days ago, i kinda felt this virus.

        Virus, what virus? Do you mean constantly niggling at how to do some bit of coding, while doing other things, like shopping or whatever?

        yes, that's exactly what i mean by it. i'm kind of schrizophrenic about that: one part of me wants to be present at the other things i'm at and the other part really likes (and thinks it's cool :) )being still busy with the code.

        well no, afaik it's not the 2nd programming language to learn. he tried out all kinda things (asp, php, vb). but i do not have any information about how seriously he was into them.

        i do believe, learning is about posing questions. being able to pose questions to people who might know some things about the problem i'm into (like i'm doing in here). another way is, trying to solve every little thing on your very own. maybe that's the harder and more frustrating way to go - and it is, what he's doing. he doesn't like to pose questions and get hints by others how he could solve a prob. hm. yes, maybe he thinks he should already know everything.

          Heather Nova??? It is to laugh.

          She almost certainly got the phrase from Richard Brodie's book, Virus of the Mind: The New Science of the Meme (1995). The concept of mental viruses was explored deeply and popularized by Richard Dawkins, who (AFAIK) coined the term "memetics". And the idea is older than that. We know, for example, that the beat author William S. Burroughs said "Language is a virus from outer space" some time in the mid '80s.

    Re: your attitude towards the code you write
    by CloneArmyCommander (Friar) on May 07, 2004 at 20:56 UTC
      My problem isn't usually the code or the computer, it's the people around me who frustrate me. Especially when I'm working on a public computer, and the middle school kids come in and waste the useful resources of the computer to play with Runescape :). When I come across problems with a script I am needed to write, I don't complain, becuase if it worked all of the time, I wouldn't be needed :), hahaha :). What I find really interesting is your idea of coding sometimes being a virus to the mind :), I'm nowhere near over Perl, I'm still in the stages of development :). But, this sounds like it could easily make an interesting poll.
    Re: your attitude towards the code you write
    by TomDLux (Vicar) on May 08, 2004 at 05:05 UTC

      Sure, sometimes I get frustrated, or go into a panic .... "Why isn't this working? It's going to blow up! They'll fire me and I'll never get another girlfriend!"

      Then I find the place where I set a variable to undef and go back to normal mode.

      Most of the time, especially sincee I adopted test-driven development and started writing a test, developing a few lines to suit the test, things are under control. It's simply a matter of figuring out which solution would be best, benchmarking to verify efficiency, refactoring code, and continuing on.


    Re: your attitude towards the code you write
    by Jenda (Abbot) on May 08, 2004 at 21:09 UTC

      I have to admit I do get irritated, I do swear and curse while programming ... if I'm forced to write in C# or VB. Especialy if I know how simple would that task be if I were using Perl. It's kinda OK now with VB since I'm somewhat used to it and I know the limitations. So it is like running with your legs tied, but at least you can see where are you going. While C# feels like I was trying to run with my arms tied and my eyes blinfolded. I just keep hitting concrete walls unexpectedly.

      Apropos ... I guess you are right about the virus. I'm so used to watch the details looking for books that I've started noticing spelling mistakes in books and webpages which is something I've never used to do before. (Before someone points out a spelling mistake in this post. English is not my native, I'm talking (mostly) about books in Czech.) And the "bugs" are rather annoying to me. I almost started "fixing" the book I read during today's flight to Chicago. :-} It just felt awkward.

      I guess I should take a few years break ;-)

      Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live.
         -- Rick Osborne

      Edit by castaway: Closed small tag in signature

    Re: your attitude towards the code you write
    by hardburn (Abbot) on May 10, 2004 at 13:08 UTC

      what's your attitude towards the code you write? Towards the problem that happen to cross your way?
      how do you live with the feeling of having problems all day long and need to solve them? (otherwise you get fired or whatever)

      If I was solving the sort of large, depressing problem like "world hunger", I probably would get dragged down fast. Fortunately for me (though perhaps less fortunately for the people who are starving), I don't have to solve that sort of problem.

      Programmers solve problems of a different nature. They are almost purely intellectual. Everything from a one-line Golf up to a major application is put together with a bunch of abstract problems that often have use in a wide veriety of tasks. To use a language effectively, you must know what sort of abstract problems your language is good at, and apply them as needed.

      This, I think, is the primary difference between CS and pure Mathmatics. Even though computers have a direct relationship to math, CS needs to be more concerned with abstraction rather than mathmatical rigor (which in some ways are opposites of each other).

      . . . often you know it should be that way but you can't be 100% sure . . .

      Something tells me that even "gods" of programming can't do this one. It's not the abstract problems mentioned above that will get to you, but rather if the particular abstraction you applied is the best one for the real world problem you're trying to solve. At some point, you have to get real work done, and you have to go with a solution that you may not be comfertable with because you don't have a better one.

      On dealing with burn-out: a few months ago, we had rolled out what is probably the largest system we've done (not huge by many corprate standards, but very large for only one coder (me) to create). Many users misunderstood the system (many of our users are older university professors who aren't comfertable with computers), and for almost a month straight I had nothing else to do but deal with the problems these users had. I would come in to work in the morning, read my e-mails of all the latest problems, fix each one in turn and send an e-mail back. By the time I finished with the last round, a new round would have come in. I was very close to complete burn-out during this time.

      A solution I found was that during my break period, I would find a very calming peice of music. (My personal favorite for this is "Collean Dahs". Pachelbel's Canon also works well, if you get a good arrangement). Plug in the headphones, shut out everything else, close eyes, and focus on the music. When it's done, I am so completely relaxed that I can hardly open my eyes again.

      : () { :|:& };:

      Note: All code is untested, unless otherwise stated

    Re: your attitude towards the code you write
    by flyingmoose (Priest) on May 08, 2004 at 22:21 UTC
      how do you live with...

      1) Crashing mountain bikes into trees for fun

      2) Beer

      But then my company sucks...

    Re: your attitude towards the code you write
    by gwhite (Friar) on May 12, 2004 at 16:08 UTC

      I don't have problems, I have solutions....