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


Page 1 of 23 (223 items) 1 2 3 4 5 Next > ... Last »
  • Re: My heart bleeds

    [quote user="Mason Wheeler"]So first you ignore my fundamental anti-gross-hack requirement: without being forced to create an entirely new class just to enable RAII.[/quote] Hmm, I thought "entirely new" meant you didn't want to write an entirely new class each time you need a try/finally clause; not no new class at ...
    Posted to "Side Bar" WTF (Forum) by fatbull on 04-12-2014
  • Re: My heart bleeds

    [quote user="Mason Wheeler"]Can it be done in C++?[/quote] Sure. The basic idea is to create a utility class which calls a user-defined function in its destructor, e.g. ScopeGuard 2.0 or a smart pointer with custom deleter. This is a lot easier with C++11 lambdas. Hide the boilerplate code behind a macro (maybe even overload ...
    Posted to "Side Bar" WTF (Forum) by fatbull on 04-12-2014
  • Re: how many files?

    [quote user="mott555"] [quote user="blakeyrat"][quote user="mott555"]Anyone who puts newlines into a filename needs to be shot.[/quote] Why do Linux people blame the user, and not the filesystem that accepts names that are impossible to work with? (And in some cases, dangerous?) Just dropping this here once ...
    Posted to Coder Challenge (Forum) by fatbull on 04-01-2014
  • Re: Implement an O(n) sorting algorithm

    Counting sort, radix sort, bucket sort, ...
    Posted to Coder Challenge (Forum) by fatbull on 03-31-2014
  • Re: goto fail;

    [quote user="savar"]It's C.[/quote] Interesting. Apparently HashSHA1Update (alias SSLHashSHA1.update) always returns 0.
    Posted to "Side Bar" WTF (Forum) by fatbull on 03-04-2014
  • Re: Quantum CSS

    [quote user="boba_fett"]Looks like someone just used 5/7 and didn't worry about the precision. Why should they, so long as it's precise enough?[/quote] This. Probably just copy&paste from calculator Excel. But why would anyone want to do this? Well, since em depends on the font size, you sometimes have to specify fractions ...
    Posted to "Side Bar" WTF (Forum) by fatbull on 01-10-2014
  • Re: Are FAQs Non-Perishable?

    [quote user="OldBrooklyn"] One of the departments in our organization just contacted IT with this request (slightly paraphrased to keep my job):We have received a complaint that the Frequently Asked Questions for the Department of [Redacted] are not up to date because some of them show an update in 2009 or 2010. The actual information ...
    Posted to "Side Bar" WTF (Forum) by fatbull on 12-04-2013
  • Re: Win8.1

    [quote user="dhromed"]So any 8.1 users here that can confirm their gamezz are still perfectly fine or horribly borken?[/quote] As far as I can tell, only the mouse acceleration has changed. If you don't use it, you should be fine. If you do, I guess you can back up HKEY_CURRENT_USER\Control Panel\Mouse\SmoothMouse[XY]Curve now and ...
    Posted to "Side Bar" WTF (Forum) by fatbull on 11-27-2013
  • Re: first 100 primes without goto

    r = range(2, 542) print(set(r) - set(i*j for i in r for j in r))
    Posted to Coder Challenge (Forum) by fatbull on 09-27-2013
  • Re: mysterious empty files

    I would double-check the error handling code.Are all errors logged? Don't forget to capture stdout/stderr of the child processes.Are all return values checked and no exceptions swallowed? Note that C++ iostreams don't throw by default.Are all input files actually non-empty? There could be a race condition if the application is launched too ...
    Posted to Coding Related Help & Questions (Forum) by fatbull on 09-20-2013
Page 1 of 23 (223 items) 1 2 3 4 5 Next > ... Last »
Powered by Community Server (Non-Commercial Edition), by Telligent Systems