News for hackers. Stuff that matters.
Re:Ask HN: Do you use programming tricks in real life too? by jamesbritt on Wednesday September 15, 2010 @05:00PM (#1695822)
I've seen people use exceptions for flow control: rather than constantly checking if it's OK to keep doing something, just keeping doing it until there's a problem, handle it, then gracefully stop.

That's something I do all the time in real life.

Re:Ask HN: Do you use programming tricks in real life too? by tricky on Wednesday September 15, 2010 @10:33PM (#1696637)
ooh, my wife hates that. I typically fix our cars myself when they break. When something starts making noise that I can't diagnose, I do everything I can to make it worse hoping it'll help me figure out the problem. Apparently, that's counter-intuitive.
Re:Ask HN: Do you use programming tricks in real life too? by arethuza on Thursday September 16, 2010 @07:52AM (#1697524)
My wife is far more analytical about most tasks than I am - I drive her crazy by not really being able to explain how I can fix most things, using a process she describes as "fiddling randomly until it works".
Re:Ask HN: Do you use programming tricks in real life too? by kragen on Thursday September 16, 2010 @01:42PM (#1698495)
Your mechanic might hate that too. One difference between software and hardware is that you can't just revert the checkin that cracked your cylinder head when you were over-revving the engine to see if you could make the ping louder.
Re:Ask HN: Do you use programming tricks in real life too? by dkarl on Wednesday September 15, 2010 @06:45PM (#1696133)
That's an idea that I explicitly learned from computing, coming from a mathematical background where that pattern doesn't really have an analogue. I really never thought that way until I conceived of it as an adult and immediately connected it to some code I had written recently. The closest pattern of thinking I had prior to that was the idea of the scientific method, which isn't exactly the same and isn't nearly as applicable to problems in daily life.
Re:Ask HN: Do you use programming tricks in real life too? by ScottBurson on Thursday September 16, 2010 @02:07PM (#1698579)
Are you kidding? I use the scientific method quite consciously all the time. Form a hypothesis, try to come up with some relevant experiments, perform them, notice that they (usually) disconfirm the hypothesis, repeat until the hypothesis is not disconfirmed.
Re:Ask HN: Do you use programming tricks in real life too? by mkramlich on Wednesday September 15, 2010 @06:12PM (#1696049)
similar here. this pattern reminds me also of "better to ask forgiveness than permission" in order to maximize productivity. Just Do It. alter/correct/stop later if/as needed.