Classics, Redux



  • I think everyone's already seen

    [code]
    public class Constants {
      // Stupid naming convention sic current project.
      public static final String appVersionNUMBER = "1==0.999...";
      // 80% hash keys used anywhere in the app follow.
      // The rest are, of course, randomly hardcoded inline.
    }

    public class Cabbage extends Constants {
      // ...
    }
    [/code]
     - groaned and moved on.

    Now, the fun begins when you combine your everyday overpriced enterprisey version control system that needs a guru (read: someone who read Pragmatic Version Control and can rub two braincells together) to administrate, and your everyday administrator of said VCS whose guru-fu is lacking.

    Telelogic Synergy, said VCS software, is actually reasonably sane from the developer perspective once you poke around and RTFM, learn to read the lingo, find out it has a CLI, and create a ten or so external tools in your IDE to invoke that (the above being an afternoon of effort), and don't ever touch the obtuse and clunky GUI except for the rare few tasks for which God intended a GUI interface to a VCS. Besides explicit checkout/checkin, it tends to Get Out Of My Way (moreso since there's someone else to do nontrivial merges), and Do The Right Thing (i.e. never, ever clobber files unless explicitly told to, save for major administrator lossage)

    One of its features are "parallel versions" - Synergy keeps track of file histories individually, and will branch them ad-hoc when two developers check out a simultaneously. (I can hear the version control people groan already.) Obviously, this is only supposed to be used in a quick'n'dirty context, and lets you for example pull in unrelated updates from the repository without having your files replaced by diff gunk, or have someone that has an idea what the code is supposed to do do the merges instead of junior code monkeys [raises hand].

    The above mentioned Synergy admin / config manager at our place apparently never heard of the trunk/release branch/baseline merge scheme. Or branch proliferation so he'd figure out using parallel versions without merging them together ASAP is a bad thing. So, instead of doing release coding in isolation (which should actually be doable rather easily in Synergy), they're done into trunk. And Synergy will default to bringing in the latest dated version on update, even if it follows a year-old one.

    As anyone that bothered reading this far could figure out, come QA release time, most of the people working on the project have their codebase horribly broken because their Constants.java has been overwritten with a year-old version, plus a bump of the RC count stored in appVersionNUMBER. (That this isn't done using ant, that the project doesn't even use ant, that dependencies aren't being versioned, I'm the first person that ever thought of launching the app in the IDE debugger, or that the seniors, working on this since Java 1.1 times, haven't yet figured out DateFormat.getDateInstance(DateFormat.MEDIUM, Locale.GERMAN), are WTFs on their own, but everyone's had those too.)

    Ironically, and slightly perversely, Constants.java breaking horribly is a Good Thing - since it's the obvious file to get changed first on release, it gives the process fail-fast behaviour in that it tells me to pour over the update log to see other odd file version replacements, and stop doing updates until the dust settles.



  • So this is just a rant about Synergy, yes?



  • @David Vallner said:

    public static final String appVersionNUMBER = "1==0.999...";

     1==0.999... should evaluate to true :D



  • @GettinSadda said:

    So this is just a rant about Synergy, yes?

    It's a rant. I don't think it's about anything in particular. 



  • @Einsidler said:

    @David Vallner said:

    public static final String appVersionNUMBER = "1==0.999...";

     1==0.999... should evaluate to true :D

    But only for exceedingly small values of 1.
     



  • @JamesKilton said:

    @Einsidler said:

    @David Vallner said:

    public static final String appVersionNUMBER = "1==0.999...";

     1==0.999... should evaluate to true :D

    But only for exceedingly small values of 1.
     

    Oh, no!  Not this crap again... we went over this last week.  If you mean by "..." that it repeats infinitely (the normal meaning), then they are exactly equal mathematically.  You just wouldn't represent it that way  ("0.99999...") in a computer, since they don't like working in repeating decimal format, though Knuth probably has something to say on the issue :-)

    Or did I completely miss a pair of scarcasm tags? 

     


  • Winner of the 2016 Presidential Election

    n = 0.999...
    ( n * 10 = 0.999... * 10 )
    10n = 9.999...
    ( 10n - n = 9.999... - 0.999... )
    9n = 9
    ( 9n / 9 = 9 / 9 )
    n = 1

    See also: http://en.wikipedia.org/wiki/0.999...



  • @joe.edwards@imaginuity.com said:

    n = 0.999...
    ( n * 10 = 0.999... * 10 )
    10n = 9.999...
    ( 10n - n = 9.999... - 0.999... )
    9n = 9
    ( 9n / 9 = 9 / 9 )
    n = 1

    See also: http://en.wikipedia.org/wiki/0.999...

     Well,<sarcasm> I agree with everything you say, obviously.  But I think you would want to write it as  "abs (1.0 - 0.9999...) < EPSILON" just to be on the safe side.</sarcasm>

     

    Edit:  Yep, no wonder the sarcasm tags are missing.  Even after manually adding them in the html-editor, the forum software strips them out.  Oh well :-)

     


Log in to reply
 

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