Best practices and common mistakes

TwitterFacebook
Get flash to fully experience Pearltrees

12 common programming mistakes to avoid | Geek Files

Programming is an art and science and like all art and science the only way to learn is from mistakes. I have made many… and I would like to share with you the mistakes that I have made over my journey with development. These are some of the most common programming mistakes made by developers (including me) and how to avoid them (not listed in any specific order) 1. Improper or No comments http://www.sunilb.com/programming/12-common-programming-mistakes-to-avoid
In software engineering , Don't Repeat Yourself ( DRY ) is a principle of software development aimed at reducing repetition of information of all kinds, especially useful in multi-tier architectures . The DRY principle is stated as "Every piece of knowledge must have a single, unambiguous, authoritative representation within a system."

Don't repeat yourself - Wikipedia, the free encyclopedia

http://en.wikipedia.org/wiki/Don%27t_repeat_yourself
by Miško Hevery

How to think about OO

http://googletesting.blogspot.com/2009/07/how-to-think-about-oo.html

Flaw: Brittle Global State & Singletons

Accessing global state statically doesn’t clarify those shared dependencies to readers of the constructors and methods that use the Global State. Global State and Singletons make APIs lie about their true dependencies. http://misko.hevery.com/code-reviewers-guide/flaw-brittle-global-state-singletons/
by Miško Hevery Recently many of you, after reading Guide to Testability , wrote to telling me there is nothing wrong with static methods. After all what can be easier to test than Math.abs() !

Static Methods are Death to Testability

http://misko.hevery.com/2008/12/15/static-methods-are-death-to-testability/
Procedural languages allowed us to remove GOTOs in our code. I would like to think that OO languages allow us to remove IFs (conditionals).

Procedural Language Eliminated GOTOs; OO Eliminated IFs

http://misko.hevery.com/2008/08/14/procedural-language-eliminated-gotos-oo-eliminated-ifs/
http://misko.hevery.com/2009/07/31/how-to-think-about-oo/ Everyone seems to think that they are writing OO after all they are using OO languages such as Java, Python or Ruby.

How to think about OO

http://java.dzone.com/articles/how-think-about-oo

How To Think About OO | Javalobby

We Recommend These Resources Everyone seems to think that they are writing OO after all they are using OO languages such as Java, Python or Ruby. But if you exam the code it is often procedural in nature.

Falsehoods Programmers Believe About Names: MicroISV on a Shoestring

http://www.kalzumeus.com/2010/06/17/falsehoods-programmers-believe-about-names/ [This post has been translated into Japanese by one of our readers: 和訳 もあります。]
There's an election coming up in Thailand on December 23rd and the streets are lined with election posters. As a bit of an i18n geek, I find it interesting that the posters almost all make the candidates' first names at least twice as big as their last names. If you're also an i18n geek, your reaction might well be: "it must be because Thais write their family name first, followed by their given name". But you would be wrong. Thais have a given name and a family name; the given name is written first, and the family name last.

Thai personal names - James Clark's Random Thoughts

‘Real’ names online, part 2 : defining ‘real’ - A Modern Hypatia

Before we get into the more interesting meat of the topic (which will follow next week), I want to go into a digression about the problem of ‘real names’. First problem: What does a ‘real name’ look like? We like to think that we know them when we see them. But really, we don’t.
I’ve been watching the conversations about the new RealID additions on the Blizzard forums with some interest, because they tie into a much larger conversation about online interactions and anonymity and pseudonymity. So, in the next week or so, a few posts about first, some background, and then some specific concerns and considerations around the use of real-world identifying names online. Why does this matter on a librarian’s blog? Well, first, because I use the ‘Net, and I’m fascinated by how other people use it, and about how to help give people tools to make informed choices for their use of it. But also because I think this is one of the major freedom of information issues of at least the next decade: how do we balance a desire for sincere conversation, with meaning and history and in the context of a particular community, with the reality that some people will abuse, harass, intimidate, or otherwise seek to harm others.

Background (‘real’ names online : part 1) « A Modern Hypatia

C'est en tout cas le point de vue du W3C qui vient de publier une page de conseils. Le point central est de rappeler que la notion de « patronyme » varie avec les cultures et les pays. Un développeurs ayant travaillé sur le système de réservation des JO de Pékin rappelait par exemple que demander son nom à un utilisateur en Chine était moins pertinent qu'en Europe. Cinq à dix patronymes couvriraient en effet la quasi totalité de la population (Li, Wang, Chen, Zhang, etc.).

Comment les noms diffèrent à travers le monde ? Le W3C se penche sur les implications pour les formulaires et bases de données Web