Friday, January 20, 2012

A free JavaScript IDE? Aptana to the rescue

Just thought I share one cent: for those of us doing web development and looking for a good, free IDE, Aptana fits the bill well!

http://aptana.com/

Sunday, January 8, 2012

Visual Studio Code Formatting (tab spaces)

In our project at work, we have a visual studio code base that contains server codes of various languages, including C#, JS, HTML, XML, SQL, and CSS. The issue we have is that the format of the code is very much inconsistent: some code are tabbed at two spaces while others at four spaces. The reason for this mixture is because the code has been passed on by a few teams, who have been following different coding standards. This problem can be common among project code, especially legacy code.

To solve this problem, there are recommendations to use the VS macro to run the "Format Code" command on the solution. And I found such a recommendation: Format all document in visual studio. However, for some undiscovered reasons, it was not able to re-format our project code. Then I was quite lucky enough to find an existing tool called CodeMaid that does this job wonderfully. I could simply run the cleanup all files function, then all code will be automatically re-formatted with the same tab spacing. Afterwards, the inconsistent itches in our code are gone!

P.S. if you're looking for some coding style suggestions, StyleCop as an add-on may fit the bill. It prints out possible coding style problems as warnings for your consideration.