Most Popular

1500 questions
194
votes
20 answers

How to find positive things in a code review?

After some serious quality problems in the last year, my company has recently introduced code reviews. The code review process was quickly introduced, without guidelines or any kind of checklist. Another developer and I where chosen to review all…
RobMMurdock
  • 1,651
  • 2
  • 10
  • 7
194
votes
3 answers

How is localStorage different from indexedDB?

localStorage and indexedDB are used for offline storage of data in HTML5. What are their key differences and which one is preferable in what situations?
user52009
194
votes
14 answers

What's wrong with circular references?

I was involved in a programming discussion today where I made some statements that basically assumed axiomatically that circular references (between modules, classes, whatever) are generally bad. Once I got through with my pitch, my coworker asked,…
dash-tom-bang
  • 2,543
  • 2
  • 16
  • 11
191
votes
25 answers

How to convince my boss that quality is a good thing to have in code?

My boss came to me today to ask me if we could implement a certain feature in 1.5 days. I had a look at it and told him that 2 to 3 days would be more realistic. He then asked me: "And what if we do it quick and dirty?" I asked him to explain what…
Kristof Claes
  • 3,100
  • 2
  • 21
  • 33
191
votes
15 answers

Why are the sizes of programs so large?

If we look at the vintage program Netscape Navigator or an early version of Microsoft Word, those programs were less than 50 MB in size. Now when I install google chrome it is 200 MB and desktop version of Slack is 300 MB. I read about some rule…
Niklas Rosencrantz
  • 8,008
  • 17
  • 56
  • 95
190
votes
9 answers

Why should I use a factory class instead of direct object construction?

I have seen the history of several С# and Java class library projects on GitHub and CodePlex, and I see a trend of switching to factory classes as opposed to direct object instantiation. Why should I use factory classes extensively? I have pretty…
rufanov
  • 1,953
  • 2
  • 12
  • 9
190
votes
6 answers

Difference between REST and CRUD

I learned REST and it feels a lot like CRUD (from what I have read about CRUD). I know they are different, and I wonder if thinking they are similar means I don't understand them. Is it that REST is a "superset" of CRUD? Does it do everything CRUD…
Jesse Black
  • 2,415
  • 3
  • 16
  • 15
188
votes
21 answers

A large part of my code has a major design flaw. Finish it off or fix it now?

I am a high school student working on a C# project with a friend of mine with about the same skill level as me. So far, we have written roughly 3,000 lines of code and 250 lines of test code in a span of 100 commits. Due to school, I put off the…
oldmud0
  • 1,573
  • 2
  • 10
  • 9
188
votes
3 answers

Meaning of MIT license

Suppose I use this ActionScript API released under MIT license to build a software: http://www.cove.org/ape/docs/api/ Can I sell that software? Do I need to give the source code of my software away? Is anyone receiving my software permitted to…
simplfuzz
  • 2,011
  • 2
  • 11
  • 5
187
votes
17 answers

How do you balance between "do it right" and "do it ASAP" in your daily work?

I find myself pondering over this question from time to time, again and again. I want to do things the right way: to write clean, understandable and correct code that is easy to maintain. However, what I end up doing is writing patch upon a patch;…
187
votes
19 answers

How do I review my own code?

I'm working on a project solo and have to maintain my own code. Usually code review is done not by the code author, so the reviewer can look at the code with the fresh eyes — however, I don't have such luxury. What practices can I employ to more…
Max Yankov
  • 901
  • 2
  • 9
  • 17
186
votes
9 answers

Has "Not everyone can be a programmer" been studied?

An old adage that many programmers stick to is "It takes a certain type of mind to learn programming, and not everyone can do it." Now I'm sure that we all have our own trove of anecdotal evidence, but has this been studied scientifically?
System Down
  • 4,743
  • 3
  • 24
  • 35
186
votes
3 answers

Is C++11 Uniform Initialization a replacement for the old style syntax?

I understand that C++11's uniform initialization solves some syntactical ambiguity in the language, but in a lot of Bjarne Stroustrup's presentations (particularly those during the GoingNative 2012 talks), his examples primarily use this syntax now…
void.pointer
  • 4,983
  • 8
  • 30
  • 40
185
votes
15 answers

Developer insists if statements shouldn't have negated conditions, and should always have an else block

I have an acquaintance, a more seasoned developer than me. We were talking about programming practices and I was taken aback by his approach on 'if' statements. He insists on some practices regarding if statements that I find rather…
Patsuan
  • 1,627
  • 2
  • 9
  • 10
185
votes
17 answers

Is there a benefit in compiling your code as you go along?

I recently had a job interview in which they gave me an hour to write some real code. It wasn't a huge amount, probably less than 100 lines. After about 45 minutes, I compiled, ran it, and got it to work. I may have spent 5-10 minutes working out…
CaptainCodeman
  • 1,895
  • 2
  • 15
  • 14