A piggy bank of commands, fixes, succinct reviews, some mini articles and technical opinions from a (mostly) Perl developer.

Sed example - removing lines

for file in `grep -r mysqld t|cut -d: -f1|uniq`; do sed -i -e '/use Test::mysqld/d; /Test::mysqld->new/N; /Test::mysqld->new/N; /Test::mysqld->new/N; /Test::mysqld->new/N; /Test::mysqld->new/N; /Test::mysqld->new/d; /traits/d' $file; done; find t -name '*-e' -delete


Result:


Install postgres on Ubuntu 16

How to do it:

  • sudo apt-get install postgresql postgresql-contrib
  • sudo -i -u postgres
  • psql

What is a professional attitude to software development?

Professional attitude:

  • Confidence without arrogance
  • Humility without self-pity
  • Politeness, approachability
  • Communicative, hard-working
  • Competence and reliability above all
Doesn't seem too hard does it!?

Documentation formatting, presentation and distribution

Points relating to formatting and presentation (not content):
  • Documents need version numbers. This comes for free with a wiki-based system.
  • Need a "changes" section at the top, including dates & authors.
  • A table of contents with clickable (and bookmarkable) links
  • Code samples to be in a consistent style, monospace font, and limited to a single page
  • Web page or PDF, not .docx because .docx will be formatted differently by every application, and might appear corrupted or unreadable on some computers.
  • Host the document on company servers and send around a link to download it. Don't email as an attachment because it will become out of date quickly.