Most Popular
1500 questions
75
votes
9 answers
How were the first compilers made?
I always wonder this, and perhaps I need a good history lesson on programming languages.
But since most compilers nowadays are made in C, how were the very first compilers made (AKA before C) or were all the languages just interpreted?
With that…
user6791
75
votes
19 answers
How do I improve my coding skills?
Here's a bit information about me, before starting with the question.
I am a Computer Science Undergraduate, Java being my primary coding language.
The basic problem in my University are the teaching standards. No one is concerned about teaching…
ykombinator
- 4,287
75
votes
16 answers
How to suggest changes as a recently-hired employee?
I was recently hired in a big company (thousands of people, to give an idea of the size). They said they hired me because of my rigor and because I was, despite my youngness (i'm 25), experienced as a C/C++ programer.
Now that I'm in, I can see that…
ereOn
- 2,001
75
votes
4 answers
What is the purpose of storing multiple lower resolution versions of the same original image?
Sometimes in apps I look into the Resources and find files for, for example, a 256x256 version, a 128x128 version, a 64x64 version, AND a 32x32 version, of the same icon. When I see simple geometric icons like circles I already wonder why they do…
CPlus
- 1,187
- 1
- 8
- 22
75
votes
10 answers
Is it good practice to replace division with multiplication when possible?
Whenever I need division, for example, condition checking, I would like to refactor the expression of division into multiplication, for example:
Original version:
if(newValue / oldValue >= SOME_CONSTANT)
New version:
if(newValue >= oldValue *…
ocomfd
- 5,712
75
votes
7 answers
How does a surname of Null cause problems in many databases?
I read an article on BBC. One of the examples they said was that people with surname 'Null' are having problems with entering their details in some websites.
No explanation is given about the error they are facing.
But as far as I know the string…
Nitish
- 779
75
votes
10 answers
Why was the first compiler written before the first interpreter?
The first compiler was written by Grace Hopper in 1952 while the Lisp interpreter was written in 1958 by John McCarthy's student Steve Russell. Writing a compiler seems like a much harder problem than an interpreter. If that is so, why was the first…
anguyen
- 861
75
votes
10 answers
Does it make sense to write tests for legacy code when there is no time for a complete refactoring?
I usually try to follow the advice of the book Working Effectively with Legacy Code. I break dependencies, move parts of the code to @VisibleForTesting public static methods and to new classes to make the code (or at least some part of it) testable.…
is4
- 779
75
votes
7 answers
Writing Tests for Existing Code
Suppose one had a relatively large program (say 900k SLOC in C#), all commented/documented thoroughly, well organized and working well. The entire code base was written by a single senior developer who no longer with the company. All the code is…
Paul
- 1,025
- 1
- 10
- 14
75
votes
9 answers
When to use HTTP status code 404 in an API
I am working on a project and after arguing with people at work for about more than a hour. I decided to know what people on stack-exchange might say.
We're writing an API for a system, there is a query that should return a tree of Organization or a…
Loïc Faure-Lacroix
- 1,644
75
votes
6 answers
Is there a point to unit tests that stub and mock everything public?
When doing unit tests the "proper" way, i.e. stubbing every public call and return preset values or mocks, I feel like I'm not actually testing anything. I'm literally looking at my code and creating examples based on the flow of logic through my…
enthrops
- 853
75
votes
32 answers
What's a nice explanation for pointers?
In your own studies (on your own, or for a class) did you have an "ah ha" moment when you finally, really understood pointers? Do you have an explanation you use for beginner programmers that seems particularly effective?
For example, when beginners…
Macneil
- 8,223
75
votes
11 answers
Why are cryptic short identifiers still so common in low-level programming?
There used to be very good reasons for keeping instruction / register names short. Those reasons no longer apply, but short cryptic names are still very common in low-level programming.
Why is this? Is it just because old habits are hard to break,…
Roman Starkov
- 4,469
75
votes
14 answers
At which point do you "know" a technology enough to list it on a resume
I recently had a programmer in for an interview, who listed Python, PHP, Rails and ASP as a few of their skills. In the interview however, they interviewee didn't enough know what control structures and basic logic were, they had only followed a few…
Brandon - Free Palestine
- 5,863
75
votes
17 answers
How important is self-teaching in the programming field?
I'm 16. I started programming about a year ago when I was about to start high-school. I'm going for a career in programming, and I'm doing my best to learn as much as I can. When I first started, I learned the basics of C++ from a book and I started…
Bugster
- 4,013
- 8
- 38
- 44