Mike Robinson
  • Member for 3 years, 2 months
  • Last seen more than a month ago
How can there be so much "business logic" for a company that they cannot drop their old COBOL/mainframe code?
15 votes

(Koff, koff ...) Speaking as someone who used to teach a community-college course in COBOL ... there are actually key attributes about that particular language which have never been replicated since. ...

View answer
Why don't languages like C have NAND operators?
6 votes

I have seen only a few languages that implemented a NAND keyword. Remember that source-code is designed to be expressive of the logic that is needed to solve the problem at hand. It is entirely up to ...

View answer
Are bank transactions run with DB transactions?
6 votes

"The real world of multi-business financial transaction processing" is always that there are many entirely-disconnected systems in place. "SQL transactions" therefore can never cover this.

View answer
Is it a good idea to start a function with a bunch of assert statements?
5 votes

(Speaking not just in the context of Python ...) I fill(!) my source code with assertions and self-checks ... and I never(!) "compile them out" when generating "production" code. And here's why: ...

View answer
Fear of web-app not being "future-proof"
5 votes

Above all else, "scrapping the thing and starting over" is never an option ... after all, didn't you say that you have "a half-dozen clients?" Have you yet paused to consider what they might think of ...

View answer
Why do some BASIC programmers put a redundant END statement at the end of the code?
5 votes

Furthermore, in some BASIC interpreters that I have used ... ("HP2000 Access BASIC," anyone? Bah ... these kids today ...) ... the END statement was required at the end of the program, and nowhere ...

View answer
Given a function that has already been unit tested, but is present in another unit, should I bother testing it again?
4 votes

In this context, canCreateNewUsers is a "foundation brick" that createUsers relies on. createUsers should not have to re-verify "that it works." (That level of testing should ...

View answer
What is a good way to make a "software activation code" system?
4 votes

A good friend of mine once kept an expensive 12-string guitar in a cardboard case locked with the flimsiest padlock imaginable. It was there, he quipped, "to keep the honest people out." For more ...

View answer
How does this switch statement do "multiple things"?
3 votes

While I generally don't agree with Martin on this point, here's one way of looking at the situation which might be useful: "This piece of logic acts as a gatekeeper." In an out-of-the-way ...

View answer
How to implement a dirty flag on a complex object hierarchy?
3 votes

Here's what I'd probably do ... "Am I(!) Dirty?" Easy Way: The innermost section of your code which "first smells the stink" immediately informs its parent, which immediately ...

View answer
How can Data security be ensured in an open source software?
3 votes

There are several distinct ways in which this issue is handled now: • Many source-code packages are hosted at version-control repositories such as GitHub, which is thought to be a trustworthy place to ...

View answer
Is there a common Python pattern for the scenario "run code, save the output and load it on a rerun"?
3 votes

I don't know of any special name for it. But, "just do it." This sort of thing is done all the time. I once had a script that had to process about 155,000 files scattered over about twenty ...

View answer
How should I name output variables that are the same as the function?
3 votes

Most frequently, I use the variable result. Don't create ambiguity in the mind of the next Gentle Reader of your source-code. (Since, too bad for you, you just got smooshed by a bread truck, she can'...

View answer
Company outsourced testing; how can we encourage programmers to stop overly relying on testers?
3 votes

Consider taking this up in the Project Management thread. But also – simply tell them that their work will not be accepted unless it is accompanied by automated tests. "Yes, this is part of your ...

View answer
How to Replace Many if Statements for many types
3 votes

A so-called "state table" or "finite-state machine (FSM)" design might be helpful here. The algorithm starts in one "state" and moves to other "states" as time goes on. When the algorithm is ...

View answer
Should a server call services on behalf of the user?
3 votes

In most of my designs, the client-facing unit accepts, validates and stores the user's credentials. It then creates one or more other credentials which are used only internally, but which can be ...

View answer
Onion architecture applied to an .NET application
3 votes

Although in this response I do not intend to dive into the ".NET architectural specifics" of your particular case, I would like to introduce the notion that perhaps your present design decisions might ...

View answer
How to properly decouple the service layer from the user interface layer, if the service layer needs to interact with the user?
Accepted answer
3 votes

Well, what I usually do in situations like this (and my answer isn't specific to Python in this case), is to provide some mechanism within the user-interface layer that allows the user-client code to ...

View answer
When are equality comparisons between IEEE 754 floating point values acceptable?
2 votes

My frank answer is – "just use range tests and be done with it." Anytime you test an FP value for "literal equality," you are making assumptions about their underlying ...

View answer
Event Driven Architecture - Best Practice
2 votes

Be warned: "Microservice architectures" are not the panacea that they are often described to be. They introduce asynchronicity in situations that ought to be sequential – and that actually ...

View answer
Designing this module to support exchangeable drivers
2 votes

Drivers like this are often implemented as shared libraries (.so or .DLL) with agreed-upon interfaces. They serve to "abstract away" how the device actually works. Then, all of these ...

View answer
How to express abstractions?
2 votes

Much cleaner idea: "Dear 'Person,' will you please tell me what is your 'Shape'?" ("Bounding box?") Because – in all of my many years on Planet Earth, I have never encountered a &...

View answer
"Dead programs tell no lies" in the context of GUI programs
2 votes

The assert() primitive is a classic way to test for a condition and to throw an exception if "what can never happen ... just did." When designing software, I fill my code with assertions (...

View answer
Is it possible to update exactly 1 byte in RAM?
2 votes

All modern microprocessors physically read and write to memory in units larger than one byte, but allow the content of individual bytes to be changed.

View answer
Is it required for an app developer to know information security?
2 votes

While the "heavy lifting" of constructing a crypto algorithm infrastructure might have been done by the people who work at agencies with three-letter names, it is absolutely crucial that you use them ...

View answer
Is inheritance without polymorphism/overriding a right practice?
2 votes

There are no absolutes in software design. Some might say that the base class should be Calculator with two children, SimpleCalculator and ScientificCalculator. But that strictly depends on how you ...

View answer
Is there any benefit in having more than one table for storing the same type of objects?
2 votes

To extend the previous comment – relational database systems are routinely capable of storing billions(!) of entries if necessary, and they contain specific mechanisms – such as "Tablespaces" – to ...

View answer
Is nesting try-except sequence in try-else block bad form?
1 votes

In a situation like this, I often find it useful to create one or more new exception classes, which I can then raise manually. So, no matter how convoluted the "inner logic" might be, it ...

View answer
Which is the best approach I should follow use private fields in data class primary constructor or use Interfaces Inheritance?
1 votes

My general preference is "getters and setters." For a few practical and maybe philosophical reasons. • "Philosophically," I don't think that "how it works" ever belongs ...

View answer
Do lexers have to go word by word or can they go line by line
1 votes

"It depends." In early languages such as the original FORTRAN, and some COBOLs, which assumed that input would be provided on 80-column punched cards, we have the notion of a continuation ...

View answer
1
2 3 4 5 6