Comment I left in the code today



  • Of course, TRWTF is VB...

    'Why are we doing this kind of shit when we have .Net Framework tools to do it in like 6 lines of code?!
    'For this, what should have been done is to execute a select or stored proc, and use the schema information that is sent back
    'instead of calling a separate DB query for the column names. And you guys wonder why performance sucks? This is why.
    'This might be a MINOR performance hit - but when you do this kind of thing in everything you write, it makes the whole system suck ass.
    'There's two problems here - one is that you already know what the columns are going to be at design time, and the second issue is that
    'even if you didn't have prior knowledge what the column names are, they come back with the FIRST query, so there is never any need
    'to query the database schema directly, which requires elevated permissions. See where I'm going with this? This kind of design problem
    'leads to the database not being secure, since the app needs to run as the DB administrator to do this (useless) query.
    'Nobody who claims to be a VB.Net programmer should have ever written code like this - they are obviously not qualified for the job.
    'BTW, this is the management problem you guys have - 100 idiot programmers is not better than 1 good one.
    'You need to hire some smart people if you can afford them - for each good one you get, you can send 10 others back to India.
    'AND! The fucking column names are not even USED!!! 

    ...followed by stupid code...



  • >.>



  • Holy crap.

    That is epic.



  • The pain, the pain...

     

    Anyway, this weirdo comment symbol always make me think the writer was imitating a cockney accent. 'Allo guv'! 'ow's the missus? 'Aven't seen much o' 'er lately, 'ave we.



  • This sort of ranting should be completely verboten in this industry.

    1. It's unprofessional.
    2. It complains about what is there, without suggesting a better alternative.
    3. It gives management more of an excuse to ship more seats to countries where the workers don't bitch like this.

    And the big one, which I why we never hire people who say crap like this in interviews:

    4. If your company is dumb enough to hire one incompetent programmer, it has probably hired many. You're probably one of them.



  • Sometimes the best thing to do is to write the comments at the end of the code. And make sure the comment contains only a bunch of backspace character.



  • @smxlong said:


    2. It complains about what is there, without suggesting a better alternative.
    ?

    "You don't need a second call to the database to get the schema because 1) you already have this information in all the .Net stuff with the first call and 2) it's not used anyway"

    Seems pretty clear to me.



  • @Sutherlands said:

    @smxlong said:


    2. It complains about what is there, without suggesting a better alternative.
    ?

    "You don't need a second call to the database to get the schema because 1) you already have this information in all the .Net stuff with the first call and 2) it's not used anyway"

    Seems pretty clear to me.

    Suggesting an alternative involves a bit more than just saying "It can be done." I'm reminded of Q in ST:TNG, who, when asked to help solve the problem of a planet with a decaying orbit, suggested "Simply change the gravitational constant of the universe."


  • ♿ (Parody)

    I enjoy ranting in the commit messages and ticket system.


  • Garbage Person

    @smxlong said:

    Suggesting an alternative involves a bit more than just saying "It can be done." I'm reminded of Q in ST:TNG, who, when asked to help solve the problem of a planet with a decaying orbit, suggested "Simply change the gravitational constant of the universe."
    If those suggested alternatives do not make sense to you immediately, you are not a qualified .net developer.



  • @jasmine2501 said:

    ...

    'AND! The fucking column names are not even USED!!! 

     

    Epic, this is the best part ^^

     

    @Sutherlands said:

    @smxlong said:


    2. It complains about what is there, without suggesting a better alternative.
    ?

    "You don't need a second call to the database to get the schema because 1) you already have this information in all the .Net stuff with the first call and 2) it's not used anyway"

    Seems pretty clear to me.

     

    I don't think smxlong even read the post; it should be clear to anyone who read the OP that better alternatives are suggested. The only conclusion is smxlong either:

    1. Can't read
    2. Is retarded, i.e IQ < 70
    3. Is a troll

     



  • You should add a linbreak before the last comment line, make it stand out more, like:

    @jasmine2501 said:

    ...

    'You need to hire some smart people if you can afford them - for each good one you get, you can send 10 others back to India.

    '

    'AND! The fucking column names are not even USED!!! 

     

     



  • @Weng said:

    @smxlong said:

    Suggesting an alternative involves a bit more than just saying "It can be done." I'm reminded of Q in ST:TNG, who, when asked to help solve the problem of a planet with a decaying orbit, suggested "Simply change the gravitational constant of the universe."
    If those suggested alternatives do not make sense to you immediately, you are not a qualified .net developer.

    FTFY. The problem exposed by the OP is not related only to .NET. If you keep querying a database for its schema repeatedly, you have a problem. If you keep querying a database repeatedly and don't even use the schema you're getting, you should be banned from programming.


  • Garbage Person

    @Renan said:

    @Weng said:

    @smxlong said:

    Suggesting an alternative involves a bit more than just saying "It can be done." I'm reminded of Q in ST:TNG, who, when asked to help solve the problem of a planet with a decaying orbit, suggested "Simply change the gravitational constant of the universe."
    If those suggested alternatives do not make sense to you immediately, you are not a qualified .net developer.

    FTFY. The problem exposed by the OP is not related only to .NET. If you keep querying a database for its schema repeatedly, you have a problem. If you keep querying a database repeatedly and don't even use the schema you're getting, you should be banned from programming.

    Yeah. I almost wrote "database developer" but figured some pedantic dickweed would jump me because they aren't developing the database and "database-oriented" is too clunky and still not quite right. So I copped out.



  • @jasmine2501 said:

    Comment I left in the code today

    Unfortunately that fails to be useful. Completely. I am sorry to break you the news, but no one ever reads comments on code that is working (and despite being silly the code seems to be, right?) and managers never read comments in code, working or otherwise.

    You may be thousand times right, but putting rants as comments in code is childish. If you actually want to be helpful, you should do two things:

    1. Find out who wrote the code (If you don't have version control, there is a much bigger WTF and you better just run), ask them, privately, why they thought it was needed and tell them why it's not.
    2. Tell the team leader that you found a useless code that is slowing it down and hopefully they'll tell you to kill it (if not, abandon all hope and run).


  • I didn't post it to be useful. This is TDWTF, I posted it because it is mildly funny. It's vendor code, which I'm customizing.



  • @Bulb said:

    1. Find out who wrote the code (If you don't have version control, there is a much bigger WTF and you better just run), ask them, privately, why they thought it was needed and tell them why it's not.
    2. Tell the team leader that you found a useless code that is slowing it down and hopefully they'll tell you to kill it (if not, abandon all hope and run).

    We have done that so many times that basically all we can do anymore is complain among ourselves. We have SC (TFS), but from our view the vendor looks like a single user - that way we didn't have to set up windows accounts for their entire company. So, we can't tell who wrote the code on our side, but they could tell on their side. We have had tactful private conversations, our department manager has personally discussed this issue with the CEO and they have been given the mandate to stop sending us crappy code - but they don't know what crappy code is. That's why the comment about 100 idiots - because basically anyone with any programming chops is such a rock star for them, that they get promoted to management where they can no longer do any good. They literally do employ over 100 lousy VB programmers, and there's maybe 5 to 10 good ones - all managers, and all very understanding about this situation, but none doing anything about it.


Log in to reply