Related Entries

Quick Start: Git for personal use
SVN client over SSH to remote Unix server from Windows
Quick Start Grinder - Part V
Quick Start Grinder - Part IV
Quick Start Grinder - Part III

« Getting interested in SVG
» Mandrake 9 - Getting more software

Plead to programmers

Unix girl writes about what is most annoying in programming. And my notes on some tools that can help you.

Kasia Trapszo:

I ask, no, I beg if you do nothing else with your code, please, please, please format it properly. ... Indentation, spacing, break up long lines, logical variable names, avoid global variables, avoid duplication of code, avoid excessively long methods.

An emotional and sensible plea! I used to plead and curse about this quite often.

Any given day since 1995, I had to read and/or write programs in atleast 3 different languages including C, C++, HTML, Perl, PHP, SQL and PL/SQL, Shell, Awk, Python, Javascript, Java, COBOL, ASP, VB and various Markup Languages to name a few. So what is the solution? Wari got it right.

You could use python :-) where indentation is necessary and resistance is futile.


Tools that indent source

Another solution is to see if a language has some tool that can indent the code for you.

GNU Source Hilite is a good tool if you want to produce color-coded HTML listing of your code.

Linux C-C++ Beautifier how-to has a section on other languages.

  1. Is there a beautifier for C-shell script? Thank you!

    Posted by: Keath Chen on December 9, 2002 02:35 PM
  2. GNU indent should be able to format C-shell to a certain extent. I've not programmed in C-shell and so it is just a guess.

    Posted by: Babu on December 10, 2002 05:30 AM