Most Popular
1500 questions
98
votes
9 answers
Why is it hard to make a Java program 'appear native'?
Most Java applications don't look the same as C/C++ applications. Swing might have been designed on purpose to have a distincitve look, but based on what I've read, SWT for example tried to 'look native', and doesn't completley succeed.
My question…
user3150201
- 1,217
98
votes
4 answers
Rich Domain Models -- how, exactly, does behavior fit in?
In the debate of Rich vs. Anemic domain models, the internet is full of philosophical advice but short on authoritative examples. The objective of this question is to find definitive guidelines and concrete examples of proper Domain-Driven Design…
RJB
- 2,110
98
votes
5 answers
Why store a function inside a python dictionary?
I'm a python beginner, and I just learned a technique involving dictionaries and functions. The syntax is easy and it seems like a trivial thing, but my python senses are tingling. Something tells me this is a deep and very pythonic concept and I'm…
mdeutschmtl
- 1,099
- 1
- 8
- 6
98
votes
2 answers
What is JavaScript, really?
All this started when I was looking for a way to test my webpage for JavaScript conformance like the W3C HTML Validator. I have not found one yet. So let me know if you know of any...
I looked for the official JavaScript page and find ECMA Script.…
Lord Loh.
- 1,767
- 1
- 14
- 22
98
votes
18 answers
Are unit tests really that useful?
I just graduated with a degree in CS and I currently have a job as a Junior .NET Developer (C#, ASP.NET, and web forms). Back when I was still in university, the subject of unit testing did get covered but I never really saw the benefits of it. I…
Jane Doe
- 457
98
votes
45 answers
What popular "best practices" are not always best, and why?
"Best practices" are everywhere in our industry. A Google search on "coding best practices" turns up nearly 1.5 million results. The idea seems to bring comfort to many; just follow the instructions, and everything will turn out fine.
When I read…
Steven Evers
- 28,180
98
votes
8 answers
RESTFul: state changing actions
I am planning to build a RESTfull API but there are some architectural questions that are creating some problems in my head. Adding backend business logic to clients is an option that I would like to avoid since updating multiple client platforms is…
Miro Svrtan
- 1,139
98
votes
19 answers
How to Mentor a Junior Developer
This title is a little broad but I may need to give a little background before I can ask my question properly.
I know that similar questions have been asked here already. But in my case I'm not asking if I should be mentoring someone or if the…
Josh Johnson
- 1,141
98
votes
17 answers
Do TODO comments make sense?
I am working on a fairly big project and got the task to do some translations for it. There were tons of labels that haven't been translated and while I was digging through the code I found this little piece of code
//TODO translations
This made me…
Ivan Crojach Karačić
- 547
- 1
- 4
- 12
97
votes
53 answers
Harmful temptations in programming
Just curious, what kinds of temptations in programming turned out to be really harmful in your projects?
Like when you really feel the urge to do something and you believe it's going to benefit the project or else you just trick yourself into…
Dan
- 2,892
97
votes
6 answers
Why are some C programs written in one huge source file?
For example, the SysInternals tool "FileMon" from the past has a kernel-mode driver whose source code is entirely in one 4,000-line file. The same for the first ever ping program ever written (~2,000 LOC).
Bran
- 853
97
votes
5 answers
Why is %s better than + for concatenation?
I understand that we should use %s to concatenate a string rather than + in Python.
I could do any of:
hello = "hello"
world = "world"
print hello + " " + world
print "%s %s" % (hello, world)
print "{} {}".format(hello, world)
print '…
Niklas Rosencrantz
- 8,068
- 17
- 57
- 96
97
votes
21 answers
How can a new programmer impress the software engineer (boss)?
I'm working at my first programming job. My boss is a very smart software engineer, and I feel
like I have very little to offer compared to him. Problem is, he is always busy, and needs someone to help him out. I feel like I'm not good enough, but…
Pablo
- 827
97
votes
2 answers
Why have hardware-accelerated vector graphics not taken off?
I'm working on an app that involves real-time manipulation of vector paths at 60fps, and I'm very surprised by how little information there is on the subject. At first, I tried to implement my idea using CoreGraphics, but it didn't perform…
Archagon
- 1,187
97
votes
18 answers
Dependency injection: How to sell it
Let it be known that I am a big fan of dependency injection (DI) and automated testing. I could talk all day about it.
Background
Recently, our team just got this big project that is to built from scratch. It is a strategic application with complex…
Mel
- 1,121