3,110 reputation
21026
bio website
location Chicago, IL
age 26
visits member for 3 years
seen 2 hours ago

Apr
26
comment Are there numbers that are not representable in base 10 but can be represented in base 2?
@Ramhound Given memory limitations, binary can represent 0.0999999....998.. exactly, but not the full number 0.1 - approximations like rounding to the nearest hundreth with 0.100 are an implementation concern that involves not showing you all the digits and rounding it instead.
Apr
22
comment Are multi-line comments a critical facility in a modern language?
@HostileFork That's an old question that predates Programmers.SE. As I understand it, it can't be migrated here now.
Apr
22
revised Using multiple Git repositories instead of a single one containing many apps from different teams?
Fixing a link
Apr
10
comment How can I make my logging more useful?
...by writing better log messages?
Apr
9
revised Real time unit testing - or “how to mock now”
[Edit removed during grace period]
Apr
9
answered Real time unit testing - or “how to mock now”
Apr
9
comment Real time unit testing - or “how to mock now”
@mika Is this question strictly limited to testing, or is an answer involving some refactoring of the code also acceptable?
Apr
9
reviewed Approve suggested edit on Why do JavaScript frameworks/libraries have functions which already exist in pure JavaScript?
Apr
8
comment Why do JavaScript frameworks/libraries have functions which already exist in pure JavaScript?
@josh3736 At least you don't still have to support IE6 ('tho, luckily only in a "make it work, it can look like crap" way)
Apr
5
comment Order of parameters in localization code
Python - also: 'Hello %(name)s' % {'name': 'John'} (not as concise, but gives context in the translation string)
Apr
5
comment Does functional programming add complexity in code?
@Brendan Only within the same paradigm (and even then, sometimes not). For example, Prolog, Java, and APL are so different that I would argue that if you only know one of those (and no other languages), you cannot read the other two, no matter how well you know the first one. (Seriously, in bdesham's example, how the devil are you supposed to interpret "christmas tree" if you don't know any APL?)
Apr
5
comment Correct way to undo the past few git commits including a merge?
@Jsess This command creates a new commit that is the exact reverse of the SHA given to it. If any of the commits that from after the original merge happened to touch the same lines, the conflict is: when revert looks at the code it's trying to revert, the code no longer matches the state the code was in immediately after the original merge.
Apr
2
awarded  Custodian
Apr
1
comment How to distribute, one virtual token to each person in this world, and make sure nobody gets more than one?
@Brendan Oh, if the key to your idea is the birth-assigned token, that already exists in the US, and duplicates do happen..
Mar
30
comment Model-View-Controller: Does the user interact with the View or with the Controller?
@Mahdi Just look at the other most-upvoted answer. They're calling it the GUI, but UI or just "interface" is a better term.
Mar
30
comment Strategies to troubleshoot an error that only happens on a specific device
+1 for "best testing program", I had one for my battery-tracking Android app. When I sent it to a user who was getting bizarre results, and got the debug output, it was an extremely WTF moment: He'd somehow screwed up his phone such that Android itself was reporting 60% battery one minute, 40% the next, 80% the next, and it just kept jumping around. Can't do anything at that point in the app to fix it, they needed to fix their phone.
Mar
30
comment How to distribute, one virtual token to each person in this world, and make sure nobody gets more than one?
@Brendan Tattoos can be removed and modified, so I'd stick with "impossible".
Mar
30
comment How to distribute, one virtual token to each person in this world, and make sure nobody gets more than one?
@david.pfx What about identical twins? How about DNA-theft (such as putting someone else's blood in the scanner)? Or in the future, clones?
Mar
30
comment Question/Answer for multiple Users - How should I design it?
User-Model - are you using an ORM? Which one?
Mar
30
comment How far should we rename code and data when end users nomenclatures change?
The data shouldn't need to be migrated for this, it should be using the ID (or index for enums?) from MySQL, not the text...