pitfalls

What C++ pitfalls should I avoid ?

I remember first learning about vectors in the STL and after some time, I wanted to use a vector of bools for one of my projects. After seeing some strange behavior and doing some research, I learned that a vector of bools is not really a vector of bools. Anyone out there have any other common pitfalls to avoid in C++? ...

Any tips for managing a project with basecamp?

I'm going to be using basecamp for the first time on new project. Does anyone have any good tips / pitfalls for using basecamp. For example, can you end up spending more time playing with the to-do lists than actually getting on with the project? ...

When is it ok to use a global variable in C?

Apparently there's a lot of variety in opinions out there, ranging from, "Never! Always encapsulate (even if it's with a mere macro!)" to "It's no big deal - use them when it's more convenient than not." So. Specific, concrete reasons (preferably with an example) Why global variables are dangerous When global variables should be use...

What are the most common mistakes made in WPF development?

This question intends to provide a list of solutions to common pitfalls, "gotcha's", or design issues when developing WPF applications. This can also include proper design-patterns as long as there is an explanation as to why it works best. Responses should be voted up or down based on how common the type of issue is. Here are the rules:...

Programming by guessing/hoping

The Visual Studio IDE gives the developer almost instant feedback as to whether or not a block of code is correct or a program runs correctly. This usually leads to programming by guessing... The programmer thinks to themselves, "Maybe the intellisense will tell me it's right if I do it like this..." or "Maybe if I change this constant ...

Ruby on Rails: Common pitfalls/gotchas

There is a similar question about Ruby in general but I am soon to be starting out using Ruby on Rails to develop a website or two. What are the common pitfalls/gotchas that are specific to Rails. ...

MS Access as Enterprise Software?

Something that I often run into with my users is their desire to aquire solutions quickly means that they sometimes have said "Heck, I'll just roll up my sleeves and do it in Access - it's installed on my desktop". Sometimes, we're lucky and the person that creates the Access database back-ends it to a SQL Server, so at least the mdb fi...

What are common concurrency pitfalls?

I'm looking into educating our team on concurrency. What are the most common pitfalls developers fall into surrounding concurrency. For instance, in .Net the keyword static opens the door to a lot of concurrency issues. Are there other design patterns that are not thread safe? Update There are so many great answers here it is difficul...

What are the Pitfalls of using a shared static WCF Proxy Client?

I am considering using a Shared (read static) WCF proxy client for a high throughput application. I believe there is a performance gain in doing this, but I have not benchmarked this as yet. Are there some serious pitfalls to this idea? From my research I can see that there is the issue of handling the fault state, it is not clear wh...

Pitfalls for OO Programmer Learning the Functional Way?

I've been programming Java for a few years now, and I've dabbled in functional programming now and again. I'm thinking I should learn how to do the functional thing properly after having 'fun' with XQuery, so... Are there traps my OO way of thinking can lead me into when I'm writing in a functional way? ...

LINQ to SQL pitfalls

What are the major pitfalls that would make you think twice about using LINQ to SQL in an enterprise/non-trivial system? I know it lacks the power and flexibility of NHibernate, but I'm not clear on the major reasons why you wouldn't want to use LINQ to SQL in an enterprise app. ...

C macro pitfalls

Duplicate: Good Programming Practices for Macro Definitions (#define) in C C (and by extension C++) macros are laden with pitfalls and practical problems when not implemented properly. Take, for example, the macro #define cube(x) x*x*x What is wrong with it? Where will it fail? When can unexpected results be returned? What is ...

Pitfalls of code coverage

I'm looking for real world examples of some bad side effects of code coverage. I noticed this happening at work recently because of a policy to achieve 100% code coverage. Code quality has been improving for sure but conversely the testers seem to be writing more lax test plans because 'well the code is fully unit tested'. Some logical ...

What are the common mistakes that causes the code in Java is not thread safe?

Duplicate: What is the most frequent concurrency problem you’ve encountered in Java? I've been thinking of list of common programming mistakes/pitfalls that causes the code in Java is not thread safe. Here are the common ones that I encountered in the code through the recent years of Java development. Using non-static fields within ...

Are there any good resources for transitioning from Java/C# to PHP

OK, so I see that there are a few articles for transitioning from PHP to Java, but I am going the other way around. I have experience with developing with C# and Java applications (these languages have roughly similar architectures). I have recently begun to work with PHP, and there are a few things which seem very unusual from the JA...

How do different languages handle the "dangling else"?

I often see the dangling else handled as: if (x > 0) if (y > 0) print "hello" else print "world" the parser or interpreter will actually match the else with the closest if statement, which is the "if (y > 0)". Does any language have the pitfall of actually matching the else with the outer if or the farthest if? (except the o...

PHP quirks and pitfalls

I've realized that, although most of my experience consists in writing PHP applications, I find myself making "beginner mistakes" from time to time. This because PHP is a language that has grown very organically and as such has some idiosyncrasies, quirks and pitfalls that I don't know about. I'd like this question to be a wiki for all ...

jQuery pitfalls to avoid

I am starting a project with jQuery. What pitfalls/errors/misconceptions/abuses/misuses did you have in your jQuery project? ...

Python differences: a+= [b] vs a = a + [b] ...

Edited: Why is there a different output in these two cases? class foo: bar = [] def __init__(self,x): self.bar += [x] class foo2: bar = [] def __init__(self,x): self.bar = self.bar + [x] f = foo(11) g = foo(12) print f.bar print g.bar f = foo2(11) g = foo2(12) print f.bar print g.bar ...

Store data series in file or database if I want to do row level math operations?

I'm developing an app that handle sets of financial series data (input as csv or open document), one set could be say 10's x 1000's up to double precision numbers (Simplifying, but thats what matters). I plan to do operations on that data (eg. sum, difference, averages etc.) as well including generation of say another column based on co...