3,384 reputation
826
bio website
location
age
visits member for 3 years
seen Jul 23 at 12:04

Jul
6
comment Recursion or while loops
@dan_waterworth: This is all again about writing. While writing you happily accept what the function means and enjoy the simplicity, assuming the function is correct. Debugging is all about "what the function actually does, versus what it was supposed to do", and all the elegance and simplicity of writing crashes on your head. "Dirty mechanics" which recursion manages to hide efficiently is where usually the problem lies, and debugging stuff that happens behind the scenes is always harder than debugging what lies out in the open.
Oct
31
comment “Do it right, against customer's wishes” - how is it called?
@Rig: So, unless we just build it reliable, we're in a lose-lose situation. We can't not build it (deadline is final), and we can't build it to specs (flawed). The choice is quite smart: make it flawless and then if someone protests, let them argue that no, they demand flaws to be implemented.
Oct
30
comment “Do it right, against customer's wishes” - how is it called?
Let me emphasize: This is NOT the USA. And these government organizations may not be technical experts but are great at politics. Seriously, if you point out two different dates and ask which one is right, they can reply with a straight face these are both the same date and your request is invalid. Argue with that.
Oct
30
comment “Do it right, against customer's wishes” - how is it called?
(in particular, the contract is pretty clear on punitive charges for delays in delivery. We're better off deploying an empty box that does nothing, and "fixing it" as warranty repairs by filling it with electronics as they are developed, than to delay deployment for any reasons.)
Oct
30
comment “Do it right, against customer's wishes” - how is it called?
@JamesSnell: In this particular case, likely the lawyer costs would exceed the expected profits long before resolution. Especially that a device that doesn't perform to specs can be "fixed within warranty" (only costs of modifying the algorithms). That's the worst that can really happen to us currently. Also, I have a strong suspicion the customer understands the SNAFU but is unwilling to admit mistake and silently hopes we do what we're about to do. That way their reputation is never at stake and the device performs just fine. It's not just about law, it's very much politics.
Oct
30
comment “Do it right, against customer's wishes” - how is it called?
@JamesSnell: Thing is, we face a choice between: [No safety system, angry customer, no contract money, clear legal standing] and [Fully working system, satisfied customer, fully paid contract, somewhat dubious legal standing]. Of course "demonology" (building the system following wrong specs) would be a very bad solution here (faulty system, dissatisfied customer, struggle for money from contract, dubious legal standing) but we don't intend to use demonology here.
Oct
30
comment “Do it right, against customer's wishes” - how is it called?
@jozefg: No, they are government employees. My guess is simple unwillingness to admit to own errors. Matter of ego and admission to mistake before superiors: better dead than proven wrong. This is not atypical. A body of the same level, but different locality, asked to point out which of two dates (like, november 15th and december 10th) in two (equally important) documents specifying final deadline of some contract is the correct one answered "There is no difference in dates between these documents."
Oct
30
comment “Do it right, against customer's wishes” - how is it called?
One thing more: that's a fairly small market. If the customers ever learn our company is willing to sue any of them, we can pack up.
Oct
30
comment “Do it right, against customer's wishes” - how is it called?
...also, we are fairly sure even if it does fail for some reason that flaw won't be the vector of failure if we fix it.
Oct
30
comment “Do it right, against customer's wishes” - how is it called?
@Simon: This is a small company with no legal department. The market requires us to take contracts before full extent of works is known - make too many requests and someone else will swipe the job from before our noses. This time the caveat was discovered rather late. The difference with seatbelts is that they are currently mandated by law. Think more like parachutes installed in passenger seats of airliners.
Oct
30
comment “Do it right, against customer's wishes” - how is it called?
@Rig: Thing is: by NOT releasing it we don't just lose money. We fail to deliver a much-needed safety system leaving people insecure. By doing as our boss says, we act unlawfully but everyone is happy. People are safe because the system works right. The customers don't ever need to suffer damage to their overblown egos. We're getting paid in full. Yes, we're at risk that if someone tries to dredge up dirt on us they might discover formal requirements aren't satisfied - but then, that's unlikely. Thanks to tactics like these we don't make many enemies.
Oct
30
comment “Do it right, against customer's wishes” - how is it called?
It isn't so much "put lives at risk" as "fail to prevent...". The customer always has an option of not moving a finger and leaving people to depend on their own hunch as they were for centuries past. The device would not cause deaths, it would just fail to prevent ones it was meant to prevent.
Oct
30
comment “Bad apple” algorithm, or process crashes shared sandbox
How guaranteed is that the badly-behaved process will bring the sandbox down? I mean - can we assume a finite time when we know for sure given sandbox is running only "clean" processes because it didn't crash?
Oct
30
comment “Do it right, against customer's wishes” - how is it called?
@Phoshi: Not really. It's an optional safety equipment that would simply fail to warn in certain situations. It's not commonly installed but in this situation it would cause a false sense of security. In this case the customer is a government organization and there is really no point trying to escalate this (only more politicians above) - the only result would be losing all future contracts.
Aug
10
comment In what order are rows fetched absent ORDER BY clause?
You can realistically expect the first query by unindexed column to follow "insert time" order; by indexed "update time". Consecutive requests may likely be "tainted" by cached results and so quite randomized; nevertheless never depend on it - it may change from version to version, by parameters, by update operations and by bad weather on the full moon. "Undefined" is the correct answer, and anything else is at best informed guesses.
Jul
29
comment Does modular programming affect computation time?
Premature optimization is the root of all evil. Linear code is slightly faster than modular code. Modular code is vastly faster than spaghetti code. If you aim at linear code without a very (VERY) thorough project of the whole thing, you'll end up with spaghetti code, I guarantee that.
Apr
12
comment Why do bitwise operators have lower priority than comparisons?
@Dunk: I don't know about you but I remember multiplication/division/AND has priority over addition/substraction/OR, and remembering "arithmetic above logic" is exactly one bit of information. Besides, there's a chart of operator precedence hanging on the wall by me, just in case - and the only simplification the "mess" example needs to be clear is removal of the redundant parentheses. And as for "concerned with solving problem at hand" - neglecting code clarity at that phase tends to bite you in the back while maintaining the code.
Apr
12
comment Why do bitwise operators have lower priority than comparisons?
Oh. So the meaning of & changes depending on where you place it. For a=1; b=2; if(a & b){...}` will execute the block, while c = a & b; if(c){...} will consider the condition not satisfied. Big thanks to mr. Richie for fixing that.
Apr
12
comment Why do bitwise operators have lower priority than comparisons?
@Dunk: The common "by hunch" approach is [arithmetics] [logic operator] [arithmetics]. Most programmers don't create a mess of parentheses like if(((x+getLowX()) < getMinX) || ((x-getHighX())>getMaxX()))) - most will assume precedence of arithmetics over logics and write if( ( x + getLowX() < getMinX ) || ( x - getHighX() > getMaxX() )) assuming precedence of + above <. Now intuitively if( x ^ getMask() != PATTERN ) should behave the same, XOR being arithmetic operator. The fact it's interpreted as if( x ^ ( getMask() != PATTERN ) ) is completely counter-intuitive.
Apr
11
comment How meaningful is the Big-O time complexity of an algorithm?
It is important to realize that constants can be quite important. O(n) where single iteration takes a second may be worse than O(n log n) where you get a million iterations per second.