|
|
|
| Non-WTF Job: Interface Designer/Front-end Developer at Naviance (DC) |
| « Let's All Reinvent the Wheel... Again, and More | Two Weeks Notice » |
"I'm as much a fan of Java Generics as the next guy," writes Jim Bethancourt, "why bother with writing all that type-specific code for common collections (or - gasp - losing type safety) when one can simply go HashMap<String, SomeObject>."
"However, after working on several of my predecessor's projects, I think it's pretty clear that liked generics, too. But I'm gonna go ahead and say that he liked them juuuuuust a bit too much. This was one of way-too-many lines in the variable definition section of some (you guessed it) generic class...
HashMap<Long, HashMap<Timestamp, Vector<HashMap<String, Object>>>> superHashMap =
new HashMap<Long, HashMap<Timestamp, Vector<HashMap<String, Object>>>>();
|
This code is a precursor to the data structures used in the Matrix.
|
So the long is the universe, the timestamp is the time, the vector is the dimension and the string is the key. What's wrong with that? |
| « Let's All Reinvent the Wheel... Again, and More | Two Weeks Notice » |