Friday, January 31, 2014

Open Sourced

Ok, I noticed quite a few projects are on GitHub, so I got one repo also. I’m not committing there anything any time soon, but better to be prepared and start to learn what I need to know.

One struggle was to choose the license. I pushed my selfish me further away and chose the shortest one – MIT License (aka X11 License), which is the most permissive.

Then I understood I will need some “header” in my source code files, so I constructed two simple lines of code, one is copyright and license info, second is version (YY.MM.DD) and short description of the source file:

  1. /* Copyright (c) QetriX.com. Licensed under MIT License, see /LICENSE.txt file.
  2. * 14.01.31 | Description of the file
  3. */

I’m going to comment scripts quite well (as I did in recent past), but I also think the code should be self-explanatory, so I’ll try to stay modest.

Currently I feel this step as yet another way how to send a word about QetriX, but maybe it will catch on and somebody will rub the code into my face, which will ultimately make me a better programmer :)

On the other hand I’m little worried people may have problems with my way of coding. My programming is mostly “just enough”. I don’t build vast object schemas and in PHP I still prefer the old function way, because it’s faster and less greedy for resources. I’m aware, that bloated code is mostly bug fixes, but IMO less code means less things that could go wrong.

Then, I don’t comply to wide used coding standards, because on QetriX I’m trying to unify coding across various platforms, so I did quite a research on coding standards for particular languages, chose the most used parts and stuck with it. This includes using double quotes in PHP and JS for strings, because in other languages single quotes are for char datatype, while double quotes are for strings.