Useful terminal tools
Photo by Tee Cee · CC BY 2.0, cropped
Like most of my co-workers, I spend a lot of time in a terminal emulator (console) in a shell at the Linux command line. I often come across tools that make work there nicer, but sometimes I forget about them before I integrate them into my workflow. So here are notes about a few of them for myself and anyone else who may find them useful.
HTTPie
HTTPie is:
a command line HTTP client with an intuitive UI, JSON support, syntax highlighting, wget-like downloads, plugins, and more.
Given how commonly-used curl, wget, and GET/POST (lwp-request) are, it is nice to see some innovation in this space to enhance usability.
Here is a simple example that demonstrates several HTTP redirects with full request and response headers, colorized:
http -v --pretty=all --follow endpointdev.com | less -R
The color highlighting of the body, not just response headers, is the main difference here from curl, wget, etc.
Also nice for ad-hoc interactive use is that the verbose header output is sent to stdout
instead of stderr
, so it shows up in less
without needing to have the shell merge it with 2>&1
before piping to less
.
An aside on HTTP redirects
In the …
tips tools
Making sense of XML/JSON items in the shell
Working as a system administrator means I have to spend quite some time during my work (and even during casual surfing) with the terminal. Sometimes I feel that certain information I want could just be fetched and parsed through the terminal, without having to use my mouse and point to the browser.
Some of the websites I visit use XML and JSON, which we could parse with Bash scripting. Previously I wrote a Ruby script to call Nokogiri to parse the XML elements until I found a Bash tool that could do the same thing.
These tools have already been around for quite a while—I’d just like to share what I did with them. The tools I used are xmlstarlet
for XML parsing and jq
for JSON.
XML
I have the following XML elements, and I’ll save them to a file called data.xml:
<rss version="2.0"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:admin="http://webns.net/mvcb/"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
<title>eSolat JAKIM : Waktu Solat Hari Ini …
shell json
A Career Talk for 1st Graders
Giving a Career Talk to 1st Graders
This week, I gave a career talk to my daughter’s 1st grade class and I talked about my job as a software engineer. I started with this video, which depicts two kids explaining to their dad how to make a peanut butter sandwich (called the “Exact Instructions Challenge”), but he takes them very literally and acts as though he has no context on how to work with peanut butter, jelly, and bread. The video got some giggles!
After the video, I talked about how the video was similar to what I do: I give computers instructions, and like that silly dad, computers don’t know anything about what they are being told to do. I hope they understood the analogy!
I have 5 Alexas!
We talked about what a computer is and how we all have a lot of computers at our house (“I have 5 Alexas at my house!”, “I have a PS4!”, “I have a PS2!”), even some that can turn the lights on and off now. I didn’t show them code because I didn’t think it would mean much to them, but a couple of the kids in the class had worked on kid-friendly coding projects.
I talked a little bit about my education (1st graders aren’t quite sure what this “college” thing is), and how I work from home. …
development community
Reviewing the Code
Code review is analysis of source code of a software project by reading the code itself or sometimes using automated tools to analyze it, and it is part of the Software Quality Assurance (SQA) activities which define the quality assurance of the whole software development lifecycle.
As we go through the flow of a code-review, we’ll understand what to assure by doing code review. Code review lifecycle covers the guidelines and the code review process itself.
Code review guidelines
Preparing for code review
- Pick the right reviewers. The reviewer should be an experienced software architect. Sometimes, less experienced groups can join the review team. Communication is also important, since frequent round table code review meetings with the developers are not usually productive.
- Let authors annotate the code before review indicating which files have precedence for review. Annotation by the developers to orient the reviewer so they know where changes have taken place and where to review is a good practice.
- Request code review. Requesting code review just before testing is another good practice.
Tips for reviewer during the code review
- Review small pieces of code at a time, for …
development java culture
A Project Manager’s Toolkit
I do a lot of project management work related to web applications. Everyone assembles their own set of useful productivity tools and I’m feeling pretty good about how I’ve got things set up at the moment so I thought I’d share my secret sauce. I’m interested to hear what other people have found useful as well so feel free to share in the comments.




Chat Tools
Ok, this one is all over the map. Slack is obviously the big one and many of our clients use that with us. Most larger organizations incur a cost (smaller projects are free). Internally End Point uses Zulip, which is a pretty decent open source application. Zulip doesn’t have as refined a user interface as Slack, but it works for our needs, and also has a mobile app I can use on the go.
I also highly recommend Skype. While it’s not the best system out there, so many people use it, it is almost impossible to avoid. Skype is really easy way to get someone’s attention and I use it with a lot of my clients for quick one-on-one questions and chats. Google Hangouts chat is also really nice for working with external folks and will run in your menu tray and mobile phone, so you can stay up to date wherever you’re working. …
tools
Winning with CSS Grid and Autoprefixer
Photo by Stijn te Strake on Unsplash
Using CSS Grid Today
Support for CSS Grid is excellent (over 90% globally! 💯). I have been using it in a variety of client projects for the past few years with great success. The combination of CSS Grid and Flexbox has made layout on the web much simpler, more fun and less frustrating compared to the hacks techniques which were used for CSS layout in the past. Definitely give it a try if you haven’t already done so.
IE10 and IE11 support an earlier version of the CSS Grid spec and with help from Autoprefixer we can reap the benefits of CSS Grid in those old browsers with a little bit of extra work. I’ve long been a huge fan and happy user of Autoprefixer. It’s a PostCSS plugin that examines your CSS and augments it with vendor prefixes and alternative syntaxes. Although vendor prefixes (e.g. -webkit
, -moz
, -o
, etc.) are much less common these days, there are a few still in use.
CSS Grid Basics
With CSS Grid the basic idea is to define the grid, i.e. the rows and columns that make it up, and then go about placing elements on the grid. Think of a website layout with a masthead, navigation, hero image, main content sidebar, and footer as an …
browsers css tools development
Rails Exception Notification and Logging
Photo by Randen Pederson, used under CC BY-SA 2.0, cropped from original.
Exception handling is an important component of any Rails application that is intended to be deployed in a production environment.
If you have ever felt your heart sink because you received a screenshot of your Rails application with this dreaded “something went wrong” message from a customer or client, you know what I’m talking about:

Though developers strive to deploy projects that are free of bugs and never throw an exception, the reality is that people using your Rails applications do sometimes encounter errors. When that happens it’s better to have your application automatically notify you of the event, rather than finding out about it for the first time when someone calls or emails you.
Exception Notification
The Exception Notification gem is a stalwart of the Ruby/Rails ecosystem and the standard solution for configuring your Rails project to notify you when errors occur. I typically use the gem to deliver notifications to a development/hosting team via email, but it has a variety of built-in notifiers that can output to just about any location you would want: Slack, IRC, Amazon SNS, etc., plus an …
ruby rails monitoring
Project On-ramping: Infrastructure and Codebase
Photo by NASA via Unsplash
Living in the consulting world, we often jump into codebases and environments to get quickly up to speed to provide estimates or start fixing bugs right away. Here are some important landmarks I visit along my way to get up to speed on a new project.
Dev stack
First up, I learn as much as I can about the dev stack a codebase runs on. It used to be the case that LAMP (Linux, Apache, MySQL, PHP) was a pretty common setup in our world, but the number of dev tools and variety in stacks has expanded greatly over time. Many of my End Point clients are now running nginx on Linux, with Ruby on Rails and MySQL or PostgreSQL, but as a company we have both breadth and depth in web stack technologies (hover over the Expertise dropdown above).
Layered on top of the base infrastructure might be a JavaScript framework (e.g. React, Ember.js), and other abstractions to improve the dev process (e.g. Sass, Node.js). And layered on top of that further is the possibility of other services running on the server locally (e.g. search using Elasticsearch or Solr) and 3rd-party tools running on a server elsewhere (e.g. content delivery networks, monitoring, Stripe).
The web stack …
rails clients development