Software Methodologies for Very Small Teams

When I was working on my undergraduate degree in Computing and Software Systems, I took a class in software engineering. The purpose of this class was to introduce us to the range of real-world processes that professionals use to develop software, processes that didn’t often come up in our academic work. That goal turned out […]

Continue

Using Integers and Longs in Java

Programming puzzles frequently involve manipulation of integers. And even problems that are mainly about string manipulation, character sets, or floating point arithmetic need integers for array indexes and counters. So it pays to know how to use them. In this article, I’m going to cover some of the quirks of integers and longs as implemented […]

Continue

Results Not Guaranteed

In 2013, I took an experimental course on deliberate practice that Cal Newport and Scott Young were developing. In the email announcing the course, Cal warned: “If … you’re expecting guaranteed results, this pilot might not be a good fit.” It’s a standard marketing technique for products and services to promise guaranteed results. But that’s […]

Continue

Is There No Map?

In Linchpin, Seth Godin has this to say about giving advice: Telling people leadership is important is one thing. Showing them step by step precisely how to be a leader is impossible. “Tell me what to do” is a nonsensical statement in this context. There is no map. No map to be a leader, no […]

Continue

What is competitive programming?

What is competitive programming? Here are a few definitions. From Wikipedia: Competitive programming is a mind sport usually held over the Internet or a local network, involving participants trying to program according to provided specifications. … A programming competition generally involves the host presenting a set of logical or mathematical problems to the contestants … […]

Continue

Solving UVa 978 With Unit Tests

Last week, I wrote about how unit testing can improve your competitive programming practice. As promised, this week I’m going to go through an example of the unit testing process. For an example problem, I’ll be using UVa 978: Lemmings Battle! See above for a picture of a ferocious lemming. Problem Summary Lemmings Battle! is […]

Continue

Unit Testing Your Competitive Programming Solutions

A couple of months ago, I wrote an article about a type of unit test called a learning test. The goal of learning tests is improving your understanding of how code works, rather than verifying functionality or influencing design, the traditional goals of unit testing. This week, I’m going to discuss those traditional goals of […]

Continue

UVa 11572: Unique Snowflakes

UVa 11572 contains a story about a magic snowflake-capturing machine, but the underlying puzzle can be stated quite simply: Given a sequence of integers, find the length of the longest contiguous subsequence containing no repeated elements. The sequence given in the sample input is: 1, 2, 3, 2, 1 The subsequence 1, 2, 3, 2 […]

Continue