Most Popular
1500 questions
58
votes
8 answers
Are events only used for GUI programming?
Are events only used for GUI programming?
How do you handle in normal backend programming when something happens to this other thing?
user3093620
- 601
58
votes
8 answers
Should a developer do UI mockups if there are no designers in the project?
I'm working with a small team that creates a proprietary web application and UX isn't much of a priority since our own people will be the ones operating it, but we do try to make their jobs easier.
Should I, as a developer, create a UI mockup…
PentaKon
- 611
- 5
- 7
58
votes
9 answers
How to write unit tests before refactoring?
I've read some answers to questions along a similar line such as "How do you keep your unit tests working when refactoring?". In my case the scenario is slightly different in that
I've been given a project to review and bring in line with some…
PDStat
- 783
58
votes
4 answers
How much stack usage is too much?
Lately when I've been writing C or C++, I'll declare all my variables on the stack just because it's an option, unlike with Java.
However, I've heard that it's a bad idea to declare large things on the stack.
Why exactly is this the case? I…
Elliot Way
- 691
58
votes
3 answers
Is it an antipattern to use peek() to modify a stream element?
Suppose I have a stream of Things and I want to "enrich" them mid stream, I can use peek() to do this, eg:
streamOfThings.peek(this::thingMutator).forEach(this::someConsumer);
Assume that mutating the Things at this point in the code is correct…
Bohemian
- 1,996
58
votes
8 answers
How can we be certain that the lower components of computer programming like compilers, assemblers, machine instructions, etc. are flawless?
Since we are becoming more and more reliant on computing, including very critical tasks of day-to-day life, I was just wondering how those vital components are tested.
More technically, how are the compilers and assemblers tested? (I suppose this…
Sudip Bhandari
- 1,137
58
votes
10 answers
Are SMART goals useful for programmers?
Several organisations I know use SMART goals for their programmers. SMART is an acronym for Specific, Measurable, Achievable, Relevant and Time-Bound. They are fairly common in large corporations.
My own prior experience with SMART goals has not…
Craig Schwarze
- 3,266
58
votes
12 answers
What programming language generates fewest hard-to-find bugs?
What language, in your opinion, allows the average programmer to output features with the least amount of hard-to-find bugs? This is of course, a very broad question, and I'm interested in very broad and general answers and wisdoms.
Personally I…
Magnus Wolffelt
- 2,383
58
votes
7 answers
Solo developer vs. team developer : should I move on?
I work as a solo developer in a small company. There's more than enough work, but the same does not apply for money. Thus, I won't be seeing any new colleagues in the near future.
I am responsible for absolutely everything that has do to with IT…
sbrattla
- 793
58
votes
4 answers
Boolean Method Naming Affirmative vs Negative
Should boolean methods always take the affirmative form, even when they will only ever be used in the negative form?
Say I wanted to check whether an entity exists before creating one, my argument is that the first form below is better than the…
lynks
- 683
58
votes
10 answers
How to explain that sample size does not influence project length
We have big enterprise projects they normally involve copying data from a source database to a destination database and then setting up a number of additional applications that sync this data etc.
The last project contained 250,000 items (rows of…
Daveo
- 900
58
votes
4 answers
Why is SQL's BETWEEN inclusive rather than half-open?
Semi-open (or Half-Open, Half-Closed, Half-Bounded) intervals ([a,b), where xbelongs to the interval iff a <= x < b) are pretty common on programming, as they have many convenient properties.
Can anyone offer a rationale that explains why SQL's…
alex
- 2,904
- 1
- 16
- 19
58
votes
9 answers
Explanation on how "Tell, Don't Ask" is considered good OO
This blogpost was posted on Hacker News with several upvotes. Coming from C++, most of these examples seem to go against what I've been taught.
Such as example #2:
Bad:
def check_for_overheating(system_monitor)
if system_monitor.temperature > 100
…
Pubby
- 3,380
58
votes
8 answers
Scrum - how to carry over a partially complete User Story to the next Sprint without skewing the backlog
We're using Scrum and occasionally find that we can't quite finish a User Story in the sprint in which it was planned. In true Scrum style, we ship the software anyway and consider including the User Story in the next sprint during the next Sprint…
Nick
- 1,175
58
votes
7 answers
Why are there so many string classes in the face of std::string?
It seems to me that many bigger C++ libraries end up creating their own string type. In the client code you either have to use the one from the library (QString, CString, fbstring etc., I'm sure anyone can name a few) or keep converting between the…
Tamás Szelei
- 7,767