Most Popular

1500 questions
108
votes
11 answers

What kind of bugs do "goto" statements lead to? Are there any historically significant examples?

I understand that save for breaking out of loops nested in loops; the goto statement is evaded and reviled as a bug prone style of programming, to never be used. Alt Text: "Neal Stephenson thinks it's cute to name his labels 'dengo' " See the…
Anon
  • 3,603
108
votes
10 answers

Why is Python used for high-performance/scientific computing (but Ruby isn't)?

There's a quote from a PyCon 2011 talk that goes: At least in our shop (Argonne National Laboratory) we have three accepted languages for scientific computing. In this order they are C/C++, Fortran in all its dialects, and Python. You’ll notice…
Cyclops
  • 2,167
107
votes
12 answers

Result object vs throwing exceptions

When sending a request to another module and expecting a result, it seems to me there are two ways of dealing with the 'non-happy paths'. Throw an exception Return a result object that wraps different results (such as value and error) I would say…
dumazy
  • 1,219
107
votes
10 answers

Is it ok to use meta-programming even though not all of my colleagues understand it?

I employ a lot of meta-programming to avoid repetitive tasks and build safer-to-use abstractions. I recently moved to a new job where I am working in a larger team and this worries some of my colleagues, because they do not comprehend it. I always…
kamikaze
  • 1,080
107
votes
3 answers

Folder-by-type or Folder-by-feature

I make use of an AngularJS style guide. Within this guide there is a style called folder-by-feature, instead of folder-by-type, and I'm actually curious what's the best approach (in this example for Java) Let's say I have an application where I can…
Jelle
  • 2,034
107
votes
14 answers

Does TDD make defensive programming redundant?

Today I had an interesting discussion with a colleague. I am a defensive programmer. I believe that the rule "a class must ensure that its objects have a valid state when interacted with from outside the class" must always be adhered to. The reason…
user2180613
  • 1,782
107
votes
8 answers

Are there any design patterns that are unnecessary in dynamic languages like Python?

I've started reading the design pattern book by the GoF. Some patterns seem very similar with only minor conceptual differences. Do you think out of the many patterns some are unnecessary in a dynamic language like Python (e.g. because they are…
Gere
  • 2,191
  • 2
  • 17
  • 21
107
votes
16 answers

What is the benefit of not using Hungarian notation?

One of the things I struggle with is not using Hungarian notation. I don't want to have to go to the variable definition just to see what type it is. When a project gets extensive, it's nice to be able to look at a variable prefixed by 'bool' and…
user29981
107
votes
17 answers

Does Scrum turn active developers into passive developers?

I'm a web developer working in a team of three developers and one designer. It's now about five months that we've implemented the agile scrum software development methodology. But I have a weird feeling I just wanted to share in this site. One…
Saeed Neamati
  • 18,210
106
votes
17 answers

Importance of hobby projects

I want to know, how important is it to program in your spare time? Is it necessary to work your 9-5 as a programmer and then get home and work on your hobby to become a better programmer? This said, I know you only get better at programming by,…
106
votes
5 answers

How does shifting to microservices create a run-time problem?

The following commentator writes: Microservices shift your organizational dysfunction from a compile time problem to a run time problem. This commentator expands on the issue saying: Feature not bug. Run time problem => prod issues => stronger,…
hawkeye
  • 4,819
106
votes
4 answers

How is a Java reference different from a C pointer?

C has pointers and Java has what is called references. They have some things in common in the sense that they all point to something. I know that pointers in C store the addresses they point to. Do reference also store the address? How they are…
Gnijuohz
  • 2,055
106
votes
9 answers

Check First vs Exception Handling?

I'm working through the book "Head First Python" (it's my language to learn this year) and I got to a section where they argue about two code techniques: Checking First vs Exception handling. Here is a sample of the Python code: # Checking First for…
jmq
  • 6,078
106
votes
7 answers

What makes a language Turing-complete?

What is the minimal set of language features/structures that make it Turing-complete?
Curious Cat
  • 1,135
105
votes
22 answers

Do job postings exaggerate their requirements?

I feel like a reasonably qualified programmer, but a lot of job postings I run into make me feel otherwise. Almost all of them separate qualifications into requirements and desirables, but even the requirements part can be daunting. I've seen a lot…
Tesserex
  • 3,025
  • 4
  • 27
  • 27