News for hackers. Stuff that matters.
Re:My takeaways from "Clean Code" by cocoflunchy on Tuesday May 28, 2013 @11:45PM (#5784469)

    Flag arguments are ugly
    Perhaps the only exception is for specific setters that 
    directly set the value of an object property (flag?) 
    itself. But I have to agree that flags implicitly mean 
    that the method is probably doing too much (e.g. there is 
    no Command Query Separation).
Can someone elaborate on this (I'm not sure what he means by 'flag argument') ?
Re:My takeaways from "Clean Code" by spc476 on Wednesday May 29, 2013 @12:30AM (#5784600)
Take the Unix system call open(). It accepts multiple flags, to open the file read-only, write-only, read-write, append (only meaningful if writing), truncate (only meaningful on a write-only open), create (again, only really meaningful on a write-only open) along with about half a dozen other flags that can be looked up.

The sheer number of flags can lead to weird issues (what does it mean to open a file for read-only and truncate it? The man page I'm reading leads me to believe it does something other than return an error) and hard to test (I count fifteen flags, which gives 32,768 paths through the code).