casing

What is the best-practice casing style for javascript? Why?

One aspect of javascript that it's hard to find information on is casing practices. By casing practices, I mean what casing style (ie. camel-case, pascal-case, etc) should be used for what elements (Constructors, private functions, public functions). The only rule I've heard was from a Douglas Crockford lecture on YUI theater, stating ...

Why is DB an acronym and not abbreviation?

According to the .NET framework design guidelines, they say DB is an acronym and cased as such. But I thought it was an abbreviation of database? ...

How to force UpperCase in a VS2008 snippet?

I've settled on the following style of creating properties (with a backing field): private _firstName; public string FirstName { get { return _firstName; } set { _firstName = value; } } Given that the name of the property is similar to the name of the backing field, I've improved the built in prop snippet to the following: <?...

Regex and the characters case.

Okay, I got a rather simple one (at least seems simple). I have a multi lined string and I am just playing around with replacing different words with something else. Let me show you... #!/usr/bin/perl -w use strict; $_ = "That is my coat.\nCoats are very expensive."; s/coat/Hat/igm; print; The output would be That is my Hat Hats are ...

Git checkout file - casing in file name

Hello! Git newbie here :) Faced casing-related problem: file aspnetdb.mdf was removed from repository several commits ago, I decided to restore it from some of earlier commits and did it is such way: git checkout master~3 aspnetdb.mdf wanted to get file from 3rd back commit But git said, that there was no such file. Then I exe...

Does naming conventions make better maintainable code?

I like to give my variables, methods and objects descriptive names. Obviously not going overboard, but let me give you a couple of examples. public class Account { public decimal Balance { get; set; } } Account account = new Account(); account.Balance = 1000; Some people would opt to go for the following, which really does not ma...