| « Prev | Page 1 | Page 2 | Page 3 | Next » |
Married programmer is only having to date palm one week per month. |
Say you have a main function in C: int main(void) {
What should true and false be, if we want to be compliant with standard exit codes? In bash, try: ( exit 34 ); echo $? |
|
FTFTFY: This Yoda's head explode would make.
|
|
My favorite bool WTF was the guy who made a java program with two static AtomicBooleans, FileReader.TRUE and FileReader.FALSE.
Everywhere throughout the code, he would do a reference comparison between a given bool and either FileReader.TRUE and FileReader.FALSE. The general idea was that there would be multiple kinds of readers, but this guy only implemented the FileReader, then passed it on to me for the rest. So I did some quick refactoring and quickly found that things were failing because SQLReader.TRUE != FileReader.TRUE I went and asked the guy WTF he was doing and had the most awkward "you're not getting it" conversation ever when he kept trying to tell me that he did it that way because "it has to be atomic". |
|
lol I like the hidden Cornify :)
(click on "truth truly is ," on one of the last paragraphs... you won't be disappointed) |
That's not enough to resolve all the possible states... There's also weak pull up/down, strong pull up/down as well. As well as open-collector/open-drain. Otherwise you can't simulate some logic, like say, USB. (USB uses weak pullups on the host - the stronger pulldowns on the device give determination between USB slow speed and USB full speed. High speed is negotiated through some special signalling during enumeration (chirps), and super speed well, probably uses the other pins. But having logic tied together means the logic has to take into account any pullups and pulldowns to resolve. (And yes, "driven" will override any pullup/pulldown, and a strong pull up/down will override a weak pull down/up, respectively). |
Maybe the author was preparing his code for quantum computing. SIM = simultaneous (true and false) |
Re: Truth or Sim
2012-11-13 04:39
•
by
Captain Boolean
(unregistered)
|
|
Invoice for new keyboard in the post!
Captcha: Paratus, Even almighty! |
So be IT. |
| « Prev | Page 1 | Page 2 | Page 3 | Next » |