7,112 reputation
1434
bio website linkedin.com/in/rosspatterson
location Virginia
age 55
visits member for 4 years, 5 months
seen 47 mins ago

Over 35 years designing and building software systems, both in-house and for profit, and building and leading the teams that do so. A proven track record of delivering releases on time and meeting requirements, enabling sales and marketing to plan well and to execute according to plan.


38m
comment How would a compiler turn an else-if cascade into a switch?
You've got some really good answers below, but your starting position should also be reconsidered. An if/elseif/.../else cascade has serious problem that a switch does not: The source code must be very carefully read to ensure that the mutual interations of all the conditions do not have strange impacts. For example, side-effects of function calls, or simple typographic errors. This has nothing to do with compiler optimizations, and everything to do with readability and correctness.
Mar
23
comment Add file paths to database
"The real problem is that programmers have spent far too much time worrying about efficiency in the wrong places and at the wrong times; premature optimization is the root of all evil (or at least most of it) in programming." delivery.acm.org/10.1145/370000/361612/a1974-knuth.pdf
Mar
23
answered Add file paths to database
Mar
20
comment What principle is violated by having a button do two radically different things or screens act radically different depending on the situation
Pretty much "every principle".
Mar
20
comment What principle is violated by having a button do two radically different things or screens act radically different depending on the situation
Yeah, the PLA is the key here.
Mar
20
comment Documenting intent Vs knowledge
The purpose of the exception is the intent of the code, and that's what you should document.
Mar
17
comment Is there accepted decimal-based Unicode notation for technical audiences?
@MSalters Well, there's always sexigesimal :-)
Mar
16
comment Is there accepted decimal-based Unicode notation for technical audiences?
Why bother? Instead, fully embrace this rare, near-universal, agreement on notation.
Mar
16
comment How to save many changes to database data?
Good database design eschews auto-incrementing row ids, or at least refuses to use them for anything. Foreign keys should be based on values in the rows' columns, not on some independent identity value.
Mar
16
comment How to save many changes to database data?
Boy, I sure hope there's only one user editing these rows.
Mar
16
comment Do bare computer systems (without OS installed) use (executable) files?
As did the IBM System/360 family of the early 1960s. You set an input device address using front-panel switches, pressed the "Initial Program Load" (IPL, aka boot) button, and it read 24 bytes from the device into locations 0-23, continued the I/O command program with the Channel Command Word (CCW) it read into locations 8-15, and when the I/O program ended, loaded the Program Status Word (PSW) from locations 0-7, launching whatever code it read in.
Mar
16
answered Is there accepted decimal-based Unicode notation for technical audiences?
Mar
8
awarded  Enlightened
Mar
8
awarded  Nice Answer
Mar
5
comment Way to toggle debugging code on and off
Your "very nasty" method has been the standard for decades. But don't just #define verbose(x) for the OFF case, instead use #define verbose(x) {;}. That way code like if (badThingHappend) verbose('OMG!') doesn't accidentally capture the next statement.
Mar
3
comment Helping testers who don't have specialized domain knowledge
A QA manager I worked with liked to say, riffing on Arkady Renko in "Gorky Park", "QA decides what interests QA". :-)
Mar
1
comment Storing data in code
"The data itself changes very rarely and when it does change it's really not even that important." Tell that to the Bosnians, Serbs, Croats, Ukranians, South Sudanis, former South Yemenis, former Soviets, et al. Tell that to every programmer who had to deal with the transition to the Euro currency, or to the programmers who may have to deal with Greece's potential exit from it. Data belongs in data structures. XML files work nicely, and can be easily changed. Ditto SQL databases.
Mar
1
comment Reimplementing algorithm from GPL program
@BartvanIngenSchenau is right when he says "... someone else to write up ...". In industries where such "clean room reimplementation" is common, there are explicit barriers to communication between the team that analyses the other thing, and the team that builds its alternative, with only the specification crossing the barrier.
Feb
25
comment Are there memory-memory instructions?
@JamesAnderson System/360 could have had decimal registers, the designers just chose not to. There are examples of machines with decimal registers, just not many. Most predate the now-near-universal use of two's complement binary for fixed-point and integer arithmetic. And when Amdahl, Blaauw, and Evans were designing the System/360, decimal computer arithmetic was still a recent memory.
Feb
23
comment How can I convince my manager to contribute back to the open source community?
What does your employment agreement say? Some companies I have worked for claim ownership of everything you do, on and off the job. My current employer forbids me to work for any other employer, or to own a business of my own. You should review the NDA you've probably signed.