The random musings of a software developer

NosillaCast CCATP – Should there be Art in STEM?

Allison Sheridan, Ashlyn Anstee, and I got together to record an episode of Chit Chat Across The Pond entitled "Should there be Art in STEM?" Link to the podcast. Excellent discussion! Ashlyn is an enthusiastic and dynamic animator for JibJab and has posted several animations online. Here’s her website. Go listen!!

Queen of Sheba Cake

Dense gateau-style chocolate cake with ground almonds.

Serves 8 to 10


CAKE

125 grams semisweet chocolate
125 grams unsalted butter
3 eggs-separated
125 grams granulated white sugar
1/2 tsp. vanilla 125 grams ground almonds


GLAZE

50 grams white wheat flour-sifted
100 grams semisweet chocolate
50 grams unsalted butter


  1. Preheat oven to 175°C (350°F).

  2. In a small pan, melt chocolate over low heat. Cool to room temperature.

  3. In a mixing bowl, cream butter and mix in melted, cooled chocolate. Add egg yolks, one by one, and half of the sugar, beating well after each addition. Mix in vanilla. Fold in ground almonds and then flour.

  4. In another bowl, whip egg whites just until they are stiff. Add remaining half of the sugar and beat until egg whites are glossy, about 30 seconds more.

  5. Stir 1/4 of the egg whites into chocolate mixture and then fold in the rest of them. Pour mixture into a 20-cm (8-inch), buttered and floured cake pan.

  6. Bake until cake shrinks slightly from sides of the pan and the top springs back when lightly pressed with a fingertip, about 30 minutes. Cool cake in pan for a few minutes before turning it out onto a cake rack to cool completely. At this point, cake can be stored in an airtight container for a week.

  7. For the glaze, a few hours before serving, melt chocolate with butter over very low heat. Stir gently.

  8. Put cake on a rack and spread warm glaze over its top and sides, working quickly to finish before glaze sets.

To make ground almonds, cover them with water, bring to a boil, drain, and then slip each almond out of its skin by pinching between your thumb and forefinger. In a 175°C (350°F) oven, toast almonds until they are light golden, about 10 minutes. Cool. In a food processor, grind almonds with a few tablespoons of the sugar by turning machine on and off.

Banana-Nut Bread

Just made this tonight. Enjoy!

A perennial favorite when banana ripening outstrips consumption.

Makes 1 loaf (Serves 6 to 8).

1 cup firmly packed brown sugar
½ cup butter
2 eggs
1 ½ cup mashed bananas-very ripe (about 3 to 4)
1 tbl. lemon juice
2 cup sifted white wheat flour
3 tsp. baking powder
½ tsp. salt
1 cup chopped nuts


Preheat oven to 350°F. Butter a large loaf pan. Sift the flour, baking powder and salt together.

Cream the brown sugar together with the butter, then mix in the eggs. Thoroughly mix in the bananas and lemon juice, then mix in the flour mixture as quickly as possible.

Fold in the chopped nuts, then pour into the prepared pan. Bake for 45 minutes to 1 hour, until a toothpick inserted in the center of the loaf comes out clean.

(Cook’s Magazine, courtesy of Mangia, the Mac OS 9 recipe application)

Alfred 2 is in the Mac

I just upgraded to Alfred 2 from the previous version. Seriously – get the Powerpack, you will not be disappointed. I’ve got Alfred 1.x and wrote a couple of nifty things with their extensions, such as mounting a remote Airport Extreme drive, launching various apps, and . While the support site is a little bare right now, their support forum is a hive of buzzing activity.

I’ve ported a number of the previous extension doo-dads I had cadged up using Alfred 2’s workflows. For instance I have a keyword shortcut which launches all my development tools (wrote that up in a previous post). Alfred 2 has a workflow specifically for that called “Launch file group from keyword” (Click on the + button at the bottom of the workflow list, it’s in Templates > Files and Apps. Drag and drop the apps I want to launch and that’s it. Would be nice if there was a + in the app / file list so I can search and select them, but no matter.

The one which was a little tricky was launching an Automator workflow. Turns out that doing a “Launch file group from keyword” did not work – it simply opened the Automator workflow in Automator itself. Figured I needed to run some command line script launcher (note: osascript does not work). So I consulted the man pages using the apropos command, apropos automator in to be exact and up popped the command I needed and it was (drumroll) automator.

Back to Alfred 2, create a “Keyword to Script” workflow, located in Templates > Essentials. Next, make sure that /bin/bash is the language, uncheck all the Escaping checkboxes, and enter

automator "full_path_to_automator_workflow.workflow"

in the Script text field. You want the full path starting at the root, i.e.:

/Users/my_user_id/directory/.../directory/automator_workflow.workflow

And that’s just it!

I like the way in which Alfred 2 uses its workflows to achieve everything in Alfred 1.x’s extensions, and more, in a uniform representation. And it’s far more versatile, almost icon based programming. You can even pop up Notification Centre alerts!

Do read Federico Viticci’s review on MacStories – it’s good. In fact, read anything Federico writes.

PopClip + Dash = Xcode Love

I’ve written about PopClip and the Dash documentation browser, in particular how I found an issue using the PopClip Dash extension and provided a fix.

Here’s why I love the combination of PopClip with its myriad extensions and Dash while using Xcode. My standard development application launch comprises:

On my iMac, I additionally launch Kaleidoscope for file comparisons.

I always have PopClip running in the background, with the Dash Extension installed. When I select text in Xcode, the familiar PopClip menu comes up and includes the “cat” icon for Dash. Selecting that Dash icon switches over to Dash and looks up the selected text. I find Dash a whole lot more useful, easier to navigate, and quicker compared to Xcode’s Organiser.

The usefulness of Dash comes from clicking on the method declaration (it has a grey background) which copies the entire method text. Switching back to Xcode via command-tab, I do a paste and voilà, I have the method declaration in place. You could also select and copy portions of the text in Dash, if you so desire.

The best part is you’re not restricted to only the documentation which Apple provides. You can populate Dash with a whole slew of documentation, including PHP, Ruby, Python, and even man pages! And you don’t have to be tied in to Xcode – go on, be different and use BBEdit, TextWrangler, or TextMate!

As for PopClip, it’s a pity that I can only have 22 PopClip extensions… Fortunately I don’t need that many!

One more thing… I don’t use the dock to launch applications – I use Alfred instead. The dock only contains currently running applications (thanks Elaine and MacBites!). The nice thing about the Alfred Powerpack (extra cost, not much but worth it!) is that it can launch a set of applications when a short string is typed in its search field. I open Alfred (control-space in my case) and type in dev, press return and my standard suite of development applications launches.

Share and Enjoy!

To Our Beloved Cat Tasha: An Elegy

Tasha - when she came into the family

Tasha entered our lives in August 1997. She was a lithe grey striped tabby we rescued from the Austin Animal Shelter. She joined our other cat Sassy whom we had adopted only three days earlier – we simply had to have two cats. Tasha had a lovely time in Texas and moved along with us to Iowa in 1999, flying in style with TWA.

Both Tasha and Sassy filled our lives with joy as they bonded with us, lived with us, and shared nuzzles and copious cuddles. She and Sassy were the protectors of the domicile, and were very affectionate to all who visited our home.

We noticed that Tasha wasn’t well about a month or so ago, when she started breathing hard. Vet visits ensued, x-rays were taken, and we saw that her lungs were cloudy. Ultrasounds were done, medication given to ease her breathing.

Today, February 10th, 2013, she did not eat nor drink any water, and her breathing was very, very laboured. With much sadness and tears, we made the decision that had to be made. Somehow, she seemed to know. The drive to the vets was the longest 20 minutes of our life. There, we spent time with her, speaking of our love, and allaying any worries she may have. We told her to be strong. We stroked and petted her. We were with her to the very end.

The winds are blowing. It’s cold here, not only outside but within our hearts. We have lost a cherished and beloved member of our family.

Sleepy Tasha

O Tasha,
Nibbler of toes,
Climber of high places,
Concealer extraordinaire,
Opener of Drawers,

You have truly lived a life that’s full,
You have given us much joy,

We will remember you, always,
Peace and rest, dear one.

Macworld/iWorld 2013

3rd and final day at Macworld/iWorld 2013. It’s been a fun show.

panorama

macgeekgab

crowds

PopClip Dash extension fixed

Just received a tweet from Pilotmoon Software that the PopClip Dash extension has been fixed.

On my way to Macworld /iWorld 2013

Typing this from the air enroute to San Francisco for Macworld/iWorld 2013. Lots of things to see, seminars to attend, but most importantly friends in the Apple community to connect with. See you at the show!

Of Dyson and Design

I’ve been thinking recently about the reasons why I’m so drawn to the Dyson family of household products. I believe it’s the elegance of superb industrial design applied to ordinary things about the house. We have a Dyson DC-17 Animal upright vacuum cleaner and here’s what I like about it:

  • when you turn it on, it starts in a known state – the vacuum begins ingesting dirt and the brush roller will come on when you lower the handle. This has been referred by many interface designers as the Law of Least Surprise. Some of the vacuums I have used power up in the state which you last left. Goodness knows what that might have been, given that it might have been a week or more ago!

  • it automatically adjusts for carpet height. The degree which you move the handle down sets the brush roller height to match the carpet height being vacuumed. My old Eureka had a dial to set the height – is this carpet a setting of 3 or 5? Who can tell?

  • it has a transparent dirt collection container. This to me serves two purposes: you can see the dirt being actually sucked in (yes, it’s working!) but more importantly, see when it’s full. My Eureka has a bag, tucked away on the inside, under a lid. Full, empty, or almost full – I have no idea.

  • The on/off controls for the vacuum and brush roller are easily reachable, clearly marked, and designed well. Yes, you can even turn off the brush roller for hardwood floors. My Eureka has a flap switch you step on the left to turn it on and off, and a round button on the right to unlock the handle. Both are not marked, you just have to know. It also doesn’t have a switch to turn off the brush roller.

  • Small things matter. The HEPA filter in the Dyson needs to be washed every 6 months. This filter is marked with the digit 6 with an underline beneath it to indicate not only the number of months but also to differentiate 6 from 9. There’s a tap icon to indicate what needs to be done, no words in multiple languages, just 6, an underline, and a tap. Details, I know, but it counts.

  • The new Dyson vacuums have a ball which contains the vacuum motor, it lets you manouevre the cleaner deftly. But did you know that Dyson invented the ballbarrow? Design reuse there!

  • Dyson has recently introduced a fan without exposed blades, the Dyson Air Multiplier which was an innovative reapplication of the vacuum cleaner motor. This fan was reinvented as the Dyson Hot which incorporates a heating element and became an electric heater which circulated warm air. There is a video and article from the Telegraph discussing the engineering in its design. There’s also the Dyson Air Blade – a neat way to dry hands in restrooms.

You can see where these design ideas can help us build more engaging and useful applications.

To wit:

  • Always uphold the Law of Least Surprise. Design for the most expected user experience. Take for example the iPhone camera activation button on the lock screen. If you didn’t know how to use it, you might tap the camera button and immediately see it bounce up and reveal a sliver of the camera app, a cue to perhaps think about sliding the button up to reveal the entire camera app.

  • Make things as intuitive and easy in the application interface. Hide complex computations and lookups so as to present results succinctly. Take guesswork out from the functionality exposed by the interface.

  • Show that the application is working – put up a spinning cog or progress bar. If the application uses storage – maybe a bar indicating storage space used would be beneficial, especially when the colour of the bar changes to say, red, when nearly full.

  • Make controls obvious in their use and stick with design guides and commonly expected behaviour (law of least surprise, again).

  • Details matter – it’s what separates the truly elegant applications from the run of the mill ones.

  • “Whevever possible, steal code” – Jon Bentley, Programming Pearls. Jon wasn’t referring to the misappropriation of software, but of the reuse of code. I’d also add “Whenever possible, contribute code” as a corollary.

  • Innovate. Come up with clever ways of doing things, and using things ingeniously to make other things

Powered by WordPress