105
votes
16answers
3k views

Does craftsmanship pay off? [duplicate]

Possible Duplicates: Prototyping vs. Clean Code at the early stages Frankly, do you prefer Cowboy coding? After working in a number of companies, I am starting to realize that my ...
104
votes
16answers
8k views

How to avoid “DO YOU HAZ TEH CODEZ” situations?

I have a strange situation at work, where a colleague of mine often asks me and other co-workers for working code. I would like to help him, but this constant request of trivial snippets interrupts ...
104
votes
8answers
8k views

Why does the US government disallow dynamic languages for secure projects?

I know some people that are currently working on a project for the US military (low security level, non-combat human resources type data). An initial state of the project code was submitted to the ...
104
votes
17answers
17k views

Why is Global State so Evil?

Before we start this, let me say I'm well aware of the concepts of Abstraction and Dependency Injection. I don't need my eyes opened here. Well, most of us say, (too) many times without really ...
104
votes
12answers
10k views

Effective Strategies for Localization in .NET

I am developing the UI for a .NET MVC application that will require international localization of all content in the near future. I am very familiar with .NET in general but have never had a project ...
103
votes
18answers
8k views

Can a function be too short?

Whenever I find myself writing the same logic more than once, I usually stick it in a function so there is only one place in my application I have to maintain that logic. A side effect is that I ...
103
votes
20answers
93k views

When to favor ASP.NET WebForms over MVC

I know that Microsoft has said ASP.NET MVC is not a replacement for WebForms. And some developers say WebForms is faster to develop on than MVC. But I believe speed of coding comes down to ...
100
votes
20answers
5k views

Project Manager that wants to lock in time estimate with a signed contract

At a previous employment, a project manager (PM) wasn't satisfied with the delivery time of the code on a project I was on. I was told by my project lead that that the PM was considering having me ...
100
votes
22answers
11k views

Do job postings exaggerate their requirements? [closed]

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 ...
99
votes
8answers
10k views

How to avoid being forked into oblivion by a more powerful contributor?

As recently reported here: Xamarin has forked Cocos2D-XNA, a 2D/3D game development framework, creating a cross-platform library that can be included in PCL projects. However the founder of ...
98
votes
60answers
9k views

Which things instantly ring alarm bells when looking at code? [closed]

I attended a software craftsmanship event a couple of weeks ago and one of the comments made was "I'm sure we all recognize bad code when we see it" and everyone nodded sagely without further ...
98
votes
18answers
6k views

When should I make the first commit to source control?

I'm never sure when a project is far enough along to first commit to source control. I tend to put off committing until the project is 'framework-complete,' and I primarily commit features from then ...
98
votes
16answers
5k views

Should I remove unreferenced code?

I'm working on a medium sized (100k lines) code base, it's all relatively recent code (less than a year old) and has good unit test coverage. I keep coming across methods which are either no longer ...
98
votes
16answers
5k views

How do you store “fuzzy dates” into a database?

This is a problem I've run into a few times. Imagine you have a record that you want to store into a database table. This table has a DateTime column called "date_created". This one particular record ...
97
votes
16answers
14k views

How can I tell in an interview if a programmer is passionate about programming?

While most interview questions are focused on current knowledge of a candidate or check his/her skill to solve algorithmic problems I would like to hire a developer who is passionate about ...
97
votes
10answers
26k views

Is Ken Thompson's compiler hack still a threat?

Ken Thompson Hack (1984) Ken Thompson outlined a method for corrupting a compiler binary (and other compiled software, like a login script on a *nix system) in 1984. I was curious to know if modern ...
96
votes
11answers
59k views

How can I teach a bright person, with no programming experience, how to program? [closed]

I have been asked to take a person in our IT department who has no programming experience but is a smart and capable person and help him move into programming at lets say an entry level developer ...
96
votes
14answers
41k views

What is the advantage of currying?

I just learned about currying, and while I think I understand the concept, I'm not seeing any big advantage in using it. As a trivial example I use a function that adds two values (written in ML). ...
95
votes
17answers
8k views

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, ...
95
votes
12answers
39k 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 ...
95
votes
22answers
7k views

Elegant ways to handle if(if else) else

This is a minor niggle, but every time I have to code something like this, the repetition bothers me, but I'm not sure that any of the solutions aren't worse. if(FileExists(file)) { contents = ...
95
votes
10answers
4k views

TDD vs. Productivity

In my current project (a game, in C++), I decided that I would use Test Driven Development 100% during development. In terms of code quality, this has been great. My code has never been so well ...
94
votes
3answers
42k 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 ...
94
votes
5answers
21k views

Scheme vs Common Lisp: Which characteristics made a difference in your project? [closed]

There are no shortage of vague "Scheme vs Common Lisp" questions on both StackOverflow and on this site, so I want to make this one more focused. The question is for people who have coded in both ...
93
votes
14answers
13k views

Learn programming backwards, or “so I failed the FizzBuzz test. Now what?”

A Little Background I'm 28 today, and I've never had any formal training in software development, but I do have two higher education degrees equivalent to a B.A in Public Relations and an Executive ...
93
votes
10answers
13k views

How accurate is “Business logic should be in a service, not in a model”?

Situation Earlier this evening I gave an answer to a question on StackOverflow. The question: Editing of an existing object should be done in repository layer or in service? For example ...
92
votes
24answers
48k views

Why are data structures so important in interviews?

I am a newbie into the corporate world recently graduated in computers. I am a java/groovy developer. I am a quick learner and I can learn new frameworks, APIs or even programming languages within ...
92
votes
8answers
14k views

Why is polling accepted in web programming?

I am currently working on a Ruby on Rails project which shows a list of images. A must-have for this project is that it shows new posts in realtime without the need of refreshing the web page. After ...
92
votes
18answers
13k views

How to market yourself as a software developer? [closed]

I have noticed that this is a frequent issue among younglings from technical areas such as ours. In the beginning of our careers we simply don't know how to sell ourselves to our employers, and ...
92
votes
9answers
7k views

Am I too young to burn out? [closed]

I feel like I have burned out, even though I am only out of college for 5 years. For the first 3 years of my career, things were going awesome. I was never anything special in school, but I felt ...
91
votes
17answers
6k views

Being stupid to get better productivity?

I've spent a lot of time reading different books about "good design", "design patterns", etc. I'm a big fan of the SOLID approach and every time I need to write a simple piece of code, I think about ...
91
votes
13answers
9k views

I'm in over my head at my job. What should I do? [closed]

About 8 months ago I was hired as the sole developer at a small company to take on a certain project. Although there are other small projects that come up from time to time, I've been spending about ...
90
votes
19answers
42k views

Why are interfaces useful?

I have been studying and coding in C# for some time now. But still, I can't figure the usefulness of Interfaces. They bring too little to the table. Other than providing the signatures of function, ...
90
votes
27answers
16k views

Why do people use programming books? [closed]

I find that when someone asks what is the best way to learn how to program, people usually provide them with references to a bunch texts written by various authors. However I don't believe many ...
89
votes
21answers
7k views

What's the benefit of avoiding the use of a debugger?

Over the course of my career, I've noticed that some developers don't use debugging tools, but do spot checking on erroneous code to figure out what the problem is. While many times being able to ...
89
votes
16answers
23k views

What functionality does dynamic typing allow?

I've been using python for a few days now and I think I understand the difference between dynamic and static typing. What I don't understand is under what circumstances it would be preferred. It is ...
88
votes
14answers
10k views

Is it illegal to rewrite every line of an open source project in a slightly different way, and use it in a closed source project?

There is some code which is GPL or LGPL that I am considering using for an iPhone project. If I took that code (JavaScript) and rewrote it in a different language for use on the iPhone would that be ...
88
votes
25answers
9k views

How do programmers quit a job? [closed]

I'm thinking about leaving my current employer and wondering how one goes about that process in the programming world. We have a lot of projects on the go at the moment and I'm the only developer. We ...
88
votes
14answers
8k views

Why do most programming languages only support returning a single value from a function?

Is there a reason why functions in most(?) programming languages are designed to support any number of input parameters but only one return value? In most languages, it is possible to "work around" ...
88
votes
6answers
5k views

Ship of Theseus applied to GPL - Can I relicense my program if I replace all of the derivative parts?

I translated a GPLv2 C program to Python, but found it was hard to extend as designed and rewrote significant portions of it. The program is now structurally completely different, but there are ...
87
votes
14answers
16k views

What triggered the popularity of lambda functions in modern mainstream programming languages?

In the last few years anonymous functions (AKA lambda functions) have become a very popular language construct and almost every major / mainstream programming language has introduced them or is ...
87
votes
10answers
6k views

What should I do when I've already waited too long between commits?

I was naughty... Too much "cowboy coding," not enough committing. Now, here I am with an enormous commit. Yes, I should have been committing all along, but it's too late now. What is better? Do one ...
87
votes
29answers
12k views

How do you manage your knowledge base? [closed]

As programmers we have a lot of inputs: Ebooks Code snippets Interesting emails Documents Web articles Blog posts StackOverflow questions Podcasts ... Which tools do you use to store, ...
87
votes
11answers
11k views

The modern way to perform error handling…

I've been pondering this problem for a while now and find myself continually finding caveats and contradictions, so I'm hoping someone can produce a conclusion to the following: Favour exceptions ...
87
votes
4answers
29k views

Difference between Dependency Injection (DI) & Inversion of Control (IOC)

I've been seeing a lot of references of Dependency Injection (DI) & Inversion Of Control (IOC), but I don't really know if there is a difference between them or not. I would like to start using ...
86
votes
12answers
6k views

Should the commit history be used to convey critical information to developers?

During a meeting regarding the rollback of a third-party SDK from the latest version it was noted that the our developers already flagged in the commit history that the latest version should not be ...
86
votes
17answers
23k views

Is it a good idea to design an architecture thinking that the User Interface classes can be replaced by a command line interface?

In Code Complete page 25, it's said that it's a good idea to be able to easily replace the regular user interface classes by a command line one. Knowing its advantages for testing, what about the ...
86
votes
10answers
40k views

What is MVC, really? [closed]

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 ...
86
votes
15answers
6k views

How can I convince management to deal with technical debt?

This is a question that I often ask myself when working with developers. I've worked at four companies so far and I've become aware of a lack of attention to keeping code clean and dealing with ...
86
votes
12answers
5k views

Best practices for sharing tiny snippets of code across projects

I always try to follow the DRY principle strictly at work; every time I've repeated code out of laziness it bites back later when I need to maintain that code in two places. But often I write small ...

15 30 50 per page