• No results found

Chapter 14: Project Presentation

9.1 Coding

Using an Integrated Development Environment (IDE) such as Visual Studio, NetBeans, and Eclipse is a must for today's programmers. Nobody codes in notepad any more! There was a time not long ago when notepad-like text editors could show more productivity than cumbersome IDEs, but those days are gone. Especially for a novice like yourself, using an IDE is highly recommended. Today's IDEs are loaded with features (and some of them are actually useful!). Keep looking for smart ways to use your IDE - a good way to start is to learn the keyboard shortcuts for frequently used features.

A very much under-used IDE feature is the debugger. Learn how to stop execution at a pre-defined 'break point', how to 'step through' the code one statement at a time, inspect intermediate values of a variable at various points, etc. Using the debugger to do all this is a much superior way to inserting ad hoc print statements.

Modern IDEs already have some automatic refactoring and code analysis capabilities. But you may also wish to look at more powerful refactoring add-ons such as Re-sharper (a commercial plugin for Visual Studio. Free education licenses are available).

Some tools can check style conformance, auto-format code, and do other types of quality assurance of the source code. E.g. FXCop can be used to enforce coding standards in .NET assemblies.

9.2 PROFILING

Profilers are indispensable for effective performance optimizations. They help you pin point actual performance bottlenecks in your program. IDEs such as the latest Visual Studio have in-built profilers. Other examples: CLR Profiler, DotTrace

9.3 METRICS

Some IDEs such as the latest Visual Studio and other speicalised tools such as Microsoft LOC counter help you gather various metrics about the code, such as the LOC written by each team member.

49

Review copy -- Get your own copy from http://StudentProjectGuide.info

9.4 CONFIGURATION MA NAGEMENT

Software Configuration Management (SCM) is another important aspect of a non-trivial project. At a minimum, you should use a source code revision control tool such as Subversion (a Windows client for Subversion is TortoiseSVN) to keep track of code versions. If you are open-sourcing your project, you can use the SVN server provided for free by Google Code Project Hosting.

Institute check-in policies to enforce proper commenting, tagging, and to keep the build unbroken.

9.5 DOCUMENTATION

Another under-used tool is the word processor. If you find yourself doing some of the below, it is an indication that you are not using the word processor optimally.

 When you insert a figure/heading in the middle of the document, you have to manually increment all figure/heading numbers that appear below it.

 When you want to change the appearance of all chapter headings, you have to do this manually, one heading at a time.

 You insert blank lines to push a stranded heading ( i.e. stuck at the bottom of a page) to the next page.

 You modify some part of the document, and write an email to describe what you did to other team mates. You attach both the modified and the original document, in case the team decides to reverse your

modification.

Modern word processors can use 'styles' to apply consistent formatting to a document; auto-generate table of contents, list of figures, and indexes; auto-update cross references to figures/tables when you insert a figure/table in the middle and automatically keep track of changes you did to a document.

Tools such as MSVisio (commercial) and ArgoUML (free) can help you with drawing diagrams. Some IDEs let you generate UML diagrams from the source code.

9.6 TESTING

You must automate as much of testing as possible. Unit testing frameworks such as JUnit and NUnit can help in unit testing as well as other types of testing (integration testing, regression testing, system testing).

For most products, it is well worth writing your own test driver for specialised system testing.

9.7 COLLABORATION

Several types of tools can help you to collaborate easily with your team members. Some simple examples include GoogleDocs, Wikis, and mailing groups.

50

Review copy -- Get your own copy from http://StudentProjectGuide.info

9.8 PROJECT MANAGEME NT

Tools such as MSProject help you in project planning and tracking. Trac is an example of a server-based project management tool.

Free project hosting services such as Google Code Project Hosting (GCPH) or Sourceforge can be used to host and manage your project online. These services usually come with tools for issue tracking, code versioning, discussion forums, etc. but impose some restrictions, for example, only open-source projects are allowed on GCPH and Sourecforge. Alternatively, you can use free-for-non-commercial-use accounts provided by commercial project hosting services such as Pivotal Tracker and Zoho.

9.9 BUILDING

Most modern IDEs have in-built support for automated project building (look for a 'build' button on your favourite IDE). Specialised build tools include Make and Ant.

9.10 ISSUE TRACKING

Bugs (and other issues such as feature requests) go through a life cycle. For example, a bug can be in different life cycle stages such as 'raised', 'assigned', 'fixed', 'reopened', etc. Tools such as Bugzilla and Trac help is in tracking bugs (and other similar issues).

It is good to enforce the use of an issue tracker to record bugs you discover in others' code because it pressurises everyone to produce better quality code (because no one wants to see many bugs recorded against their name). Some issue trackers can be used to record project tasks (not just issues), too, resulting in an automatic record of what each person contributed to the project.

9.11 LOGGING

There are tools/libraries to help your code produce an audit trail (a log file) while in operation. Such tools can be easily configured to control the level of details produced. For example, when you suspect a bug in the code that affects the operation in subtle ways, you could increase the level of details in the log file to try and catch the bug.

9B. USING TOOLS

Related documents