I died a little inside.



  • Hello.

    First of all, I would like to make a small disclaimer -- I am not actually a programmer. I'm a network analyst by trade -- I design, implement and maintain network stuff. Routers, web servers, unix junk and the like. I work as a consultant most of the time, because I enjoy working on many different networks at the same time -- keeps things exciting. Turns out I was responsible for deploying a web application to the production server every two months or so, and the in-between updates.

    I proposed (and implemented) a few changes to their developement model two years ago -- using subversion properly instead of their mess of a CVS server (cvsnt), using a stable branch and a developpement branch, tagging before releases, merging, use of Trac (think bugzilla + a wiki + time management + history), proper release schedules, proper release flow (testing - pre production and QA -- production), the use of development servers, etc etc etc. This was, and still is the workload of a titan. I would also like to mention that I have grown with a strong distaste for Macromedia Jrun.

    The application is actually a catalog engine, and basically the whole website. Makes no use of a J2EE stack at all, it's just a bunch of servlets calling methods inside a jar that actually resides in the classpath. So no war, no ejb, nothing. I tried changing that too, but I gave up half-way.

    The code for the "library" (which is the actual java application containing the catalog engine, the connection manager and everything) is relatively clean. The java programmer over here is a nice lady, and she tries to keep things clean as much as possible, which is a feat, considering the fact that this code base has changed hands six times since, and no previous programmers left any sort of notes. She kept the javadoc up to date as much as she can, which is cool.

    Now, I am moderately skilled in Java, which is a skill I sort of picked up in the course of trying to understand J2EE servers for this gig. Having some vague previous programming experience also helped, and reading here also helps. In a "don't do such things" way.

     Now, I asked the programmer a question regarding how the search engine was actually working on the website, and she actually answered that she was not too sure herself. There are many gray areas in the code, which are too painful to decipher. In her defense, I must say that is true. I fixed an SQL injection hole in the code a few months ago, and what I saw gave me a headache.

    So, I read the code and get a basic understanding of what's going on, which is not too bad. But I'm at loss regarding /how/ these six methods calling each other are called. So I venture in the actual dynamic code embedded inside the html pages. What I saw had a profound effect on me.


     

    This is just a short example. This is actually the cleanest part I could gather. At the moment I glanced upon the giant clustefuck of OR conditions running methods that were running more methods and forever on, I audibly heard something snap inside me. I think something broke inside, and I felt my heart sink.

    I have come to the sad realization that things will never go smoothly unless the whole thing is rewritten from scratch. I am really depressed. For the first time I have truely understood the things people feel when posting these WTFs here.

    And I only wished for the developpers and maintainers to be happy. God, the futility of it all. And I wrote a few scripts to automate part of the deployment procedure, and I start to wonder if this doesn't add an unecessary layer on complexity to the whole "Maintain the web site" task. I try to make the script as easily maintainable as possible, but now I wonder.

    What the hell am I doing? Why?

    Oh the questions :(

    I can't wait for this project to be over and go back in my happy little world where the worst mindfuck i'll encouter are fucked up ISA setups and firewall rules that I'll just rewrite without feeling like I'm nullifying an entire heritage of sweat, pain, and wasted dollars, or really badly configured Unix boxes that I'll just redo from scratch in the name of "upgrading hardware". Or in the best case, just enjoy the mental challenge of actually fixing a windows box instead of reinstalling. (This is actually a lost art -- it helps to know your kung fu).

    Phew. Yeah.

    Sorry for  the outburst, I just realized why I stopped wanting to be a programmer when I was in high school. I just had to share.



  • a) I feel your pain. I hope at least that you speak French, or the combined weight of complexity might melt your brain.

    b) I like the "screenshot of code then screenshot of screenshot" technique; may replace the tired old "wooden table method". But it might have made more sense to email yourself the screenshot, and then take a screenshot of your mail client :)

     

    EDIT: Just noticed that what I for some reason I took for an image viewer is a perfectly ordinary (insofar as anything vi based is ordinary) text editor. It must be time to go home...



  • Yes, I do speak french, english is only a secondary language I learned over time -- you just made me realize how truely horrendous it would have been if I would have been speaking english natively, which would have been possible in this scenario, considering Montreal has equal portions of both.

    And yeah, that was a screenshot of gvim. I didn't feel like copy pasting the actual code because I knew it would wreck the layout. And possibly prevent people from seeing the nice textwrap effect I was graced with. Lovely.

     Just dug deeper in the code. There are levels of atrocity and infinite recursion I can't even begin to describe.
     



  • @Daemon said:

    using subversion properly instead of their mess of a CVS server (cvsnt)

    CVS and CVSNT are two entirely unrelated version control systems, despite the similar names. CVS and subversion have basically the same feature set, while CVSNT is far more sophisticated, roughly on a par with Perforce (and not quite as broadly featured as ClearCase). 



  • THIS is the perfect place for a "KILL IT WITH FIRE" image macro



  • I didn't know "Tampon" was French for "Buffer", at least I presume that is what it means...



  • @asuffield said:

    CVS and CVSNT are two entirely unrelated version control systems, despite the similar names. CVS and subversion have basically the same feature set, while CVSNT is far more sophisticated, roughly on a par with Perforce (and not quite as broadly featured as ClearCase). 

    I use both perforce (at work) and svn (at home) and the only real difference I can see is the ability to organise changes into changelists to keep track of what you're doing instead of choosing what to submit when you're submitting changes. That of course is a purely client-side thing, there's no reason an svn client couldn't do that, just the one I use (tortoise) doesn't. What other differences are you talking about?



  • @Thief^ said:

    @asuffield said:

    CVS and CVSNT are two entirely unrelated version control systems, despite the similar names. CVS and subversion have basically the same feature set, while CVSNT is far more sophisticated, roughly on a par with Perforce (and not quite as broadly featured as ClearCase). 

    I use both perforce (at work) and svn (at home) and the only real difference I can see is the ability to organise changes into changelists to keep track of what you're doing instead of choosing what to submit when you're submitting changes. That of course is a purely client-side thing, there's no reason an svn client couldn't do that, just the one I use (tortoise) doesn't. What other differences are you talking about?

    Changeset management is a big thing - it's all very well to say that somebody could implement this on svn, but you can say that about pretty much any feature. It is not an easy thing to implement. A few other significant features of perforce include:

    • authentication mechanisms, including integration with existing ldap, radius, and active directory systems
    • an integrated defect tracking system (and integration with external defect trackers) - that leads into full "workflow management" and tools for assembling custom versions with the fixes for specific defects
    • a stable, consistency-maintaining caching system, for fully offline operation (you can commit offline if you have a local cache server) - effectively, perforce is a distributed revision control system
    • relational queries of the system, including an ODBC driver and an SQL interface, for generating reports on usage

    CVS and subversion, by comparison, are just file stores. CVSNT does all this stuff, more or less. ClearCase does all this stuff and also includes integrated distributed build system management.



  • @method1 said:

    I didn't know "Tampon" was French for "Buffer", at least I presume that is what it means...

    It is. It *also* means tampon. Which is logical, when you think about it. And then get mental pictures of something buffering menstrual blood. Urgh.

    On the topic of CVSNT vs CVS vs Perforce vs ClearCase vs svn... CVSNT still speaks pserver if you want it to, and thus is compatible with vanilla CVS. It *does* have nice features, but still managed to fuck up when merging branches containing binaries. Also, svn does client-server diffs, while CVS does it only one way. Subversion commits are also atomic, which makes it near impossible to break a commit by pulling the plug on the machine...

    They were running the free version of CVSNT, and merging between branches, which is a big no-no. It shouldn't even work, but CVSNT *does* support that feature, athough the documentation said it shouldn't be done.

    And also, the developpers absolutely love Tortoise SVN, and the fact that subversion does most of the operations off-line.

    But what pushed for the choice was that I am extremely comfortable with subversion, and knew it would interact with the Trac (trac.edgewall.com) very well.

    Everything is actually pretty solid in that regard.

    But the code is still atrocious. I discovered that the previous company that held the source code gave us a few classes as binary only, their own "utilities". In there, I discovered a class named FichierTexte (TextFile) that implemented the following methods

    • Ouvrir()  [read]
    • OuvrirLectureSeule() [read - read only]
    • EcrireContenu() [write contents]
    • LireLigne() [read line]

    And so on. I died inside again. And also Ouvrir doesn't throw IOExceptions. Urgh, so disgusting.

    There are also a bunch of classes to do C/C++-like things, such as sprintf(). And a library that does regular expressions in the Perl syntax, judging from the jar name and methods.

    I'm starting to see what transpired here, it probably went like this:

    1. Hear about this new technology named Java
    2. Have your CIO say it's A Good Thing
    3. Have your C++ programmers do a Project in it, it looks the same!
    4. Sell project to client
    5. ???
    6. Profit!!!
    Actually there's no question mark, but still... I wish they could throw this thing away and rewrite it from scratch. Maybe then it would stop looping to oblivion and stop crashing my Jrun instance.


     

     



  • @Daemon said:

    But the code is still atrocious. I discovered
    that the previous company that held the source code gave us a few
    classes as binary only, their own "utilities". In there, I discovered a
    class named FichierTexte (TextFile) that implemented the following
    methods

    • Ouvrir()  [read]
    • OuvrirLectureSeule() [read - read only]
    • EcrireContenu() [write contents]
    • LireLigne() [read line]

    And so on. I died inside again. And also Ouvrir doesn't throw IOExceptions. Urgh, so disgusting.

    Pardonnez-moi, monsieur, mais "Ouvrir" signifie "To Open" en Anglais. 

     



  • @Daemon said:

    And so on. I died inside again. And also Ouvrir doesn't throw IOExceptions. Urgh, so disgusting.

    It throws ExceptionsER.

     

    (Exceptions d'entrée et de rendement)

     



  • Stop using translators guys!

    Eh ben, je viens de Montréal moi aussi. Je pensais que ces WTF arrivaient plus souvent aux États-Unis, j'ai peur maintenant d'aller en informatique.

    English version : Well, I come from Montreal too. I thaught that WTF stories happen only in U.S., now I am afraid to go in Computer Science.

    P.S.: For US people, it was just a joke :D



  • @Badr Z. said:

    Stop using translators guys!

    Eh ben, je viens de Montréal moi aussi. Je pensais que ces WTF arrivaient plus souvent aux États-Unis, j'ai peur maintenant d'aller en informatique.

    English version : Well, I come from Montreal too. I thaught that WTF stories happen only in U.S., now I am afraid to go in Computer Science.

    P.S.: For US people, it was just a joke :D

     J'ai vu de bien beaux WTF 100% pur belge :) Il n'y a pas de raison que les états unis aient le monopole du mauvais code. D'ailleurs, je nierais toujours avoir écrit ce code!
     



  • Na endlich, ein mehrsprachiger Thread. Um die Verwirrung komplett zu machen: spricht hier jemand Suaheli?



  • @mdk said:

    Na endlich, ein mehrsprachiger Thread. Um die Verwirrung komplett zu machen: spricht hier jemand Suaheli?

    Mi devas bedaŭri, sed mi povas nur oferti esperanton.



  • just FYI, it's usually considered bad manners to start speaking random languages on a forum for a site that is always of a certain language. 



  • @Badr Z. said:

    Stop using translators guys!

      Je n'ai pas utilisé la Babelfish!  Chaque mot est dérivé de mes pauvres mémoires d'ecole!

    @Badr Z. said:


    Eh ben, je viens de Montréal moi aussi.

    Heh, tu n'est-pas Français, les Français rient a les Quebecois et leurs delusions de 'Françaisité'!




  • @tster said:

    just FYI, it's usually considered bad manners to start speaking random languages on a forum for a site that is always of a certain language. 

      ¡Yo no lo pienso!  En verdad, ¿cuál es tan 'random' sobre Español o Francés?

     



  • @tster said:

    just FYI, it's usually considered bad manners to start speaking random languages on a forum for a site that is always of a certain language. 

    The pig go. Go is to the fountain. The pig put foot. Grunt. Foot in what? ketchup. The dove fly. Fly is in sky. The dove drop something. The something on the pig. The pig disgusting...


    "Random", he says. Then again, generated by some freak Neural Net isn't random.


Log in to reply