20,358 reputation
44684
bio website madpropellerhead.com
location Finland
age 35
visits member for 4 years, 3 months
seen 6 hours ago

Creative hardworker.

Jack of all trades, master of none, though often better than master of one.


Oct
9
comment Why should your code not use 100% CPU?
@romkyns: Fair point. But as the Electromigration Wikipedia entry says, when operated within the manufacturer's specified temperature and voltage range, a *properly designed* IC device is more likely to fail from other (environmental) causes, such as cumulative damage from gamma-ray bombardment.
Oct
8
awarded  Guru
Oct
8
comment Why should your code not use 100% CPU?
@immibis: Please clarify.
Oct
7
awarded  Good Answer
Oct
7
awarded  Enlightened
Oct
7
awarded  Nice Answer
Oct
7
awarded  Custodian
Oct
7
reviewed Approve Why should your code not use 100% CPU?
Oct
7
revised Why should your code not use 100% CPU?
added 326 characters in body
Oct
7
answered Why should your code not use 100% CPU?
Oct
7
comment What are the disadvantages of test-first programming?
"my tests are green, so my code additions and re-factors are regression-free." False confidence IMO, but your mileage may vary.
Sep
18
awarded  Yearling
Sep
18
comment What is the difference between if('' == $variable) and if($variable == '')
The line between modern/legacy languages isn't all that clear. For example in C (a legacy language?), you can have integers in if statement (anything not a 0 is "true"), so the = vs. == bug is a real concern. But even in Java, if you have booleans, both if(a=false) and if(a==false) are legal, but the result is different! (And at least my compiler doesn't warn about this case - why would it, because either case is perfectly correct code.) IMO that's a good reason to use if(""==$variable) exclusively.
Sep
3
awarded  Revival
May
10
comment Do commercial statistical calculators calculate with a high degree of arbitrary precision or just floating point precision?
Yes, in practice vast majority of cases just work well enough as expected. But how many meaningful digits do you have after an arbitrary double FP calculation? "Probably enough", maybe, but what does that mean: 5 digits? 10 digits? 15 digits? Turns out, it's actually very hard to tell. Assessing and improving FP accuracy is still a research-level problem.
May
10
answered Do commercial statistical calculators calculate with a high degree of arbitrary precision or just floating point precision?
Apr
22
comment Java Communcation API not available for Windows
Well, it might be e.g. missing or wrong (x86/x64) binaries, I don't know. Yes, rxtx site is down. One of the alive ones seems to be java-simple-serial-connector. Have yo tried it?
Apr
22
answered Java Communcation API not available for Windows
Apr
18
comment Worried about memory leak in DLL that creates a dynamic sized array
Could it be the array[NumOfChar+1]='\0' that I mentioned in the comments? Why do you need to reload the DLL, couldn't it be just loaded once when the process starts?
Apr
17
comment Worried about memory leak in DLL that creates a dynamic sized array
By the way, array[NumOfChar+1]='\0' exceeds the array bounds. The maximum index is NumOfChar-1. If you null-terminate, you need to allocate NumOfChar+1 items to accommodate for the last null.