18 years Ago

Spolsky’s Choices

Published by marco on in Technology

The article, Choices = Headaches by Joel Spolsky, starts with the following screenshot of Microsoft Windows Vista:

 Vista 'Off' Choices

From there, he launches into a diatribe on a surfeit of choice. It’s pretty well-written, as usual from Mr. Spolsky, but somewhat poorly aimed, also as usual from Mr. Spolsky. The basic premise is a good one: don’t provide more choice than your customers know how to deal with. Provide just enough and no more. Extra functionality should be available to those who need it and no one else.

His... [More]

Wildcard Generics

Published by marco on in Programming

This article was originally published on the Encodo Blogs. Browse on over to see more!


As of version 1.5, Java has blessed its developers with generics, which increase expressiveness through improved static typing. With generics, Java programmers should be able to get away from the “casting orgy” to which Java programming heretofore typically devolved. The implementation in 1.5 does not affect the JVm at all and is restricted to a syntactic sugar wherein the compiler simply performs the... [More]

Zooooooooon

Published by marco on in Technology

 The ZuneDo you hear that sound? That’s what Apple shaking in its boots sounds like. With the Zune, Microsoft enters the personal music player fray, diversifying further into the hardward market. It’s like an iPod, but it’s not from Apple; it’s from a company you can trust.

It was accidentally released a tad earlier than expected, but that alone can’t explain the way it’s stumbled from the starting blocks, tripped over its own shoelaces and face-planted into the tarmac. The trouble started with the... [More]

Investing Wisely

Published by marco on in Public Policy & Politics

The United States takes a lot of money from taxpayers and invests it back in the country. In contrast to many other countries in the club of the “First World”, we pump an unbelievable amount into our military. The Mother of All Defense Supplementals by Charles Peña (Anitwar) supplies some numbers for those with a strong stomach. The full military budget comprises several pieces:

  • The official budget, which totals $439 billion for this fiscal year
  • Budgets for the various secret services, like the CIA and the NSA, which... [More]

Death and Taxes Redux

Published by marco on in Quotes

“The only two things you can truly depend upon are gravity and greed.”
Jack Palance (1919-2006)

Recursive Components in Tapestry

Published by marco on in Programming

This article was originally published on the Encodo Blogs. Browse on over to see more!


Given a recursive object structure in memory, what’s the best—and most efficient—way to render it with Tapestry? First, let’s define a tiny Java class that we’ll use for our example:

public class DataObject {
  private String name;
  private List<DataObject> subObjects = new ArrayList<DataObject>();

  public String getName() {
    return name;
  }

  public List<DataObject> getSubObjects() {
   ... [More]

Hicks on Elections

Published by marco on in Public Policy & Politics

The elections of yesterday were a sign that America may not be dead from the neck up. At the very least, there seem to be limits to both our apathy and patience. Despite the warm fuzzies emanating from many pundits today, the Democrats haven’t magically changed into a different party overnight. At best, we will be treated to a three-ring circus as they attempt to impeach Bush; at worst, we have the opportunity to be disgusted, appalled, disappointed and manhandled by a different sack full of... [More]

Inherited Method Annotations in Java

Published by marco on in Programming

This article was originally published on the Encodo Blogs. Browse on over to see more!


See Finding Conforming Methods for part one of this two-part article.

The problem we’re working on is as follows:

  1. Given an object, a method name and a list of parameters, execute the matching method on the given object.
  2. Determine from the object’s class whether the given method can be executed from the given context (web, command-line, etc.)

We will use annotations to mark up methods as callable or... [More]

Finding Conforming Methods in Java

Published by marco on in Programming

This article was originally published on the Encodo Blogs. Browse on over to see more!


This is a two part post illustrating some tricks for working with the Java reflection API. Part two is available here.

Java reflection provides a wealth of information about your code. One interesting use of this information is to layer scriptability on top of an application, calling code dynamically. Suppose we wanted to do the following:

  1. Given an object, a method name and a list of parameters, execute... [More]

Rape Not Just about Power

Published by marco on in Miscellaneous

For the longest time, pop psychology has taught us that “rape is about power, not sex.” That rape was purely an expression of power was received truth, though it didn’t sit well with anyone who’d experienced the powerful effects of libido. It was hard to imagine that rape would have nothing to do with that; it seemed more logical that different personalities responded differently to this drive. Because of the nature of most pornography—and it’s distinctly male-dominant/women-subservient... [More]

Colbert Lends a Hand

Published by marco on in Public Policy & Politics

Stephen Colbert, who plays a rabidly right-wing talk show host of the same name on Comedy Central, walks a tight rope on every show. He satirizes that large segment of America’s media that hews to the White House party line no matter how much it zigs and zags. He does this by pretending to be one of them, but more so. Though an exaggerated version of Bill O’Reilly or Rush Limbaugh is hard to contemplate, Stephen has to try to stay one step ahead of their theatrics every week. Needless to say,... [More]

Two Bits of Justice

Published by marco on in Public Policy & Politics

Texas Justice

 Jeffrey SkillingThe first is from Texas, where, as reported in Skilling Sentenced to 24 Years in Prison (Washington Post), Enron’s former CEO, Jeff Skilling, has been found guilty of corporate fraud. Specifically, “for the accounting tricks and shady business deals that led to the loss of thousands of jobs, more than $60 billion in Enron stock and more than $2 billion in employee pension plans”. He has been sentenced to 24 years, 4 months in prison. He will be expected to pay the outstanding sums in the class... [More]

Iraq—The Sandbox

Published by marco on in Miscellaneous

The comic strip Doonesbury has weighed in heavily on the second Gulf War, stationing one of its main characters, BD, there and having him sent home after his leg was blown off in an attack. His friend, Ray, is still there. Recently, The Sandbox has appeared on the Doonesbury web site, which, in its own words:

“…[is focused] not on policy and partisanship … but on the unclassified details of deployment – the everyday, the extraordinary, the wonderful, the messed-up, the absurd. The Sandbox... [More]”

Inherited Method Annotations

Published by marco on in Programming

This article was originally published on the Encodo Blogs. Browse on over to see more!


See Finding Conforming Methods for part one of this two-part article.

The problem we’re working on is as follows:

  1. Given an object, a method name and a list of parameters, execute the matching method on the given object.
  2. Determine from the object’s class whether the given method can be executed from the given context (web, command-line, etc.)

We will use annotations to mark up methods as callable or... [More]

Finding Conforming Methods

Published by marco on in Programming

This article was originally published on the Encodo Blogs. Browse on over to see more!


This is a two part post illustrating some tricks for working with the Java reflection API. Part two is available here.

Java reflection provides a wealth of information about your code. One interesting use of this information is to layer scriptability on top of an application, calling code dynamically. Suppose we wanted to do the following:

  1. Given an object, a method name and a list of parameters, execute... [More]

Looking for a Silver Lining

Published by marco on in Public Policy & Politics

The innocuously-named Military Commissions Act of 2006 was recently signed into law by an all-too-eager George Bush. Within it, the Congress had agreed that the executive—specifically, the POTUS—effectively has the final word on the definition of torture, applicability of protections from the Constitution, as well as which information is considered too vital to the nation’s security to be communicated to either its own citizens or other members of the government. The executive has the right... [More]

Borat

Published by marco on in Miscellaneous

 Borat In KazakhstanBorat: Cultural Learnings of America for Make Benefit Glorious Nation of Kazakhstan (IMDB) is—as the title makes relatively clear—a fake documentary by Sacha Cohen. The preview shows Cohen as Borat Sagdiyev, wandering from one excruciatingly socially awkward situation to the next, all the while with an ingratiating grin on his face that begs forgiveness for not understanding our great culture while, at the same time, apologizing for the backwardness of his own. In a word, he’s disarming—enough... [More]

Girls’s Costume Warehouse

Published by marco on in Fun

You know how everybody’s screaming about Borat being so over the top? How his schtick is so hilarious because he never goes out of character? It seems it’s catching. This guy—ostensibly from New Jersey—may be for real or he may be faking it too.[1] Either way, he’s hilarious as he tries to prove in just one minute that “[w]e got literally every girl’s costume in the god damn universe!”

Best line? It’s a tie between the announcer’s plea to “get up off yer ass and get the fuck down heah … I... [More]”

Water Boarding

Published by marco on in Public Policy & Politics

What’s one good way to tell that waterboarding isn’t nearly as much fun as Dick Cheney claims it is? Not even Steve-O from Jackass has tried it yet. Stick your face into a man-o-war? Check. Scorpions in his underwear? Check. Riding a bike on things that aren’t at all traversible by wheeled vehicles, then dropping hard onto the bike frame with your groin? Check. But so far, they’ve avoided waterboarding. Perhaps because they would be able to handle it so easily—with nary a wince—compared to... [More]

Dumbing it Down

Published by marco on in Quotes

“Nobody ever went broke underestimating the intelligence of the American people.”
- H.L. Mencken

Opera 9.0

Published by marco on in Design

 Opera Home Page Opera 9.0 New FeaturesOpera continues to improve their site, showing that standards-based design can be fast, clean and elegant. Having recently reviewed the Firefox 2 home page, it’s hard to say who’s stealing from who here. Firefox went with the darker silhouette, while Opera opted for the “girl of indeterminate age”. Both have the big, green download button (a good idea, drawing the eye to it), but Opera has nicer product layouts, with big, Apple-y graphics. Digging further into the site reveals a clean,... [More]

Interfaces in Delphi − Part I

Published by marco on in Programming

This article was originally published on the Encodo Blogs. Browse on over to see more!


This is the first of a two-part article on interfaces. part two is available here.

Delphi Pascal, like many other languages that refuse to implement multiple inheritance, regardless of how appropriate the solution often is, added interfaces to the mix several years ago. However, Borland failed, at the same time, to add garbage collection, so they opted instead for a COM-like reference-counting model,... [More]

Interfaces in Delphi − Part II

Published by marco on in Programming

This article was originally published on the Encodo Blogs. Browse on over to see more!


This is the second of a two-part article on interfaces. part one is available here.

In part one, we saw how to use non-reference-counted interfaces to prevent objects from magically disappearing when using interfaces in common try…finally…FreeAndNil() cases. Though this brings the interface problem under control, there is further danger.

Dangling Interfaces

A dangling interface is another problem... [More]

Firefox 2

Published by marco on in Design

 Firefox 2 Home PageAfter years of changing styles and hit-or-miss site designs, Firefox seems to have finally hit a nice, open, clean style. The download button is huge and green and inviting. The background graphic is confined to the product area (not in the header or footer, reserved for “corporate” use) and adds to the fun feel. Overall, it’s airy, making good use of white space and all text is well-aligned (bullet titles aligned with descriptions … yay!). Even the footer got alignment attention, offering an... [More]

Pitfall in the @For component in Tapestry

Published by marco on in Programming

This article was originally published on the Encodo Blogs. Browse on over to see more!


Any properties used from a Tapestry template have to be declared in the corresponding Java page class. It is highly recommended to declare these properties as abstract; Tapestry implements them for you, automatically including code that re-initializes each property automatically when a page is re-used from the cache. If you implement the properties yourself in the customary Java getter/setter way, it is up... [More]

Immutable Collections in Java

Published by marco on in Programming

This article was originally published on the Encodo Blogs. Browse on over to see more!


Java supports immutable collections of all kinds, but not in the way you would expect. A naive implementation would declare the immutable (unmodifiable in Java parlance) interface as follows[1]:

interface UnmodifiableList<T> {
  function T get();
  function int size();
}

There is no way to modify this list—the API is simply not available. That done, we can now create the modifiable version of the list... [More]

Alan Wake

Published by marco on in Video Games

Alan Wake is a psychological action thriller coming to the X-Box and PC in sometime in 2007. The game’s namesake is a writer, living in the woods somewhere, presumably along a coastline. It takes the realism of a Grand Theft Auto world to new heights, with forested lanscapes as well as small American towns rendered with an incredible level of detail. Throw in weather effects, a day/night cycle and realistic physics and this game has real-world environments like we’ve never seen before. The game... [More]

One Economy for All

Published by marco on in Public Policy & Politics

The Republicans have had control of two branches of government for almost six years now. The third branch fell to their control a couple of years ago. With the help of an extremely complicit and fawning Democratic minority, they have broken nearly everything they’ve touched. There is no need to reiterate the issues—suffice it to say that people are not happy. Bush’s approval ratings are between 35% and 40%, whereas those for the Congress lay between 15% and 20%. You don’t get numbers like... [More]

Anarchy

Published by marco on in Quotes

“Your right to swing your fist ends where my nose begins.”
- Anonymous

Kenny’s Wife

Published by marco on in Miscellaneous

Kenny’s wife is jumping for joy right now. Since he died before going to trial, the judge in the case was forced to accede “to decades of legal precedent” and wipe all 10 criminal charges from his record. Judge Revokes Lay’s Conviction (Washington Post) has the gory details.

“Legal analysts said Lake’s ruling closely hewed to a long-held doctrine called abatement, which allows a conviction to be vacated if defendants die before they are able to exercise their right to appeal. Courts typically rule that defendants’... [More]”