• Schien (unregistered)

    this reminds me of my very first developer job in a business research environment, where coders are part of their experimental subjects. projects were divided into loose phases and each phase lasts usually 6 to 9 months. since they tend to hire university students who just learned the rules of consistent naming, every one of them decided to play god and over use their own conventions against existing ones. by the time i took over the project, i've seen all the possible permutations such as 'tblCatagories', 'tblCatagory', 'tbl_catagory', 'catagoryTables',...,...

    captcha: business

  • (cs)
    Alex Papadimoulis:


    You think I'm done, right? Wrong. All of these inconsistencies in naming are handled individually, in code on the ASP pages. For the table names that follow some remote semblance of a consistent naming convention, the table name is stored in an unencrypted cookie, which is read into dynamic SQL queries. I imagine it goes without saying that all SQL queries were dynamic with no attempts to validate the data or replace quotes.


    This might actually be a good thing.  Leaving the code open for SQL injection attacks might invite some poor hacker to try and derive the structure of the database.  This will ultimatly cause his brain to implode leaving him unable to even look at a computer without curling up into the fetal position.

    I say put the app into the wild and annouce that it is unhackable.  :)
  • Schien (unregistered) in reply to sammybaby
    sammybaby:

    Okay. Not externalizing the connection strings is seriously stupid. (I once spoke to a guy whose job was to make web sites, who was replacing a bunch of Perl DBI calls to an msql database, with Perl DBI calls to a MySQL database.... once on every page of his site. Without the use of a find-and-replace, even. Sad.)

    Not having a seperate environmnet for testing.... seriously stupid. For simple systems, we're talking maybe a pair of db commands to recreate the whole thing from scratch, so there's no excuse for using the same database for production that you do in development.

    But the one thing that I see all the time, yet which is arguably the biggest wtf: no source control system.

    People. Use SCM. Seriously. Even if it's a toy app you're screwing around with on your PC.

    (Why SCM wasn't taught, or even discussed, in any university class I took is still a mystery to me.)

    it's a good thing universities don't teach useful things, because they can't teach them right anyway. i'm glad that they don't teach things like integrated webdevelopment. yet still, they've ruined my favourite language - C. in general university is a machine that produces incompetent java programmers.

    captcha: freedom

    didn't work ... this forum software is shit

    captcha: fraction

  • (cs) in reply to Gene Wirchenko
    Gene Wirchenko:
    sammybaby:
    But the one thing that I see all the time, yet which is arguably the biggest wtf: no source control system.

    People. Use SCM. Seriously. Even if it's a toy app you're screwing around with on your PC.

    (Why SCM wasn't taught, or even discussed, in any university class I took is still a mystery to me.)


    Were your projects big enough that the benefit of SCM would be seen by students?

    One way to ensure that a tool is never used is to push its use in inappropriate situations.  For example, using recursion to calculate factorials is a horrible way to introduce recursion.
    Student: Why not just use a loop?
    Teacher: Well, recursion is useful sometimes.
    Student: When?
    Teacher: Well, they are too complicated to get into at this level.
    Student: So why would I want to use this tool when I supposedly can not understand the cases when it would be used?
    Teacher: <no satisfactory="" answer="">
    </no>

    Sincerely,

    Gene Wirchenko
    this is exactly what tempted me to go into teaching back where i grew up (before i realized that would have been a colossal waste of time).

    some teachers simply don't know their stuff, or they'd make note that recursion vastly simplifies the development and validation of an algorithm trivially - linked lists are a prime example.  but the factorial example is a perfect way to teach a math major the concept of recursion in programming: it's exactly what he does with such algorithms as a matter of course.

    but the people that end up teaching either don't know this or don't realize it and just don't pass the knowledge on to students....  leaving them to fend for themselves in their vain attempts at understanding an algorithm.

    i hated school.

    (ooh, yay!  my first post!)
  • Schien (unregistered) in reply to paddy

    paddy:
    I've had to deal with clients and their HTML sites where, over the years, everytime they'd misspell a filename in a link and get a 404 error (say, they linked to contat.htm instead of contact.htm) they'd just copy contact.htm and name it contat.htm.  The htm vs html extensions were never consistant so there were a lot of duplicates. 

    But test tables and columns in a RDB? 
    While Eskimos have over 200 words for snow, ITs should really have a few hundred for types of pain induced by viewing really bad code...I am at a loss to describe this sensation.

    that's why i read the WTF site, just to learn those words. developmestuction, developmestRuction, brillant,... just to name a few.

    captcha: enterprise

    captcha (2nd attempt... again!): hamburger

  • Sam (unregistered)

    Oh, you guys aren't creative, I can think of lots of ways to make this worse.  I mean, look at how clear those table column names are!  He could have used user_field_1 and user_id_2 for actual and test values, for instance.  Or he could have written his code in VBScript.  Or.. . damn, this is hard...

  • (cs) in reply to Sam
    Anonymous:
    Oh, you guys aren't creative, I can think of lots of ways to make this worse.  I mean, look at how clear those table column names are!  He could have used user_field_1 and user_id_2 for actual and test values, for instance.  Or he could have written his code in VBScript.  Or.. . damn, this is hard...

    Surely everyone knows that you should use an MD5* of a description of the field as the field name, for security reasons**? I mean, what is the world coming to...

    * Possibly truncated
    ** Job security

  • (cs)

    on a second note, I don't want to know what would drive a perfectly good developer to quit after just three days.

    I'm crying. A grown man is CRYING!!!

  • (cs) in reply to Schien
    Anonymous:
    sammybaby:

    Okay. Not externalizing the connection strings is seriously stupid. (I once spoke to a guy whose job was to make web sites, who was replacing a bunch of Perl DBI calls to an msql database, with Perl DBI calls to a MySQL database.... once on every page of his site. Without the use of a find-and-replace, even. Sad.)

    Not having a seperate environmnet for testing.... seriously stupid. For simple systems, we're talking maybe a pair of db commands to recreate the whole thing from scratch, so there's no excuse for using the same database for production that you do in development.

    But the one thing that I see all the time, yet which is arguably the biggest wtf: no source control system.

    People. Use SCM. Seriously. Even if it's a toy app you're screwing around with on your PC.

    (Why SCM wasn't taught, or even discussed, in any university class I took is still a mystery to me.)

    it's a good thing universities don't teach useful things, because they can't teach them right anyway. i'm glad that they don't teach things like integrated webdevelopment. yet still, they've ruined my favourite language - C. in general university is a machine that produces incompetent java programmers.


    Well, at least they teach capital letters.
  • (cs) in reply to sammybaby
    sammybaby:

    Okay. Not externalizing the connection strings is seriously stupid. (I once spoke to a guy whose job was to make web sites, who was replacing a bunch of Perl DBI calls to an msql database, with Perl DBI calls to a MySQL database.... once on every page of his site. Without the use of a find-and-replace, even. Sad.)

    Not having a seperate environmnet for testing.... seriously stupid. For simple systems, we're talking maybe a pair of db commands to recreate the whole thing from scratch, so there's no excuse for using the same database for production that you do in development.

    But the one thing that I see all the time, yet which is arguably the biggest wtf: no source control system.

    People. Use SCM. Seriously. Even if it's a toy app you're screwing around with on your PC.

    (Why SCM wasn't taught, or even discussed, in any university class I took is still a mystery to me.)



    Subversion uber alles!

    svnadmin create /svn/myrepos
    svn co /svn/myrepos .
    svn add *
    svn commit -m 'initial commit'

  • (cs) in reply to greyfade
    greyfade:

    recursion vastly simplifies the development and validation of an algorithm trivially - linked lists are a prime example.


    Does it?  I routinely process linked lists like so (pseudocode):

    process(node) {
      local_node = node;
      while (local_node != EOL) {
        do_something(local_node);
        local_node = next(local_node);
      }
    }

    OTOH, traversing all nodes of a sorted binary tree in order is a Big Win (tm) for recursion (more pseudocode):

    process(node) {
      if (node == null) return;
      process(left(node));
      do_something(node);
      process(right(node));
    }

  • (cs) in reply to Gene Wirchenko

    Gene Wirchenko:

    Were your projects big enough that the benefit of SCM would be seen by students?

    Yes.  Any project bigger than hello world benefits from SCM.  Especially students, who should be encouraged to experiment, which is one of the great things about SCM.  Likewise, I can remember doing my own half-assed SCM at least once:

    cp main.cpp main2.cpp

    vi main.cpp

    cp main.cpp main3.cpp

    cp main2.cpp main.cpp

    vi main.cpp

    Oh, I'm done, let's get rid of all these extra copies..

    rm main*.cpp

    DOH.

    And I can remember most of my classmates committing similiar mistakes, as I imagine most CS students have.  Why shouldn't the instructor spend a day going over cvs/svn instead?

     

  • [Si]dragon (unregistered) in reply to sammybaby
    sammybaby:
    Besides which, I suspect that SCM would come in handy the very first time you had a group programming project. But that's as may be.


    Furthermore, you should never not use source control.  Even if you are just slapping together a project by yourself, regardless of the size.  There will always be cases where you will want to revert changes and doing that by hand (plus the frustrations of failing to do so correctly) will always cost more time than the occassional commit.

    And to be pedantic, it gives you good practice too.
  • Eric (unregistered) in reply to Monomelodies
    Monomelodies:
    Oh, that's easy. Let me look at your code, and you can look at mine. In my experience since, you only need to see snippets to identify common but oh-so important practices like coherent style, proper indenting, thought-through variable, function and class naming etc.
    Companies one wants to work for tend to applaud this stance, companies you don't deny it. And there's a few in between who reluctantly let you see a few lines of their horrible code and you never return their calls. Sure kept me out of trouble since then!


    That makes good sense, thanks.
  • Anonymaly (unregistered) in reply to Gene Wirchenko
    Gene Wirchenko:
    sammybaby:
    But the one thing that I see all the time, yet which is arguably the biggest wtf: no source control system.

    People. Use SCM. Seriously. Even if it's a toy app you're screwing around with on your PC.

    (Why SCM wasn't taught, or even discussed, in any university class I took is still a mystery to me.)


    Were your projects big enough that the benefit of SCM would be seen by students?

    One way to ensure that a tool is never used is to push its use in inappropriate situations.  For example, using recursion to calculate factorials is a horrible way to introduce recursion.
    Student: Why not just use a loop?
    Teacher: Well, recursion is useful sometimes.
    Student: When?
    Teacher: Well, they are too complicated to get into at this level.
    Student: So why would I want to use this tool when I supposedly can not understand the cases when it would be used?
    Teacher: <NO answer satisfactory>


    Sincerely,

    Gene Wirchenko

    I would have to agree with sammybaby on some form of "source control".  I recall many years ago developing on a 16-bit machine; most of the development was writing utility libraries or small applications.  There was no source control for this platform or even a "diff" utility.  (This was a TI-99/4a by the way.)  Even worse, there were not date or time stamps on files.

    I ended up with several stacks of floppy disks from a game that I had developed, complete with dates and numbers written with a silver sharpie, each time I made radical changes or re-wrote portions.  It was difficult to know what changed when and where.

    I will admit that source control is a tool, however, it is difficult to find many situations in which not using that tool (i.e. "Hello World" programs or miniscule code snippets) isn't beneficial.

    I don't know if comparing a programming methodology with a tool used to increase productivity is necessarily a good comparison. 

  • Eric (unregistered) in reply to RyanLeeSchneider
    RyanLeeSchneider:
    Likewise, I can remember doing my own half-assed SCM at least once:


    When I was starting out, I was big on making an archive of a project at roughly each "commit" stage.  Of course, that meant each project had a directory with a bunch of numbered zip files. :P

    Then I got into using MS Source Safe...and the first time I had to roll back more than one file (after a few days of work that turned out to be a dead end), I began seriously researching SCM.  I've been using Subversion since (which has been a godsend), though I'm looking at darcs, now...


  • (cs) in reply to Jake
    Anonymous:

    I'm the submitter.  I was the low man on the totem pole at my old job, and the developer responsible for this monstrosity was the star developer of the team.  He always had things done on time (or early!), and management loved him for it.  I could scream about it until I was blue in the face, but I'm automatically overruled.

    Oh, plus he was in charge of the entire project, and I only found out about it after he'd left the company.  I know everyone will disagree with me here, but after it was already in such bad shape, I thought it was pointless to set up a solid test environment.  So much was hardcoded (such as locations of files in the filesystem) that there was still a risk of harming the production system even from a test environment.



    I've worked with people like this.  There can never be more than one on any given project, of course.

    The most effective term I've ever seen for such a person is "programming prima donna" or "techie prima donna."

    They never take constructive criticism.  They've been doing things the same way since the seventies and they're never going to improve or budge an inch, because, after all, "it works."  They create endless extra work and painstaking tedium for the other developers.  They cost the project untold hundreds of hours.

    And they're usually in charge, and they're usually the boss's favorite (a.k.a. "star developer" or "hero"), because if they weren't, they would have been dismissed long ago.

    At every interview, I ask bluntly whether I'll have to deal with such a person.  If the place is infected with a prima donna, there is no escaping a job of near-constant misery.

    By the way, peer reviews and design reviews are an excellent countermeasure to prima donnas, who are quickly defeated by exposure.  For that reason, they rabidly oppose instituting peer reviews.
  • (cs)

    Bitch bitch bitch.

    Where the code with the WTF?

  • (cs) in reply to [Si]dragon
    Anonymous:
    sammybaby:
    Besides which, I suspect that SCM would come in handy the very first time you had a group programming project. But that's as may be.


    Furthermore, you should never not use source control.  Even if you are just slapping together a project by yourself, regardless of the size.  There will always be cases where you will want to revert changes and doing that by hand (plus the frustrations of failing to do so correctly) will always cost more time than the occassional commit.

    And to be pedantic, it gives you good practice too.

    I've come to love the Local History (http://www.jetbrains.com/idea/features/lvc.html) of my IDE, because with it I can revert some lines of code that I edited a couple of minutes or hours ago (I think a history entry is created at every autosave; the history length defaults to 3 active work days). It gives much freedom when you can trust that there is always the possibility to go back to any previous state. A separate server for CVS/SVN/similar is good for backups and working in teams, or if you need to revert to a state more than a couple of days ago.
  • Benjamin Smith (unregistered)

    I've seen this. I've lived through it. I assumed a project a few years back that clearly qualifies for WTFery. Just as this one. Lots of tables with incremental names. EG: "students2003", "students04" and "students11". (no telling on the last one)  

    It's a real WTF. 19 copies of the same file, all different by about 35 lines of code. Variables that don't seem to be defined anywhere. Variables that are consistently used everywhere but about 10% of the time. Random files (word .doc files, pdf files, etc) strewn about haphazardly. Is it linked to? Who knows?

    And no, I'm not exaggerating when I say there was 800 MEGABYTES of this...

    I nursed it along for a few months, grabbed out of it what I could, and then rebuilt the thing from scratch. Now we have a clean test environment, build scripts, publishing methods that are consistent and reliable, and 2 years of HARD WORK later, it's starting to come together very nicely...

    (PS: Another WTF is that Captcha doesn't always work here...)

  • (cs)

    I know I'm late to this party, but, in my opinion, the WORST thing you can do as a programmer is be inconsistent. To me, you can do pretty much whatever you want and it will still be manageable as long as you always do the same thing.

    This kind of crap not only masks the underlying WTF  but makes it impossible to locate/contain.

    For once, I must agree that the goggles do nothing.


  • Dave (unregistered) in reply to Sean
    Sean:
    I've been racking my brain trying to find a worse method than this.  But I just can't.

    It just occured to me that you could make it worse by having a meta field for each table, into which you could insert an xml string detailing if the data is test or production data. That could be a great way of ensuring your job for ever more.

  • (cs) in reply to Schien
    Anonymous:

    this reminds me of my very first developer job in a business research environment, where coders are part of their experimental subjects. projects were divided into loose phases and each phase lasts usually 6 to 9 months. since they tend to hire university students who just learned the rules of consistent naming, every one of them decided to play god and over use their own conventions against existing ones. by the time i took over the project, i've seen all the possible permutations such as 'tblCatagories', 'tblCatagory', 'tbl_catagory', 'catagoryTables',...,...

    captcha: business


    How about the properly spelled 'tblCategories'?  I'm not really trying to pick on you, just trying to lead into my own short story....  The guy who designed the databse I work on most of the time absolutely couldn't spell.  Now I have to memorize 30 misspellings of common words to work with the data.  I haven't grown the balls yet to rename them because they are tied way too tightly with the application and all hell would break loose if I did.  It drives me nuts, he is a lifelong english speaker, college educated, highly paid, and he gets about 10% of the words he spells wrong.
  • (cs) in reply to RyanLeeSchneider
    RyanLeeSchneider:

    Gene Wirchenko:

    Were your projects big enough that the benefit of SCM would be seen by students?

    [..snip...]

    And I can remember most of my classmates committing similiar mistakes, as I imagine most CS students have.  Why shouldn't the instructor spend a day going over cvs/svn instead?


    mine did.

    learning to use the SVN system is part of one of the obligatory first year courses here. the University of Utrecht also runs an extra SVN server just for students to use for their own projects.

    university CS students mostly learn to think about complexity and algoritms, not lines of code. this is the reason some of them can't write a single line of C when they start out on their first job. and they don't have to. they've got minions for that ;)

  • fgilcher (unregistered) in reply to lukas
    lukas:

     [snip]

    mine did.

    learning to use the SVN system is part of one of the obligatory first year courses here. the University of Utrecht also runs an extra SVN server just for students to use for their own projects.

    university CS students mostly learn to think about complexity and algoritms, not lines of code. this is the reason some of them can't write a single line of C when they start out on their first job. and they don't have to. they've got minions for that ;)



    and you're proud that they can't code a single line? Thats a major WTF in itself http://www.c2.com/cgi/wiki?ArchitectsDontCode

    captcha: speaker
  • (cs) in reply to lukas
    lukas:

    university CS students mostly learn to think about complexity and algoritms, not lines of code. this is the reason some of them can't write a single line of C when they start out on their first job. and they don't have to. they've got minions for that ;)



    As long as "can't write a single line of C" means that they learned other programming languages, it's ok for me - C isn't known for beauty and elegance.
    As long as ".. on their first job. and they don't have to. they've got minions for that" doesn't mean they start as some kind of manager or consultant, it's ok for me - people without experience are dangerous in such positions, especially if they try to replace experience with arrogance.
  • (cs) in reply to jsmith
    jsmith:
    It drives me nuts, he is a lifelong english speaker, college educated, highly paid, and he gets about 10% of the words he spells wrong.


    Dyslexic?

  • (cs) in reply to gwenhwyfaer

    gwenhwyfaer:
    jsmith:
    It drives me nuts, he is a lifelong english speaker, college educated, highly paid, and he gets about 10% of the words he spells wrong.


    Dyslexic?



    Nope, just good ole' bad spelling.  Here are some examples I am able to find with minimal effort (these are from production tables, stored procedures, and documentation, all stuff the client can see):

    Registerd
    Buisness
    Lable
    Balnk
    retrives
    migrate-able
    "on queue"  (he meant "on cue")
    Devlopment
    Disconceted
    Signetures

    Some of the stuff could be contrued as dyslexic if they were on their own, but most are just plain wrong.  The most common examples are spelling words how they sound (signetures) or using the wrong word amongst several that sound the same (he almost never used "they're" and "their" correctly).  The strange part was that he had been promoted to a job where he spent 90% of his time in contact with clients and writing specs and almost no time programming.

  • (cs) in reply to Gene Wirchenko
    Gene Wirchenko:
    Were your projects big enough that the benefit of SCM would be seen by students?

    One way to ensure that a tool is never used is to push its use in inappropriate situations.


    Well, maybe I'm just thick, but is there a situation where using a SCM is not benefical at all? Before you say "toy project" or "quick hack", count all of your toy projects that snowballed into a Kind Of Tolerable Tools that really do benefit from SCM use. In my opinion SCM is never overkill even for small projects.

    I've had tons of small hacks and regretted they weren't versioned at all initially. (And tons of small hacks that were versioned with RCS and I learned the pains of converting that to CVS and on to Subversion, but that was worth it =)


    And as for immediate benefits, well, small exercises like "see how Subversion kills the revision feature of your word processor dead, small file sizes
  • (cs) in reply to WWWWolf
    WWWWolf:

    Well, maybe I'm just thick, but is there a situation where using a SCM is not benefical at all?


    SCM are not beneficial if you use them incorrectly. 15 Years ago, I learned that the hard way when we used a GUI-builder tool called UIMX to design motif forms and let UIMX generate the necessary C source. Unfortunately, we put the resulting C files into SCCS, but not the UIMX files.
    Then, one day, one of us damaged a UIMX file containing dozens of forms. Lesson to learn: always put _all_ files into the SCM.

  • Maniacally Depressed (unregistered) in reply to EnterUserNameHere

    I actually began reading this site when one day I got to work and had to exclaim WTF about a colleague’s code. I was so depressed that I plugged WTF into Google and I was relieved to discover that I’m not alone. <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p>

    The problem with the guy I work with is that he just thinks chaotically...when I try to sit and help him he simply can't think in a clear manner, maybe I intimidate him. When I started here 6 months ago they didn't have coding standards and version control was time stamped directories on a server (I’ve since introduced coding standards, which are not followed and forced them to purchase SourceGear Vault, which has meaningful check in comments for less than 50% of the checkin’s, and that’s only because I’m the one who did them). When I watch this guy code he can write 5 lines of code using 5 different coding standards. He cuts and pastes like a mad man... He's scared shitless of losing stuff so there are multiple copies of files and multiple copies of databases everywhere on the network. His harddrive Data directory has about 250 folders off the root folder, how the hell he finds anything I’ll never know. Each database or file will have minor changes done for one specific customer or one specific bug fix. He's also got no grasp of OOP concepts. When I got here the network also had around 250-300 folders in the “IT Development” directory…step one was for me to create a folder “unorganised” and move the whole pile of steaming cow dung into there and issue a request for stuff to be organised as we “moved forward” (I know that PHB bullshit bingo talk but I figured it might help…it didn’t). Naturally I’m the only one who has ever moved anything and I’m the only one who has ever created a directory structure with more than 1 level.

    The trouble is he's quick in that he gets things working but everything he does pretty much needs rewriting. However being quick means that management love him because he’s a producer…

    I've just resigned from this hell hole so fortunately I only have three weeks to survive this nightmare.<o:p></o:p>

     

  • (cs) in reply to marvin_rabbit
    marvin_rabbit:
    Anonymous:

    it's a good thing universities don't teach useful things, because they can't teach them right anyway. i'm glad that they don't teach things like integrated webdevelopment. yet still, they've ruined my favourite language - C. in general university is a machine that produces incompetent java programmers.


    Well, at least they teach capital letters.

    Heh, look at what he DID capitalize...
  • Asd (unregistered) in reply to greyfade
    greyfade:
    but the factorial example is a perfect way to teach a math major the concept of recursion in programming: it's exactly what he does with such algorithms as a matter of course.

    Except the standard factorial example is ludicrously inefficient and quite likely to put off any student who understands it fully.
  • Hendrik (unregistered) in reply to paddy
    paddy:

    While Eskimos have over 200 words for snow,


    They don’t, but I agree with your point.

    (http://en.wikipedia.org/wiki/Eskimo_words_for_snow)

    H.
  • (cs) in reply to Jake

    Jake, I don't know why you assume everyone would disagree with you. There are battles worth fighting, and battles not worth fighting. No one can choose your battles for you, or second-guess the reasons for your choices.

    It sounds as if the lowest level of management at that company was trading off long-term cost for short-term benefit. If you decided to fight the battle, you could use the same logical skills you normally apply to software engineering to the task of quantifying the cost of doing business that way. You could estimate a project to remediate the system and present it to management. You could show the approximate date where the two cost projections cross; the date of payoff for remediating the system.

    If the first level of management was uninterested, you could take your story to the next level of management, and you could keep doing that until you get results or you are shut down. Unpleasant and not easy, but at least it would address the root problem.

    And if you were already so fed up that you had decided to quit the job anyway, what's the risk to you in doing that? Best case, you would be recognized as a clear thinker who needs to be put into a better job position. The star programmer and his star manager would be exposed. Maybe you would decide to stay with the company a while longer. Worst case, you could take these skills with you to your next job, and talk about how you acted as a proactive problem-solver in your last job. Either way, you can't lose.

  • (cs)

    This is a really interesting WTF. A lot of people are responding to it at a detailed level - how should one set up version control, etc. I think there's a much bigger WTF here, though. The whole management culture at that company is screwed up. How is it that the project manager is so short-sighted that he praises the star programmer for building crap on top of crap? How is it that the next manager up the chain isn't paying attention to what's going on in his/her area? How is it that management is unwilling to listen to other members of the technical staff who are concerned about the situation? The whole situation with the developestuction environment is a symptom of much bigger problems, IMO. I get the sense there are quite a few good reasons for Jake's new colleague to regret joining that organization.

  • George (unregistered) in reply to makomk

    Thanks for that. It's the first time I've actually laughed out loud while reading this forum.

     

  • George (unregistered) in reply to makomk

    makomk:
    I suggest you take off and nuke the entire program from orbit. It's the only way to be sure.

    Sod. When I said "Thanks for that. It's the first time I've laughed out loud while reading this forum," it was meant to quote what I was referring to as well.

     

  • (cs) in reply to Jake
    Anonymous:

    Matt B:
    So the submitter of this story worked with the person/people responsible for this?

    Are we to assume that the submitter stepped in at some point once learning about this piece of work with the correct, mind-numbigly obvious solution to having seperate environments for the app?

    I'm the submitter.  I was the low man on the totem pole at my old job, and the developer responsible for this monstrosity was the star developer of the team.  He always had things done on time (or early!), and management loved him for it.  I could scream about it until I was blue in the face, but I'm automatically overruled.

    Oh, plus he was in charge of the entire project, and I only found out about it after he'd left the company.  I know everyone will disagree with me here, but after it was already in such bad shape, I thought it was pointless to set up a solid test environment.  So much was hardcoded (such as locations of files in the filesystem) that there was still a risk of harming the production system even from a test environment.



    I've been in that situation before, and I took it upon myself to rewrite the code to externalize file paths and data sources, improve its legibility and maintainability, and and fix some dumb things.  I did this from the very first day I was hired.  Well, actually the third day, as I spent the first day staring at the horrendous mess of code, and the second day trying to recover my sanity from it.  This is when I resolved myself to rewriting it (probably testament to my loss of sanity.)  I worked on it on any breaks I could take, using a lot of my personal time (even staying late), while at the same time trying not to neglect my current obligations.

    Eventually (after about 2 months) I was done and showed my code to management, along with proof and justification for the improvements, such as quantified performance boosts and security features.  They accepted it, and a plan for deployment was prepared, including an entire plan for a separation of test, development and production environments, with versioning control.  The thing that sold them the most was that the work was already done for free (i.e. on my own personal time), so no resources need to be considered for that.  But it was also important that I didn't just say "your code is crap, I need to rewrite it", but that I had a compelling, well thought-out case that my new code was significantly better to maintain and execute.

    I will admit that in my case it helped that I was displacing the "star programmer", as he had recently left the company, so there was a lot less active resistance.

    Its not for everyone, I know, but I *had* to do it.  I just had to.  If I hadn't, or couldn't for some reason, I probably would have quit after those first 3 days, just like your co-worker.

       -dZ.

  • (cs) in reply to Monomelodies
    Monomelodies:
    Anonymous:
    Monomelodies:
    Needless to say, I quit within the month and never took another job without seeing at least some of the code produced at a company beforehand...


    That sounds like a good idea, but how do you go about asking to see some of their code at, say, an interview?


    Oh, that's easy. Let me look at your code, and you can look at mine. In my experience since, you only need to see snippets to identify common but oh-so important practices like coherent style, proper indenting, thought-through variable, function and class naming etc.
    Companies one wants to work for tend to applaud this stance, companies you don't deny it. And there's a few in between who reluctantly let you see a few lines of their horrible code and you never return their calls. Sure kept me out of trouble since then!


    It should be easier than that.  You should be able to ask simpler questions, such as "Which versioning control software do you use", or "could you describe your development environment to me, and how it reflects your production environment?"  If their answers are something like "Versioning what? uh... Development environment?  We are a small shop, so we do not feel the need for a large development infrastructure... we let Bob here, our developer, take care of those things..."

    If their answers resemble those, run! Run, and don't look back.

        -dZ.
  • (cs) in reply to RyanLeeSchneider
    RyanLeeSchneider:

    Gene Wirchenko:

    Were your projects big enough that the benefit of SCM would be seen by students?

    Yes.  Any project bigger than hello world benefits from SCM.  Especially students, who should be encouraged to experiment, which is one of the great things about SCM.  Likewise, I can remember doing my own half-assed SCM at least once:

    cp main.cpp main2.cpp

    vi main.cpp

    cp main.cpp main3.cpp

    cp main2.cpp main.cpp

    vi main.cpp

    Oh, I'm done, let's get rid of all these extra copies..

    rm main*.cpp

    DOH.

    And I can remember most of my classmates committing similiar mistakes, as I imagine most CS students have.  Why shouldn't the instructor spend a day going over cvs/svn instead?

     

    Well, I am self-taught.  I only have ME to blame.[:S]

  • (cs) in reply to WWWWolf

    WWWWolf:

    Well, maybe I'm just thick, but is there a situation where using a SCM is not benefical at all?

    You know what's the WTF with most SCMs? They don't like 'shared sandbox' situations. At the place I work we develop websites, we have some DLL's that are used as well as a bunch of XSL's that produce HTML (yes we use XML, but it actually makes sense here). We use Visual Studio and Visual SourceSafe as our SCM, unfortunately to get it to work with a shared sandbox we need to use FrontPage Extensions, otherwise when you check a file out it's open to anybody to edit and Visual Studio doesn't bother finding out if you have it checked out or not. We have had many problems with that, as well as situations where someone opened the file to look at it while someone else had it checked out, the first person checked it back in and the second person checked it out while he still had it open in Visual Studio, did some edit, saved and checked it in, but because VS didn't refresh the open file when it was checked in he overwrote the first persons edits. Also with FP Ext loading a project takes almost a minute, and project-wide searches can take up to 5 min to return anything.

    We are looking for better tools but we stay in the MS environment for the customers (they are kinda stuck on MS products) but we would love to find a way to run something better… if there is a better setup around (IDE + SCM that will work with a shared sandbox and had syntax highlighting + intellisense for XSL/HTML/CSS/JavaScript and ASP) Most likely we are stuck with what we have… ohh well…<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p>

     

  • (cs) in reply to Anita Tinkle
    Anonymous:
    Anonymous:

    Matt B:
    So the submitter of this story worked with the person/people responsible for this?

    Are we to assume that the submitter stepped in at some point once learning about this piece of work with the correct, mind-numbigly obvious solution to having seperate environments for the app?

    I'm the submitter.  I was the low man on the totem pole at my old job, and the developer responsible for this monstrosity was the star developer of the team.  He always had things done on time (or early!), and management loved him for it.  I could scream about it until I was blue in the face, but I'm automatically overruled.

    Oh, plus he was in charge of the entire project, and I only found out about it after he'd left the company.  I know everyone will disagree with me here, but after it was already in such bad shape, I thought it was pointless to set up a solid test environment.  So much was hardcoded (such as locations of files in the filesystem) that there was still a risk of harming the production system even from a test environment.



    It sucks, but if you DO deliver on time and under budget, quality is of no concern at most shops.  Sad fact.  I think Jeft has blogged about this recently

    It's hard to ignore that around bonus time, too.  If you do iterative development you can try to push for cleanup releases, if you can.  My last place was really idiotic: they wanted architectual brilliance yet requirements were never really gathered in a formal fashion and there was zero change control, other than having someone babysit the source control server.

     

    Did you work for DTI too?

  • (cs) in reply to sammybaby
    sammybaby:

    Okay. Not externalizing the connection strings is seriously stupid. (I once spoke to a guy whose job was to make web sites, who was replacing a bunch of Perl DBI calls to an msql database, with Perl DBI calls to a MySQL database.... once on every page of his site. Without the use of a find-and-replace, even. Sad.)

    Not having a seperate environmnet for testing.... seriously stupid. For simple systems, we're talking maybe a pair of db commands to recreate the whole thing from scratch, so there's no excuse for using the same database for production that you do in development.

    But the one thing that I see all the time, yet which is arguably the biggest wtf: no source control system.

    People. Use SCM. Seriously. Even if it's a toy app you're screwing around with on your PC.

    (Why SCM wasn't taught, or even discussed, in any university class I took is still a mystery to me.)



    Why would anyone want to bother with source control for a toy project?
    If you screw it up, who cares?
  • (cs) in reply to Gene Wirchenko
    Gene Wirchenko:
    sammybaby:
    But the one thing that I see all the time, yet which is arguably the biggest wtf: no source control system.

    People. Use SCM. Seriously. Even if it's a toy app you're screwing around with on your PC.

    (Why SCM wasn't taught, or even discussed, in any university class I took is still a mystery to me.)


    Were your projects big enough that the benefit of SCM would be seen by students?

    One way to ensure that a tool is never used is to push its use in inappropriate situations.  For example, using recursion to calculate factorials is a horrible way to introduce recursion.
    Student: Why not just use a loop?
    Teacher: Well, recursion is useful sometimes.
    Student: When?
    Teacher: Well, they are too complicated to get into at this level.
    Student: So why would I want to use this tool when I supposedly can not understand the cases when it would be used?
    Teacher: <no satisfactory="" answer="">
    </no>

    Sincerely,

    Gene Wirchenko



    Why do you say that?
    It may not be the most efficient way but it does make the concept very easy to understand and apply to other situations.
  • Sam (unregistered) in reply to ferrengi

    ferrengi:


    Why would anyone want to bother with source control for a toy project?
    If you screw it up, who cares?

    I've seen enough toys become actual production apps that source control is probably a good idea (though I'll admit I've often not used sc for toys, myself).

  • pLu (unregistered) in reply to chaim79
    chaim79:


    We are looking for better tools but we stay in the MS environment for the customers (they are kinda stuck on MS products) but we would love to find a way to run something better…


    SCM for Windows is spelled TortoiseSVN, if you ask me. The lack of Visual Studio integration is IMO not a big problem since Subversion uses a copy-modify-merge model as an alternative to locking. I've also been trying to introduce Trac, which integrates with Subversion, at job but project leaders have been surprisingly reluctant this far.


  • (cs) in reply to ferrengi
    ferrengi:
    Why do you say that?
    It may not be the most efficient way but it does make the concept very easy to understand and apply to other situations.


    The concept is useless if it is not used.  If the students can not see how it is better, why would they use it?

    A technique that makes things more complicated to do?  Things like that get submitted to Alex.

    Sincerely,

    Gene Wirchenko

  • (cs) in reply to RyanLeeSchneider
    RyanLeeSchneider:

    Gene Wirchenko:

    Were your projects big enough that the benefit of SCM would be seen by students?

    Yes.  Any project bigger than hello world benefits from SCM.  Especially students, who should be encouraged to experiment, which is one of the great things about SCM.  Likewise, I can remember doing my own half-assed SCM at least once:

    cp main.cpp main2.cpp

    vi main.cpp

    cp main.cpp main3.cpp

    cp main2.cpp main.cpp

    vi main.cpp

    Oh, I'm done, let's get rid of all these extra copies..

    rm main*.cpp

    DOH.

    And I can remember most of my classmates committing similiar mistakes, as I imagine most CS students have.  Why shouldn't the instructor spend a day going over cvs/svn instead?

    And what do you do about the student who says, "That looks like a rather complicated way to do a backup."?

    In a way, you are right, but this is also true of the student.  Can you get across why (and when) your way would be better?

    Sincerely,

    Gene Wirchenko


  • (cs) in reply to WWWWolf
    WWWWolf:
    Gene Wirchenko:
    Were your projects big enough that the benefit of SCM would be seen by students?

    One way to ensure that a tool is never used is to push its use in inappropriate situations.


    Well, maybe I'm just thick, but is there a situation where using a SCM is not benefical at all?


    That is not what I am stating.  Look again at the bold words.

    Before you say "toy project" or "quick hack", count all of your toy projects that snowballed into a Kind Of Tolerable Tools that really do benefit from SCM use. In my opinion SCM is never overkill even for small projects.


    Do I also get to count the number of toy projects that I threw out?  The time used in dealing with SCM for them would be largely wasted.

    Do I really need SCM for a program that turns keyboard click on/off (It fit on a screen.) and that will almost certainly never be revised.

    SCM takes time.  Sometimes, that time would be better spent elsewhere.

    When the project stops being a toy, that is when SCM comes into its own.

    I've had tons of small hacks and regretted they weren't versioned at all initially. (And tons of small hacks that were versioned with RCS and I learned the pains of converting that to CVS and on to Subversion, but that was worth it =)

    And as for immediate benefits, well, small exercises like "see how Subversion kills the revision feature of your word processor dead, small file sizes


    I have written lots of little programs that I threw away quite soon after I wrote them.  Had I had to use SCM, it often would have been less trouble not to bother writing.

    SCM has its place, but that is not everywhere.

    Sincerely,

    Gene Wirchenko

Leave a comment on “The Developmestuction Environment”

Log In or post as a guest

Replying to comment #:

« Return to Article