Jeff Sexton

Monday, March 08, 2010

Links Dumped

Oregon DMV offices cancel their Muzak service.

"Oregon taxpayers pay up to $160 a month to pipe Muzak’s acoustic wallpaper into lobbies where drivers come to take tests, renew licenses and register vehicles."

* * *

Make your URL shady with ShadyURL!

* * *

End tables from Ikea turn out to work great as 19" hardware racks.

* * *

Here's in impressive visualization of the science, or lack o science, behind food supplements.

* * *

Google Public Data Explorer...

* * *


Thursday, March 04, 2010

Extending Java Socket Logging With SSL

loggers in Ostego County, MichiganImage via Wikipedia

The java.util.logging package includes a handy way to send log message out a port to a server. This is done by replacing the usual log handler with an instance java.util.logging.SocketHandler. The provided SocketHandler, by default, uses java.util.logging.XMLFormatter to create an XML message that will be send out a socket to the host of your choice, and to your own server code.

Suppose you need to do this with an SSL connection, rather than a normal socket?

This is simple to do using a alternate handler which functions similarly to SocketHandler, but creates an SSL connection.

package com.example.logger;

import java.util.logging.LogRecord;
import java.util.logging.StreamHandler;
import java.util.logging.SocketHandler;
public class SSLHandler extends StreamHandler {
private SSLSocket sslSocket;
private String host;
private int port;

private SSLHandler() throws IOException {

public SSLHandler(String h, int p) throws IOException {
host = h;
port = p;

private void connect() throws IOException {
SSLSocketFactory sslsocketfactory = (SSLSocketFactory) SSLSocketFactory.getDefault();
sslSocket = (SSLSocket) sslsocketfactory.createSocket(host, port);

OutputStream out = sslSocket.getOutputStream();
BufferedOutputStream bufferedOutputStream = new BufferedOutputStream(out);
"connect() completed to [" + host + "] at port " + port);

public boolean isLoggable(LogRecord record) {
return true;

public synchronized void publish(LogRecord record) {
if (isLoggable(record)) {

public synchronized void close() throws SecurityException {
if (sslSocket != null) {
try {
} catch (IOException e) {
sslSocket = null;

The use of this class is the same as using a SocketLogger.

Logger logger = Logger.getLogger(getClass().getName());
Handler handler = new SSLHandler("my_host_name", 3000);
logger.log(Level.INFO, "Hello World");

Logged messages are send as XML fragments to the designated host at port 3000 via SSL. The developer is free to implement any sort of server needed to catch and process these messages.

There's some good information related to remote logging here, including a simple non-SSL logging server example:

The non-SSL server code is easily altered to open an SSL connection using an instance of SSLServerSocket.
Reblog this post [with Zemanta]

Tuesday, March 02, 2010


1917 photograph of the board of the Federal Re...Image via Wikipedia

This is the sort of thing that gets people really hating stock market traders.

"Kansas City Federal Reserve President Thomas Hoenig reiterated . . . that the Federal Reserve should not guarantee zero-percent interest rates for an extended period. "We're going to have these days throughout the year, when investors get hit with the idea of eventual tightening," said Owen Fitzpatrick, head of U.S. equity group at Deutsche Bank. But the reaction is largely a knee-jerk one that's bound to dissipate, Fitzpatrick added"

Proving Hoenig correct, as he (shockingly reiterated) that interest rates might not stay near zero forever, the indexes dipped sharply on these words at about 10:30 eastern time this morning - only (of course) to climb right back up again.

So... I'm just wondering what traders expected him to to say? Maybe something like "I absolutely guarantee that interest rates will remain near zero from now until the end of times, for sure, no matter what." Ya, that would make sense. But since he didn't say that it's all OMG! Sell! Sell! Sell!

You just have to laugh...

Reblog this post [with Zemanta]

3D modeling Advertising Air Canada Airline Alfa Romeo Spider Touring Gran Sport Analog signal Android Anomalies and Alternative Science Apache Apollo Astoria Asus Augmented reality Aurora Famous Fighters auto-awesome Automobile Autos Backups Barack Obama Batman Battery Beards Beer Bell System Berkshire Hathaway Bigfoot Bird Food Bird Toys Birds Birthdays Blogger Books Build Management Business and Economy Business Process Execution Language Byte-order mark Canadian Carrot Cats Christmas Civil Defense CNN Cockatiels Collections Crows Dear Jane Debian Diabetes Digital Living Network Alliance Digital television Disney Doll House Dow Jones Industrial Average Duesenburg SJ Roadster Durham University E-mail address ebauche Economics EJB Energy development Enterprise JavaBean ESP Facebook Fedora Filesharing Finance Ford Fossil fuel Garfield James Abram Garfield Minus Garfield Glassfish Global warming Golden Arches Goofy Google Google Buzz Google Docs Google Lively Google Photos Google Reader Google Wave Google+ Greenhouse gas Half-Life 2 Helbros High-definition television History Hybrid electric vehicle IBM Inner city Instagram Insulin Investing Irony J.C. Penny Jane Austen Java Java Architecture for XML Binding JDBC Jeff's! Jim Davis joe the plumber John McCain Karma Kay Thompson Kermit the Frog Kids and Teens LA Auto Show Larry King Laser Logging Lowry Sexton Mark Cuban Market trends McDonald Meier and Frank Microsoft Microsoft Windows Models Monkey monsters Moon MOUNT HOOD Music Music industry Muxtape MySQL NetBeans Netflix Nintendo Nissan Cube Norm Coleman Nuclear fallout Nuclear warfare Office Depot Open ESB Oracle Corporation Pacific Ocean Packard Boattail Pearl District Pearl District Portland Oregon Philip K Dick photography PlayStation 3 Pocher Pokémon HeartGold and SoulSilver Politics Portal Portland Portland Development Commission Presidents Pride and Prejudice Programming Projects Radio Recipes Recording Industry Association of America Renewable energy RIAA Robot Chicken Rock-paper-scissors Sarcasm SATA Science fiction film Serbia Service-oriented architecture Shopping Slide Rule Social Security Social Studies Society6 Spirit of St. Louis SQL Stanford Hospital Star Wars Starbucks Stock market Strip search Sun Microsystems T-Mobile Tablet TechCrunch Technical ThinkGeek Toaster Total Recall Transportation Security Administration Unicode United States United States Department of Homeland Security Universal Plug and Play Unknown Primates USB Vegetable garden Video game Vintage Images Vintage Vintage! Virtual world Volvo C70 Wall Street Warren Buffett watches We Can Remember It for You Wholesale Web service Web Services Description Language Wii Windows 7 Windows Phone 7 Windows Vista Windows XP X-Files X-ray vision XML XML Schema YouTube Yugo Zima