dr jimbob
Reputation
1,553
Top tag
Next privilege 2,000 Rep.
 Oct 28 awarded Nice Answer Jul 21 awarded Popular Question Jul 14 comment How does learning assembly aid in programming? @StriplingWarrior - that seems more for learning about how compilers work to optimize your code than learning assembly. E.g., you could learn assembly and end up writing much slower code than if you wrote straightforward C that your compiler was able to better optimize your code than you and there also are the rare cases where assembly will be faster as you can't access the specific assembly calls you need in C. Jun 14 awarded Nice Answer Jun 14 revised Learn programming backwards, or “so I failed the FizzBuzz test. Now what?” grammar; fix link ; expand Jun 14 answered Learn programming backwards, or “so I failed the FizzBuzz test. Now what?” Jun 5 awarded Nice Answer May 30 awarded Announcer May 30 answered Why is quicksort better than other sorting algorithms in practice? May 25 comment Which hashing algorithm is best for uniqueness and speed? For random input and an ideal hashing function, you expect 5.5 collisions with N=216553 and a 32-bit word size (d=2^32) by N-d-d*((d-1)/d)^N. The probability of no collisions in this ideal case is p ≃ ((d-1)/d)^(N*(N-1)/2) ≃ 0.00426 (0.426%). Sheer luck that CRC32 had low collisions. So when collisions aren't significantly above 5.5 and input is sufficiently random, only speed matters. (For consecutive integers; low collisions are desired). May 4 comment Is it bad practice to name an unused variable with a single underscore? Also, using `_` for dummy variables in python will clash with `_` for last returned value. E.g., in the interpreter, if you do `5*5` on line 1; then on line 2 `_` will have the value `25`. However if you then set `x,_ = (3,'not used')`, you will find that `_` is now `not used` instead of the last returned value until you `del _`. You probably shouldn't be using `_` for last returned value in real code; but its often handy in the interpreter when trying new stuff out. Apr 27 comment Completion time on a company where the supervisors don't know programming It's also reasonable to give a generous initial estimate due to Hofstadter's law: It always takes longer than you expect, even when you take into account Hofstdter's Law. If you finish early, great, there's always the next project/feature. If you finish late, you will have untold levels of stress and misery. Mar 19 comment Is a company order to switch to a certain IDE a red flag? Depends on what "without discussion" means. If the head boss just decided all devs must use eclipse, no exceptions for no reason and the devs are upset, that seems like a red flag. If a policy was set for standardization (saying we won't pay for VisualStudio, etc) don't want to maintain instructions for how to set up build environments for other IDEs, or it resolves other issues (have eclipse in multiple VMs for testing), that's great. I wouldn't start applying elsewhere over this trivial issue -- but if the 4-12 devs are upset at arbitrary orders coming from above, talk to your boss. Feb 13 answered How can I explain the difference between NULL and zero? Jan 19 awarded Yearling Jan 11 comment Best Version Control Habits For Solo Developer? I did look at Version control for independent developers? (among other questions), but my question wasn't whether to use VCS or not as a solo dev; but what kind of habits are typical/best practice. (Most questions/guides for distributed VCS start from the perspective of multiple devs working on a project where I see bigger need to branch & commit often.) Jan 11 awarded Scholar Jan 11 accepted Best Version Control Habits For Solo Developer? Jan 10 comment Best Version Control Habits For Solo Developer? "what if your computer crashes" - files are saved to disk quite frequently and backups made nightly (if you meant if the hard disk breaks). However +1 for the binary search for bugs could come in handy. I'm pretty good at quickly finding 95% of my bugs; but every now and then there is the truly bizarre bug arising from a seemingly inconsequential change in another part of the program. Jan 10 awarded Nice Question