Recently I involve in various projects. And they are using different technologies. I am fervent in programming because it conforms to my theological and philosophical perspective.
The languages and technology I am currently using: AngularJS and NodeJS, .NET MVC with C# Mono, and Ruby on Rails. Other related technologies: Nginx, AWS, migrations, Bootstrap CSS, etc. Besides that, my background is strong fundamental C, C++, and PHP skills; have good experience on Python; some experiences on Java, Android, Perl, and VB Script.
Naming convention and syntax
Involving in various languages and different development frameworks, there is something very important, that is, naming convention. Unlike syntax, where syntax is the language level rules, naming convention is the framework level rules. That means, when using a certain framework, you should follow the naming convention, especially MVC framework. Because by following naming convention (and file structure as well), the framework will use the corresponding database, view page, and controller as well. That is why, you follow it, your development will work faster, need not to care about the internal algorithms.
And some of the naming conventions, is just the style, not really related to the framework. They are “recommended”, instead of “required”. You must know how to differentiate these two.
The above is purely client side HTML. For the server side, we usually use a template engine or template system. MVC uses Razor: Rails uses ERB; ExpressJS uses Jade; etc. So, when using these engines, new syntax comes in. Some template engines allow logical statements written in the view, such as Razor and ERB. As a result, you will see pascal case in Razor, snake case in ERB. So, by looking at these naming conventions and syntaxes, you will know what languages being used and what you should do. On the other hand, AngularJS has a very neat template design. No logical statements allowed in the template. Consequently, the template is very neat!
Pascal case and camel case
I don’t like Microsoft, but I admit that Microsoft has its own strength in some technologies. (Else you will not see Mono in Linux.)
Microsoft uses Hungarian notations in C/C++ documentation, for instance, “szName” means identifier “Name” with zero-terminated string data type. It is less human readable. Currently there are a lot of high level languages, thus human readable is required so EVERYONE can code. That is why the methods/functions are verbs like getSomething, setSomething, countSomething, addSomething, removeSomething, clearSomething, etc.
means data type. And
So, using the uppercase of the first letter allows me to differentiate my source code easily. However, Microsoft .NET C# uses PascalCase.
So, the question is, should I follow PascalCase or camelCase when using C#? After working with so many projects, I decided to follow the naming convention as recommended. Just use PascalCase as it is recommended. So that, I can feel the conformity instead of alienation. So, how to differentiate the data type and the variable? That is an easy solution. Just recognise them semantically! Because the programming languages, at the end, are still human readable language.
I like Vim too. There is always Emacs and Vim war. I like Vim, as it is a general text editor. Edit any text with keyboard only. Edit configuration files through SSH, Vim is the best. Yet, Emacs is the programmer editor. It takes care the programming language indentation smartly. This is what I need! Highlight all and TAB, everything is formatted!