Archive for December, 2009

Brain-Dead

Monday, December 21st, 2009

Java is somewhat brain-dead at times. For instance:

while(c=System.in.read()>-1){
  System.out.print(backspaceChar);
}

Doesn’t do what you’d expect. (hide console input) It appears that System.in is being silently buffered.

So a little googling: http://java.sun.com/developer/technicalArticles/Security/pwordmask/

Sun’s recommendation is a busy-wait loop in a separate thread that constantly rewrites the previous character?!? I mean, seriously, WTF?!?

Edit: It looks like Sun implemented a new API for non-echoing prompts in v1.6: http://java.sun.com/javase/6/docs/api/java/io/Console.html

But this is still crappy. Introducing a new API to partially work around the broken functionality of an old API is how you get bloated monstrosities to begin with.

Food, Inc.

Friday, December 4th, 2009

I watched Food, Inc. last night. Was not impressed. Yes, we mass-produce food. Yes, it’s gross in parts. But so was the small-scale chicken slaughtering the film touted. Why is a smaller, open-air assembly line better than a larger, more environmentally controlled one?

Plus they played with the stats too much. “There used to be X thousand meat processing plants, but now 13 produce 80% of the meat in this country.” This doesn’t tell me anything. That last 20%, is that 2,000 smaller plants? Or 3 other really huge ones? What percentage did the top 13 used to produce? Apples-to-oranges statistical comparisons make me distrust the source.

Not to say it was all bad. The patenting of GMOs and the strong-arm tactics of their producers are definitively abusive, which I have ranted about before.

But overall, it seemed more anti-corporate, anti-science and hippy-ish than anything resembling a reasonable collection of recommendations on how to better our food production system.


<Kered.org>   © Copyright 2000-2005 by Derek Anderson
Get Firefox