Skip to main content

Posts

Showing posts from 2010

Trends of Vulger Phrases

Of course my mind first goes to typing vulgar phrases into Google's new N-gram Viewer but the results were pretty neat.

Simplifying logging with Maven and SLF4J

UPDATE: Ceki commented below which prompted me to rewrite the third paragraph. UPDATE 2: I have a better way of configuring Maven and SLF4J now. The mismatch between logging frameworks always seems to come up in projects I've developed over the years. Little-by-little I've learned and relearned how to navigate the nest of runtime logging that occurs in non-trivial applications. With my latest project I think I finally converged on a solution that I'll carry forward to future projects. So what am I really talking about? Have you ever been stumped, even for a short time, about where a certain log message is going and why it might not appear in your log? Often this happens when you are trying to debug an issue with a third-party library that's using a different logging implementation them your application. If you are nodding from familiarity, skip the next paragraph. Let's start from the beginning. There are several logging implementations available for Java, th

Best Practices with Maven: OSS forks

Recently I came across a company that is forking several open source Java projects. I saw they were making a mistake that I also made a few years ago and have since learned from. In Maven's distributed repository architecture project artifacts, like JAR files, are uniquely identified by a coordinate system composed of a group identifier, an artifact identifier, a version number, optionally a classifier, and a packaging type. For instance, the most recent version of the Apache Commons Lang project has a Maven coordinate (i.e. groupId:artifactId:version:classifier:type ) of commons-lang:commons-lang:2.5::jar . A few years ago, if I wanted to make custom changes to this project I would get the source, make my changes and then deploy the result to our private Nexus repository under a new groupId such as com.jaxzin.oss:commons-lang:2.5::jar . That might seem reasonable. Then a year later or so I tried something different and changed the artifactId like this commons-lang:commons-lang-jax

Not for Adoption

Last night was my first session as a volunteer at the Danbury Animal Welfare Society (DAWS). I had attended an orientation a few weeks back and that's when I saw the facility for the first time, learned about the standard operating procedures and policies, and got to meet some of the cats I'll be working with. Now I'm not a person that enjoys change or meeting new people, but other than my immediate family I don't think many people are aware because I try very hard to hide my discomfort. Who knows, I could be wrong so feel free to call me out in the comments! So far, this entire experience is quite out of my normal comfort zone, but I'm forcing myself to do this for several reasons. I learned about DAWS after attending their Puppy Love Ball , a fund-raiser they held in February, in support of a friend of mine who was honored as their Person of the Year. They premiered this mission video at the event and it had me hooked. To learn that DAWS is a shelter that

First Impressions from NoSQL Live

Today I drove up to Boston for the day to attend NoSQL Live . My experience so far within the NoSQL community has been limited to what we've built in-house at Disney and ESPN over the past decade to solve our scaling issues, more recently has been ESPN's use of Websphere eXtreme Scale , and the very latest has been my own experimentation with HBase which hasn't gotten much further than setting up a four node cluster. I've read a little about Cassandra, memcached, Tokyo Cabinet and that's about it. So before the sandman wipes away most of my first impressions of the technologies discussed today, I wanted to record my thoughts for posterity or, at the very least, tomorrow. Cassandra Cassandra seems to be the hottest NoSQL solution this month with press about both Twitter and Digg running implementations. My impression, I'm wary of "eventual consistency". I don't feel I understand the risk and ramifications well enough to design a system properly

Java Puzzler

I bought the book Java Puzzlers by Josh Bloch and Neal Gafter a few years ago and enjoyed it. If you aren't familiar with it, it covers rare, odd and usually counter-intuitive edge cases of Java in a brain-teaser style of presentation. For both a Java user and an analytical mind its a fascinating book. Well today I stumbled onto a puzzler of my own and thought I'd share. Can you tell me what the main method of this class will output? 1 : public class Parser { 2 : 3 : private static <T> T parse(String s, Class<T> type) { 4 : // Simple implementation only supports long primitive 5 : if(type == long.class) { 6 : return (T) Long.parseLong(s); 7 : } 8 : throw new UnsupportedOperationException( 9 : "parse() only supports long right now!"); 10: } 11: 12: public static void main(String[] args) { 13: System.out.println(parse("1234", long.class).equals(1234)); 14: } 15: } So what gets written to standard output?

UFOs, Ghosts and Bigfoot

So I hope you don't think I'm a complete loon, but I've always been interested in the paranormal, cryptozoology and lights in the sky. I think it is driven by my need to try to answer all those unanswered questions in life. Lately I've been watching various 'reality' shows on these topics like MonsterQuest, Paranormal State and Ghosthunters. Don't get me wrong, I'm not gullible enough to believe these shows are finding evidence of anything, its just some good ol' fashioned mind-numbing popcorn TV for me to fall asleep to. Watching them has reminded me of a few unexplained incidents I've had in my life and I wonder if you've experienced anything similar? I've got three that all happened to me over a decade ago but were so unnerving that I remember them vividly. So here are my campfire ghost stories, feel free to share yours! Incident #1: The Mysterious Flash I don't remember the exact date or even the season of this first incident,