Programming

Getting Started with ncurses

How to use curses to draw to the terminal screen. While graphical user interfaces are very cool, not every program needs to run with a point-and-click interface. For example, the venerable vi editor ran in plain-text terminals long before the first GUI.

Analyzing Song Lyrics

I was reading about the history of The Beatles a few days ago and bumped into an interesting fact. According to the author, The Beatles used the word "love" in their songs more than 160 times. At first I thought, "cool", but the more I thought about it, the more I became skeptical about the figure. In fact, I suspect that the word "love" shows up considerably more than 160 times.

V. Anton Spraul's Think Like a Programmer, Python Edition

What is programming? Sure, it consists of syntax and the assembly of code, but it is essentially a means to solve problems. To study programming, then, is to study the art of problem solving, and a new book from V. Anton Spraul, Think Like a Programmer, Python Edition, is a guide to sharpening skills in both spheres.

Watermarking Images--from the Command Line

Us geeks mostly think of the command line as the best place for text manipulation. It's a natural with cat, grep and shell scripts. But although you can't necessarily view your results from within a typical terminal window, it turns out to be pretty darn easy to analyze and manipulate images from within a shell script.

Heirloom Software: the Past as Adventure

Through the years, I've spent what might seem to some people an inordinate amount of time cleaning up and preserving ancient software. My Retrocomputing Museum page archives any number of computer languages and games that might seem utterly obsolete.

Manipulate Images with ImageMagick

In my last article, I had some fun looking at the children's game of rock, paper, scissors, writing a simple simulator and finding out that some strategies are better than others. Yes, I used "strategy" and "rock, paper, scissors" in the same sentence!

Gabriel Ford, Sadie Ford and Melissa Ford's Hello, Scratch!

In the new book Hello, Scratch! (published by Manning Publications), parents and kids work together to learn programming skills, but not in just any old way. They create new versions of old retro-style arcade games with the Scratch open-source visual programming language from the MIT Media Lab.

Rogue Wave Software's Zend Studio

The quick pitch for Rogue Wave Software's Zend Studio, recently updated to version 13.6, is "the PHP IDE for smarter development". Zend Studio 13.6, says Rogue Wave, offers 3X faster performance in indexing, validation and searching of PHP code, and it allows users to code faster, debug more easily and leverage the massive performance gains in PHP 7.

Scissors, Paper or Rock?

In this article, I'm going to tackle a children's game that's extraordinarily complicated, with many variations, and the programming task is going to be quite tricky. Just kidding! Rock Paper Scissors (or RPS, as it's known) is pretty darn easy to simulate because there aren't really many variants or possible outcomes.

Is the Moon Waxing or Waning?

In my last article, I talked about the complications of calculating the phase of the moon and decided simply to scrape the same website that Google uses.