The document describes 7 stories from the author's career as a programmer. Each story highlights a different challenge solved through creative technical solutions: 1) Automating stored procedure generation. 2) Generating joins by reading metadata. 3) Mapping fonts to work around software limitations. 4) Creating an easy-to-use program for a coworker with disabilities. 5) Writing a file checking utility in a day. 6) Creating a color-coded report to identify issues across departments. 7) Monitoring remote switches and troubleshooting connection issues. The last story describes consolidating duplicate reports into a single automated report. The moral is to know the technology, business needs, and take time for creative thinking.
SQL Database Design For Developers at php[tek] 2024
Seven War Stories and a Moral
1. 7 War Stories & a Moral
John Ashmead
Mpsig November 2Nd, 2013
2. Informix Stored Procedure
Template
✤
Stored procedure -- about 100 lines long & did nothing!
✤
Standard comments!
✤
Standard security checks!
✤
Logged that it ran!
✤
Copy & hack!
✤
Most useful thing I did at 1838 apparently???
3. Reading the meta data
✤
All the foreign keys are in the meta data!
✤
Most stored procedures are just joins & a few fields!
✤
So give it the tables & it can lookup the join keys!
✤
Generated 100K lines in < 2 minutes!
✤
90% useable, 8% good starting point, 2% -- what is life without work?!
✤
Two month contract done in 3 days
4. How to lie to the software
✤
Only four fonts; needed eight!
✤
Needed only four at one time, however! Did have to use the font
tables!
✤
So, just mapped the four we needed on the way in & back on the way
out.!
✤
Wrote a shell script to lie systematically!
✤
Got idea at 11:30 am on a Saturday in a garden
5. Brain damaged co-worker
✤
Had negative typing speed!
✤
Wrote a 4 up address program he couldn’t screw up!
✤
So he formatted our journal articles using it!!
✤
Finally gave up & just put him in front of a pile of envelopes
6. File system checker
✤
Checked for overlaps, not in backups, & so on!
✤
1000 lines, written in a single day. !
✤
One bug, co-worker worked it out!
✤
Had every setting known to be needed by man!
✤
Operators said they needed just one: fix it!
7. The report of many colors
✤
60% hit rate on video; should have gotten 90%!
✤
four departments each pointing the finger in three directions!
✤
Wrote report of: of 100 going in to your stage, what % escaped? Red,
yellow, green!
✤
Turned out the damage about equally spread out!
✤
A great silence descended on the company or at least the four
departments
8. Falling off the edge of the world
✤
Idiot switchers kept overflowing their 64K buffers!
✤
Had trouble calling home when the satellite told them to!
✤
Wrote a report: switchers at the edge of the world, with those most
delinquent in orange & red!
✤
Wrote a mad-polling script to hammer them. Operators loved this!
✤
Tweaked continuously
9. Twelve for one
✤
Previous programmer had died; moonlighting IRS agent.!
✤
12 copies of main report; 3 minute gaps on ideas, 11 edits would be
right!
✤
Told lab director, I can do it the same way. Or I can spend two days
consolidating using “make” & “m4”, so there is really only one report!
✤
Take the two days!
10. And a Moral
✤
Know the tech!
✤
Know the business!
✤
Take a walk in the garden