Author: MTR

Tinkering With Java Stream()

package test;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Random;

 * @author matthew.rupert
public class Test
    private static DoStuff stuff;
    private static List a;
    private static class MyCoolClass implements Comparable{
        int value;

        MyCoolClass(int value) {

        public int getValue() {
            return value;

        public void add(int x) {

        public String toString() {
            return Integer.toString(value);

        public int compareTo(MyCoolClass other) {
          if (this.getValue() > other.getValue())
              return 1;
          return -1;

    private static class DoStuff {
        public static void doStuff() {
            a = new ArrayList<>();
            //List a a = new ArrrayList<>();
            Random rand = new Random();
            for (int i=0; i<=10; i++) {                 a.add(new MyCoolClass(rand.nextInt(100)));             }             //Collections.sort(a);             Collections.sort(a);             System.out.println("sorted: " + a.toString());             Collections.shuffle(a);             System.out.println("\nshuffled: " + a.toString());             // Filter only > 50
            System.out.println("\nfiltered (>50): ");
   -> b.getValue() >= 50).forEach(b -> System.out.println(b));

            // Filter only > 50 and even
            System.out.println("\nfiltered (>50 and even): ");
   -> b.getValue() >= 50).filter(b -> b.getValue() % 2 == 0).forEach(b -> System.out.println(b));

            // Filter only < 50, place results in ArrayList
            System.out.println("\nfiltered (<50) with results as ArrayList: ");
            List c;
            c = -> b.getValue() < 50).collect(Collectors.toList());

    public static void main(String[] args) {


With CoreOS, developers can now easily spin up Docker containers on DigitalOcean

Awesome! Will be a great way to easily create FuseESB services on the cheap.

Freakonomics, Regulate This!

Some people create and innovate, some people follow the innovators, and some do everything they can to keep innovation down. This is a great episode of Freakonomics Radio.

Freakonomics Radio: Regulate This! 

Computer Programming, High School

To argue that computer programming should be a required high school course is absurd. But I’ve learned that many high schools still don’t offer any kind of computer programming/computer science classes. This is surprising to me, because even my high school, a mostly rural school with children of blue collar families and farmers, offered Computer Programming I and II (and before the days of Visual Studio).

I haven’t been able to find much data on the subject, but this Washington Post article states that few than 1 in 10 high schools across the state offer computer science courses:

Across the Washington region’s school systems, fewer than one in 10 high school students took computer science this academic year, according to district data.

I imagine the statistics are similar in other states. Also, one must wonder what is considered “computer science.” A high school near my house teachers Microsoft Powerpoint, Word and Publisher classes. This I find as surprising as the fact that most schools don’t offer computer science classes at all. Computer science, as far as code design, data structures, methodologies, algorithms, is hardly something of rapid change. These fundamentals are the basics that should be learned before any student delves into the specifics of a language. The Microsoft Office Suite, on the other hand, is little more than a set of common, user-friendly tools, guaranteed to be a version or two out of date in the span of four years! Why waste time teaching such things?

I have read that finding qualified teachers to take on computer sciences courses is a challenge. This makes sense, as any skilled engineer would probably rather be earning three times the income of a high school teacher.

Maybe this is an area where the local engineering community could step up. Why not let a good engineer cut away for an hour a day to do some community service by teaching a class? It would be a great way to help high schools–a win-win. The high schools would get a qualified teacher for a specialized class, and the business community would nurture future engineers. This idea seems so obvious that I can’t imagine it isn’t already being tried somewhere!

On Publishing and Writing and Documenting


I was telling my daughter the other evening that it is important to know how to spell, and just as important to know how to write (and write well). She’s going into 5th grade, so such a lecture may be a bit premature. No worries. This lecture will be a repetitive one.

As I recall, the conversation came up when I made note of how impressed I was that she was reading a book just for fun on summer break. Reading–reading real books by real authors with real editors–is the best way to learn the craft. And for whatever reason, it seems that fiction is the best place to learn to write. (This is an opinion, but I have no problem asserting it as undeniable truth.) The technical stuff–most of it–is dry and full of poor writing. I’ve stumbled across countless examples of verbiage in techie books and articles that would make any English professor curse.

I love fiction. Shouldn’t we all? I read much more fiction than non. It would be easy to argue that the skills used to convey well-written fiction have little, if any crossover into a technical career. Don’t say it! (If you already said it, take it back!)

On the contrary, I’ve found that reading quality fiction is applicable my professional career, and its application comes in a form of learning that requires little deliberate uptake. So long as a story holds my attention, reading is easy and fun, and the learning and improving grammar is a secondary, seemingly osmotic benefit. While lost in a great story, we build upon vocabulary and command of language. We see styles and methods that we like. These we recall. We see styles that seem awkward or boring. These we recall as well (and avoid).

I cannot name a single professional career in which the ability to write is not of importance. I’d be interested in hearing of another opinion on this matter. It may sound absurd, as though I am declaring that simple arithmetic is important. But if this is such an obvious assertion, why does it seem that so many communications are written with bold indifference toward basic English?

Lest I get too far ahead of myself, I should come clean with something. The other day I sent my boss a very short email, typed on my iPhone, as I hurried to get things situated at home. The email, I thought, was short and to the point:

Running a little late this morning. In by 9:30.

(Micky is not my boss’s actual name, for the record.) The text above is what I meant to write. It is not what was sent. When I arrived to work, “a little late,” as I had told my boss, he had already had a good laugh at my email. Here’s what I actually wrote:

Rubbing a little late this morning. In by 9:30.

Rubbing. There it was… In my boss’s inbox forever. Foiled by auto-correct again!

Auto-correct is great for very short things, but only when used with caution. In this case it wasn’t a big deal (or was it?). Aside from the hilarity, my boss knew what I meant, and he guessed that auto-correct created the error. As silly as this example may be, it does leave a certain aftertaste, does it not? I’m a technical person, paid for focus and attention to detail. I write software… Software that needs to work the right way every time. While the example above is chuckle-worthy, it is also cringe-worthy. I know better!


Publishing articles here and there has been fun. There’s something extremely satisfying about seeing your name in print. (See how I used two adjectives in that last sentence? Don’t do that in a technical document. Ever.) There is a certain thrill in having your words read by an audience. But with this comes a great amount of work and time commitment, which I haven’t consistently had the bandwidth for. To be sure, writing an article for a trade publication must be a labor of love, as the payout for such things is right around $0.00.

It isn’t all that difficult to get an article published, and it may be something worth seeking, if not regularly, at least once. The key is simply to have a specific goal for the article and a certain amount of knowledge of the subject (along with a willingness to put in some research where necessary). When it comes to publishing in a trade publication or website, it is also important to spend time self editing. Most of these outlets don’t edit much (or very well). It is embarrassing to see a typo make its way through to the end product. Even worse, reading a sentence or entire paragraph that you wish you had revised can be infuriating.

Infuriating may be a strong word… Or not. Personally, when reading anything, be it a book, article, or blog post, I lose focus and interest when I become annoyed by an author’s lack of writing skill. And while I am fairly confident that even this post will have a sentence or two that should be reworked, I stand by this assertion!

Keep the grammar simple. If you aren’t sure whether a particular sentence structure works, don’t use it. Lofty language is for poets, not for those of us attempting to convey a point. If a may set aside humility for a moment, the most consistently positive feedback I’ve received over the years has been with regard to my ability to write. What’s the secret here? Nothing, really, at least not that I can pinpoint. (See what I did there? I used a fragment. I love fragments. They are concise. And clever.)

A few things when it comes to software development and writing:

  • The developer who actually takes the time to document, from commenting code to precise checkin comments to keeping the wiki clean, already has a leg up.
  • Don’t write to impress. Chances are you will fail. Write to communicate.
  • Keep it simple, grammatically clean, and to the point… “Pithy,” as Bill O’Reilly likes to say. As I mentioned before, if you believe something doesn’t make sense, rewrite it in a way that you would like to read it.
  • There is little need to editorialize when documenting software. It may be necessary for certain things, but only in small doses.
  • Documentation is often treated as something that is done once and forgotten. This is a problem.
  • We all like to insert humor into our work lives. This isn’t a bad thing. But if there is any chance your words will be read by a customer or outsider of any kind, don’t do it. The words you use may find their way to people considering your company as a partner, client, or provider. Given the fact that the things engineers write may escape the scrutiny of corporate leadership, we should inject professionalism early on.
  • Have you ever sent a document out to the team for feedback and peer review? When you don’t get any responses (and you probably won’t), don’t assume that this means your document is perfect. It isn’t.
  • The Oxford Comma is the subject of some amount of debate among literary nerds. I think its use in technical documentation is appropriate.
  • Semicolons suck. Too strong? Okay, fine. Semicolons are way overused! This doesn’t have much to do with technical documentation, per se. I just couldn’t help but editorialize a bit.

I am hitting the Publish button now. I have not re-read or edited this post. Shame on me!

Fiber to Wake Forest Residents (Hopefully)

Wake Forest: Public Meeting Sheds Light on ‘Fiber to the Forest’


Hopefully many people show interest and this can actually happen soon.

Some Random Links

Swift — Not really new news by now, but I’m looking forward to having some time to tinker with it.

Chordify — Give it an mp3 or URL, see chords, play along. Really cool.

Oracle vs. Google vs. Java — This is still going on?

Why Choose Jenkins (over Hudson)

Browser Usage Statisics — Chrome is clearly in the lead. So why do we all continue to bend over backward to support Internet Explorer quirks? Probably because so many corporations insist on it.


Moore’s Law Plateauing? — While I’m skeptical, do people really pay that much attention to processor speed any more? Increasing persistent storage speed along with the leaps forward from SSD seems to be our greatest performance gain these days… If the cost ever comes down.

Patent Troll Targeting Podcasts — Why isn’t this getting more attention?