Most Popular

1500 questions
93
votes
19 answers

Dealing with management that does not see value in improvements that are not immediately visible to the user

I can understand schedule pressure. You want to please your users, as they are the lifeblood of the company. However, it is also true that certain changes will make everything easier down the road. Unfortunately, management in my organization has…
92
votes
11 answers

Why F#, Rust and others use Option type instead of nullable types like C# 8 or TypeScript?

AFAIK, Option type will have runtime overhead, while nullable types won't, because Option time is an enum (consuming memory). Why not just mark optional references as optional, then the compiler can follow code execution and find whenever it can't…
Chayim Friedman
  • 1,148
  • 1
  • 6
  • 15
92
votes
8 answers

How to modify the output of a program for which you don't have the source code

In our company we have a small program (.exe 500Kb size) that does mathematical calculation and in the end it spits out the result on a Excel spreadsheet that we use to continue our workflow. I want to modify the columns, spacing format and add VBA…
Alec
  • 997
92
votes
28 answers

How important is graceful degradation of JavaScript?

Should web developers continue to spend effort progressively enhancing our web applications with JavaScript, ensuring that features gracefully degrade, thereby ensuring accessibility? Or should we spend that time focused on new features or other…
Stephen
  • 2,199
92
votes
5 answers

Best practices for making header file?

What things should absolutely always/never be included in a header file? Functions: what must go in the header file and what mustn't Constants: Is it good practice to define lot of constants in a header file? Any other good practices for C header…
Moshe Magnes
  • 1,071
92
votes
26 answers

What does mathematics have to do with programming?

I just started a diploma in software development. Right now we're starting out with basic Java and such (so right from the bottom you might say) - which is fine, I have no programming experience apart from knowing how to do "Hello World" in Java. I…
Rory
  • 237
92
votes
16 answers

Do the young minds need to learn the pointer concepts?

Why did the C master Dennis Ritchie introduce pointers in C? And why did the other programming languages like VB.NET or Java or C# eliminate them? I have found some points in Google, and I want to listen your comments too. Why are they eliminating…
niko
  • 2,119
  • 4
  • 22
  • 19
91
votes
18 answers

How to explain a layperson why a developer should not be interrupted while neck-deep in coding?

If you just consider the second part of my question, "Why a developer should not be interrupted while neck-deep in coding", that has been discussed a number of times by smart people. Heck, even the co-founder of SO, Joel Spolsky, wrote a blog post…
András Szepesházi
  • 581
  • 2
  • 7
  • 16
91
votes
15 answers

How can I favor quick (and dirty) over clean (and slow) in practice?

Preface, TL;DR This question is about the implied tradeoff between the speed of development and the quality of code. I am looking for methodologies which can be followed in order to optimize development speed, even at the expense of code-quality and…
Gulzar
  • 1,240
91
votes
8 answers

What is "Soft Coding", really?

In this article by Alex Papadimoulis, you can see this snippet: private void attachSupplementalDocuments() { if (stateCode == "AZ" || stateCode == "TX") { //SR008-04X/I are always required in these states attachDocument("SR008-04X"); …
RaidenF
  • 1,579
91
votes
10 answers

Clean Code comments vs class documentation

I'm having some discussions with my new colleagues regarding commenting. We both like Clean Code, and I'm perfectly fine with the fact that inline code comments should be avoided and that class and methods names should be used to express what they…
Bjorn
  • 1,083
91
votes
10 answers

How do you avoid getters and setters?

I'm having something of a hard time with designing classes in an oo way. I've read that objects expose their behavior, not their data; therefore, rather than using getter/setters to modify data, the methods of a given class should be "verbs" or…
91
votes
10 answers

If null is bad, why do modern languages implement it?

I'm sure designers of languages like Java or C# knew issues related to existence of null references (see Are null references really a bad thing?). Also implementing an option type isn't really much more complex than null references. Why did they…
zduny
  • 2,653
91
votes
17 answers

How do you cope with ugly code that you wrote?

So your client asks you to write some code, so you do. He then changes the specs on you, as expected, and you diligently implement his new features like a good little lad. Except... the new features kind of conflict with the old features, so now…
mpen
  • 1,889
91
votes
8 answers

How to reject a code review that you believe is unnecessary?

I am in a position where I have been asked to review some code that fixes a problem that I don't believe exists. The fixer, who is more senior than me, insists his fix is necessary but it appears to be no more than C++ sophistry to me. Part of…
James
  • 4,348