Missing the point of Code Analysis



  • As part of our biggest customer's consolidation from 4 software vendors to 2, my company has recently agreed to take on the maintenance of a Silverlight app from vendor Tee. This, of course, was done without allowing the guys who are going to be working on this app (me) any chance to look at the source before making that decision based on our feedback. Granted, that's probably because our feedback would've been to run out of the room screaming when we saw the code... but I digress.

    So 3 of our guys (1 dev, 1 manager, 1 director) went to get "handover" from the dev, Jay, who originally wrote the code (yes, it was a one-man show). Despite the fact that the app has nearly 200 separate projects, 1800+ .cs files in its solution and thousands of lines of code, the total time for handover was 1 day. And although I'm expected to work on this app, I didn't get invited to the handover session.

    A few words about the app itself. The reason it was written in Silverlight is because it makes heavy use of a single component (developed by Tee themselves, hence they have the source) that only works in SL. Instead of rewriting that component to be usable in WinForms/WPF, Tee instead decided to create this app in SL, which entailed recreating the Windows Desktop paradigm in a web browser... as I'm sure you can all imagine, that works about as well as a car with triangular wheels. (Did I mention that its "windows" have no Close or Minimize buttons?)

    Internally, it uses WCF services to talk to a DB. Jay claimed that "WCF's full-duplex communication is broken" so he wrote his own implementation of full-duplex comms. This actually works, but the code to do it.... raw Sockets and Threads and object serialization and XML everywhere... UGH. (Allegedly what he said at the handover session, while demonstrating this code, is "this part of the app is impossible to debug, so if anything ever goes wrong, good luck".)

    Finally we get to the biggest WTF. Tee has a strict policy that all code must conform to Microsoft standards, and their employees aren't allowed to check in unless their code builds without generating warnings; to enforce this they mandate that Code Analysis must be enabled in all Visual Stuudio projects. Sounds like a good policy, until you consider that enabling CA increases the time to build a solution by about 150%. (When we got the solution, it took 10 minutes to build from scratch on a fast machine, but I quickly turned off CA in all the projects. Now it "only" takes 4 minutes to build.)

    Now Jay didn't have time nor inclination to fix his code to comply with those pesky CA warnings, but he couldn't check in his code unless it did. Luckily for him, when Visual Studio displays CA warnings, it gives you an option to suppress them with a right-click - which is what our intrepid dev did. 195 times. In over 100 different source files.

    This got a bit tedious after a while, so he did some research and found out about the GlobalSuppressions.cs file. Now every project has one of those and no more CA warnings. Hullelujah!

    But wait, there's more! Tee's company standards also mandated that all public members must have XML comments. Again, our hero Jay couldn't be bothered to actually do any of that stuff, so he installed GhostDoc to auto-generate these comments. Thus I have the following words of wisdom to guide me in my attempt to figure the app out:

        /// 
        /// Actions the list contains.
        /// 
        /// <param name="actionList">The action list.</param>
        /// <param name="actionType">Type of the action.</param>
        /// <returns></returns>
        public static bool ActionListContains(ActionType actionType)
        {
        }
    
    /// <summary>
    /// <strong>Geoes the lookup.</strong>
    /// </summary>
    /// <param name="longitude">The longitude.</param>
    /// <param name="latitude">The latitude.</param>
    /// <returns></returns>
    public static GeoLocation GeoLookup(double longitude, double latitude)
    {
    }
    
    /// <summary>
    /// <strong>Windows the state of the update visual.</strong>
    /// </summary>
    /// <param name="visualStates">The visual states.</param>
    public void WindowUpdateVisualState(WindowStates visualStates)
    {
    }
    

    SHOOT ME NOW.



  • windows the state of the update visual

    Where's the problem? The update visual needs some windowing now and then.

    finishes the windowing work and proceeds to geoing the lookup



  •  My favorite comment in the middle of half a million lines of PL/I code, left there by someone who I'm sure thought he was being helpful:

     Used as an externally interface for perfecting purposes.

    This, in case you didn't quite fathom the significance, is the entire comment, in the place where you're supposed to put the overview of what the module does.  It's no mere extract.  And it's no mere intended clarification of some obscurely written single line of code where you could perhaps overlook the fact that programmers don't think like normal people, and forgive the author for failing to communicate his intention clearly.

    No.  If we take its context at face value, the above line is a full summary of what the entire module does.



  • @The_Assimilator said:

    Again, our hero Jay couldn't be bothered to actually do any of that stuff, so he installed GhostDoc to auto-generate these comments.

    Should I be surprised that there is a software that can automate writing useless comments for you?



  • @PSWorx said:

    @The_Assimilator said:

    Again, our hero Jay couldn't be bothered to actually do any of that stuff, so he installed GhostDoc to auto-generate these comments.

    Should I be surprised that there is a software that can automate writing useless comments for you?

    Hey, if you keep in mind how that documenter works while naming your functions, the generated comments will actually make sense in the end. This simplifies your documentation process from writing a descriptive comment to choosing a function name that will be turned into a descriptive comment. Okay, one might say the expense is greater than the benefit, but well... YOU'LL NEVER HAVE TO WRITE COMMENTS AGAIN!

    (For those wiseasses that think "but without comments in the function bodies, it will be maintenance horror", well there's a simple solution: don't make long functions. Whenever a function is larger than 10 lines, make it call another function. This function will be auto-commented => profit.)



  • @da Doctah said:

    My favorite comment in the middle of half a million lines of PL/I code...

    500,000 lines? My brain shut down right there.

    @PSWorx said:

    @The_Assimilator said:

    Again, our hero Jay couldn't be bothered to actually do any of that stuff, so he installed GhostDoc to auto-generate these comments.

    Should I be surprised that there is a software that can automate writing useless comments for you?

    GhostDoc is intended to generate comment "skeletons" that the programmer will fill in later with useful info on their methods. It's not a bad tool, it's just been horribly misused in this scenario. ("Horribly misused" is an apt metaphor for most of the technologies in this app, come to think of it.)

    I'd really have preferred it, however, if Jay had not applied GhostDoc to the methods he didn't bother to put meaningful comments on. That way I could at least see which methods had comments and which ones didn't, and from that infer that the former are important while the latter are less so.



  • @derula said:

    @PSWorx said:

    @The_Assimilator said:

    Again, our hero Jay couldn't be bothered to actually do any of that stuff, so he installed GhostDoc to auto-generate these comments.

    Should I be surprised that there is a software that can automate writing useless comments for you?

    Hey, if you keep in mind how that documenter works while naming your functions, the generated comments will actually make sense in the end. This simplifies your documentation process from writing a descriptive comment to choosing a function name that will be turned into a descriptive comment. Okay, one might say the expense is greater than the benefit, but well... YOU'LL NEVER HAVE TO WRITE COMMENTS AGAIN!

    (For those wiseasses that think "but without comments in the function bodies, it will be maintenance horror", well there's a simple solution: don't make long functions. Whenever a function is larger than 10 lines, make it call another function. This function will be auto-commented => profit.)

    I love GhostDoc. Every time it generates a stupid description, I know I have chosen a bad name for my function



  • Holy cow!

    This is MAIN PAGE Material!!

    Really.



  • @da Doctah said:

     My favorite comment in the middle of half a million lines of PL/I code, left there by someone who I'm sure thought he was being helpful:

    As long as we're sharing comments, I'll throw one in. A few years ago I was in our reporting team and had to slog through a steaming pile of COBOL to find the logic behind a canned report. While doing so I found many comments like this:

    *****************************************************************************************

    *** The following paragraph performs paragraph to containing the

    *** application is logic to write, to write the file containing

    *** the reporting period

    ****************************************************************************************



  • @rudraigh said:

    *****************************************************************************************

    *** The following paragraph performs paragraph to containing the

    *** application is logic to write, to write the file containing

    *** the reporting period

    ****************************************************************************************

    Holy internet meme, I think I found my new sig!

  • Winner of the 2016 Presidential Election

    Does anyone else hate the pretty boxes drawn with asterisks around comments?

    Comments in general tend to interfere with code readability for me, doubly so when they are shouting for attention with boxen. I'd prefer it if my IDE would hide them by default, actually, so I could maybe only choose to look at them when the code in question needs explanation.

    Of course, a proper naming scheme should make the purpose of methods, properties, and parameters obvious enough to make comments superfluous. (GhostDoc seems only to reinforce this idea.)

    I usually write comments only when my code does something counter-intuitive, uses a tricky algorithm/formula, or when edge-case logic requires explanation.



  • @joe.edwards said:

    Does anyone else hate the pretty boxes drawn with asterisks around comments?

    No.

    @joe.edwards said:

    Comments in general tend to interfere with code readability for me, doubly so when they are shouting for attention with boxen.

    People using the non-word "boxen"-- now that I hate.

    @joe.edwards said:

    I usually write comments only when my code does something counter-intuitive, uses a tricky algorithm/formula, or when edge-case logic requires explanation.

    So you're a bad programmer. Gotcha.



  • @wf_tmro said:

    Holy cow!

    This is MAIN PAGE Material!!

    Really.

     

    This is [b]better[/b] than main page material, considering the mangling that those articles are subjected to.


  • Winner of the 2016 Presidential Election

    @Zylon said:

    This is better than main page material, considering the mangling that those articles are subjected to.

    When it makes its appearance on the front page you can be sure it will be munged into an implausible and inconsistent narrative with typos, awkward dialogue, incomplete anonymization, a dubious denouement.



  • @joe.edwards said:

    Does anyone else hate the pretty boxes drawn with asterisks around comments?

    Comments in general tend to interfere with code readability for me, doubly so when they are shouting for attention with boxen. I'd prefer it if my IDE would hide them by default, actually, so I could maybe only choose to look at them when the code in question needs explanation.

    In general, this doesn't bother me, though excessively verbose comments can, of course, be problematic.

    @joe.edwards said:

    Of course, a proper naming scheme should make the purpose of methods, properties, and parameters obvious enough to make comments superfluous. (GhostDoc seems only to reinforce this idea.)

    This, too has its limits for me. Especially in languages where the standard is camel case. And you end up with several words jammed together. Auto-completion of long function or variable names helps a bit, but is still a PITA, when you have to stare at several 20+ character names to figure out what you really want.

    Clearly, the solution is to ignore code written by others.



  • @boomzilla said:

    Clearly, the solution is to ignore code written by others.

    
    /***************/
    /**           **/
    /**  Agreed.  **/
    /**           **/
    /***************/
    


  • @joe.edwards said:

    @Zylon said:
    This is better than main page material, considering the mangling that those articles are subjected to.

    When it makes its appearance on the front page you can be sure it will be munged into an implausible and inconsistent narrative with typos, awkward dialogue, incomplete anonymization, a dubious denouement.


    Did everyone notice that, I'm sure Joe wouldn't want us to miss it since it took him like 3 trips to Wikipedia to make sure he was using it correctly. Everyone marvel at his sheer genius.



  • @chikinpotpi said:

    Did everyone notice that, I'm sure Joe wouldn't want us to miss it since it took him like 3 trips to Wikipedia to make sure he was using it correctly. Everyone marvel at his sheer genius.

    We bow to your lack of vocabulary and are humbled by your willingness to point it out. That part was sarcasm, this part isn't: go read some books. Seriously, there's no excuse for this. I for one appreciate joe's assonance and alliterations. Oh, I just made some, too, sweet.



  • @Xyro said:

    @chikinpotpi said:
    Did everyone notice that, I'm sure Joe wouldn't want us to miss it since it took him like 3 trips to Wikipedia to make sure he was using it correctly. Everyone marvel at his sheer genius.

    We bow to your lack of vocabulary and are humbled by your willingness to point it out. That part was sarcasm, this part isn't: go read some books. Seriously, there's no excuse for this. I for one appreciate joe's assonance and alliterations. Oh, I just made some, too, sweet.
     

    There is something to be said for using small words so that those with not so good english vocabularies (such as a few of the ESL individuals on this forum) can easily understand you.  Now if we assume that chikinpotpi is a native speaker then yes, he needs to be locked in a small room with a large stack of books (though I suggest nothing too challenging as we don't want him defacing good literature).



  • @locallunatic said:

    @Xyro said:

    @chikinpotpi said:
    Did everyone notice that, I'm sure Joe wouldn't want us to miss it since it took him like 3 trips to Wikipedia to make sure he was using it correctly. Everyone marvel at his sheer genius.
    We bow to your lack of vocabulary and are humbled by your willingness to point it out. That part was sarcasm, this part isn't: go read some books. Seriously, there's no excuse for this. I for one appreciate joe's assonance and alliterations. Oh, I just made some, too, sweet.
     

    There is something to be said for using small words so that those with not so good english vocabularies (such as a few of the ESL individuals on this forum) can easily understand you.  Now if we assume that chikinpotpi is a native speaker then yes, he needs to be locked in a small room with a large stack of books (though I suggest nothing too challenging as we don't want him defacing good literature).

    ESL? as in  Eighteenth street lounge <FONT color=#0e774a>www.eslmusic.com?  </FONT>

    <FONT color=#0e774a>What a conundrum this is...</FONT>

    <FONT color=#0e774a>To mock or not to mock, that is the question.</FONT>

    <FONT color=#0e774a>I think google is faster than wiki btw</FONT>



  • @serguey123 said:

    ESL?

    Being from Cuba, you should be aware ESL stands for English as a Second Language. Your fellow Cubans go through that class shortly before turning their early 60s Chevy into a raft.



  • @serguey123 said:

    @locallunatic said:

    @Xyro said:

    @chikinpotpi said:
    Did everyone notice that, I'm sure Joe wouldn't want us to miss it since it took him like 3 trips to Wikipedia to make sure he was using it correctly. Everyone marvel at his sheer genius.
    We bow to your lack of vocabulary and are humbled by your willingness to point it out. That part was sarcasm, this part isn't: go read some books. Seriously, there's no excuse for this. I for one appreciate joe's assonance and alliterations. Oh, I just made some, too, sweet.
     

    There is something to be said for using small words so that those with not so good english vocabularies (such as a few of the ESL individuals on this forum) can easily understand you.  Now if we assume that chikinpotpi is a native speaker then yes, he needs to be locked in a small room with a large stack of books (though I suggest nothing too challenging as we don't want him defacing good literature).

    ESL?

     

    Ah, missed that I was using colloquialisms in partially defending the use of simple language to account for the international audience of the these forums.  In the USA ESL is a common short term used for 'English as a Second Language', and I should have used the fuller form as I was saying that making sure your writing is clear to many more users of the forum is a good thing.



  • @blakeyrat said:

    @serguey123 said:
    ESL?
    Being from Cuba, you should be aware ESL stands for English as a Second Language. Your fellow Cubans go through that class shortly before turning their early 60s Chevy into a raft.

    Oh, I know what it stand for, I was just mocking the fact that someone advocating for clarity would use an acronym instead thus decreasing the clarity of the post.

    Btw I never acknowlodged to being Cuban, you said that fitted but did not provide insight as to why.

    Hmm, Cuba second language in schools is english so...

    In the news there are several items converted to raft by cubans, old american cars are not the coolest impromptu rafts



  • @blakeyrat said:

    @serguey123 said:
    ESL?

    Being from Cuba, you should be aware ESL stands for English as a Second Language. Your fellow Cubans go through that class shortly before turning their early 60s Chevy into a raft.

    You made me choke on my coffee.



  • @Smitty said:

    You made me choke on my coffee.

    I hope you were unscathed by that. However, why were you drinking coffee and reading this? That is asking for trouble.

    The thing that makes me wonder is what made you choke on your coffee, blakeyrat post is as inflammatory as usual.



  • @joe.edwards said:

    Does anyone else hate the pretty boxes drawn with asterisks around comments?

    Comments in general tend to interfere with code readability for me, doubly so when they are shouting for attention with boxen. I'd prefer it if my IDE would hide them by default, actually, so I could maybe only choose to look at them when the code in question needs explanation.

    Except for extreme cases, I don't, really.

    In fact, I usually precede each logical block of code with a one line comment on what it does. I can then skim through comments a lot faster than I can mentally parse code, because like it or not the latter usually has a lot of verbal "fatness" in it.

    Anyway, I assume you have set your syntax highlight of comments to light grey or another easily ignorable color?..

    Plus, what boomzilla said. EDIT: community server doesn't like fragment-only links. Here.



  • @Zecc said:

    In fact, I usually precede each logical block of code with a one line comment on what it does.
     

    +1 clarity

     


  • Discourse touched me in a no-no place

    @chikinpotpi said:

    @joe.edwards said:
    @Zylon said:
    This is better than main page material, considering the mangling that those articles are subjected to.

    When it makes its appearance on the front page you can be sure it will be munged into an implausible and inconsistent narrative with typos, awkward dialogue, incomplete anonymization, a dubious denouement.


    Did everyone notice that, I'm sure Joe wouldn't want us to miss it since it took him like 3 trips to Wikipedia to make sure he was using it correctly. Everyone marvel at his sheer genius.

    In Joe's defense, most people couldn't use the word correctly even with three visits to Wikipedia.



  • So, it's a take over project were management outnumbers the engineers by a factor of two and the sole engineer is not invited to the party.

    Sounds like a typical IBM fail project.



  • Well the GlobalSuppressions is generally a WTF (but not always) the remainder do not seem a problem for me. As others have pointed out if GhosDoc writes something really wierd, it is likely that the name of the element could be improved.

    CodeAnalysis time for a build should have 0 impact. This is what Gated Checkins and multiple Build Configurations are exactly designed for, Typically you run the fastest possible build during development, then do a gated checkin - all of the analysis performed, all of the unit tests run, and then only if everything is good does the checkin happen. If there is a failure, you fix the code (and depending on the type of failure) run the appropriate configuration locally.

    It is also important to remember what XML document comments are for - the generation of external documentation that is the functional equivilant of MSDN pages. Far too many developers fail to remember this. Detailed coments about the implementation (what you need to understand how it works as opposed to what you need to use it) belogs as "regular" comments in the code, same as they alsys have.



  • @TheCPUWizard said:

    ...the remainder do not seem a problem for me. As others have pointed out if GhosDoc writes something really wierd, it is likely that the name of the element could be improved.

    And the failure to observe that GhostDoc was writing something weird and at the very least correct it doesn't strike you as a problem?

    It is also important to remember what XML document comments are for - the generation of external documentation that is the functional equivilant of MSDN pages. Far too many developers fail to remember this. Detailed coments about the implementation (what you need to understand how it works as opposed to what you need to use it) belogs as "regular" comments in the code, same as they alsys have.
    If Microsoft uses GhostDoc that would explain why the MSDN descriptions of properties and methods are nearly always completely useless.


  • Hmm...

    Am I the only one around here that comments WHY the code does what it does, rather than WHAT it does?
    The code clearly states what it does (or so help me, I shall bring the Peer Audit Hammer), so why repeat it in a comment?

    print $foo;  # Print the variable $foo to standard out.
    

    NO REALLY?!

    print $foo;  # Debug output to check the state of $foo TODO:  Remove at end of testing
    



  • @Chewbacca said:

    Im I the only one around here that comments WHY the code does what it does, rather than WHAT it does?

    The code clearly states what it does (or so help me, I shall bring the Peer Audit Hammer), so why repeat it in a comment?

     For the type of comments you posted (inline with the code) you are 100% correct. But that is NOT the purpose fo the XML code comments being discussed here.

     XML Comments are intended to be processed (there are multiple tools, my favorite is SandCastle) to produce a set of pages formated like: http://msdn.microsoft.com/en-us/library/system.object.aspx

     So you have <Summary>, <Remarks>, <See>, <SeeAlso> all as short comments at the beginning of the class and each member. Run it through the tool of you choice and "bingo", you have your refernece documentation - which will often be used by people how do not have access to the code (such as anyone ho receives it as a compiled assembly.



  • @TheCPUWizard said:

     For the type of comments you posted (inline with the code) you are 100% correct. But that is NOT the purpose fo the XML code comments being discussed here.

    Urr, the post I was replying to was "+1 clarity" on a single line of comment preceding each block of logic, documenting what it does. I have yet to see any meaningful XML comments in a single line, let alone preceding every single block of logic.
    Oh well, live and learn.



  • @Chewbacca said:

      I have yet to see any meaningful XML comments in a single line, let alone preceding every single block of logic.

    Oh well, live and learn.

     Where did I ever say anything about a single line? or even "block of logic"?  XML Comments are applied at the Type and Member Level.

    <font color="#808080" size="2"><font color="#808080" size="2">//</font></font><font color="#008000" size="2"><font color="#008000" size="2"> </font></font><font color="#808080" size="2"><font color="#808080" size="2"><summary>
    </font></font><font color="#808080" size="2"><font color="#808080" size="2">///</font></font><font color="#008000" size="2"><font color="#008000" size="2"> The Null Logger class.  This is useful for implementations where you need
    </font></font><font color="#808080" size="2"><font color="#808080" size="2">///</font></font><font color="#008000" size="2"><font color="#008000" size="2"> to provide a logger to a utility class, but do not want any output from it.
    </font></font><font color="#808080" size="2"><font color="#808080" size="2">///</font></font><font color="#008000" size="2"><font color="#008000" size="2"> It also helps when you have a utility that does not have a logger to supply.
    </font></font><font color="#808080" size="2"><font color="#808080" size="2">///</font></font><font color="#008000" size="2"><font color="#008000" size="2"> </font></font><font color="#808080" size="2"><font color="#808080" size="2"></summary>
    </font></font><font color="#0000ff" size="2"><font color="#0000ff" size="2">public</font></font><font size="2"> </font><font color="#0000ff" size="2"><font color="#0000ff" size="2">class</font></font><font size="2"> </font><font color="#2b91af" size="2"><font color="#2b91af" size="2">NullLogger</font></font><font size="2"> : IExtendedLogger
    </font><font size="2">{..}</font>

    <font size="2">That is the source material that generates: http://api.castleproject.org/html/T_Castle_Core_Logging_NullLogger.htm  (Look at the very first line)</font>

    <font size="2"> Similarly http://api.castleproject.org/html/AllMembers_T_Castle_Core_DependencyModel.htm is generated from:</font>

    <font size="2"><font color="#808080" size="2"><font color="#808080" size="2">

    /// <summary>
    /// Determines whether the specified <see cref="T:System.Object"/> is equal to the current <see cref="T:System.Object"/>.
    /// </summary>
    /// <param name="obj">The <see cref="T:System.Object"/> to compare with the current <see cref="T:System.Object"/>.</param>
    /// <returns>
    ///  <see langword="true"/> if the specified <see cref="T:System.Object"/> is equal to the
    /// current <see cref="T:System.Object"/>; otherwise, <see langword="false"/>.
    /// </returns>
    public override bool Equals(object obj)
    {
    }

    ps: It is good that a Wookie lives 600 years...becuase it seems they still have much to learn...

    </font></font></font>



  • @Chewbacca said:

    Im I the only one around here that comments WHY the code does what it does, rather than WHAT it does?
    No.

    @Python code said:

    ## Create database backup
    sql = "BACKUP DATABASE %(database)s TO DISK = N'%(bakfile)s' WITH COPY_ONLY, INIT" % {
    'database': src_db.db_name, 'bakfile': bakfile
    }
    with connect(src_db) as conn:
    conn.autocommit = True # Can't perform backup inside transaction
    curs = conn.cursor()
    curs.execute(sql)
    while curs.nextset(): # This is so we wait for the backup
    pass # to finish before proceeding

    @More Python said:
    # Be a little less verbose
    from support_scripts.logger import logger
    logger.setLevel(logger.WARNING)

    But more to the point, don't tell me these comments don't help to understand this code:

    @I'll let you guess what language this is in said:

    # Extract logical names from .bak file
    sql = "RESTORE FILELISTONLY FROM DISK = N'%s'" % bakfile
    curs = conn.execute(sql)
    for row in curs:
    if row.Type == 'D':
    logical_mdf = row.LogicalName # Main data file
    elif row.Type == 'L':
    logical_ldf = row.LogicalName # Log data file


  • @TheCPUWizard said:

    Where did I ever say anything about a single line? or even "block of logic"?

    Nowhere. It was not your message I was replying to.

    It might be a shock to you, but this is not a private conversation just between the two of us.

    Whatever. I just remembered why my post count on here is so low. Pretend I wasn't here.



  • @Chewbacca said:

    Nowhere. It was not your message I was replying to.

    It might be a shock to you, but this is not a private conversation just between the two of us.

    Whatever. I just remembered why my post count on here is so low. Pretend I wasn't here.

     There is a presumption that a post on a topic relates to either the original entry, or the most recent entry. Any deviations should be noted. Considering that the original topic was about XML type comments, and that GhostDoc [which generates XML comments] has been a major part of the discussion, and finally that you replied right after a post directly related to XML comments...

     Why would you think that other readers here would automatically infer that you were talking about a completely (and very largely unreleated topic)????

     Take care...



  • @TheCPUWizard said:

    There is a presumption that a post on a topic relates to either the original entry, or the most recent entry. Any deviations should be noted.

    I agree that an unquoted comment would naturally refer to the OP, but I wouldn't generally presume anything about the most recent entry. If there's really a question, you can just click the "In Reply To" button, which CS gets more or less correct, amazingly enough. Even so, it's usually a breach of etiquette not to give some context in your post.



  • @Zecc said:

    I'll let you guess what language this is in

    Is it Boo?



  • @The_Assimilator said:

    When we got the solution, it took 10 minutes to build from scratch on a fast machine, but I quickly turned off CA in all the projects. Now it "only" takes 4 minutes to build.
     

    Huh.  I woked on a project written in C++ that took (wait for it) 8-10 HOURS to build.  This was mostly due to a include file that included about 10 MB worth of header files (boost library, windows headers, etc), to compile each of the hundreds of small source files that made up the project.  

    You guessed it, once the preprocessor was done with it, a small 5-10 line code file (perhaps a class with 2-3 methods) became a 10 MB plus source file that the compiler had to wade through.  And it did this over and over again.

    And no one (except me, of course) was smart enough to figure out how to work precompiled headers.   Correct use of precompiled headers could have cut compile time in 1/4?  1/10?  

     So 4 minutes per build is still intolerable, but it is hardly anything compared to what you get in the c++ world.


Log in to reply
 

Looks like your connection to What the Daily WTF? was lost, please wait while we try to reconnect.