What is risk management?

risk management

O’Reilly runs a nice and simple article on what is risk management.  They look at it from the perspective of a web application, but the suggestions are generic enough to be applied universally.  The highlights are:

  • Managing risk
  • Identifying risk
  • Remove worst offenders
  • Mitigate
  • Review regularly

I particularly liked this paragraph from the identifying risks section:

You will likely find that there are obvious entries in the list, but there should also be entries that surprise you. This is good. You want to uncover as many of your risk vulnerabilities as possible, and if some of them don’t come as a surprise to you, you probably haven’t dug deep enough.

Micro – a modern and intuitive terminal-based text editor

micro-solarized

Micro is a modern console based text editor, written in Go.  Version 1.0.0 has been recently released.  It’s cross-platform (installs as a single binary) and supports a variety of features:

  • Easy to use and to install
  • No dependencies or external files are needed — just the binary you can download further down the page
  • Common keybindings (ctrl-s, ctrl-c, ctrl-v, ctrl-z…)
    • Keybindings can be rebound to your liking
  • Sane defaults
    • You shouldn’t have to configure much out of the box (and it is extremely easy to configure)
  • Splits and tabs
  • Extremely good mouse support
    • This means mouse dragging to create a selection, double click to select by word, and triple click to select by line
  • Cross platform (It should work on all the platforms Go runs on)
    • Note that while Windows is supported, there are still some bugs that need to be worked out
  • Plugin system (plugins are written in Lua)
  • Persistent undo
  • Automatic linting and error notifications
  • Syntax highlighting (for over 75 languages!)
  • Colorscheme support
    • By default, micro comes with 16, 256, and true color themes.
  • True color support (set the MICRO_TRUECOLOR env variable to 1 to enable it)
  • Copy and paste with the system clipboard
  • Small and simple
  • Easily configurable
  • Common editor things such as undo/redo, line numbers, unicode support…

Although not yet implemented, I hope to add more features such as autocompletion, and multiple cursors in the future.

If you are looking for a new editor, give Micro a try.

Troubleshooting with /dev/tcp and /dev/udp

Imagine you are on a freshly installed Linux machine with the minimal set of packages, and you need to test network connectivity.  You don’t have netcat, telnet, and your other usual tools.  For the sake of the example, imagine that even curl and wget are missing.  What do you do?

Well, apparently, there is a way to do this with plain old bash.  A way, which I didn’t know until today.  You can do this with /dev/tcp and /dev/udp. Here is an example verbatim from the Advanced Bash-Scripting Guide:

#!/bin/bash
# dev-tcp.sh: /dev/tcp redirection to check Internet connection.

# Script by Troy Engel.
# Used with permission.
 
TCP_HOST=news-15.net       # A known spam-friendly ISP.
TCP_PORT=80                # Port 80 is http.
  
# Try to connect. (Somewhat similar to a 'ping' . . .) 
echo "HEAD / HTTP/1.0" >/dev/tcp/${TCP_HOST}/${TCP_PORT}
MYEXIT=$?

: <<EXPLANATION If bash was compiled with --enable-net-redirections, it has the capability of using a special character device for both TCP and UDP redirections. These redirections are used identically as STDIN/STDOUT/STDERR. The device entries are 30,36 for /dev/tcp: mknod /dev/tcp c 30 36 >From the bash reference:
/dev/tcp/host/port
    If host is a valid hostname or Internet address, and port is an integer
port number or service name, Bash attempts to open a TCP connection to the
corresponding socket.
EXPLANATION

   
if [ "X$MYEXIT" = "X0" ]; then
  echo "Connection successful. Exit code: $MYEXIT"
else
  echo "Connection unsuccessful. Exit code: $MYEXIT"
fi

exit $MYEXIT

 

Linus Torvalds loves GPL

Slashdot links to this CIO article, which quotes Linus Torvalds on the importance of the General Public License (GPL):

“FSF [Free Software Foundation] and I don’t have a loving relationship, but I love GPL v2,” said Torvalds. “I really think the license has been one of the defining factors in the success of Linux because it enforced that you have to give back, which meant that the fragmentation has never been something that has been viable from a technical standpoint.”

and:

“The GPL ensures that nobody is ever going to take advantage of your code. It will remain free and nobody can take that away from you. I think that’s a big deal for community management.”