Crossroads The ACM Magazine for Students

Sign In

Association for Computing Machinery

Magazine: Advice Five programming tips

Five programming tips

By ,

Full text also available in the ACM Digital Library as PDF | HTML | Digital Edition

Tags: Computing industry, Reference works, Software and its engineering

Connection Failure


Thu, 26 Aug 2010 07:57:20 UTC

Post by Sasidhar Kasturi

Good work Jason. These probably are the first 10 sentences in a programmer's bible.

My two cents: 1. With the usage of IDEs, indentation is being taken care of in a way. Once a template is set at the organizational level, the ide takes care of the rest. Languages like python help in a way, as they divide blocks based on the indentation that we provide. So, the programmer is indeed forced to indent, for putting his logic down into code. 2. Many languages now don't have a restriction(realistic) on the number of characters one can use for a variable name. And with technologies like IntelliSense in IDEs, the pain of typing in large variable names is also lessened. So it might be better in cases to declare variables of the length of a sentence(though the code looks a bit unclean). 3. In case one really needs some global variables, ts better to add some indication of what kind of variable it is (global, local) etc in its name. In C conventionally, capital letters are used for global variables. And in python, we need to explicitly write "global" when we are trying to access a global variable.

Overall, its better to start using an IDE(eclipse, visual studio etc .. ) for programming. Some of the best practices(comments, indentation) implicitly get into one's mind while programming. Also, it is easier to undo mistakes like, renaming variables after 1000 lines of code are written.

-Sasidhar Kasturi.


To comment you must create or log in with your ACM account.


ACM Journal on Educational Resources in Computing (JERIC)

JERIC is an electronic publication providing access to high quality, archival resources suitable for use in support of computing education

ACM Special Interest Group on Ada Programming Language

Forum on all aspects of the Ada language and technologies

ACM Transactions on Multimedia Computing, Communications, and Applications (TOMCCAP)

TOMCCAP focuses on multimedia computing, multimedia communications, end-to-end streaming media, resource allocation, multicast protocols, and multimedia applications

ACM Transactions on Programming Languages and Systems (TOPLAS)

The purpose of TOPLAS is to present research results on all aspects of the design, definition, implementation, and use of programming languages and programming systems

ACM Transactions on Software Engineering and Methodology (TOSEM)

Designing and building a large, complex software system is a tremendous challenge. TOSEM publishes papers on all aspects of that challenge

Journal of the ACM (JACM)

JACM aims to provide coverage of the most significant work going on in computer science, broadly construed