icdiff (improved colored diff): Side-by-side highlighted command line diffs

icdiff screenshot

http://www.jefftk.com/icdiff

On Github: https://github.com/jeffkaufman/icdiff


From the icdiff web page:

Your terminal can display color, but most diff tools don’t make good use of it. By highlighting changes, icdiff can show you the differences between similar files without getting in the way. This is especially helpful for identifying and understanding small changes within existing lines.

Instead of trying to be a diff replacement for all circumstances, the goal of icdiff is to be a tool you can reach for to get a better picture of what changed when it’s not immediately obvious from diff.

Installation

curl -s https://raw.githubusercontent.com/jeffkaufman/icdiff/release-1.6.0/icdiff \
  | sudo tee /usr/local/bin/icdiff > /dev/null \
  && sudo chmod ugo+rx /usr/local/bin/icdiff

# The install-with-curl command should also work on other unixes.

# Or (mac only, depends on homebrew):
brew update && brew install icdiff

Moose: Perl module that extends the Perl 5 object system to make programming easier, more consistent, and less tedious

http://search.cpan.org/~ether/Moose-2.1402/lib/Moose.pm

This module has me interested in writing some Perl code for the first time in years. I’m going to check this out.

Example from perldocs:

package Person;

use Moose;

has 'first_name' => (
    is  => 'rw',
    isa => 'Str',
);

has 'last_name' => (
    is  => 'rw',
    isa => 'Str',
);

no Moose;
__PACKAGE__->meta->make_immutable;

This is a complete and usable class definition!

package User;

use DateTime;
use Moose;

extends 'Person';

has 'password' => (
    is  => 'rw',
    isa => 'Str',
);

has 'last_login' => (
    is      => 'rw',
    isa     => 'DateTime',
    handles => { 'date_of_last_login' => 'date' },
);

sub login {
    my $self = shift;
    my $pw   = shift;

    return 0 if $pw ne $self->password;

    $self->last_login( DateTime->now() );

    return 1;
}

no Moose;
__PACKAGE__->meta->make_immutable;

When ready to instantiate your class in an application, use it in the “traditional” Perl manner:

use User;

my $user = User->new(
  first_name => 'Example',
  last_name  => 'User',
  password   => 'letmein',
);

$user->login('letmein');

say $user->date_of_last_login;

Effective Go: A primer for writing idiomatic Go code (based on Go’s unique properties)

Go Gopher Mascot

https://golang.org/doc/effective_go.html


This is for folks who are already somewhat familiar with Go.

From the Effective Go Introduction:

Go is a new language. Although it borrows ideas from existing languages, it has unusual properties that make effective Go programs different in character from programs written in its relatives. A straightforward translation of a C++ or Java program into Go is unlikely to produce a satisfactory result—Java programs are written in Java, not Go. On the other hand, thinking about the problem from a Go perspective could produce a successful but quite different program. In other words, to write Go well, it’s important to understand its properties and idioms. It’s also important to know the established conventions for programming in Go, such as naming, formatting, program construction, and so on, so that programs you write will be easy for other Go programmers to understand.

mermaid: Generate flowcharts and diagrams from text using Node.js

https://github.com/knsv/mermaid


Now ya’ll know I love me some Markdown, and while this isn’t quite a pretty to read in text format as Markdown is, mermaid scratches a similar itch for me. It provides a way to represent flowcharts and diagrams using text, making it easy to easily store and compare them in your source control repository.

Example

graph LR;
    A[Hard edge]-->|Link text|B(Round edge);
    B-->C{Decision};
    C-->|One|D[Result one];
    C-->|Two|E[Result two];

Example flowchart

Additional examples here: http://www.sveido.com/mermaid/demo/html/web.html