- WillametteRvrPano_edit.jpg (JPEG Image, 7073×1100 pixels)
Cool downtown Portland / Willamette panorama.
(categories: wikipedia photography photos panorama portland willametteriver ) - Six Apart Update Stream
A stream of updates from LiveJournal, TypePad, and Vox weblogs via Atom.
(categories: atom blogging feed stream syndication sixapart ) - subethasmtp.tigris.org
SubEthaSMTP is a easy to understand Java library which provides a receptive SMTP server component. An alternative to James for embedding SMTP.
(categories: java james subethasmtp smtp mail embedded server )
Monthly Archives: November 2007
Links: 11-26-2007
- Eye-Fi » Home
Wifi SD cards: send pictures directly from your camera to Flickr using Wifi. Nice.
(categories: wifi sdcard memory flickr photography wireless camera )
Links: 11-22-2007
- Half-Life 2: Episode Two Stats
Some cool visualizations and *death maps*!
(categories: visualization infoviz infographic analytics graph half-life )
Links: 11-20-2007
- How to make a good ID in Atom [dive into mark]
Creating useful / good ID elements in Atom feeds.
(categories: id atom feed feeds syndication rss )
Java ZipEntry bug on Windows
I rolled out the Clearfox plugin on the Jive Software Community site a couple weeks ago and got some good feedback and some bad feedback. A number of people said they tried to install the Firefox part of the plugin, restarted Firefox and then didn’t see the Clearspace icon like my screenshots / screencast showed. There were no errors in the Clearspace error logs and no errors showed up in the Firefox JavaScript debug console. Through the help of a couple customers, I was able to narrow it down to running Clearspace on Windows: for some reason the zip file (really the XPI file) that the Clearfox plugin creates on the fly was invalid, at least according to Firefox. If you opened the XPI file using any common zip file utility the contents appeared to fine. As always, google came to the rescue and pointed me to this bug filed on bugs.sun.com, which has two parts. The Unicode file name bug didn’t matter to me, but this one did:
Within a ZIP file, pathnames use the forward slash / as separator, as required by the ZIP spec. This requires a conversion from or to the local file.separator on systems like Windows. The API (ZipEntry) does not take care of the transformation, and the need for the programmer to deal with it is not documented.
which wouldn’t hurt so much if it hadn’t been filed back in… get this… 1999. Are you kidding me?
Anyway, long story short: if you’re writing Java, creating a zip file that has paths while on a Windows based machine and deploying said zip file to a place that actually cares about the zip file specification (or violates Postel’s Law), then make sure to do something like this in your Java code:
String zipFilePath = file.getPath(); if (File.separatorChar != '/') { zipFilePath = zipFilePath.replace('\\', '/'); } ZipEntry zipAdd = new ZipEntry(zipFilePath);
noting that even the workaround they give in the aforementioned bug is incorrect because they show
... file.getName();
which doesn’t contain the path separators. Awesome.
Java, Commons HTTP Client and HTTP proxies
If you’re living at a giant corporation during the day and you want to browse the web you’re probably going through some sort of proxy to the outside world. Most of the time you don’t care, but if you’re writing a Java application that needs to access resources on the other side of said proxy (ie: the rest of the world), you’ll eventually end up over here. That wonderful document will hook you up with all your need to know about setting the proxy host, port and optionally a username and password for your proxy as long as you’re using URLConnection, HttpURLConnection or anything that deals with the class URL. If you’re really a go-getter you might even browse over here and read all about how to utilize those properties on the command line, in code or when you’re deployed inside of Tomcat.
Some of you won’t be so lucky: you’ll eventually want to use some advanced tools that abstract you away from having to fetch InputStreams to get your feeds and will instead depend on the Commons HTTP Client, which unfortunately (or fortunately depending on your point of view), doesn’t care about those nice little system properties that java.net.URL likes and instead goes off and uses sockets directly. No, instead you have to do something like this:
HttpClient client = new HttpClient(); HttpConnectionManager conManager = client.getHttpConnectionManager(); client.getHostConfiguration().setProxy("proxyserver.example.com", 8080);
and if you want to provide a username and password for said proxy:
HttpState state = new HttpState(); state.setProxyCredentials(null, null, new UsernamePasswordCredentials("username", "password")); client.setState(state);
which is all fine and dandy but sometimes I just wish the world were simpler. Ya know?
Links: 11-13-2007
- Java HTTP Proxy Settings « Information for Technology
HTTP proxy configuration settings for Tomcat / Java.
(categories: java tomcat proxy configuration proxyhost proxyport ) - todd: Google Android SDK released
A nice summary of the Android SDK feature set.
(categories: android google sdk java ) - com.google.android.xmppService – Android
Android does XMPP. Sweet.
(categories: google android mobile xmpp )
Links: 11-9-2007
- Jumpcut – Blue Angel # 5 low pass
If you’ve never seen the Blue Angels or the Thunderbirds… you’re just missing out.
(categories: blueangels aviation military planes videos video ) - Costco Trade-In and Recycle Program – Service Provided by GreenSight
Costco does consumer electronics recycling and in some cases will even give you trade-in cash.
(categories: costco recycling hotdogsmmmmmm )
Books, the last 12 months
It’s been almost exactly a year since I last pointed to my reading list, turns out I’ve read about 30 books in the last 12 months, highlighted by seven in the month of July (mom-in-law got me a gift certificate to Barnes & Noble for my birthday so I splurged and then read them all in quick succession). Here’s the list in reverse chronological order with no spacing:
The World Is Flat A Rumor of War The Ghost Map The End of Poverty The Design of Everyday Things Purple Cow: Transform Your Business by Being Remarkable
Small Things Considered: Why There Is No Perfect Design The Soul Of A New Machine The Last Night of the Yankee Dynasty: The Game, the Team, and the Cost of Greatness Seven Seconds or Less: My Season on the Bench with the Runnin’ and Gunnin’ Phoenix Suns The Teammates: A Portrait of a Friendship Stiff: The Curious Lives of Human Cadavers Mountains Beyond Mountains: Healing the World: The Quest of Dr. Paul Farmer Collapse: How Societies Choose to Fail or Succeed Acts of Faith Traveling Mercies Founders at Work: Stories of Startups’ Early Days Micro-ISV: From Vision To Reality To End All Wars SR-71 Revealed: The Inside Story The Architecture of Happiness Don’t Think of an Elephant: Know Your Values and Frame the Debate The Scandal of the Evangelical Mind Skunk Works: A Personal Memoir of My Years of Lockheed Next Crossing the Chasm The Man Who Shocked the World: The Life and Legacy of Stanley Milgram Clemente: The Passion and Grace of Baseball’s Last Hero This Beautiful Mess Love Me, Hate Me: Barry Bonds and the Making of an Antihero
I haven’t come across many new books lately (I keep my to-read list at Amazon and my have-read list here) so ping me (ajohnson@cephas.net) if you’ve read something cool lately.