• (disco)

    (10, for a "natural logarithm")

    :wtf: You're right. Words are hard. Numbers, apparently, are also hard. You seem to have used either the wrong word or the wrong number.

  • (disco) in reply to Fox

    Good catch

  • (disco) in reply to Yamikuronue

    Ironically, the correct number cannot be represented numerically, and instead must be represented by a character, which sort of makes it a word, too. So it's doubly hard.

  • (disco)

    Logging has a fascinating etymology, by the way. It originally had to do with a bit of wood that was designed to float upward when a ship sank, making it easier for someone to discover what had befallen the ship by reading its log

    That doesn't sound right to me. The way I heard it, it came from recording the ship's speeds into a book. To measure the speed, sailors threw a rope with a log tied to the end into the water (counting knots in the rope, etc.). Then they wrote the measurements into the "log book".

  • (disco) in reply to NedFodder
    NedFodder:
    That doesn't sound right to me. The way I heard it, it came from recording the ship's speeds into a book. To measure the speed, sailors threw a rope with a log tied to the end into the water (counting knots in the rope, etc.). Then they wrote the measurements into the "log book".

    Pff, debating urbannaval myths is not the point of this site.

  • (disco)
  • (disco)

    Writing a .NET application to manage school schedules requires some contortions to avoid using the reserved word class

    I think you may have oversold this a little; all you need is an @ before the keyword to make it a variable

  • (disco) in reply to RaceProUK
    RaceProUK:
    all you need is an @ before the keyword to make it a variable

    Don't do that. Please. The English language has plenty of synonyms so that you don't need to abuse interop features to have your variable named exactly as you want.

  • (disco) in reply to RaceProUK
    RaceProUK:
    all you need is an @ before the keyword to make it a variableEvery time you are using the keyword as not-a-keyword

    FTFY.

    also :wtf: why do you need to do special effort to avoid keywords?

    you can have more than one word in your variable name @class works, sure, as does aClass, or session or theClass or _class or even just Class!

  • (disco) in reply to Maciejasjmj

    Unfortunately, MS has already forced the use of that in Razor views if you want to be able to set classes dynamically

  • (disco) in reply to accalia
    public class Class {
    [...]
    }
    
    public Class theClass = new Class("class");
    
  • (disco) in reply to Yamikuronue

    Or use c++...

    #define CLASS public
    #define c_l_a_s_s new
    
    CLASS class Class {
    [...]
    }
    
    CLASS Class theClass = c_l_a_s_s Class("class");
    
  • (disco) in reply to Yamikuronue

    I wonder if #define had been invented by someone that loved debugging ...

    But "class" allows for only 31 additional keywords by using different cases. Maybe we could use the methods described in https://what.thedailywtf.com/t/how-to-write-be/54375 to get a "class" only programming language?

    (It would be much easier to just create yet another variant of Whitespace, though.)

  • (disco) in reply to Maciejasjmj
    Maciejasjmj:
    RaceProUK:
    all you need is an @ before the keyword to make it a variable

    Don't do that. Please. The English language has plenty of synonyms so that you don't need to abuse interop features to have your variable named exactly as you want.

    I'd much rather process an @event than I would an occurance or a happening.

  • (disco)

    The story completely glossed over the :wtf: in the original xxLog function. Why are they calling something in SQL to calculate a logarithm?

  • (disco) in reply to devjoe

    Besides trying to be enterprisey™, you mean?

    I suppose if you are a Hammer ...

    Ooops, I meant "if all you have is a hammer (of the other kind)" of course ...

  • (disco) in reply to Fox
    Fox:
    Pff, debating urbannaval myths is not the point of this sitethread.

    Nothing is off topic here....

    ##Nothing!

  • (disco) in reply to devjoe

    Thought about mentioning that, but if they're writing a scripting language, it might have been a reasonable tradeoff. I don't know enough of the context to really judge there.

  • (disco)

    Ouch.

    This article reminds me of my biggest WTF that has ever reached production.

    I overloaded the log() function to do error logging (who wants to write errorlog(string) when log(string) would work just as well right. All was well, as my application (data logging and hardware control) did not do any real math until I had to do some post test processing of the data and imported my utility module....

    The biggest problem was that the return value of my log() function was either 0 or 1 depending on success or failure to write to the log file and those results are perfectly valid numeric values for calculations as well so it took me surprisingly long to figure out what ws wrong as the argument to log() vas suficiently close to 2.7 that a result of 1 was not too far off. DOH

  • (disco) in reply to Yamikuronue
    Yamikuronue:
    it might have been a reasonable tradeoff

    http://cdn.meme.am/instances/500x/42994652.jpg

  • (disco) in reply to Yamikuronue

    Uh, that's not valid C++ code ... or perhaps I missed the joke.

  • (disco) in reply to Yamikuronue

    I like your corporate jargon!

    "reasonable tradeoff" :smile: "enough of the context" :smile:

    With your explanations, TDWTF could be easily converted to "Excellent Practices Bible" site.

  • (disco)

    As a mathematician, log(x) is for unnatural logarithms - if you don't specify the base, it's base 10. Natural log is written ln(x) (if you're being really precise and formal. Usually we can't be bothered with the brackets unless the argument is complicated) and pronounced 'lon'. We're not writing three whole letters for the logarithm we use most often.

  • (disco) in reply to CarrieVS

    It's the log files! The exponent is out there…

  • (disco) in reply to CarrieVS
    CarrieVS:
    'lon lon ranch'

    WTTETFY

    Also, :hanzo:'d

  • (disco) in reply to dkf
    dkf:
    It's the log files! The exponent is out there…

    Is that a reference?

  • (disco) in reply to dkf

    Or in my case, the argument was is in the log files..... :-)

  • (disco)

    Some of this reminds me of PL/1 and keyword abuse. In that language, one could have variables the same as keywords, and the compiler (hopefully) could figure it out given the context. With a bunch of defaults, one could write a program using only the words READ and WRITE and get a job done (I don't have a reference). It took a while for the human to understand what was going on, and then you would really tear your hair out, but it did work in the end. Of course it wasn't recommended, but that never stopped someone.

    Somehow the PL/1 compiler did its best and made LOTS of assumptions on just what you "intended" to do and then spewed out errors/warnings to let you know. Probably a WTF in its own right, but I'll save that for another day.

  • (disco) in reply to NedFodder

    You are correct and the author of this article made that etymology up. I've checked several etymology sources, and they agree both with you and with the way stuff was written in various 18th-19th-century sailing novels I've read.

    And really, FoxBlackCinder, since when don't we jump all over authors for the tiniest error in their submission? :stuck_out_tongue_closed_eyes:

  • (disco) in reply to CarrieVS

    If only. The base used for "log(x)" varies wildly by language, sadly.

  • (disco) in reply to herby

    If you write write right, you write write with a 'w'. It's not right to write right when you mean write. All right?

  • (disco) in reply to Yamikuronue
    Yamikuronue:
    #define CLASS public
    #define c_l_a_s_s new
    
    CLASS class Class {
    [...]
    }
    
    CLASS Class theClass = c_l_a_s_s Class("class");
    

    That's an evil thing to do to the next person who has to maintain that code.

    RaceProUK:
    all you need is an @ before the keyword to make it a variable

    Maybe not as evil as that, though. Just name your class "StudentClass" or something like that and don't abuse InterOp.

  • (disco)

    Let me consult...(pause for drama)...the Log Tables!

    http://intmstat.com/blog/2010/05/log-table2.jpg

  • (disco) in reply to CoyneTheDup
    CoyneTheDup:
    Let me consult...(pause for drama)...the Log Tables!

    Wooden tables? Logs are made of wood, aren't they?

  • (disco) in reply to Matt_Westwood

    Only if they weigh the same as a duck.

  • (disco)

    I hate "new" now my code is all filled with neu.

  • (disco) in reply to Yamikuronue
    Yamikuronue:
    Or use c++... ```cpp #define CLASS public #define c_l_a_s_s new

    CLASS class Class { [...] }

    CLASS Class theClass = c_l_a_s_s Class("class");

    </div></BLOCKQUOTE>I liked the joke, but I can't get over the fact that it's not syntactically correct. So, to fix that:
    ```cpp
    #define CLASS public
    #define class_ private
    #define c_l_a_s_s new
    #define cLass static
    #define c1asS return
    #define ClasS auto
    
    class Class {
      CLASS: cLass Class* clASs();
      class_: Class();
    };
    
    Class* Class::clASs() {
      c1asS c_l_a_s_s Class;
    }
    
    ClasS cLASs = Class::clASs();
    
    

    I could redefine all the punctuation too, but that would probably run the joke a bit too thin.

  • (disco) in reply to Yamikuronue

    Reading this aloud sounds to me like a new dance hit.

  • (disco)

    Writing a .NET application to manage school schedules requires some contortions to avoid using the reserved word class, and writing one to hold Dungeons and Dragons character sheets requires you to spell out the attribute Intelligence instead of using the far more common abbreviation int.

    TRWTF is spelling out Intelligence when the abbreviation 'Intel' would work just fine. ;-)

  • (disco) in reply to redwizard

    Or just shadowing int. It's not like you'd need those in a game about dice anyway.

    Edit: You don't even need to shadow it: http://play.golang.org/p/PH4rSBSou0

  • (disco) in reply to PleegWat
    PleegWat:
    If you write write right, you write write with a 'w'. It's not right to write right when you mean write. All right?

    Strangely, this reminds me of: "War does not decide who is Right. War decides who is Left."


    Filed under: Yes, I know the bad jokes thread is :arrow_backward::arrow_down_small::arrow_forward:

  • (disco) in reply to cellocgw
    cellocgw:
    You are correct and the author of this article made that etymology up. I've checked several etymology sources, and they agree both with you and with the way stuff was written in various 18th-19th-century sailing novels I've read.
    I would have thought that was common knowledge at least among people who've ever done any logging of the electronic kind. Even if not, it should have been obvious the term is old enough to predate ships made from anything else but wood so the idea of tying a wooden log a wooden ship allegedly to know more precisely where it sank if it did (which would gain you exactly nothing since you couldn't get down there anyway) should make anyone go :wtf:, LMGT first ...
  • (disco) in reply to LaoC

    Just because a wooden ship sinks doesn't mean another piece of wood sitting on the deck and not secured wouldn't float. The question is, how do you make sure it would float up if the ship sank but also make sure it wouldn't get swept overboard or kill someone in a storm that didn't sink the ship?

    http://boards.straightdope.com/sdmb/showthread.php?t=381393

  • (disco) in reply to na5ch
    na5ch:
    Just because a wooden ship sinks doesn't mean another piece of wood sitting on the deck and not secured wouldn't float.
    Uh...sure. I did know wood tends to float. Witches are made from it.
  • (disco) in reply to CarrieVS
    CarrieVS:
    dkf:
    It's the log files! The exponent is out there…

    Is that a reference?

    The tag-line of the X-Files series was "The truth is out there".

  • (disco) in reply to LaoC
    LaoC:
    Uh...sure. I did know wood tends to float. Witches are made from it.

    And so do ducks. So as long as the log weighs the same as a duck, it will float even when the ship doesn't.

    [EDIT: :hanzo:'d, should have scrolled up first.]

  • (disco) in reply to redwizard
    redwizard:
    the abbreviation 'Intel' would work just fine.

    Intel usually means "Information" though, rather than "A character's academic smarts".

    If you're not going to do Str Dex Con Int Wis Cha, it makes more sense to do Strength, Dexterity, Constitution, Intelligence, Wisdom, Charisma.

  • (disco) in reply to Yamikuronue
    Yamikuronue:
    If you're not going to do `Str Dex Con Int Wis Cha`, it makes more sense to do Strength, Dexterity, Constitution, Intelligence, Wisdom, Charisma.

    Everyone knows that Charisma doesn't matter.

  • (disco) in reply to Yamikuronue
    Yamikuronue:
    If you're not going to do Str Dex Con Int Wis Cha, it makes more sense to do Strength, Dexterity, Constitution, Intelligence, Wisdom, Charisma.

    Str Dext Const Intel Wisdm Char is what I used in my teenage years before I even used computers on a regular basis, never mind programming. Pencil and Paper.

    But then, while some choose-your-own-adventure books instruct you choose a number from the random number table at the back of the book while not looking, I simply rolled a D10 instead.

    Good memories.

    Guess I'm just weird.

  • (disco) in reply to Yamikuronue

    What about SAN?

Leave a comment on “Log of String”

Log In or post as a guest

Replying to comment #:

« Return to Article