The Daily WTF: Curious Perversions in Information Technology
Welcome to TDWTF Forums Sign in | Join | Help

Search

Page 1 of 12 (116 items) 1 2 3 4 5 Next > ... Last »
  • Re: Interview question

    The big issue I have with this question is that Supportability and Compactness or whatever seem to be the same thing: well written code. Code that is not maintainable does not look "elegant" to me. Sometimes you need code that looks messy. However it should be hidden away in the background. Separation of concerns is a big issue to me. ...
    Posted to "Side Bar" WTF (Forum) by Cbuttius on 03-19-2013
  • Re: Men and women (trollbait)

    It works a bit like this: We pro-create and then little people are born. We all get older and in 20-30 years time they are mating and bringing even younger people into the world. Meanwhile we slowly decay until we cease to be any more and end up buried under the earth where we get eaten by the worms.    
    Posted to General Discussion (Forum) by Cbuttius on 03-08-2013
  • Re: Maths... they do still teach it in schools, right?

    [quote user="pkmnfrk"] BEDMAS: Brackets Exponents Division, Multiplication Addition, Subtraction = 6 - 1 x 0 + 2 / 2 = 6 - (1 x 0) + (2 / 2) = 6 - (0) + (1) = 6 + 1 = 7 Where did 5 come from? [/quote] 5 comes from inserting an invisible parentheses that don't belong, opening either before the 1 or the 0 and ending at ...
    Posted to "Side Bar" WTF (Forum) by Cbuttius on 03-08-2013
  • Most popular article types on TheDailyWTF..

    Just done a quick survey of the last 10 articles of each type (not including yesterday's) and the number of comments they have received. There are the averages: Tales From The Interview 191.8 Feature Articles 124.2 CodeSOD 106.5 Error'd 64.2 I don't know if it's because people are not around so much on Friday, less so Saturday ...
    Posted to General Discussion (Forum) by Cbuttius on 12-18-2012
  • Re: Firefox UK spellcheck

    Thunderbird is not in the UK English dictionary? What would Lady Penelope have to say about that one? Better get Brains on the case...  
    Posted to "Side Bar" WTF (Forum) by Cbuttius on 12-10-2012
  • Re: Guaging Knowledge via the Ternary Operator

    [quote user="PJH"][quote user="Tyler"]std::cout << "Good morning " << ((gender == Male) ? "Sir" : "Ma'am") << std::endl;[/quote] I do, however have issues with things like: syslog(LOG_NOTICE, "WebRelay %s:%d Relay: %s Input: %s Reboot: ...
    Posted to "Side Bar" WTF (Forum) by Cbuttius on 11-20-2012
  • Re: A shortcut for resetting member variables, except not.

    The actual danger of memsetting a pointer to all zero bytes would be if: 1. You then compare the pointer to NULL and it returns false, or you perform a boolean check on it if( ptr ) { ... } 2. if you called free() (or delete) on it, which is guaranteed to be no-op on a NULL pointer but that didn't work on your pointer. Dereferencing it or ...
    Posted to "Side Bar" WTF (Forum) by Cbuttius on 11-20-2012
  • Re: A shortcut for resetting member variables, except not.

    [quote user="blakeyrat"]Jesus people. Wrong code is wrong code. What does it matter if there's some hypothetical platform in some hypothetical universe in which maybe the code kind of works a little bit even though it's wrong. That doesn't make the code any less wrong.[/quote] Actually, more commonly in the C and C++ world ...
    Posted to "Side Bar" WTF (Forum) by Cbuttius on 11-19-2012
  • Re: A shortcut for resetting member variables, except not.

    One may memset a pointer to zeros on a platform where this is a null pointer, and it is possible for platform-dependent isPOD() checks for pointers. Similarly with floats and doubles. GNU actually implements something like this in vector. When you create a C++ vector and resize it (rather than reserve) it must set all its members to the default ...
    Posted to "Side Bar" WTF (Forum) by Cbuttius on 11-19-2012
  • Re: A shortcut for resetting member variables, except not.

    The code is well-defined behaviour if the class is POD: 1. The class has no virtual methods and does not derive from anything with virtual methods 2. All its data members are POD. If the class contains something like a std::string or a std::vector, your operation is invalid. (Nothing should happen on the call itself but subsequently you may ...
    Posted to "Side Bar" WTF (Forum) by Cbuttius on 11-16-2012
Page 1 of 12 (116 items) 1 2 3 4 5 Next > ... Last »
Powered by Community Server (Non-Commercial Edition), by Telligent Systems