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

Search

Page 1 of 15 (148 items) 1 2 3 4 5 Next > ... Last »
  • Re: how many files?

    [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?) [/quote] Because it's fun, and (on a more serious level) ...
    Posted to Coder Challenge (Forum) by flop on 03-31-2014
  • Re: how many files?

    [quote user="PleegWat"] find /tmp/22747 -type f -print x | wc -l[/quote]How about that: (find ... -printf " 1 + " ; echo 0 ) | bc
    Posted to Coder Challenge (Forum) by flop on 03-28-2014
  • Re: how many files?

    Oh, and BTW, "ls | wc -l" fails if there can be newlines in the filenames - which isn't forbidden in the challenge.
    Posted to Coder Challenge (Forum) by flop on 03-27-2014
  • Re: how many files?

    [quote user="PJH"][pjh@sofa ~]$ wc -l /tmp/lst 43 /tmp/lst[/quote] [quote user="PJH"][pjh@sofa ~]$ ls -l /tmp/22747 | wc -l 43[/quote] Hrm, copy/paste is hard. If I fetch your ls output and count the lines, I get 42 .... so we've got 3 different values yet, and that with only 2 answers! Go, team, go!
    Posted to Coder Challenge (Forum) by flop on 03-27-2014
  • Re: how many files?

    $ perl -e 'opendir(F, shift() || ".") and print(scalar(grep(!/^\.\.?$/,readdir(F))))' 41
    Posted to Coder Challenge (Forum) by flop on 03-27-2014
  • Re: Implement an O(n) sorting algorithm

     As we all know, the machines always get faster ... it's developer time that's limited. So, I'd like to present my O(1) (developer time) sort algorithm; just use one of these: qsort(3) for C sort Perl, Python, ... anything that your stdlib offers.
    Posted to Coder Challenge (Forum) by flop on 03-18-2014
  • Re: Implement an O(n) sorting algorithm

    [quote user="Ben L."]Your choice of language[/quote]  I'll choose physics.
    Posted to Coder Challenge (Forum) by flop on 03-12-2014
  • Re: goto fail;

    [quote user="LoremIpsumDolorSitAmet"]You can demonstrate all you like and tell me I'm wrong, but think about this: why do none of the modern programming languages have goto?[/quote] Well, how "modern" would you like? "Go"? See  Why does Go have a goto statement. Or, Perl6? goto in the reference.. So, ...
    Posted to "Side Bar" WTF (Forum) by flop on 03-09-2014
  • Re: I sense a mouse

    [quote user="PleegWat"] I'm on linux, and use vi. Hence, I'm bereft of the beauty that intellisense undoubtably is.[/quote]  You should try the vim plugin "youcompleteme".
    Posted to "Side Bar" WTF (Forum) by flop on 02-25-2014
  • Re: FastFileRenamer

    [quote user="Ronald"]Renaming a big batch of files on Windows is no fun. The ren command is pretty weak and unless one is thrilled at the idea of dealing with NTFS transactions and DTC, even using PS or .Net does not allow for an easy rollback strategy. [/quote]  My typical workflow for things like that is a directory ...
    Posted to "Side Bar" WTF (Forum) by flop on 11-12-2013
Page 1 of 15 (148 items) 1 2 3 4 5 Next > ... Last »
Powered by Community Server (Non-Commercial Edition), by Telligent Systems