pitfalls

Library implementation pitfalls

What practices should developers avoid when implementing libraries? For example, libraries should not use the following (or default usage should be disabled): System.err System.out exception.printStackTrace System.exit The developer of an application needs full control over the text that is presented to the user (language being one r...

Pointers for a C# Developer Learning Ruby on Rails

I've spent the majority of my professional career developing in C#. To broaden my abilities I've recently begun learning Ruby on Rails. Thus far I've found scaffolding a basic CRUD app in RoR to be easy and fun. I am well aware that I have barely scratched the surface of what RoR is capable of but am curious if there is anything I should...

Common Pitfalls in BASH programming

I am not able to find this particular discussion in SO. What are all the common mistakes and pitfalls in the BASH programming / shell scripting? PS: Please close if this has been discussed already. ...

Transitioning from .NET to Lisp. Has anybody here done it?

I use ASP.NET during my day job, but I'm always looking to expand my programming knowledge. I've tinkered with everything from Ruby to 6502 assembly language, and now I want to learn Lisp. I guess I have Paul Graham to blame for that. I've heard about "Practical Common Lisp" and I know how to Google, but I'm curious if there are any ....

What to avoid in php/mysql/ajax when relying on heavy reads/writes

Hi, i was wondering what the main things were to avoid when creating an webapplication that relies on heavy reads and writes every second. Think of online gaming where money is involved. For example you have an javascript that constantly updates the browser(1), There is a cronjob running that updates the db(2), There is user input subm...

What are disadvantages of JavaFX and Silverlight?

JavaFX is a new technology introduced by Sun. I would like to know what are the limitations and pitfalls of JavaFX and silverlight......... ...

Apache Velocity performance pitfalls?

We are using Apache Velocity for website templates and some of them are getting complex. Have you noticed any performance issues with certain Velocity features? And how did you get around them? ...

Regex common pitfalls/gotchas (Java flavor)

Are there common patterns that people often use regex for (Java flavor) that is usually: incorrect due to various corner cases (but works "most of the time") correct but very slow etc... Also, more generally, what other tips are there for people who use regex-es in Java? I find that I often struggle due to: lack of named capturing ...

Iphone store image (pitfalls ?)

I have an application that loads images from the net and stores it on the app's documents directory so when the users starts up the application and doesn't have internet they still can use the application. but my question is .. does the iphone controls that document directory ? does it clears itself after a certain period or after a c...

Common WPF pitfalls

I want to gather a list of WPF pitfalls. Issues with WPF that are not that well known and either have some serious design consequences or some major inconveniences. One topic per answer. List: WPF doesn't call your dependency property getters and setters. Mouse.GetPosition() does not always return a correct value. WPF and Winforms ca...

What code have you written with #pragma you found useful?

I've never understood the need of #pragma once when #ifndef #define #endif always works. I've seen the usage of #pragma comment to link with other files, but setting up the compiler settings was easier with an IDE. What are some other usages of #pragma that is useful, but not widely known? Edit: I'm not just after a list of #pragma d...

What are the top javascript pitfalls?

I'm planing on giving an introduction talk on JavaScript and in the preparation process I wondered what the top pitfalls are that rookies fall into. I know I've had a few gotchas before I fully understood closure, but much of the strange behavior in JavaScript is not something I think about any more... So, which pitfalls should you def...

What are the pitfalls to watch out for when upgrading MediaWiki?

We've got MediaWiki 1.13.2 and we'll soon be upgrading to the latest & greatest version (probably 1.16). We've got lots of extensions installed (for which we'll probably also need to get the latest versions) and we've done some minor configuring (e.g. adding new edit buttons). What should we watch out for during the upgrade? And what ...

Which articles I've should read before starting to make my custom drawn winforms app?

Hello! I'm currently developing a windows forms application with a lot of user controls. Some of them are just custom drawn buttons or panels and some of them are a compositions of these buttons and panels inside of FlowLayoutPanels and TableLayoutPanels. And the window itself is also custom drawn. I don't have much experience in winfor...

Common MVC 2 Pitfalls

I'm surprised this hasn't been asked before...or maybe I just don't see it. Anyway, I'm finally straying from the comfort of ASP.NET Web Forms and exploring the world of MVC2. I've done the nerdinner walk-through and it was fairly straightforward. Now I am getting a little more adventurous and building an MVC2 app on my own and would li...

Objective-C Dot Syntax and Init

I have read a number of snippets that mention you should never use dot-notation within your init or dealloc methods. However, I can never seem to find out why. One post did mention in passing that it has to do with KVO, but no more. @interface MyClass : NSObject { SomeObject *object_; } @property (nonatomic, retain) SomeObject *obje...

Switch from C# to Java, which "gotchas" I should care?

I'll maybe have to switch to Java for new project. I have very few experiences about Java, because I've mainly studied and used C#, and I'm afraid of the differences between these two language/platform should likely to cause me many problems. Which are pitfalls/gotchas I should care about? ...

Things to avoid in Python

Possible Duplicate: Common pitfalls in Python Hello all, inspired by this question Fastest way to learn Python? I've read the Dive into Python 3 webpage. I learned the basics, wrote a few simple programs and started to like the language. However i also started running into bugs, i did things wrong and my programs did not work...

Pitfalls of number values in Python, "How deep?"

I'm a fairly green programmer, and I'm learning Python right now. I'm up to chapter 17 in "Learn to Think Like a Computer Scientist" (Classes and Methods), and I just wrote my first doctest that failed in a way I truly do not fully understand: class Point(object): ''' represents a point object. attributes: x, y ''' ...

When can optimizations done by the compiler destroy my C++ code?

Hello, When can optimizations done by the compiler cause my C++ code to exhibit wrong behaviour which would not be present had those optimizations not been performed? For example, not using volatile in certain circumstances can cause the program to behave incorrectly (e.g. not re-reading the value of a variable from memory and instead o...