153
votes
11answers
28k views

Strategy for keeping secret info such as API keys out of source control?

I'm working on a website that will allow users to log in using OAuth credentials from the likes of Twitter, Google, etc. To do this, I have to register with these various providers and get a super-...
152
votes
11answers
75k views

How can I find a good open source project to join? [closed]

I just started working a year ago, and I want to join an open source project for the same reasons as anyone else: help create something useful and develop my skills further. My problem is, I don't ...
151
votes
3answers
81k views

Is Entity Framework Suitable For High-Traffic Websites?

Is Entity Framework 4 a good solution for a public website with potentially 1000 hits/second? In my understanding EF is a viable solution for mostly smaller or intranet websites, but wouldn't scale ...
151
votes
6answers
31k views

Is every language written in C?

Sometimes while programming in different languages (C/C++, C#), this thought comes to my mind: Is each and every language written in the C programming language? Is the C language the mother/father ...
151
votes
13answers
10k views

If my team has low skill, should I lower the skill of my code? [closed]

For example, there is a common snippet in JS to get a default value: function f(x) { x = x || 'default_value'; } This kind of snippet is not easily understood by all the members of my team, ...
150
votes
11answers
19k views

How do operating systems… run… without having an OS to run in?

I'm really curious right now. I'm a Python programmer, and this question just boggled me: You write an OS. How do you run it? It has to be run somehow, and that way is within another OS? How can an ...
148
votes
20answers
12k views

How do quick & dirty programmers know they got it right?

If you ask programmers why they should write clean code, the number one answer you get is maintainability. While that's on my list, my main reason is more immediate and less altruistic: I can't tell ...
148
votes
26answers
17k views

Is constantly looking for code examples a sign of a bad developer? [closed]

I am a CS student with several years of experience in C and C++, and for the last few years I've been constantly working with Java/Objective C doing app development and now I have switched to web ...
147
votes
24answers
143k views

What are the drawbacks of Python? [closed]

Python seems all the rage these days, and not undeservingly - for it is truly a language with which one almost enjoys being given a new problem to solve. But, as a wise man once said (calling him a ...
146
votes
13answers
81k views

Why use a database instead of just saving your data to disk?

Instead of a database I just serialize my data to JSON, saving and loading it to disk when necessary. All the data management is made on the program itself, which is faster AND easier than using SQL ...
146
votes
15answers
17k views

Are 9 to 5 programmers looked down upon?

I would consider myself a 9 to 5 programmer. What I mean by this, is that I have a programming job, but after I leave work, I leave my work there and do not take it home. I very much enjoy my career ...
146
votes
3answers
9k views

Should I keep my GitHub forked repositories around forever?

So I've forked someone else's repository, made a few changes, submitted a pull request, and my changes made it into the product. Great! But...what should I do with my forked repository? Is there a ...
145
votes
19answers
145k views

Is there any reason to use C++ instead of C, Perl, Python, etc.? [closed]

As a Linux (server side) developer, I don't know where and why should I use C++. When I'm going for performance, the first and last choice is C. When "performance" isn't the main issue, programming ...
145
votes
30answers
31k views

How many hours can you be really productive per day? How? [closed]

I find that I'm having a great deal of trouble staying alert 8 hours per day. I've heard of people who've negotiated work contracts of just 4 hours/day, arguing that they won't be able to do much more ...
145
votes
31answers
54k views

How do you dive into large code bases?

What tools and techniques do you use for exploring and learning an unknown code base? I am thinking of tools like grep, ctags, unit-tests, functional test, class-diagram generators, call graphs, ...
144
votes
13answers
14k views

Is it just me or is this a baffling tech interview question? [closed]

Background I was just asked in a tech interview to write an algorithm to traverse an "object" (notice the quotes) where A is equal to B and B is equal to C and A is equal to C. That's it. That is ...
142
votes
87answers
11k views

How to become a “faster” programmer?

My last job evaluation included just one weak point: timeliness. I'm already aware of some things I can do to improve this but what I'm looking for are some more. Does anyone have tips or advice on ...
142
votes
10answers
109k views

What is MVC, really?

As a serious programmer, how do you answer the question What is MVC? In my mind, MVC is sort of a nebulous topic — and because of that, if your audience is a learner, then you're free to ...
142
votes
9answers
131k views

Aggregation vs Composition

I understand what composition is in OOP, but I am not able to get a clear idea of what Aggregation is. Can someone explain?
141
votes
28answers
37k views

How to be a zero-bug programmer? [closed]

My boss has always told me that a good programmer should be able to ensure that the code he or she changes is reliable, correct, and thoroughly self-verified; that you should completely understand all ...
141
votes
21answers
7k views

How do you maintain focus when a particular aspect of programming takes 10+ seconds to complete? [closed]

I have a very difficult time focusing on what I'm doing (programming-wise) when something (compilation, startup time, etc.) takes more than just a few seconds. Anecdotally it seems that threshold is ...
141
votes
7answers
164k views

When do you use float and when do you use double

Frequently in my programming experience I need to make a decision whether I should use float or double for my real numbers. Sometimes I go for float, sometimes I go for double, but really this feels ...
140
votes
9answers
128k views

What's the difference between Entry Level/Jr/Sr developers? [closed]

Other than title and pay, what is the difference? What different responsibilities do they have, how knowledgeable/experienced are they? Basically what would you use to determine which one you (or ...
140
votes
9answers
11k views

Is there a specific reason for the poor readability of regular expression syntax design?

Programmers all seem to agree that readability of code is far more important than short-syntaxed one-liners which work, but require a senior developer to interpret with any degree of accuracy - but ...
140
votes
17answers
42k views

Why are part-time jobs in programming an anomaly? [closed]

I've recently quit my full time developing job at mega-corp, and I decided that I'll look for a part time job. Since then I've talked to half a dozen potential employers, and every one of them had the ...
140
votes
5answers
55k views

Choosing between Single or multiple projects in a git repository?

In a git environment, where we have modularized most projects, we're facing the one project per repository or multiple projects per repository design issue. Let's consider a modularized project: ...
139
votes
12answers
24k views

Why does it matter that HTML and CSS are not programming languages?

Example here: What languages should I know if I'm interested in building web applications ? Yes, I understand that HTML and CSS are not Turing-complete. Yes, I understand that they are declarative, ...
139
votes
13answers
91k views

Why do we need private variables?

Why do we need private variables in classes? Every book on programming I've read says this is a private variable, this is how you define it but stops there. The wording of these explanations always ...
139
votes
18answers
11k views

How to keep a big and complex software product maintainable over the years?

I have been working as a software developer for many years now. It has been my experience that projects get more complex and unmaintainable as more developers get involved in the development of the ...
139
votes
6answers
13k views

How to break up a programming project into tasks for other developers? [closed]

I have recently joined a development project and was suddenly given the job of lead developer. My primary responsibility is to break up the programming part of the project into tasks, give these tasks ...
139
votes
3answers
23k views

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? ...
138
votes
14answers
22k views

Why does Uncle Bob suggest that coding standards shouldn't be written down if you can avoid it?

While I was reading this question, the top voted answer quoted Uncle Bob on coding standards, but I was confused by this tip: Don't write them down if you can avoid it. Rather, let the code be ...
137
votes
25answers
13k views

Is it “normal” for people to not work?

After graduating from college I was hired as a junior programmer a little over a year ago. I quickly noticed that I was degrees of magnitude faster than all the other programmers; this seems to be ...
137
votes
10answers
51k views

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. ...
137
votes
22answers
23k views

Stuck due to “knowing too much” [closed]

Note more discussion at http://news.ycombinator.com/item?id=4037794 I have a relatively simple development task, but every time I try to attack it, I end up spiraling in deep thoughts - how could it ...
137
votes
6answers
22k views

SOLID Principles and code structure

At a recent job interview, I couldn't answer a question about SOLID -- beyond providing the basic meaning of the various principles. It really bugs me. I have done a couple of days worth of digging ...
136
votes
31answers
15k views

Is micro-optimisation important when coding?

I recently asked a question on Stack Overflow to find out why isset() was faster than strlen() in PHP. This raised questions around the importance of readable code and whether performance improvements ...
136
votes
20answers
26k views

Interesting interview question [closed]

Today I was asked this question. We have 2 cases with code blocks A, B and C. These code blocks don't share any resources except an iterator (int i). Please give 3 possible reasons why case 1 could ...
136
votes
14answers
8k views

Simple method for reliably detecting code in text?

GMail has this feature where it will warn you if you try to send an email that it thinks might have an attachment. Because GMail detected the string see the attached in the email, but no actual ...
135
votes
8answers
63k views

What does C++ do better than D?

I have recently been learning D and am starting to get some sort of familiarity with the language. I know what it offers, I don't yet know how to use everything, and I don't know much about D idioms ...
134
votes
11answers
20k views

Should I stop using the term C/C++?

I understand C and C++ are different languages but when I was learning C++ I was always told that C is a subset of C++ or C++ is C with classes. And that was quite true until the appearance of C++x0, ...
134
votes
17answers
43k views

Are #regions an antipattern or code smell?

C# allows the use of #region/#endregion keywords to make areas of code collapsible in the editor. Whenever I do this though I do it to hide large chunks of code that could probably be refactored into ...
133
votes
13answers
34k views

Is it OK to split long functions and methods into smaller ones even though they won't be called by anything else? [duplicate]

Lately I've been trying to split long methods into several short ones. For example: I have a process_url() function which splits URLs into components and then assigns them to some objects via their ...
133
votes
5answers
27k views

What exactly makes the Haskell type system so revered (vs say, Java)?

I'm starting to learn Haskell. I'm very new to it, and I am just reading through a couple of the online books to get my head around its basic constructs. One of the 'memes' that people familiar with ...
132
votes
14answers
43k views

“Never do in code what you can get the SQL server to do well for you” - Is this a recipe for a bad design?

It's an idea I've heard repeated in a handful of places. Some more or less acknowledging that once trying to solve a problem purely in SQL exceeds a certain level of complexity you should indeed be ...
132
votes
6answers
17k views

Why hasn't a faster, “better” language than C come out? [closed]

With all the new "modern" languages out today, how is it that C is still heralded as the fastest and "closest to the machine"? I don't really believe in there ever being only one correct way to do ...
130
votes
45answers
40k views

Does giving a developer a slower development machine result in faster/more efficient code? [closed]

Suppose I give my developers a screaming fast machine. WPF-based VS2010 loads very quickly. The developer then creates a WPF or WPF/e application that runs fine on his box, but much slower in the ...
130
votes
6answers
23k views

How much should I be using 'let' vs 'const' in ES6?

I've been writing a lot of ES6 code for io.js recently. There isn't much code in the wild to learn from, so I feel like I'm defining my own conventions as I go. My question is about when to use const ...
129
votes
34answers
6k views

How do you make people accept code review? [duplicate]

All programmers have their style of programming. But some of the styles are let’s say... let’s not say. So you have code review to try to impose certain rules for good design and good programming ...
129
votes
16answers
22k views

Is there any way to get faster at solving bugs? I've just had a warning from my boss [closed]

I've just been told by my boss that I will receive a negative performance review on Monday. He wants to talk to me about why I am so slow and why my bug fix rate is so low. I love programming and ...

15 30 50 per page