- By the way, you can watch Raven and Cory episodes on disneychannel.com.
- Also, I've always felt that Family Guy episodes took a lot of time and energy to get through--becoming more depraved can be a chore sometimes, I suppose.
- Although in the case of Arrested Development, becoming more depraved is a speedy process.
- If I didn't have clocks to prove otherwise, I could swear The Office is only a 15 minute show, tops.
Saturday, August 25, 2007
The Mark of a Good Sitcom
Wednesday, August 22, 2007
Are Java Generics Worth It?
Java 5 introduced a feature called Generics that was an attempt to duplicate, more or less, the Template feature of C++. The motivation behind it was to allow the compiler to provide more type safety--making sure you don't accidentally use the wrong type object. It was also touted as a way to prevent casting. So, for example, let's say I wanted to sum the contents of a Collection of Integers, I'd write this (before Java 5):
This is all wonderful, you may think, but there are downsides I've discovered:
- Extra Keystrokes: I may avoid casting and its associated keystrokes with Generics, but I have to type a lot more just to declare that I'm using Generics. Compare the two Collection instantiations below.
Collection coll = new ArrayList(); // pre-Java 5 Collection<Integer> coll = new ArrayList<Integer>(); // Java 5Hmm...Java 5 is a little bit wordier. But it can easily get worse, like if I wanted, say, a Map of Strings to a Collection of Integers:Map map = new HashMap(); // pre-Java 5 Map<String,Collection<Integer>> map = new HashMap<String,Collection<Integer>>(); // Java 5Java 5 doesn't require you to explicitly specify Generic types, but it will give you a warning if you're not.
- Type "Interference": For lack of a better way of describing this, sometimes in an attempt to use Genericized code, you can find yourself struggling to placate the compiler so that it lets you do what you want to do. I think the issue is partially related to backwards compatability, wildcards, and covariance-- which is a fancy way of saying that subtypes and supertypes aren't interchangable. This article does a good job of explaining the quirks. It'll suffice to say that nuances and subtleties with Generics sometimes hinders your ability to program more than the type safety provided helps you program.
- Compiler Errors: I stick with the Sun compilers, so it could be their problem, but I depending on the version of the compiler I use, sometimes my complex Generics code compiles, sometimes it doesn't. We used to have problems with JDK 1.5.0_08 but had those problems resovled by _09. Now we're getting a new compiler errors after switching to 1.6.0_02. You really need to execise more caution with JDK upgrades when your code relies on Generics.
- Unreadable Code: This is the most troubling of the problems I have with Generics. A mark of a good programmer, in my opinion, is working code that is readable and therefore understandable. But sometimes if there's some code that is Genericized using other Genericized code, you get this snowball effect and before you know it your code is littered with so many angle brackets you'd think you were writing XML. Check out this class declaration from some code written for my latest work project:
public abstract class FooDAG<F extends Foo, B extends Bar<F, F, B>, E extends FooDAG.Edge<F, B, E>> extends FooGraph<F, B, E, FooDAG.Node<F, B, E>> implements Iterable<FooDAG.Node<F, B, E>>Even though I helped write this class, I honestly don't fully understand at this time what it does or why it needs to be that way, at least without a good 15 minutes reading the class over.
In any case, I'm beginning to conclude that the extra type safety offered by Generics isn't worth it, especially nowadays with with popularity of loosely-typed dynamic languages and dependency injection frameworks like Spring, which let you retrieve objects from a Factory which you need to explicitly cast into the object of your choice. I do enjoy using the Generics built in to the JavaSE API, namely the java.util package, but as far as using Generics in your own private APIs, I don't think it's worth it.
Monday, August 20, 2007
LDS Wedding
I noticed some architectural similarities between the temple and some Masonic buildings I've seen, specifically the Masonic Temple in Alexandria and a lodge a couple miles from where we live.
- No Windows - although the Masonic Temple appears to have windows, the lodge and the Mormon Temple were void of any inlet for natural light. It's a little odd that something touted as "a light to the world" shields the outside world from any light originating from within it.
- Near Symmetrical Design - all the buildings are symmetrical, or as the Masons seem to refer to it "geometrical." The only non-symmetrical feature of the temple is the spire holding the statue of Moroni. Note that the remaining five spires form a slightly elliptical inverted pentagram behind him. (OK, so maybe that's a little bit of a stretch, but some Mormon temples do have pentagrams on them.)
- Out-of-place -both the temples sort of show up out of nowhere. You're driving down the beltway towards the Wilson Bridge, noticing the large commercial buildings and then all of sudden you say "What's that?" as the Masonic Temple comes into view. Likewise, the spectacle of the gigantic, marble white Mormon Temple nested within a quiet, lush, wooded area elicits even more of an exclamation.
- Creepy - the creepiness is probably results from a combination of the out-of-place nature, unusual architecture, and the enigmatic nature of Mormonism and Masonry. It was uncomfortable to be there.

Some claim Mormonism has no relation to Freemasonry, other than that Joseph Smith himself was a 32nd-level Mason, the highest level to which any non-US President can attain to (Smith also possessed +12 Charisma and +5 Accuracy with the long bow...I kid). But apparently there's a lot of material out there linking the two more deeply, architecturally and ceremonially. I'm not going to tread those waters right now.
I would like to offer my congratulations to my coworker, though. He and his wife are a great fit and make a cute couple.Friday, August 17, 2007
Debt & Debtor
- People borrow more money than they're able to pay back.
- Banks lose money on the loans given to these people.
- Banks can't give out more loans since they don't have as much money to loan out.
- People can't get the loans they need to buy things, so they have to stop spending.
- Companies profiting from people buying their stuff lose sales.
- Investors used to steady, rising company profits get upset and cash out their investments.
- Stock prices fall, companies lose capital they need to do business, people lose jobs, the economy goes south.
Hey, doesn't this sound familiar? Anyways, the difference between now and 1929 is that we have federal groups that are supposed pull strings to try to keep the economy going. Good luck with that. To be fair, the latest move by the Fed--lowering the interest rate for loans they give to banks--did help the market rebound today, but that just adds more borrowed money into the mix.
Eventually the US is going to have to generate money, maybe some lucrative new energy source, perhaps? Until then, I'm not sure what to do. If this scenario causes the value of the dollar to increase (as a result of credit being harder to obtain and prices decreasing), I'll want to hold onto cash. On the other hand, if the US economy tanks and the dollar loses its value, then my cash will be worthess, so maybe I'll want to buy gold or something to protect my dollars.
Thursday, August 16, 2007
What is Technology?
- Standards (CSS, EJB): A standard is nothing more than an agreed way of doing things that people implement in partially incompatable ways. Nothing that can be done using one standard that can't be done with a different standard.
- Programming Languages (.NET, Java, Ruby): New languages allow people to do the same things they've always been able to do with a different syntax. Ultimately, though, all languages end up as a bunch of zeros and ones pumping through a processor. And that's boring.
- XML (XSLT, Schema, XForms, XML-RPC): XML is a standard (and a yucky programming language), but it deserves it's own bullet because it's the parent of dozens of derivative standards that are all equally boring.
- Web-enabling: This is the process of moving applications from one OS (Windows/Unix/Mac) to another, more limited OS (Internet Explorer/Firefox/Safari).
Things that are really technology require scientific research to discover and implement, in my opinion--things that are produced by engineering not marketing.
Outlet
I started this blog to externalize my thoughts in order to make room for other thoughts or good ideas...ideas like how to start a successful business or getting free lunches. To avoid random rants, I will try to focus postings into four categories corresponding to the prominent areas of my life (which are sadly not always in this order): Christ, Family, Money, Technology.
I used to have a pre-Google Blogger blog in college that I neglected and now is forever lost among the Google server farms. Then I posted some things on my myspace blog...but myspace is lame (sorry, Rupert). We'll see how it goes this time around.