180 likes | 333 Views
The Basic Tools. Presented by: Robert E., & Jonathan Chase. The Power of Plain Text. What is it? Printable characters in a form that can be read directly by people Can be structured (xml, html) Possible to achieve self-describing data stream independent of its creator. Plain Text (cont.).
E N D
The Basic Tools Presented by: Robert E., & Jonathan Chase
The Power of Plain Text • What is it? • Printable characters in a form that can be read directly by people • Can be structured (xml, html) • Possible to achieve self-describing data stream independent of its creator
Plain Text (cont.) • Advantages • Insurance against obsolescence • Potential use extension • Able to parse with partial knowledge of its format • Leverage • Many different computing environments operate on plain text (compiler, editors, SCCS, etc.) • Easier testing • Easy to modify synthetic test data without special tools • Analysis through a scripting tool
Plain Text (cont.) • Disadvantages • Potentially occupy more space than compressed binary • Computationally more expensive to interpret and process plain text
Shell Games • “For a programmer manipulating files of test, that workbench is the command shell.”
Shell (cont.) • Shell • Able to build complex macro commands • Automate tasks • GUI • Limited functionality “What you see is what you get” • Can’t create customized macro tools • Windows • Windows cmd-line utilities are limited compared to Unix • Try • Cygwin • UWIN • Perl Power Tools
Power Editing • Know one editor very well including its advanced features • Editor should be • Configurable to your preferences • Extensible to new languages • Programmable with macros or scripting • Able to create templates • Language specific features • Syntax highlighting • Auto-completion • Auto-indentation • Document boiler plate • Increases productivity
Source Code Control Systems • Project-wide time machine that can return back to a previous state • Advantages • Undo mistakes • Track changes • Identify of your software • Keep track of compiler and OS versions • Generate branches in the development tree • Concurrent development • Builds that are automatic and repeatable • Automatic regression tests
Debugging • No one writes perfect software… • Debugging is problem solving and should be approached in that manner. • Focus on the problem and not the blame. • Don’t Panic.
Where to Begin • Make sure the code compiled cleanly without warnings. • Ensure your observations are accurate. • Clarify all bug reports–particularly third party reports.
Debugging Strategies • Visualize Your Data • Tracing • Rubber Ducking • Process of Elimination
Debugging Questions • Is the problem being reported a direct result of the underlying bug, or merely a symptom? • Is the bug really in the compiler? Is it in the OS? Or is it in your code? • If you explained this problem in detail to a coworker, what would you say? • If the suspect code passes its unit tests, are the tests complete enough? What happens if you run the unit test with this data? • Do the conditions that caused this bug exist anywhere else in the system?
The Element of Surprise • “Don’t Assume It–Prove It”
Text Manipulation • Tools • Awk • Sed • Python • Tcl • Ruby • Perl
Applying Text Manipulation • Database schema maintenance • Java property access • Test data generation • Book Writing • C to Object Pascal interface • Generating Web documentation
Code Generators • Passive code Generators • create freestanding results • Active code generators • create reproducible results • Code generators can generate more than code • Eg. Html, xml, plain text