Friday, May 23, 2008

New Weezer Album

As many of you may know, Weezer is my favorite band. In eleven days (June 3 2008) they are releasing their next album, "Weezer". It will their third self titled album, this time nicknamed "The Red Album".


The video for their single, "Pork and Beans", came out on YouTube today! If you keep up on the internet's viral videos, you'll find it pretty funny.



Below is a list of videos I compiled that are included (in order of first appearance):

Is it sad or impressive I recognized 80% of them? Please tell me if you know any that I've missed. :-)

Thursday, May 15, 2008

Finicky Configuration.RegexStringValidator

I was working on a custom ConfigurationElement for an HttpModule and I needed two properties. They both needed to be in the form of a URL (but only the host) and one was required. Regular expressions are a great tool for easily verifying a string is in a certain format and Microsoft was nice enough to include the RegexStringValidatorAttribute. So I tried this:

[ConfigurationProperty("Url", IsRequired = true)]
[RegexStringValidator(@"^https?://[A-Za-z\d\-_\.]+$")]

[ConfigurationProperty("Url2", IsRequired = false)]
[RegexStringValidator(@"^https?://[A-Za-z\d\-_\.]+$")]

If you know regular expressions you can see a simple URL like "http://www.jessemandel.com" should validate. Neither one worked, plus it gave me the misleading error that "http://www.jessemandel.com" wasn't validating.

After a bit of fiddling around, I figured out that at some point the RegexStringValidator is validating the default value. In this case it's an empty string which is not valid. This makes sense for Url2 if it's not provided but it told me "http://www.jessemandel.com" was invalid.

The second one was an easy fix. Since it's not required, I changed the regular expression to allow "" and now it works.

[ConfigurationProperty("Url2", IsRequired = false)]
[RegexStringValidator(@"^(https?://[A-Za-z\d\-_\.]+)?$")]

I can't do the same for the first one because I don't want an empty string to be valid. It's required so it's never empty but I guess when it initializes it loads the default value. Adding a DefaultValue that is valid does the trick.

[ConfigurationProperty("Url", IsRequired = true, DefaultValue = "http://localhost")]
[RegexStringValidator(@"^https?://[A-Za-z\d\-_\.]+$")]

You don't have to worry about the DefaultValue much because if you do not include the property at all you'll get the error, "Required attribute 'Url' not found." and if you include an invalid Url, you'll get the error, "The value does not conform to the validation regex string '^https?://[A-Za-z\d\-_\.]+$'."

Thursday, February 14, 2008

PlascoEnergy Group

PlascoEnergy GroupThis company is amazing! They take trash and convert it into energy using a process called plasma gasification. Plasma gasification uses plasma (super heated gas) to break down (not burn) trash into its basic elements. This allows all kinds of trash to be disposed of. Things like biomedical waste, toxic chemicals, concrete, metal, plastics.

Plasco Energy Group has the only full scale working prototype of its kind. What makes Plasco unique is how it organizes the material afterwards. Plasco uses a series of tubes (like the internet!) to sort the material so it is more useful and sends it through turbines to create energy. The most amazing part is once their power plant gets running, it produces enough electricity to sustain itself and put some power back into the grid. Plus after the process is complete, there is only about 0.2% waste product.

Check out the video

Tuesday, February 5, 2008

Internet News Readers

I read a lot of news on the internet. I also follow a few comics and read programming articles. I keep up with the TED.com videos. I have a few friends with blogs that I read. All in all there are 50 sites I want to keep track of and I am always adding more.

How do I do it? Sure I could bookmark them all and check them on a regular basis but 50+ sites would take forever! Luckily there is an easier way, feeds.

There are two standards for feeds, Atom and RSS. There are a few differences but for the most part, they function the same. They are an XML file that lists the (articles, comics, videos, blog posts) on a given web site. Now using a reader, you can subscribe to as many of these feeds as you want and have one place to check all you favorite websites for updates.

There are many free news readers available. Personally I use Google Reader. It has a slick, intuitive interface and stores my subscriptions online so I can log in from anywhere and check them. You can also use Outlook, Thunderbird, My Yahoo!, or any other news reader. You can even make live bookmarks in Firefox or add feeds directly to IE7.

Once you've chosen your reader, look for the universal feed icon Subscribe to my blog or subscribe links to add them to your reader. Try it by subscribing to mine! :-)

-Jesse

PS- If you run your own feed, there a a tool called Feed Burner that allows you to count the number of subscribers you have.

Monday, January 14, 2008

I'm going x64

I just bought a new computer! I put it together last night and it's fast. I get a 5.9 (the current max) rating in Vista in every section except video performance where I get a 5.6.

The specs are:
I kept my Logitech keyboard/mouse, Altec Lansing 5.1 speakers and dual Sceptre 20" LCDs.

As I mentioned in the title, I am running the 64-bit version of Windows. If you are buying all new hardware anyway, you should run a 64-bit operating system. There is definitely a bit of a performance increase and, in my case, is required since have 4 GB of RAM. Coding Horror has a detailed post on why you can't utilize 4 GB of RAM on a 32-bit system but it's a little confusing still.

Basically a 32-bit system means you have 32 bits to address data. A bit is the smallest amount of data in a computer, either a one or a zero. So the biggest number possible is 232 or 4,294,967,296. Memory is addressed in bytes (8 bits) so the maximum memory is 4,294,967,296 bytes or 4 gigabytes (huh?).

So why can't you use 4 gigbytes of memory? This maximum is the amount of memory you can address total, not just system memory. Of your 4 GBs, the first MB is for legacy DOS, BIOS and old add-in cards. Then there is a section for your motherboard, flash memory, video memory and all other devices. If you have a newer video card with 512 MB of memory, that is 1/8th of your address space right there! Your system memory is the last thing to get addressed so whatever is left is the amount of RAM your OS and programs get to use; usually around 3 - 3.5 gigabytes.

There are some older hacks to get around this but the best way is to use 64-bit hardware and OS.

Thursday, January 10, 2008

RIP Gemina the 'crooked-necked giraffe'

Gemina the 'crooked-necked giraffe' was put down yesterday at the age of 21. Over the last two weeks she stopped eating. The zoo keepers noticed it was affecting her quality of life so they euthanized her. I was lucky enough to see her in person as she was what the Santa Barbara Zoo was known for.