At the office I’m working on a big website, with a blog, a forum, other things, and a “shared” user system: so you only have to sign in once and you can surf from one module to another (blog, forum) without the need of signing in again. The client wanted standard and well known modules (like “wordpress” or “phpbb”). Because of this I’m studing the inner operation of these web applications. The idea is to bypass or to change its login system and to use mine.
Surprisingly I have discovered some lack of proffesionality in the database definition of “phpbb”. The user’s table allow to have duplicated login names! Even more, the “login” field is not the “primary key”. I don’t remember the whole details about database creation, which I studied in my degree, but the first rule was “if you have a field which defines without confusions an entity (a row), you have to use it as the primary key of the table“. For example, the national id number for persons, or the reference number for a bill, or the login for users of a computer system. “If you don’t find a clear field to define a row, you can create an ‘id’ field, defined as an autoincremental integer“. But I have seen a lot of people applying the second, without thinking. It’s easy to always create an ‘id’ field and avoid thinking about the basics… to be careless. But for me it’s not the correct option.
Again I feel there are too many people working as programmers without a real knowledge background. It’s easy to create websites, but it’s not so easy to create them WELL. In fact some people in the office dosn’t have a real degree, so it’s impossible to discuss with them about technical questions (especially when the reasons they use are things like “I’ve read it in a forum” or “making lots of modules is good to avoid the vertical scroll in your code editor”, incredible!!). This is a hard world for the people who believe in proffesionality, like me. We have to fight hard! Hasta la victoria siempre!