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

Jump to

Quick reference

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:

+++ t/foo.t
@@ -1,6 +1,5 @@
use Test::MockModule;
use Test::Most;
-use Test::mysqld;
@@ -21,15 +20,8 @@ END {
use Test::DBIx::Class {
schema_class => 'Foo::Bar::DB',
- traits => ['Testmysqld'],
};
-my $mysqld = Test::mysqld->new(
- my_cnf => {
- 'skip-networking' => '', # no TCP socket
- }
-) or plan skip_all => $Test::mysqld::errstr;
-
ok my $SCHEMA = Schema, "got schema";
view raw sed.diff hosted with ❤ by GitHub

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.