Thursday, September 27, 2018

Review: Drawing with Children

I reluctantly checked out Drawing with Children by Mona Brookes from the library. I've experimented enough with sketching to be confident that what's holding me back isn't a particular skill or bit of wisdom, but the commitment to practice, practice, practice. At least, that's what I assumed. Still, I have a firm policy when visiting the library: if a book sparks even the slightest interest, I check it out.

When it comes to learning to draw, I'm a fan of Danny Gregory's approach. I'm oversimplifying here, but it essentially works like this: learn a few basic concepts and then practice daily. Eventually, you'll start creating drawings you're proud of.

As I perused Brookes' Drawing with Children I realized that her method falls on the other end of the structured-learning spectrum. She covers topics from creating an art-friendly environment, to specific language students can use to analyze subjects. She provides exercises and specific works to draw that maximize a learner's chance of success.

Some may chafe under this regimented approach, but I've grown to see it as something quite positive. Through carefully planning Brookes has flattened the learning curve of drawing. If, for example, I had the opportunity to teach my niece to draw I'd almost certainly use Brookes' approach.

But the impact of Drawing with Children on me didn't stop there. It provided me with nothing short of a sketching epiphany. On page 114, in classic Brookes style, she spells out a 20 step algorithm for creating a drawing. This starts with warm-ups and ends with finishing touches. In her recipe she instructs students to start with a central point and build out from there. You see this approach in the sample drawings in the book. For example, one still life starts by drawing the knob which sits on top of the tea pot, which is one of the primary objects in the scene.

I realized this is exactly the opposite strategy I've been using for drawing. I've been attempting to draw the bounds of the scene and fill in detail from there.

Consider these objects:

I'd normally attacking this drawing like so:

The problem with this strategy is that I need to maintain a mental map as to how the contour lines I've drawn correspond to the scene. Compare that to Brookes' method, which focuses on drawing the focal point and building out from there:

I had assumed my frustration with drawing was lack of practice and general anxiety about failing. Instead, I realized I'm just trying to hold too many complex ideas in my head at one time. Using Brookes' approach, I was able to finish the sketch with relative ease:

The contour-approach I started above clearly has value. I think the proportion between the phone, medicine bottle and Lego-character is more accurate than my second attempt. But what good is accurate proportion if the process is mentally exhausting?

Perhaps I'll graduate away from Brooke's approach, but for now I'm telling you, this is a game changer.

Friday, September 21, 2018

micro:bit + Espruino + Android = The Cutest REPL You'll Ever Interact With

If you have an Android Phone and a micro:bit, then have I got an experiment for you. Grab your micro:bit, phone and a USB Host on the Go adapter.

On your phone, install the Serial USB Terminal app. On the micro:bit install the espurino JavaScript interpreter by coping the relevant hex file to your board. Using the adapter, plug the micro:bit into your phone. If you have the correct type of USB cable, you should see a screen like this:

Launch the Serial USB Terminal. Under settings, make sure that the USB device is detected and 9600 baud is selected:

Now press the reset button on your micro:bit and you should be greeted by the following message in the terminal:

Your micro:bit is now playing the role of a JavaScript REPL! As noted here you can trivially turn on LEDs, detect the state of buttons, interact with the compass and accelerometer and generally hack away like you would on any other JavaScript console. But the code is being executed on your micro:bit! Here's me playing with the following code:

> i = 0;
> tick = function() { };
> setInterval(function() { tick(); }, 200);
> tic = function() { show(i++); }

I'm amazed at how easy to install and functional espruino is, and I'm impressed that the Serial USB Terminal Just Works. Using this setup I can program my micro:bit on the go, no desktop environment or compilation system needed.

There's obvious room for improvement. Serial USB Terminal forces you to enter code in terms of lines which is a limiting environment to code in. In an ideal world, I'd interact with the USB serial port via Termux and emacs, then I'd be in programmer heaven. The micro:bit is also a tiny platform to be working on, though that can be addressed by upgrading to a ESP32 chip. This chip is far more robust (WiFi anyone?) and runs Espruino as well.

I've always wanted a mini-me sized stand alone computer that I can program in the field. And now I do!

Thursday, September 20, 2018

Cheering on Yorktown Football

Yesterday we cheered on M. at his first home football game. Yorktown almost pulled out the victory, but was unable to close the gap in the final seconds.

Go Patriots!

In other news, check out M.'s height advantage over Shira!

Tuesday, September 18, 2018

What to Pack for a Day at the US Open Tennis Tournament

Every year, as we prepare to head off to the US Open I find myself scrambling to get our gear together. A day watching tennis at the Open typically brings heat exhaustion during the day, nippy temps at night matches and the possibility of waiting out downpours. It also means putting up with their quirky what-can-I-bring-on-the-grounds rules. Take rule #1: No Backpacks. Seems simple. Yet you're greeted with this sign at the entry point:

Which clearly shows string-backpacks and purse-backpacks are allowed, and some other bag types are off limits. One pastime while waiting in line is to ogle folks carrying backpacks and wonder just how many will get through security. Most do.

Other rules are clearly enforced, for example aerosol sun-screen will be taken away. On the plus side, they're good about letting you bring in food, water and umbrellas onto the grounds.

Rather than trying to re-construct from memory what worked in past years, I'm recording what worked this year. Below are two snapshots, the first of my gear, the second of Shira's. And here's a few notes on each.

Along with the items pictured, I bring the contents of my man-bag. The rules state you can bring in a single bag, though I saw many with multiple bags walking the grounds. So next year, I may bring my man-bag and use another bag to carry the items below. Or maybe I'll do what I did this year, and cram everything into the single tote.

If they're not calling for rain, I'll leave the umbrellas and ponchos at the hotel. The inflatable seat is an absolute win. This year I got by with a single 16oz water bottle by refilling it. Armstrong and Grandstand stadiums have water-bottle refilling stations, while in Ashe you need to make do with a drinking fountain. Still, carrying extra water or paying top dollar just to avoid tap water makes no sense to me. I'm glad to save my money for curly fries.

I didn't get much use from the photo-clamp shown below, yet it holds promise. It's strong enough to hold my DSLR and means that I can take tripod-required photos and videos without a tripod.

You can see Shira's prepared for colder night temps, which despite the heat of the day, do typically make an appearance. She's also not down with drinking sketchy stadium water, so it's larger, extra water bottles all the way for her.

Monday, September 17, 2018

Anacostia Trail and Kenilworth Aquatic Gardens - You can check out anytime you want ...

When we rode our bikes to Kenilworth Aquatic Gardens over 4 years ago, I noted how impressive the Anacostia Trail was. At the time, however, to reach the gardens you needed to include city streets in your route as the trail wasn't complete.

Last night I ran the 6+ miles from Anacostia Park to Kenilworth Aquatic Gardens and found that I was on pristine trail nearly the entire run. Even Google Maps hasn't caught up yet to the trail, as there are sections that look like so:

Don't be discouraged by this: you'll find a shiny new bridge when you arrive at this point in the trail.

I saw deer, butterflies, interesting birds and possibly a beaver while running along the trail. I arrived at the Aquatic Gardens and took a stroll. It was approaching sunset and I had the place to myself; it was just about perfect.

I had planned on doing about 6 miles of running, so rather than doing 3 out and 3 back, I opted to run 6 miles to the gardens and Uber back to my car. I ordered up an Uber and started walking to the parking lot to meet my ride. It's then that things started to go sideways.

I found the parking lot. I also found a barbed wire topped security fence and a locked gate that was keeping me from exiting. My Uber may have been 20 yards away, but there was no way I was reaching her. After much apologizing to the driver, I explained that I wasn't going to be able to meet her at the pick up point. I'd have to run another mile or so down the trail and try again.

As I made my way out of the gardens, night was falling and my idyllic scene started to look like the opening of a horror movie. As I jogged out, I noticed an odd sensation. I realized that frogs were crossing the trail in front of me and kept bashing into my legs as I ran. It was surreal.

After a mile or so, I found myself back on a city street waiting for my Uber to arrive. To add insult to injury, the mosquitoes were swarming and if I stood still they'd feast on me. I can only imagine how I looked to the folks in the tidy homes across the street. Here I was, a disheveled runner pacing the street mumbling to myself (though in defense, I was actually on speakerphone with the Uber). The Uber arrived, Anacostia Park was open (whew!), so I was able to reach my car and drive myself home.

What a night! I got a run, nature walk, some pics, and solid Uber story out of the deal. What more could you ask for? If you haven't spent time on the Anacostia Trail, you're missing out. This has to be one of the region's best places to bike, walk and run.

Sunday, September 16, 2018

The Incredible, Recordable, Blinkable, Micro:Bit

The Phoenix 2.5 is a clever device used by soldiers for marking locations during night ops. The light snaps on to a 9 volt battery and generates a sequence of flashes. The Phoenix makes use of IR Leds, so only those with night vision goggles will see the strobe. What makes the Phoenix 2.5 especially interesting is that it's field programmable. Using a coin, a soldier can setup a new flash pattern.

For just a few bucks you can let fellow soldiers know that it's you, their buddy, and not some hostile force sneaking around in the dark.

While this model of strobe isn't very expensive, I don't tend to run a lot of night ops. Heck, I don't run a lot of days ops. So while I think they're nifty, I can't justify buying one. Still, the idea of field programmable strobe has stuck with me.

While I may have to pass on the military grade version, I realized I could program something similar with my micro:bit. Like the Phoenix, my version has two modes: playback and recording. While recording, pressing A, B or A and B, lights up different combinations of LEDs. Letting go of the buttons turns the LED grid off. After setting up the sequence of flashes, you switch back to playback mode where your pattern repeats.

Switching modes is accomplished by twisting (technically rolling) the device to either the left or right. To start recording, twist the device to the left and hit A. To start playback, twist the device to the right and hit B.

While this light beacon implementation isn't going to be deployed to a war zone, it does show how to combine a number of micro:bit features in a somewhat novel way. As always, what the micro:bit lacks in power it makes up for in fun.

Here's the code that powers the beacon:

let Modes = { Recording: 0, Playing: 1 };
let Symbols = { None: -1 };

let current = {
  symbol: Symbols.None,
  mode: Modes.Playing,
  started: input.runningTime(),
  step: 0,
  sequence: [
    { t: 0, s: IconNames.No },
    { t: 250, s: Symbols.None },
    { t: 500, s: IconNames.Target },
    { t: 750, s: Symbols.None },
    { t: 1000, s: IconNames.Square },
    { t: 1250, s: Symbols.None }
  ]
};

basic.forever(() => {
  if(current.mode == Modes.Playing && input.buttonIsPressed(Button.A)  && isTwistedLeft()) {
    startRecording();
  } else if(current.mode == Modes.Recording && input.buttonIsPressed(Button.B) && isTwistedRight()) {
    startPlaying();
  } else {
    if(current.mode == Modes.Recording) {
      if(input.buttonIsPressed(Button.A) && input.buttonIsPressed(Button.B)) {
        record(IconNames.Target);
      } else if(input.buttonIsPressed(Button.A)) {
        record(IconNames.No);
      } else if(input.buttonIsPressed(Button.B)) {
        record(IconNames.Square);
      } else {
        record(Symbols.None);
      }
    } else {
      let offset = input.runningTime() - current.started;
      if(offset > current.sequence[current.step].t) {
        render(current.sequence[current.step].s);
        if(current.step+1 < current.sequence.length) {
          current.step++;
        } else {
          startPlaying();
        }
      }
    }
  }
});

function render(symbol: number): void {
  if(current.symbol !== symbol) {
    current.symbol = symbol;
    if(symbol === Symbols.None) {
      basic.clearScreen();
    } else {
      basic.showIcon(symbol);
    }
  }
}

function record(symbol: number):void {
  if(current.symbol !== symbol) {
    current.sequence.push({ t: input.runningTime() - current.started,
                            s: symbol });
    render(symbol);
  }
}

function isTwistedLeft():boolean {
  return input.rotation(Rotation.Roll) < 45 ;
}

function isTwistedRight():boolean {
  return input.rotation(Rotation.Roll) > 45 ;
}

function startRecording():void {
  current.mode     = Modes.Recording;
  current.sequence = [];
  current.started  = input.runningTime();
}

function startPlaying():void {
  current.mode    = Modes.Playing;
  current.step    = 0;
  current.started = input.runningTime();
}

Grab a local copy of this project by running these commands:

pxt target microbit
pxt extract https://makecode.microbit.org/_F4MDcL8mHhh6

Thursday, September 13, 2018

US Open 2018 - Day 3

[Composed 9/2/2018]

The title on this post is a bit of a misnomer. While the US Open is going on today, we didn't actually attend any matches, much to Shira's chagrin as we walked by the stadium entrance gates. Instead, we spent time exploring the area around the stadium and then hit the road back to DC.

Our day started by exploring more of Korea Town, which included picking up pastries from yet another bakery. We also grabbed a mango bubble tea. For next year's US Open, I'll be casting my vote to stay in Flushing again, if only for access to copious amounts of fresh bread and tea. I also found my way into a couple of spice shops and gawked at the endless mystery ingredients. This had me wondering: what is fish stomach and why is it so expensive?

We then spent a bit of time wandering Corona Park, which not only hosts the US Open tennis grounds, but was also the location of the 1939 and 1964 Worlds Fair. For years now I've glimpsed various peculiar sights from the heights of Arthur Ashe stadium. Some of these are ruins from the 1964 World's Fair, while others like the Titan II and Atlas D rockets are part of the New York Hall of Science. Today I finally got up close to these oddities.

We found our way to the New York Hall of Science, which we discovered is a schnazzy science museum. As luck would have it, they offer free admission on Sundays between 11 and noon from September through June. We showed up at 11:25am, and walked right in. As science museums go, I was impressed. It's definitely biased towards kids over adults, but there was plenty for us to see. The exhibit dedicated to animation was especially interesting and gave me an appreciation for Gumby I didn't think possible. My favorite exhibit was the Insight Astronomy Photographer of the Year. What can I say, the photos on display are out of this world.

After the museum we made our way to Forrest Hills where we found a street lined with Kosher supermarkets and restaurants. Like the Korean spice shops we'd visited earlier in the day, we again found ourselves in over-crowded shops selling mystery items--though in this case, all the items were Kosher (alas, no fish stomach was on sale here). One highlight was the supermarket selling various pickled things out of buckets. Labels are so overrated.

You've got to love New York: with minimal walking we hit two ethnic areas, historic sites and a science museum, and still didn't check off all the items in the area. Maybe next year I can drag Shira to the zoo, Queens Museum or botanic garden.