[]RSS

[ Here: About | Archives+Tags | Artwork | Resumé | Contact ] [ Elsewhere: Comic | Projects | Philosophy | Work ]

Tips for C programming

[Comment]

September 30th, 2006 in Links

A large batch of tips on C programming.

Killing our language

[Comment]

September 30th, 2006 in Rants. Weblog

This is the first part of an ongoing look at how corporate culture is eroding our language. Corporate munging of our language offends me, mostly because it’s so un-artistic, and evasively dishonest.

Today’s word: Leverage. Here is its common, annoying usage:

Leveraging the latest in browser and web technologies …

Beef #1 - Cover your ass

This use of leverage applies the passive voice — a voice that removes the attribution, ripping the people or purpose out of the phrase. Writers usually do this to cover their ass. If you don’t imply that someone has done something (or say what was done) then you can’t get fired for it.

By blurring blame and responsibility we can hide or exaggerate meaning. And the possibility of dishonesty is the likelyhood of it, so the construct is often misused. It lets us get away with stretching the truth.

Beef #2 - Meaning(less)

Leverage is a weak, lofty replacement for “uses” ( or “uses to advantage”). The above phrase could be reworded:

Using the latest in browser and web technologies …

But even when we remove leverage from the mix, the sentance is weak. It’s horribly vague. Which technologies does it use? Why do we even care? And while the vagueness allows room for dishonesty, the greater crime is its bland weakness.

The gray vague of unsympathizing sea. — Lowell

Inspire me

This use of Leverage is uninteresting, pompous, and muddling. We have such a rich language, why would anyone want to choose the least useful way of using it? And people writing about products should be especially wary of weak language: if they don’t inspire or interest us, they will be out of work.

Javascript graphing

[Comment]

September 30th, 2006 in Links

MX Graph, uni-directed graphs in Javascript. I don’t recommend this library specifically, but expect good things in appication land from Javascript thingies. (Note the use of “thingies” is in retaliation of language like “leveraging”, as found on the MX Graph site).

C++ optimizations

[Comment]

September 30th, 2006 in Links

C++ Optimizations. Remember kids, “optimization” is always relative. A pile .01% gains, in meaningless locations, are all still meaningless.

Ubuntu + click&run

[Comment]

September 30th, 2006 in Links

The unofficial Ubuntu click-and-run site, a web-based repository of debian packages.

Ubuntu bug #1: Microsoft has a majority market share

[Comment]

September 29th, 2006 in Links

Microsoft has a majority market share, bug #1 in the Ubuntu bug tracking database. Sounds more like a goal or a feature to me …

One line of code: 4 languages

[Comment]

September 28th, 2006 in Programming. Weblog

I was showing a friend a line of code I wrote tonight. It’s nothing special, just a progress indicator that is displayed when a form is posted. I realized, though, that the one line of code touched four different ‘languages’, and a larger number of areas of know-how:

$('view').innerHTML = '<img src="/images/indicator.white.gif" />';
  1. .
  2. (markup language)
  3. (formatting language)

The line is emitted Javascript (reacting to a DOM event in an HTML form), produced by Php. The Javascript is writing some HTML to a DOM node, which is styled based on a set of defined CSS classes.

The line implies knowledge of the , and requires understanding the and (which hides the wonders of the DOM access and XmlHTTPRequest). Putting together the application quickly also required some understanding of Unix, which itself touches several tools. If the form were doing anything interesting, it would also bang up against . And you know what? It’s not a half-bad way of building an application with a user interface.

I’ve been hacking at another incarnation of my natural-language markup plugin (smarky), and decided to put up a quick web-based test interface. The web interface took less than 10 minutes to whip together, containing only a handful of code and a small bucket of markup.

Php, foot, mouth

[Comment]

September 27th, 2006 in Php. Weblog

I found an interesting behaviour tonight. The language allows you to call a member function as if it were a static function, something you can accidentally hide when calling callback functions:

// Oops, this calls a non-static member statically as sm::blocks
preg_replace_callback(
       "/(?<=\n\n|\r\n\r\n|\r\r|\A)(.*?)(?:\n\n|\r\n\r\n|\r\r|\Z)/sm",
       array("sm", "blocks"),
       $text);
}

What I really meant was:

array($this, "blocks")

When you call a static function in a Php class, it has the side-effect of wiping out the class context. Without the class context, you can’t make other calls to class members. In my case above, Php allowed me to break the class context (calling a non-static as static) without warning, which caused a perfectly legitimate class member function fail:

function text($m) {
    $this->inlines($m);
}

Which fails with: Using $this when not in object context.

Instead, Php should warn: Calling a non-static member as static. This might not be what you meant to do.

Alan Cox’s exploding thinkpad

[Comment]

September 24th, 2006 in Links

Alan Cox’s (of Linux kernel fame) thinkpad explodes. Includes pictures of laptop bits.

The Law of Demeter

[Comment]

September 24th, 2006 in Links

A good summary of The Law of Demeter, a “principle of least knowledge” for software design.

Next page [>>]