How not to cure poverty

May 14th, 2008

Here’s a recent post from slashdot:

“Stephen Hawking has traveled to South Africa in search of Africa’s Einsteins. The project will create Africa’s first post-graduate center for math and physics. The British government has unfortunately decided not to back the project, which is hoping to fight poverty by identifying the kind of talent that can create wealth.”

While noble (and sadly, Nobel worthy) this is unfortunately the *wrong* solution to the problem. The solution to poverty is global capitalism. Excellent, detailed moral, practical and philosophical arguments for this exist. If Stephen is serious about getting Africa out of poverty, he needs to engage in actively changing the governments of these countries from dictatorships, to free capitalist countries. There can be no wealth creation in a dictatorship. We see this every passing day in Venezuela, and Cuba is the poster child for this phenomena, as are the entire Eastern Block during the Soviet reign. Why do “smart” people have such a hard time with this point?

Just to be clear, you can’t change the government of a country in a vacuum, it requires a solid cultural shift to a culture that promotes and understands the sovereignty and power of the individual over that of the group. You can’t have a government claim to protect individual rights and individual freedoms in the context of ethnic, class and/or religious politics. So, in order to create a “lasting” governmental change, he needs to work on getting these countries to realize the power of individuals.  I don’t have the answer to that, because we need that in our country now.  Read all of the three texts above, and maybe you’ll figure out how, and start us down that road….?

 

Functional Languages

April 6th, 2008

Disclaimer: I’m becoming enamored with Functional Languages of late, and Mathematica, Lisp and Scheme in particular. But, the projects I support are all written in Java.

So, I stumbled across the codemodel project today. https://codemodel.dev.java.net/ It looks to be just what you need if you want to generate code programmatically from java. It really looks pretty slick. I couldn’t find a way for it to parse existing code, but that’s beyond the scope of what they want to do. As I was scrolling through the 80+ classes I was struck by the cognitive effort it would require to get good at this tool. 80 classes is pretty small for an API, and I imagine with a few days of intense work one could get pretty adapt at it. The design is clean, the names are intuitive so really Kohsuke Kawaguchi’ has done a bang up job on the system, and this is not a rant on his skills which appear to be formidable. This is a rant on Java. This should just be built into the language. Seeing languages that build on and operate directly on the parse tree of the language has given me a huge appreciation for the power of those languages. To automatically build code in any of the afore mentioned languages, you just do it using the core language directly, building up the parse tree using language mechanisms. So, for instance, in Mathematica, if I want to create text to represent a function, I just munge the OutputForm of an expression. It’s no wonder Lispers foam at the mouth so profusely. This power comes “for free” with the language definition. It’s just astonishing!

Pandora

March 18th, 2008

With relatively little effort (one afternoon of listening and “voting” for particularly poor or good songs) I was able to “tune” www.pandora.com to play a steady stream of trance music that perfectly matches my desired sound background for coding tasks.

I’m not particularly picky about my trance, so that may be part of it, but I did have as many thumbs down as up the first day. Now that I’ve been listening off and on for about two weeks, I’ve had very few thumbs down. Not a lot of thumbs up either (every time I’ve identified one, it was already marked with a thumbs up.)

My experience with creating a “nothing but Rush” station hasn’t worked as well. It would play a fair amount of Rush, but never got to the point where it played nothing but Rush, which is what I was hoping to achieve. My tastes in the “rock” genre is far more specific, so perhaps it needs more training? Don’t know. Although, it did suggest some nice Steve Morse, someone I’d completely forgotten about.

All in all, a big thumbs up for Pandora!

Engineering Challenges

February 22nd, 2008

Sadly, the NSF is once again showing it’s altruistic colors (I guess I should never be surprised when an agency such as it is altruistic) with it’s recent announcement of the 14 engineering challenges facing the 21st century.

What a paultry list that confuses politics with engineering in over half of the cases. “Restore and improve urban infrastructure” is not an engineering challenge. Neither is “prevent nuclear terror.” These are political problems, as are at least half of the items listed. Taking the urban infrastructure as a single example. We know how to build infrastructure. By challenge I take it to mean, “something we don’t know how to do now.” Well, I think it’s pretty clear we know how to build cities. Maybe not cities that the politically correct want us to build, but for those of us who live in reality, the cities are great. The issue is a political one in that city governments (at least US major metropolitan areas) are typically the most corrupt and it shows in their urban cores. It’s really that simple. Reality cannot handle contradictions, it pays you back for your contradictions. Always. And we see it in the urban core. I could write an essay on the irrelevance of half of the list, but that would digress me from my main point. Which is, what are the *real* engineering challenges for the next 100 years.

So, here is my list of engineering challenges, in case you care.

  • Commercialization of space (the engineering aspects, again, huge political aspects, we ignore those here, and won’t mention this again.) including routine commercial interplanetary travel.
  • Programming the human (and non-human) genomes
  • Direct human machine interfacing
  • Extend human like conciousness indefinitely, either through life extension enabled by nano-technology or uploading into computers
  • Nano technology to rework human beings, and multitudinous other entities
  • Energy from Fusion (hey, they got at least one right….)
  • Get computers to pass a real TuringTest.
  • Create robots that can pass as humans (this is one the Japanese are taking very seriously)

Well, not bad for 5 minutes work, and a hell of a lot more interesting than the fluff from the NSF.

February 22nd, 2008

Setting up a new computer from scratch. Given my profession amazing how long that’s been. Here’s the software list.

An example of why defacto monopolies don’t matter

January 4th, 2008

All that matters are government enforced monopolies.  Defacto monopolies never last.  Thus Microsoft is making strong headway into the webserver business.  And these guys are just wrong about what Apple should and should not be able to do.

Generating a random enum in java

November 20th, 2007

Here’s a code fragment for how to create a random enum in java from an Enum class object clazz (rnd is an object of type java.util.Random)


Object[] objs = clazz.getEnumConstants();

return objs[rnd.nextInt(objs.length)];

Generating a Random String in Java

November 20th, 2007

I have had a need to create a string in java. I wanted it to be clearly a string, and thus, I decided to make it all lower cases, with spaces. This is the resulting code, inspired by some googling, but since I found nothing for exactly what I wanted, I include it here:

/** In tests, I prefer my random numbers to be identical on identical runs. **/
private static Random rnd = new Random(123456789L);
private static String raw = "abcdefghijklmnoprstu ";
private String randomStr() {
    // if you want the probability of duplication to be small for 10^n iterations of this
    // code, then replace 4 with n.
    char[] chars = new char[4 + rnd.nextInt(50)];
    for (int i = 0; i < chars.length ;i++) {
        chars[i] = raw.charAt(rnd.nextInt(raw.length()));
    }
    return new String(chars);
}

Lawrence Lessig

November 20th, 2007

Today I stumbled upon the story of Lawrence Lessig’s attempt to strike down the ridiculous law that makes copy rights last effectively forever (unlike patents which expire after 20 odd years). It is an interesting and somewhat ironic story. He attributes his loss in the case to the fact that he was emotionally attached to logic. (my words, not his.) While the court supposedly is based on logic, they also respond to emotional arguments. Fascinating read. http://www.legalaffairs.org/issues/March-April-2004/story_lessig_marapr04.msp

My 7 ways to fix netflix

November 16th, 2007

Recently Inc.com described 5 ways to fix netflix. Only one of these really made any sense, that is “sail away from the mainstream.” The thing that netflix has to remember, the reason it even got popular to begin with, was that it started out as an uber video rental store. It simply had more of everything than any physical store could ever had. Thus it appealed to all the people who liked wacky movies, because *finally* we/they could get them. So, now netflix needs to solve the next problem. What is the next problem? In the short therm, it’s the website UI.

Let’s face it, the netflix interface sucks. So here’s what I think they need to fix, and frankly I could fix all of these for them for well under the million dollars they are spending on the netflix prize, and these features will have far more impact to their bottom line than an incremental improvement to a flawed approach to suggesting movies….

So, here it is, the feature list for netflix interface 2.0.

1. Multi-person lists! My wife and I are different people, with different movie preferences. If you want to predict my preferences, you need to know who I am, and what movies I like. So, while our house loves Starship Troopers, Aliens I, II, & III (hates IV), loves all things Jackie Chan, and hates all things Jet Lie, loves Casablanca, Room with a View, and Somewhere in Time. Those loves are not the love of one person. (And the split between people is not at all what you might think.)

2. Where’s the data on the movies? Netflix should either buy, or figure out a way to replicate IMDB, and then create a wiki for movies (probably best to follow the model of citizendium) but please be sure the wiki is a WYSWIG interface, and not one of these scary for non-computer types lame markup languages that Wikipedia / mediaWiki seems so enamored with.

3. While you’re at it, make sure I can search on producers, writers, screen writers, directors, sound men, makeup artists, special effects people, walk ons, filming locations, film locations (yes those are different), year made, year in the film, character names, a costume designer. Ultimately, I want to be able to describe a scene and have you find it, but that can be version 3.0 of the netflix interrface. I’ll settle for 2.0 here. If I want to be able to find every movie where Ayn Rand had a walk on part in, I should be able to do that. I can do that in IMDB. So, do you want me to do all my movie wandering in IMDB? I bet you don’t! Because then nothing distinguishes you from blockbuster…. Bottom line, IMDB’s search is passable. Netflix’s search is not up to par.

4. The layouts are generally incredibly wasteful of space. For example, the netflix 100 could fit in half the space and still not feel cramped. The more data you can fit on a screen, the better I’m going to feel. The fact that the top 2-3 inches of every screen is wasted “white” space doesn’t help either.

5. What’s with the lack of results on searches? If I search on “ardvarked” it tells me that there are two matches, but it doesn’t show them to me, worse, it’s probably a typo, so why aren’t you correcting my typo for me?

6. Ultimately, it’s not a fun interface to use. I feel like they are hiding stuff from me, and well, I don’t like that. For instance, does netflix have (or not have) a copy of “Penn & Teller Get Killed.” Far as I can tell, they don’t, but I don’t know that from the interface. Maybe I made a typo? Same question, but this DVD is out, what about Ardvarked.

7. DJK’s recent post about Netflix points out an issue that I’ve heard of, but not fully experienced yet. Netflix recommendations are just bad. In DJK’s recent post, the issue really has to do with the fact that the suggestion algorithms don’t take into account any negative information. i.e. the fact that DJK has probably never viewed anything with any nun in it (except for that one House episode and/or Sound of Music) should be a bit of a clue that he’s not interested in other stuff coming from a nun. Even if she is enlightened. (a contradiction in terms IMHO.) Recommendation algorithms are difficult, but netflix’s is notorious among my friends as being particularly poor relative to the competitors.