Most Popular

1500 questions
196
votes
20 answers

Should you keep a copy of all the code you write?

I know the company you work for owns the code and obviously you will get arrested if you try to sell it. But is it uncommon for developers to keep a personal copy of the code they wrote (for future reference)? Apparently this guy was sent to prison…
superFoo
  • 421
  • 2
  • 6
  • 7
196
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,475
  • 3
  • 17
  • 15
195
votes
19 answers

When to favor ASP.NET WebForms over MVC

I know that Microsoft has said ASP.NET MVC is not a replacement for WebForms. And some developers say WebForms is faster to develop on than MVC. But I believe speed of coding comes down to comfort level with the technology so I don't want any…
P.Brian.Mackey
  • 11,121
  • 8
  • 53
  • 88
195
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,661
195
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
  • 2,003
194
votes
3 answers

Which SPDX license is equivalent to 'All Rights Reserved'?

I've got a package.json that's expecting a SPDX-approved license acronym, but I can't find one that means 'proprietary commercial license, all rights reserved'. Is there one for non-FOSS, where I want to specify that I want to allow no reuse?
Bryce
  • 2,139
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…
191
votes
18 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…
190
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…
190
votes
10 answers

Why is Clean Code suggesting avoiding protected variables?

Clean Code suggests avoiding protected variables in the "Vertical Distance" section of the "Formatting" chapter: Concepts that are closely related should be kept vertically close to each other. Clearly this rule doesn't work for concepts that…
Matsemann
  • 1,997
189
votes
2 answers

Git branching and tagging best practices

I am currently learning to use Git by reading Pro Git. Right now I'm learning about branching and tags. My question is when should I use a branch and when should I use a tag? For example, say I create a branch for version 1.1 of a project. When I…
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,583
187
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,001
187
votes
15 answers

What is the advantage of currying?

I just learned about currying, and while I think I understand the concept, I'm not seeing any big advantage in using it. As a trivial example I use a function that adds two values (written in ML). The version without currying would be fun add(x, y)…
Mad Scientist
  • 2,856
  • 2
  • 20
  • 20
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;…