Politics: the pleasing symmetry of Bush's policies on Iran and Iraq

No comments:
Libyan model Shaima in a show in TripoliBush's legacy will not be complete unless he manages to start a third war, hopefully preemptively, and hopefully soon, with Iran. And there's a pleasing symmetry to it. Let me explain.

Today Bush has taken a hopeful step toward attacking Iran by taking an NIE report that states that Iran had abandoned it's nuclear weapon ambitions 4 years ago and turning it into a confrontation, because Iran hasn't admitted that it had a nuclear program 4 years ago. (You can read about it at the BBC World News.)

Well that's cool. We attacked Iraq because we thought they might attack us with WMD in the future. We may as well attack Iran because they might have attacked us with WMD in the past. I think you'll agree there's a kind of pleasing symmetry there.

In another twist of irony, Ahmadinejad hailed the US Intelligence report as "announcing a victory for the Iranian nation in the nuclear issue against all international powers". What happened to not believing anything the "Great Satan" says? Man, they really don't make tyrants like they used to.

The woman in the photo is modeling Libyan fashion; militaristic, yet alluring don't you think?

(Sometimes when you wake up and find yourself in the Twilight Zone, you might as well go with it.)

What do you use to do reverse proxies?

No comments:
Seems like the two popular options are:
  1. Apache with mod_proxy.
  2. Squid
I would love to see something in pure Java that I can plop into Tomcat. There seems to be a plugin for Glassfish.

What do you use?

Web Tank revisited: AgentFrank

No comments:
Years ago (1996-ish) I envisioned something similar to AgentFrank that I called the "Web Tank" - Tank in the sense of an armored vehicle, but also as a container (I'm fond of double/triple meanings). I never got around to writing it.

I like the description of AgentFrank - it's a strong metaphor: "The goal of Agent Frank is to be a personal intelligent intermediary
and companion to internet infovores during their daily hunter/gatherer
excursions." Sounds delicious!

AgentFrank is actually more comprehensive than my original vision - heck, it includes RDF. Unfortunately, it looks like the project is all-but-dead. My first clue that this is the case is that he refers to using "Avalon Phoenix" as a "future direction". Avalon is dead. The second clue is that the wiki was last updated Nov 2003.

A Trillian competitor: Miranda IM

No comments:
I haven't tried this yet, but I might. Trillian's long startup times have gotten worse for some reason. http://www.miranda-im.org/

Redundant solutions to single sign on

2 comments:
Atlassian has their own single sign on product called Crowd - but why? CAS does a fine job, and it's free.

Open source Java inspiration

No comments:
Shout out to Ray Tayek, chair of the OCJUG (and master Go player) for pointing out this wonderful list of obscure projects, embedded in a wonderful blog. The blog has a bit too much advertising for my taste, but I'm subscribing to it anyway. Almost every piece of software on that list interests me for one reason or another, and that's a Good Thing.

(Ray also posted a link to Joel Spasky's Yale speech, which was an amusing read. I never thought of in-house software as being that bad but now that he mentions it, I guess it really is.)

How many Tomcats do you need?

No comments:
I have 3 tomcats running on my system - one for OpenLaszlo, one for Jira, and one for my app. I suppose I could use GWTShell and make it 4....

Judge a development process by it's applications

No comments:
JIRA is a well-regarded issue tracking system, and Chris Mountford took the time to describe some of their process in his blog. I'm glad he did.

I recently posted about judging frameworks by their applications - I
think you can judge a process by its applications, too.

Public Domain Movies

No comments:
The upcoming Will Smith movie "I Am Legend" is based on Richard Matheson's science fiction novel of the same name, but there are other movie versions. The Last Man on Earth (1964) was the first, with Vincent Price. It is in the public domain, and can be viewed for free. This movie influenced another famous movie, George Romero's The Night of the Living Dead (1968), which is also in the public domain.

Alas, The Omega Man (1971) with Charlton Heston is not available in this way. I actually rather liked that version (although to be fair, it's the only version I've seen).

Fun with Google Analytics

No comments:
So I fixed Google Analytics and I was suprised to see how much traffic this blog gets in general, and from the search term "httrak" in particular. That is a misspelling of "HTTrack", a (handy) website copier. I went to the referring link, and lo! I am the first result in Google for that misspelling. Apart from my name, I don't think I have the first result for anything. (I was also shocked on how many visits I've gotten for "iphone speakerphone" - which is only a 5th page result! Weirdly, Google just points to "javajosh.blogspot.com" rather than to the actual post.)

So now I'm faced with a conundrum - do I fix the HTTrak misspelling, or leave it? I think I'll leave it since it seems to be a handy spelling correction for people.

Thinkpad software woes

No comments:
First, I have to give props: IBM (well, Lenovo I guess) really does a good job including some useful software with their laptops. I like the presentation manager, and the new Access Connections is useful too, and their backup software is excellent as well. Their hardware/software security stuff is top notch. And of course, the Thinkpad is the best business laptop hardware money can buy - they aren't always the fastest, but they take a beating.

But I have to admit being exasperated by some recent issues.

IBM's backup utility "Rescue and Recovery" started crashing on me after System Update updated some other software. But System Update didn't offer an update for R&R. So I went to IBM's site to see wassup - sure enough, there was an update (and a whopping 440M update at that).

So I download the enormous file, and try to install. Turns out it needs Client Security Solution 8.0 or better to install. OK.

So I download that file (another 60M) and try to install. Turns out CSS needs IBM Fingerprint Software 5.5 or better to install. OK.

So I download and install the Fingerprint software. It mostly works, except it wants a BIOS password from me for "TPM" and I have no idea what it is. I pray.

It turned out that password didn't screw everything up, and I installed CSS, and now R&R is installing and I just pray that I have enough disk space to get it all on. I know I won't have enough to defrag (which usually requires about 15% free space).

OK, it's working. I was able to get through this - but heaven help the poor shmo who isn't as tenacious as me.

Love!

No comments:

Thinkpad Accelerometer with Java JNI

2 comments:
Man I have a lot of things to do. But I can't help thinking about my aunt tilting the laptop for Crayon physics. It turns out that the accelerometer on the Thinkpad can actually be accessed:
  1. C# code [fritjers.net] and a very nice version from bsuter.[stanford.edu]
  2. Perl code [thinkwiki.org]
  3. More C# code with a writeup.
Shocking that IBM doesn't have a Java library for it! Well, I got a bit excited that I might be the first to write the code...of course, I've never written JNI code before in my life. I've heard its tricky, and I know it complicates deployment (I've had to package and deploy JNI code before). So it seems that Sun's JNI programmers guide is the place to go. I skimmed it and came to this section on wrapping existing native libraries. It's pretty hairy, especially compared to the perl code, but hey this is Java right?

Undaunted I downloaded the example code from the book, thinking I could just compile the CFuntion, etc classes and be on my way. I fire up Cygwin, discover I don't have gcc or make installed - which was easily corrected. (And I noticed that an ocaml compiler was available, so I installed it too for giggles.)

I run into my first roadblock - make goes into infinite recursion and I have to kill the process. I read the makefile. It appears that the win32 makefiles provided with the distro are written for nmake - Microsoft's rewrite of gnu make. I'd never heard of it before. (Good heavens, how many make clones does the world really need?)

Probably the easiest thing to do would be to just install Visual Studio, if I had the disk space (I have a bigger drive on order, actually). If I knew make better I could edit the makefile for compatibility. But I suspect there may be other things in the codebase that require VS. Or I could scrap my original plan and write custom "one-to-one mapping" code, and hope that gcc will cut the mustard. That might be worth a shot (and more educational) while I wait for my new hard drive.

So I gave HelloWorld a shot. Alas, it didn't work (using the command line "gcc -I$JAVA_HOME/include -I$JAVA_HOME/include/win32 HelloWorld.c") - the parser didn't like the header files. What I really need is a version of this book for Cygwin, as I don't have the expertise to figure it out myself. The internet to the rescue! (Hmm and he mentions SWIG. Interesting.)

Well I was damn close. "gcc -mno-cygwin -I$JAVA_HOME/include -I$JAVA_HOME/include/win32 -Wl,--add-stdcall-alias -shared -o HelloWorld.dll HelloWorld.c" did the trick.

(Note that when I first tried to run I got a "java.lang.UnsupportedClassVersionError: Bad version number in .class file". A "which java" in cygwin showed that I was running a JRE in "/cygdrive/c/WINDOWS/system32/java" while compiling with a different one. So I just ran it with the right JRE and it worked! "$JAVA_HOME/bin/java HelloWorld". There are lots of ways to fix cygwin systematically - I'll probably make the change globally to the PATH in /etc/.bashrc)

I don't hold JNI itself responsible for this learning curve of mine - I don't do C/C++ development in Cygwin (or out of it), and that's caused the majority of the trouble. It's true that I think it *should* be possible to drag a DLL into a tool and have it's functions exposed in whatever language you like, automatically.

After reading the mindprod JNI article (which I should have done first - Roedy Green really gets into this stuff and is generous with his knowledge) I think the biggest thing holding me back is not having the source to sensor.dll source code. There are several "SharedStub" pre-compiled libraries out there (JNative, JNIWrapper - commercial) which claim to avoid writing and compiling any C (at least under Windows and Linux). SWIG claims to avoid writing any C - but you have to compile it (and it's not clear how you compile for Windows vs. Linux). The super cool thing about SWIG is once you write the ".i" file you can generate bindings for 13 different languages, not just Java. I might even get inspiration from how Eclipse generates JNI for SWT (something called JNIGeneratorAppUI). I discovered that the Shared Stub C code from the Sun book is on the site repackaged and distrubuted with a normal make file! Perhaps that's the code that JNative is based on?

One problem I cannot solve is figuring out which functions "sensors.dll" exposes. Static or dynamic, all of these JNI methods basically require a header file to work with. Seems to me a library would be pretty up-front about the functions it exposes. A tool to generate SWIG .i files from a dll would be pretty cool - if overkill. If that's not available, then a tool that generates .h files from a .dll.



If only this data was available via a port or a file handle! Oddly, the file handle method is the one used in C# and Perl. I don't really understand it though. Ironically, Mark Smith at IBM started a project to make accelerometer data available in Linux and is now open source. (This is ironic for two reasons: first, that the Linux form would be easier to use with Java, and second that Mark had to reverse-engineer his own companies software - but come to think of it that happens all the time.)

[Update: According to MSDN, that strange path-like structure is a "communication resource handle" on which there are several possible operations. These operations are fully documented (for example the CreateFile function).

Oddly, I noticed similar path strings in Windows Services. Take this executable path: "C:\bin\Tomcat 5.5\bin\tomcat5.exe" //RS//Tomcat5. My guess is this is an internal attempt to avoid running tomcat twice, similar to using a PID file. But that's probably not what it is since tomcat won't start again because of port conflicts - a sort of port PID.

Here's another - "C:\bin\Tomcat 5.5\bin\tomcat5w.exe" //MS//Tomcat5 (for monitoring tomcat)


Building a system

No comments:
I was at Fry's tonight returning a KVM I really didn't want in the first place, when I noticed how cheap RAM and hard drives have gotten. $100 for 4G of RAM (2x2G). $100 for 500G of disk (SATA, 7200RPM, 16M cache). I mean, whoah. Even a quad core Intel Q6600 CPU was only $300. DVD writers are dirt cheap ($20).

Things are so cheap, you really start to wonder about product differentiation in computers, and how long that will last.

The interesting thing for a small-scale system builder is how overpriced all the other stuff is. Cases, power supplies, CPU coolers, cables - these are the things that will kill ya. Seems to me that motherboards are a bit overpriced too - you have to spend over $100 for a good one. Frankly, I think good mobos should be in the sub $100 range.

I think the right way to buy a box these days is to get a bare bones special from Dell (or whoever), don't upgrade anything except maybe the CPU, and then pop in more RAM and disk. Pop in burners and video cards as needed. That way you don't have to buy all those over priced doo-dads that make building your own box expensive. (Plus, I like the Dell cases a lot!) This is kind of like going to a burger joint, getting the $.99 burger, and then NOT getting a $2 soda. You go home and wash down that burger with the $.12 can of Coke you got at Costco.

Humor: top ten bad guys

No comments:
This mini-documentary about bad guys from "James" at cinemassacre.com is really well done. I'd love to see more of this sort of thing floating around the net. I was particularly pleased to see Bennett from Commando make the list.

(But how he could leave out Tim Curry's bad-guy from Legend is beyond me. That dude ripped the horn off of a unicorn, and turned the sweet, virginal princess (played by Mia Sara) into a totally hot evil princess complete with a low cut dress and black nail polish and lipstick. And his voice! The red skin! Those fangs! Those horns! Those reverse folding goat legs!)





Laugh at the world with The Onion Atlas

No comments:
The Onion's Atlas is a hilarious and very un-politically correct look at the nations of the world. Some are funnier than others, of course, but overall this beats the hell out of the CIA World Factbook for a laugh.

IMAX: I am Legend

No comments:
Fandango enrolled me in a newsletter (annoying!) when I bought a ticket through them for Beowulf 3D (which was funny because the line for the Fandango machine was almost as long as the ticket line) but it did remind me that I really do want to subscribe to new IMAX releases because IMAX is amazing. They also have coming releases - including I am Legend on Dec 14! I love post-apocolyptic movies, and this one looks really good - they played a trailer during Beowulf, and it was deeply impressive. I could almost feel the wind on my face as the camera moved through the deserted, ruined New York landscape.

Penalty chess

No comments:

Rent vs. Own calculator

No comments:
http://www.ginniemae.gov/rent_vs_buy/rent_vs_buy_calc.asp?section=YPTH

It's a nice tool but doesn't take into account the fact that rent increases over time. But here's a static data set that makes sense:












































































Years
Rent Payment
Mortgage Payment
Monthly Difference
After Tax Savings
Yearly Difference
After Tax Savings
1 800 1000 -200 -50 -2400 -600
2 840 1000 -160 -10 -1920 -120
3 882 1000 -118 +32 -1416 +384
4 926 1000 -74 +76 -888 +912
5 972 1000 -28 +122 -336 +1464
6 1021 1000 +21 +171 +252 +2052
7 1072 1000 +72 +222 +864 +2664
8-30 Savings increase every year

Judge a framework by its applications

1 comment:
Just like Eclipse gave SWT a shot in the arm, I think applications like craigslist remixed (which is actually a very useful tool) really give a shot in the arm to the technologies that enable them (in this case Tibco's General Interface, an AJAX framework that was around before AJAX had a name).

(GWT just doesn't have anything out there - except maybe Lombardi's workflow tool.)

An Access Competitor in Java: WaveMaker

No comments:
I wonder how WaveMaker competes with, say, Tibco General Interface? Or even OpenLaszlo?


Comment on Extremetech's music software shootout

No comments:

I'm glad to see ExtremeTech doing some more pro-audio and music creation coverage. A surprising number of geeks are musically inclined (or think they are) so I think it's a good direction to go in. But I have two comments about this article:

  1. It's a very strange selection of software! The review seems to imply that these three products are all that's out there, and that they are even the dominant players. There are so many choices out there: Cakewalk has many other offerings, but there's also Cubase, Pro Tools (already mentioned by another poster), Fruity Loops, Logic (mac only), Garage Band (mac only), Ableton Live, Reason and.... Not to mention the fact that as a free, virtual multi-track device, Audacity is really, really good (and used by a lot of podcasters).
  2. You can't really talk about just the software when it comes to music. Do you get an Mbox? A Tascam us-122? A firewire device of some sort? An internal card? How many channels of audio? What are the real limits of using just a sound card? What about a mic? Or a USB mic like the Snowball?
Yes, I realize ExtremeTech is more consumer-oriented, and to get deep into this stuff you go to another site! (I used to subscribe to Electronic Musician and Keyboard Magazine to get really into this stuff). But even for a consumer, Fruity Loops is a great tool, and so is Ableton - both of them have very strong virtual instrument support and relatively easy to learn interfaces.

The way I see it there are basically two approaches for the beginner: buy a good A/D converter and a mic, and use something simple like Audacity. Just do all your takes live, and multitrack as needed. It's an easy process, and you can focus on your music not on the software. Of course, this is only possible if you sing or play a real instrument. Or, if you just want to make pretty sounds, you can play around with looping and virtual instrument software like Fruity Loops. Ableton Live is an interesting mix of the two approaches.

Now, the big problem that most people have with sequencers is that you actually have to have some training in music, composition, and arrangement to make things songs that good. In other words, to use Cakewalk, Protools, or even ACID/Magix sequencing effectively you really should have some training. Unfortunately, most people don't have the training, and yet most software companies delight in selling overkill software to laymen. (Of course the "oversell" phenomena is not limited to audio software!)

The other problem is that the act of playing music, composing music and sound recording engineering are all different. All three are arts in their own right, but they are different. Most people just want to play music.

My recommendation: stick with a good sound card, a good mic, simple recording software (Audacity), and play real instruments into the mic. Be happy - play music, don't worry about fiddling with software! If you really think you have a music score in you, go to music school and learn how to compose and arrange music first; and by the time you're done, you won't need to go to ExtremeTech to get music composition software advice, because you'll probably do a lot of the work on paper, and the recording into something at a friends studio. :)

Confessions of a patent holder on Extremetech

No comments:
Art Reisman criticizes the Vonage-Verizon verdict and the patent system in general. Although he doesn't come to the same conclusion, it seems like his beef is with patent standards rather than patents themselves.

It's an interesting idea though that patents should be limited to physical things, and that software (and all information products) should be protected by copyright and trade secrets.

"Art Reisman is chief technical officer at APConnections, a manufacturer of the NetEqualizer bandwidth-shaper."