“Kill Your Darlings” is a Programming Principle Too

Posted on 28th February 2011 by Ryan Somma in Geeking Out
Proce55ing Source Code
Proce55ing Source Code
Credit: Niels Heidenreich

In his book On Writing Stephen King argued that to be a good writer, you must be able to “Kill your darlings,” where, for the sake of keeping the prose moving, you must cut out the non-essential parts, no matter how well-written:

Mostly when I think of pacing, I go back to Elmore Leonard, who explained it so perfectly by saying he just left out the boring parts. This suggest cutting to speed the pace, and that’s what most of us end up having to do (kill your darlings, kill your darlings, even when it breaks your egocentric little scribbler’s heart, kill your darlings)…I got a scribbled comment that changed the way I rewrote my fiction once and forever. Jotted below the machine-generated signature of the editor was this mot: “Not bad, but PUFFY. You need to revise for length. Formula: 2nd Draft = 1st Draft – 10%. Good luck.”

Writing code is much like writing prose, but I think it’s even harder to cut your most beautiful ideas from a computer program. In software design, we have to research heavily and go through hours of trial and error to produce some of our solutions. It’s one thing to slash several paragraphs of prose crafted in a hour of brilliant inspiration, it’s quite another to throw away an inventive solution and the wisdom that came with it.

[Continue Reading…]

Breakout of Slide Presentation Linearity with Prezi

Posted on 21st February 2011 by Ryan Somma in Geeking Out,Mediaphilism
Mxplx Prezi Screenshot
Mxplx Prezi Screenshot

At Science Online 2011 I was introduced to the Prezi Presentation Paradigm by Stacy Baker of Extreme Biology. After getting past a surprisingly mild learning curve, I was able to produce the following presentation mixing a Prezi presentation with desktop video capture:

Keeping in mind this is not the best example of a Prezi demo, you can step through and play with the Mxplx Prezi itself below (alternately, you can browse popular Prezis here). Don’t confine yourself to just click through the presentation, as you can click-and-drag, double-click, and zoom as well:

[Continue Reading…]

Comments Off on Breakout of Slide Presentation Linearity with Prezi

Deep Science Cuts in 2011 Budget, but Oil Subsidies Remain

Posted on 14th February 2011 by Ryan Somma in Enlightenment Warrior
PEW Center on Cuts
PEW Center on Cuts

Spending cuts outlined in the Continuing Resolution (CR) bill currently top out at $74 billion, but, with the Tea Party holding Republicans to principle, it will reach $100 billion (updated cuts here). Predictably, this bill has lots of bad news for Science and Technology in America; unfortunately, it maintains the status quo on oil and gas subsidies.

The biggest cuts are to Energy Efficiency and Renewable Energy (-$786.3 million), the Environmental Protection Agency (-$1.6 billion), the Centers for Disease Control (-$755 million), Clean Water Funds (-$950 million), and a cut of $893.2 million to Science. It hurts, but it’s important to keep perspective. Some of these cuts are merely cancelling out the unspent portions of the American Recovery and Reinvestment Act of 2009, and we’ve been reminded from both sides of the aisle that “very hard choices” will need to be made on the deficit. A look at the above Pew poll on where American’s think spending should be increased and decreased, and we have to admire the Republican Congress for taking such a political risk.

Federal Subsidies (2002 - 2008)
Federal Subsidies (2002 – 2008)
Source: Environmental Law Institute

But the respect is tempered by the fact that, while cutting subsidies for alternative energies, Congress won’t make the truly hard choice of cutting subsidies for the entrenched Oil and Gas industry, which receives $10 billion annually in subsidies, more than five and a half times the federal subsidies for renewable energy from 2002 to 2008. Internationally, fossil fuel subsidies are 12 times greater than support for renewable energies, $46 billion compared with $557 billion in 2008. By maintaining tax subsidies that keep gas prices artificially low in the United States, the Federal government creates a distorted energy market where consumers cannot compare the true cost of fossil fuels to alternative energies.

[Continue Reading…]

Comments Off on Deep Science Cuts in 2011 Budget, but Oil Subsidies Remain

Generating Grids, Hexmaps, and Image Markups with JavaScript

Posted on 2nd February 2011 by Ryan Somma in Geeking Out - Tags:
Corrosion Mapping, Hotspots Highlighted
Corrosion Mapping, Hotspots Highlighted
(Not an Actual Report Image)

One application I had the honor of working with in my time with the Coast Guard was a Corrosion Mapping tool used by Engineers to track the wear and tear on aircraft parts over their lifetime. Using an Active X control, users would bring up a TIF of an aircraft part, and then click on grid coordinates laid over it to identify places where corrosion was noted. These X and Y coordinates were then saved to the database, where they could be tallied in reports, with the number of occurrences of corrosion highlighted to identify weak points in the parts. It looked something like the image above.

I recently tried to reproduce this functionality with JavaScript for an application where researchers would mark incidents of contamination on a building floor plan in order to determine the radius of the area that would need to be sterilized. Here are three JavaScript variations on this theme of plotting coordinates on a grid.

[Continue Reading…]