Most Popular

1500 questions
56
votes
10 answers

Clean Code: long names instead of comments

Don't be afraid to make a name long. A long descriptive name is better than a short enigmatic name. A long descriptive name is better than a long descriptive comment. Robert C. Martin Did I understand Clean Code right? You put the whole…
56
votes
5 answers

Is it better to merge "often" or only after completion do a big merge of feature branches?

Say multiple branches are being developed, A and B, as well as a incremental "bug fix" branch C. Now C is already "finished" and merged into master. A and B are still in development and will not be fixed before (maybe) another bug fix branch is…
paul23
  • 1,081
  • 1
  • 9
  • 15
56
votes
5 answers

Where do you go to read good examples of source code?

I have heard a few people say that one of the best ways to improve your coding ability is to read others code and understand it. My question, as a relatively new programmer, where do I go to find good source code examples that are not too far over…
56
votes
13 answers

How to stop wasting time designing architechture

I have recently graduated from university and started work as a programmer. I don't find it that hard to solve "technical" issues or do debugging with things that I would say have 1 solution. But there seems to be a class of problems that don't…
JRG
  • 411
  • 4
  • 6
56
votes
3 answers

What is the name for storing / packing many boolean states into one number?

It's a sort of simple compression where you use one numeric variable to store many boolean / binary states, using doubling and the fact that every doubling number is 1 + the sum of all the previous ones. I'm sure it must be an old, well-known…
56
votes
4 answers

Why is using MySQL for a dictionary website a bad idea?

I'm planning to design and set up a database to store dictionary entries (usually single words) and their meaning in another language. So, for example, the table Glossary must have entry and definition and each table record has a reference to the id…
Aziz Az
  • 491
56
votes
6 answers

Most readable way to format long if conditions?

Long winding if conditions should be avoided if at all possible, yet sometimes we all end up writing them. Even if it's a very simple condition, the involved statements are sometimes simply very wordy, so the whole condition ends up being very…
deceze
  • 2,295
  • 1
  • 19
  • 19
56
votes
3 answers

What is a type system?

Background I am designing a language, as a side project. I have a working assembler, static analyser, and virtual machine for it. Since I can already compile and run non-trivial programs using the infrastructure I've built I thought about giving a…
Mael
  • 2,345
56
votes
8 answers

Why design a modern language without an exception-handling mechanism?

Many modern languages provide rich exception handling features, but Apple's Swift programming language does not provide an exception handling mechanism. Steeped in exceptions as I am, I'm having trouble wrapping my mind around what this means. Swift…
orome
  • 713
56
votes
3 answers

Is it actually worth unit-testing an API client?

This is something that's been troubling me for a while now. Is it actually worth unit-testing an API client? Let's say you're creating a small class to abstract-away the calls to a petshop REST API. The petshop is a very simple API, and it has a…
Phillip B Oldham
  • 663
  • 1
  • 5
  • 6
56
votes
11 answers

What is meant by, "A user shouldn't decide whether it is an Admin or not. The Privileges or Security system should."

The example used in the question pass bare minimum data to a function touches on the best way to determine whether the user is an administrator or not. One common answer was: user.isAdmin() This prompted a comment which was repeated several times…
GlenPeterson
  • 14,920
56
votes
5 answers

Is it considered Pythonic to have multiple classes defined in the same file?

In working with python for the first time, I've found that I end up writing multiple classes in the same file, which is opposed to other languages like Java, which uses one file per class. Usually, these classes are made up of 1 abstract base class,…
Ampt
  • 4,723
56
votes
10 answers

Should Junior Programmers be involved as code reviewers in the projects of Senior Programmers?

One of my team members, a junior programmer, has impressive programming skills for his level of experience. And during code reviews, I believe in emphasizing learning, not pointing out mistakes. But should junior programmers be involved in code…
56
votes
8 answers

Should a stack trace be in the error message presented to the user?

I've got a bit of an argument at my workplace and I'm trying to figure out who is right, and what is the right thing to do. Context: An intranet web application that our customers use for accounting and other ERP stuff. I'm of the opinion that an…
Vilx-
  • 5,320
56
votes
18 answers

How to manage a developer who has poor communication skills

I manage a small team of developers on an application which is in the mid-point of its lifecycle, within a big firm. This unfortunately means there is commonly a 30/70 split of Programming tasks to "other technical work". This work…
djcredo
  • 534