Thursday, December 11, 2008

I actually want the LHC people to create a little black hole

There was quite a ruckus a few months ago when the Large Hadron Collider was going online. One of the concerns is that the collider may create a black hole on earth. They say that like it's a bad thing. Sure, there is the possibility that this little black hole will consume the entirety of the planet into a space no bigger than an atom along with the rest of the solar system. Yeah, that may not be the most considerate thing we can do as a planet, but let me throw out this possibility.

What if we were able to make the black hole consume only the things we want? How cool would that be? We would have a great waste disposal solution. Yucca Mountain? Why not just put a little black hole down there? Not only can you store all of our nuclear waste in a space that is no bigger than a pinhead, we wouldn't need to worry about any radiation shielding, the black hole waste disposal unit will keep radiation and light from escaping. That's pretty sweet!

Industrial waste is another problem that a little black hole could address. Our friends the manufacturers could become good stewards of the land by disposing of their waste in a little black hole instead of dumping chemicals and other harmful waste on the sly.

The possibilities don't stop there! We could potentially put one of these in every household. You think those fancy Dyson vacuum cleaners don't lose suction? You remember the old vacuum cleaner ad where the vacuum picks up a bowling ball? They don't have nothin' on the sucking power of a little black hole. In some regards, I think a black hole vacuum would be safer than our current models. There's no risk of electrical shock. You also don't need to worry about whether it's safe to use it on combustible liquids like gasoline. Even if there were an explosion, it would all get sucked into the abysmal void of the black hole vacuum.

I would be remiss if I didn't address some of the consumer safety issues that exist with distributing appliances that have the potential of consuming our entire galaxy should they be misused. Yes that is a problem. I'm willing to concede that. But is it any different than say electrical appliances were when they were introduced? They have the potential to electrocute and start fires, but we've learned to use them responsibly. Our automobiles carry enough gasoline to start a small explosion and nobody seems to be upset with that. So I say, what's the danger of putting the power of ripping the fabric of reality in the hands of every man, woman, and child?

Let's be honest. This wouldn't be the safest appliance on the market. I think we'd need a good set of warnings so people are aware that their little black hole might consume everyone. We would need to establish a public service announcement campaign to alert the public what to do should one of the little black holes get out of control. Something like, "Should you or a member of your family notice a slowing of observable reality, please head to the nearest black hole shelter, tune in to the Emergency Broadcast System, and await further instruction."

Another great thing about little black holes is they are perishable. They will evaporate into a cloud of neutrons, thermal radiation, protons, and electrons once they expire. This will drum up a lot of repeat business and set up a loyal customer base. We used to need to engineer small defects in our products to get our customers to come back shopping, the little black hole solves that problem for us.

So, in conclusion, scientists, please do try to create a black hole, but make it so that it doesn't consume our entire galaxy into the space of a subatomic particle.

Wednesday, December 10, 2008

Productivity Tip: Fail Quickly, Succeed Quickly

Ugh, I'm in a bad spot. We're shoring up a release and I'm helping our testers with their regression tests. We're now running all the old test cases from the earlier iterations. Expectedly, some of the older test cases are failing. My job is to provide some explanations as to why the test cases are failing. It's been going well, until today.

I hit a really bad set of tests. The thing about these tests is they take a long time to run and a long time to fail. Oh, they're brimming with NullPointerExceptions that are caused by some bad assumptions that were made about 6 months ago. Fixing the NPEs is no big deal, but finding them is taking progressively longer. When I started this morning I could get to the next NPE in a few minutes. Now we're taking a good 20 minutes. I think the whole test case should take about 25 minutes to run, so we can't be too far away.

The good news, we have excellent coverage of all our test cases. The bad news, when I start a test case I have a 15+ minute void of time where I'm waiting for the next thing to do. I'm filling the void by helping my teammates with their issues, but the voids remind me of a dangerous programming rut I've found--time voids.

Time voids are the things that regularly block a programmer from doing their work. The most dangerous ones to me are development environments that take a long time to set up and require frequent setups.

When I do development I try to iterate through a cycle of setting up a test case for what I want to do, validate that the test case doesn't currently work, writing just enough code to get the case to work, and then validating that it works.

Time voids come in when a workstation takes a long time to perform one of those steps, usually it happens when an environment is being rebuilt or a server is starting up.

Ideally, I'd love to have those necessary delays take a few seconds. Unfortunately, there are times when those delays are minutes if not tens of minutes. That's a productivity killer. The biggest problem with a regular delay is everything you do becomes very expensive. Trying out an idea doesn't take a couple of minutes, instead it might be half an hour. It might cost a day.

What do you do in the time when you're waiting for your system to catch up? You can wipe out your administrative work, clean up your documentation, read documentation, work with others. Probably the best thing you could do is figure out how to eliminate the time voids and get to an environment where failure comes quickly.

Ah, nothing prepares the pallet for the taste of success like the sweet smell of swift failure.

2 Types of Java Programmers

A friend of mine posited a theory that there are two types of programmers in the world: those who can't handle multi-threading and those who are unaware that they can't handle multi-threading.

Dale Mensch has asked that I not mention his name so I will credit this basket of wisdom to anonymous.

Thursday, December 4, 2008

Productivity Tip Trip Report: Close Your Email

I've been field testing some methods to improve my personal productivity. The first method I tried is closing my formerly ubiquitous gmail window. Those readers who know me know that they could expect to get a response from me in email within a minute. To say that I obsessively checked my email is understating a borderline compulsive disorder.

I don't keep the window open anymore. Instead, I check my gmail a few times a day at the office. In the morning before work, around lunch time, and before I leave the office. At home, I sporadically check my email.

I further enabled my compulsion by carrying an iPhone. It's wonderful how easily I could check my mail wherever I am. While I'm working, I keep the iPhone stowed.

The results: big boost in productivity and more focus on whatever I'm doing. The gmail siren isn't calling me away from the task at hand. The signal to noise ratio I get for emails is about 1:4, for every one email I get that is meaningful I get four meaningless emails that immediately get deleted. Of those signal emails, almost none of them require my immediate attention, nor do they lose any significant value if I take a few hours to read them in bunches.

Another side effect of not having the window open is my friends and I don't chat. I enjoy chatting with them, but keeping a few conversations going takes a lot of attention.

The last benefit of keeping the personal email client closed is removing a source of context switching. Context switching is expensive. By controlling and planning my contact with my email I don't run the risk of losing my train of thought or deviating from my tasks at work.

Wednesday, December 3, 2008

Cool Regex Tool: strfriend

strfriend is an awesome tool for visualizing regular expressions.



I've noticed that regexes are a tragically underused resource among my fellow Java programmers. Regular Expressions are an incredible resource for dealing with text.

If you're interested in learning how to use regular expressions, I unconditionally recommend reading Mastering Regular Expressions by Jeffrey Friedl.

Tuesday, November 25, 2008

500 years of women's portraits + Bach Cello Suite No. 1 == Win

Amazing compilation of 500 years of art. I could look at each one of these paintings for hours. The original paintings, not just the morphed snapshot in the vid. But the video's still pretty cool.
Women in Art

Monday, November 24, 2008

I've been meaning to find a way to work this video into an essay

This is amazing. How do they do it without killing each other. I'd love to know if there's some sort of order involved. They probably just don't run people over.

This 2:20 Seems To Go On Forever

I'm still mulling a few essays together. In the meantime, I'll keep throwing a few videos that I find interesting up.

Sunday, November 16, 2008

Funny Top Gear Challenge, Survive Alabama

Jeremy, James, and Richard try to drive through Alabama without dying. The catch? They are each allowed to paint whatever they want on the others' car.

Friday, November 14, 2008

I'm not much of a car guy, but...

This video is awesome.

Wednesday, November 12, 2008

What Could Possibly Go Wrong?


Like a well oiled machine.

Tuesday, November 11, 2008

Sage Career Advice From My Friend Ann

Recently, I was informed that some contractors at my last jobs were given termination notices shortly after their contracts were extended. My reaction to hearing is sympathetic to the contractors' situations, affirming for my decision to leave, and anger. I was angry because they could have just let the contracts run out, why renew them just to turn around and cut them loose?

I was sobered though when I told my fellow ex patriot, Ann, the news of what happened. She's been around the industry and her reaction was, "That's contracting, it happens all the time."

That's sobering news indeed. Ann realized that nobody really talked me through contracting. She told me that for any reason, I could be told that I'm not needed and that I'm done with the client. She said that if you say the wrong thing to the wrong person it can happen. I don't think that my client would do that, but they could be faced with a situation where they may need to cut costs. I know that people in my position are some of the first costs that get cut.

Ann gave me great advice. As a professional contractor, we need to be beyond reproach. We need to take whatever the employees do, and do it a little better. Dress a little more professionally, don't keep a browser open, don't conduct personal business on site.

Ann advised me not to get involved in office politics, that's just asking for trouble.

I think my Caribou friend Keith said it best, 'an ounce of perception is worth a pound of performance.' It's true, when it comes down to it, how others perceive us really drives how well our work is received.

I believe that I work as hard as anyone, but I am not always aware of how others may perceive me. Ann gave me some good advice to improve others perception of us.

It takes very little additional effort to do a little more to project a better image. That is what I intend to do.

Clean desk. All my loose handouts are piled in a neat stack. I keep a microfiber towel to dust off my work area, I think that adds a nice touch. I stored company keyboard and mouse in a cabinet instead of leaving it on my desk. I think it will make my area look neater.

Dressing professionally, my office is casual. I'm going to try and dress less casually than I normally would.

My code. I take pride in my code. I've identified a couple of areas where it can be better though. I think I do a good job in naming and commenting, but I will kick it up a notch and make certain that all of my intents in writing code is explained. My Achilles heal is logging. I've started improving the quality of the logging in my code.

The truth is anyone can be let go at any time. As we begin facing a challenging economic future, it only makes sense to do all you can to secure your livelihood by not only doing your best work, but also doing more to make sure that the way others perceive your work, and the way you work, is as good as they can perceive it.

Friday, November 7, 2008

Smart DRM Use

Kotaku is reporting that the game Sacred 2: Fallen Angel has Digital Rights Management software that enables people to download and play a fully functional version of the game for a period of 24 hours.

This is a great idea. The publishers are encouraging their customers to share. This is a fantastic marketing technique that I believe will net them more customers than they would get through traditional video game marketing.

I hope the game doesn't suck, because I'd love to see more of this use of DRM.

Thursday, November 6, 2008

I forgot my monacle

we're hanging out in the lobby of the ordway. I was joking today about wearing a monacle. I just saw a guy wearing a top hat. Haven't seen a monacle yet. Aside from the guy sporting the stovepipe I don't see any sub-quadrigenarians in the house. I like the bars at the Guthrie better.
Question: is yelling Bravo! required every time there's any applause?

Edit: it's the first intermission of The Abduction from the Seraglio. Jolly good show so far. As I needn't remind you cultured readers, the Abduction takes place on a train. Ok, I was kidding there, but it does take place on a train. The dialogue is in English, which is nice. I had never heard the music before. It is beautiful. This Mozart fellow sure can write music. I wouldn't be surprised if he's written other good music. I just checked, he has. I wasn't expecting as much physical comedy. It's a humorous opera.

Looks like it will resume soon. Shhh.

Edit2: after the second act. I read the program a bit. The set is on the Orient Express in the 1920s. I think that this is probably an adaption. I wish they would list the movements in the program because the last song of the second act was beautiful. It's one of those songs thatbworks it's way into soundtracks of movies and commercials all the time. It's nice to get context for the songs.

Pro tip: if you want to unwrap a cough drop that is wrapped in crinkley plastic wrapping without disturbing your neighbors, don't unwrap it slowly next to the ear of the person in front of you. Instead, why not keep it in your pocket, and unwap it there. It's nature's muffler.

EDIT3: Wonderful show last night. I thought the set was brilliant. It was three train cars. The train set extended off stage. It would move to the left and the right to reveal different rooms. Wonderfully done.

My apologies for the lack of links. I was writing from my phone.

Enjoy Some Optical Illusions

Hope these don't hurt your brain too much.



Cool optical illusions - video powered by Metacafe

Wednesday, November 5, 2008

Live Streaming Puppy Cam

This is why I use two monitors, one for work. One for watching puppies.
http://cdn1.ustream.tv/swf/4/viewer.45.swf?cid=317016


EDIT: Looks like this isn't a 24/7 service. It's worth checking back a few times.

Tuesday, November 4, 2008

Can't take watching the election results

We're going to go out to eat at a restaraunt that doesn't have a tv. 

That way I'll just keep refreshing my iPhone to see the results.

Eclipse Tip: Block Autoformatting

Blocks of code can be autoformatted in Eclipse. Select the block of code and use the regular autoformat command. 

Default is CTRL + Shift + F

It comes in handy when making a small update in a file that isn't formatted. Autoformatting the whole file can cause diff tools to have trouble as autoformatting tends to make minor changes to every line of a file.

Ladies and Gentlemen of the Jury


No camera tricks or gotcha questions involved, e.g. "Governor could you provide an incomprehensible circumlocutious reply full of folksy catchphrases whilst not pronouncing a trailing G in your reply to a simple question?"

She may not be stupid, but she's not well informed and she does not communicate well. I challenge any prospective McCain/Palin voter to properly diagram a single answer of Sarah Palin's.

Palin hid from the media the entire election and now we're supposed to put her in the bullpen for an unhealthy cancer surviving septuagenarian? Like him or hate him, do you want the grossly uninformed and intellectually lazy Sarah Palin inside the White House. She's already been found to have abused the limited power she had while in office in Alaska.

She has also been found to have misused state funds by charging per diems for nights she spent at home and she let the state pick up the tab for unnecessary plane rides for Piper and Willow.

If you feel obligated to vote for Sarah Palin because of her religious beliefs, please consider this. She's likely a caricature of your beliefs. Do you speak in tongues and hunt witches? No? Well maybe you shouldn't elect someone who does to represent you.

I've said my piece. I rest my case. I bid you peace.

Monday, November 3, 2008

Big Supreme Court Case Today

The Washington Post is reporting that the future of drug regulations may change today.

At the crux of the case is when the FDA approves a drug, does it relieve the drug maker of liability from tort cases within the state courts.

Traditionally, the tort cases in state courts have provided a strong incentive for drug makers to actively improve their labeling upon discovery of new information. Facing multi million dollar liabilities is a very strong incentive for drug companies to actively work to make their drugs, and the labeling of their drugs, as safe as possible.

Traditionally, the FDA label approval is considered a minimum, or floor. That is to say, that so long as the approved labeling is in place, the drug maker could add additional labeling to clarify appropriate usage of the drug, e.g., warnings for how the drug should be administered.

Even though the drug labeling is approved, the drug companies are still liable for their products. Should they be found to be negligent in their labeling, or in any other way that can be successfully argued to hurt individuals, the company would face expensive tort cases. I think this is a nice additional check to the FDA's approval. Every other consumer products maker faces the same liability.

If you make a product that is dangerous and fail to provide adequate warning, you are accountable for the damage that it causes people. Please let me clarify that I'm talking about real dangers, not frivolous inconveniences. If you were to find out that the television set that you purchased was emitting x-rays and one of your children develops a brain tumor, I think you have a case against that television manufacturer. I think the same is true with drug companies.

The Bush administration, however, is interpreting the FDA regulations much differently. They are saying that once the approval is in place that the drug makers are absolved from any further responsibility to update the labeling on their drugs despite any new information that may become known.

The drug companies love this interpretation, without having to worry about being held accountable for their products, they need not continue updating the labeling information of their products--which is very expensive.

If the supreme court were to decide that drug companies are immune from state tort cases I believe that it would be a tremendous blow to public safety.

In my opinion, and I'm not any sort of lawyer so take that for what it's worth, this shouldn't even be up for argument. In my opinion, the justices are far too conservative. I fear that if one more Scalia or Alito were to be appointed that the interests of big businesses would take precedence over the rights and safety of individuals.

EDIT: Here is a brief of the arguments from the Wall Street Journal's legal blog.