Sunday, November 22, 2009

Bird!!



On the way home from the grocery store we were startled by a loud thud against the side of our car. At first it seemed like a minor car accident, or something fell off a truck, or someone threw something at our car. When I looked in the rear view mirror I saw what looked like several birds flapping around. When we got home and surveyed the carnage, we found confirmation that it was in fact a bird. I am pretty sure that the particular bird that hit our car did not survive.

I washed the bird remains from the car as best I could, but there were guts and feathers still stuck between the window and the car. When I lowered the window I realized to my horror that the groove that the window fits into was full of bird guts. The bird hit with such force that guts were pushed in and spread throughout the groove even though the window was closed. I had to use many q-tips to remove what was left of the bird. My wife almost threw up watching me do this.

iPod Touch on a Core i5 Computer

Holy Jeesum!

Yesterday I restored my iTunes library on my new computer, which went well. Today I thought it would be easy to sync my iPod, boy was I wrong.

When I attempted to sync my iPod, I was confronted with the following message:

iTunes could not connect to this iphone because an unknown error occurred. 0xE8000065

After a quick internet search I realized I was not alone. Apparently there are all kinds of compatibility issues with iTunes and computers with the new P55 chipset for the Core i5/i7. Thankfully Gigabyte was able to resolve the problem with a BIOS update (v. F3 for my GA-P55-UD3R). However, it was a bit of a task to finally get the BIOS updated.

I am used to updating the BIOS for Dell computers which is pretty painless, the updater is run right from within Windows. For Gigabyte there are 3 separate ways to update the BIOS! Q-Flash seemed like the recommended way, but the documentation all referred to a Floppy Drive being needed. I have not owned a computer with a Floppy drive in the last decade. I therefore tried the @Bios Application, a second method that they provide. @Bios is a Windows application to flash the BIOS, much in the way Dell works. However, this method doesn't work at all!! I tried several times. The application reports success, but each time after rebooting the BIOS version was still F2, not the newer F3. Finally I found on the internet that you can use a USB Thumb Drive with Q-Flash. Using the Thumb Drive I was finally able to flash the BIOS, and now iTunes is working with my iPod!

Saturday, November 14, 2009

New Computer: Part 2!

I have now had the new computer running for a few days, and everything is going well. With the latest technology, they now have something called XMP (Extreme Memory Profile), where if both the RAM and the Motherboard support the feature, the Motherboard can query the RAM for its potential performance and automatically adjust the frequencies. I turned this functionality on in the BIOS and it correctly updated the memory frequency to 1600 MHz, up from the default ~1300 MHz. However, after it made this adjustment, the CPU was underclocked to ~2.5 GHz. I then bumped up the multiplier a bit to x18 and it is now happily running at 2.88 GHz at about 32 degrees Celsius.

I am sure I could overclock it way more, some people are reporting upwards of 4GHz with air cooling, however I want this computer to last a long time, and I am happy with its current performance.

So far I have played Batman Arkham Asylum, and I have ripped a movie using Handbrake. Batman is friggin awesome! I am used to playing Wii games and much older computer games. I have all of the graphics settings set to the highest and it looks unbelievable compared to what I am used to. Additionally, the game story is very captivating! I also couldn't be happier with the performance of converting a DVD using Handbrake. With my old computer it would convert at around 10fps, which could take hours to convert. With this new computer it converted at over 80fps (almost an order of magnitude faster!). I can now convert a typical movie in around 30 minutes! Look at the screenshot, it shows all 4 Cores active!

Thursday, November 12, 2009

New Computer!

It has been many months since I last posted. We have had a busy summer, hopefully I will get around to posting pictures. We went to the Wild Animal Park and Legoland in San Diego, and we went to New York twice for a cousins' bridal shower and wedding! I also build two enormous Lego Star Wars sets. Unfortunately I have been stuck using my Dell Mini 9 hackintosh for the past month or so because my main computer had become pretty much unusable, which is partly responsible for my lack of posting.

However, I am happy to report that I have a new computer and my first order of business on it is this blog post! I bought my last computer at pretty much the worst time. It was the very first generation of dual core (Pentium D), which was pretty terrible. I wish I had waited for the Core line of processors.

For this new computer, I bought the parts and built it myself. Here are the specs:

Core i5-750 2.66 GHz (Quad Core)
Gigabyte GA-P55-UD3R Motherboard
4GB Corsair XMS3
Sapphire ATI Radeon 5770
Western Digital 640GB Caviar Black
Antec III Sonata Case
Cooler Master 212 Plus CPU Cooler
Windows 7 Home Premium 64-bit

I spent quite a bit of time researching all of these parts. I am hoping that this computer will be a little more "future proof" than the last one. The graphics card is DirectX 11 compatible, and I went with a 64-bit Windows 7 so that I will be able to add more RAM once 4GB chips come down in price (for a total of 12GB!). It is also nice to have Windows 7, the last computer was XP Media Center Edition, I completely skipped Vista!

The build went pretty well, thankfully even though the CPU cooler is huge, it doesn't interfere with any of the other components. The only hiccup is that one of the drive covers for the case came scratched, I will e-mail Antec and hopefully they will send a replacement part. My windows experience score is mostly in the 7's, but the Hard Drive is only 5.9, which seems low because this is supposed to be a performance drive. Oh well, I will have to research it. Right now everything is at default speeds, but I may try to overclock a little bit.





Sunday, August 2, 2009

Trout!


My wife and I lately have really been trying to cook at home more often. As part of this plan we now make a menu for the week every Sunday, and then only buy what is needed at the grocery store. We have been doing this for a few weeks now, and so far it has been working out very well! We are doing this to eat healthier, waste less food, and to save money.

We had a physical trainer many years ago before we got married. She emphasized eating 5 times a day instead of 3 to somehow boost the metabolism. We are trying to follow that plan again, and we are also attempting to eat roughly the same number of calories as we did. I whipped up a quick menu template to help keep track. We attach the current menu to the fridge.

We have been taking turns making the menu. My wife put together some great wraps for lunches a few weeks ago! However, this week it was my turn.

Von's had a sale today on Rainbow Trout, two fish were only 3.50$! I secretly made dinner for my wife because I knew that cooking a whole fish for her would get a great reaction! She loves all kinds of animals and is pretty sensitive to meat that resembles the creature that it comes from. For instance she won't eat the calamari that looks like the little squid, only the flat kind. Actually, I am lucky she eats any meat at all, because she used to be a vegetarian.

Anyway, I pan fried the fish whole and did my best at making a good looking plate. When I presented dinner to her at first she looked really happy, but once she looked a little closer she realized what it was she really freaked out! At first she refused to eat at all, but finally she calmed down was fine with me just removing the head and tail.

In the end she really liked it, and I was able to freak her out one last time by eating one of the fish eyes!






Friday, July 10, 2009

Blogging from a plane!


Today we are flying to New York so that my wife can attend a bridal shower. We are flying Virgin America for the first time. So far we are very impressed with the airline. The Wifi is only 9.95$, I thought it was going to be more. Also, there is a power outlet for each passenger, even in coach! The TV screens in the seat backs are larger than that of other airlines. The seats are nice. We had some fun chatting with friends back home and using the webcam. This blog post is being posted from a Dell Mini 9 running Mac OS X from a Plane! Pretty sweet!

Tuesday, June 23, 2009

Celebrity Sighting!

I had a celebrity sighting today at lunch! I sat at a table next to Jane Kaczmarek (the mom in Malcolm in the Middle) at Mediterranean Cafe, my favorite restaurant!

Sunday, June 21, 2009

Registering Visual C# Express

My trial of Visual C# 2008 Express Edition had run out so it wouldn't let me continue without registering. This shouldn't be too hard, I thought to myself... Well, first of all, I could have sworn I had a Microsoft Live ID with my personal e-mail address, but I guess I was wrong. I then attempted to create a new account so I entered all of my information and typed in the CAPTCHA, but it wouldn't take. It kept saying that the CAPTCHA was wrong. I tried at least 20 of them over and over, and finally it took me to a page that there was a problem registering in the account. In a fit of rage I hit F5 a bagillion times really quickly, and guess what! It took! Once hurdle number one was overcome I then actually tried to register. It was stuck with a spinning green progress indicator for about 5 minutes before I gave up. Then I realized my problem all along... I wasn't using Internet Explorer. I reluctantly fired up Internet Explorer, but I still couldn't get it to work. What I finally had to do was set Internet Explorer as my Default Browser so that I could click the button inside of the Visual C# software to launch the registration wizard and only then was I finally able to get through the process.

I do appreciate that Microsoft releases these Express Editions so that I can tinker around at home on personal projects. I just wish they would acknowledge that more than one browser exists in this world, especially in their QA department. Friggin Mircrosoft.

Saturday, May 9, 2009

Prime Rib!

Lately they have been having incredible deals on Prime Rib at Von's. I picked up a 4lb two rib roast for 15$, where it is usually closer to 40$. Overall it came out well, just slightly overdone for my liking. I also made Yorkshire pudding from its juices! My wife gets upset if I don't make something "green" to go along with dinner, so I fried up some zucchini as well.

Today was overall just a great day! We woke up this morning without having an alarm clock set, which hasn't happened in a long time. Every few months we like to take the train down to go visit Amoeba records to buy some new music. We hadn't gone in a long time and we had nothing planned for today, so we spur of the moment decided to go! On the ride to Union Station we noticed that the train seemed much more crowded than usual, and when we arrived we found out why. Today is National Train Day. I love trains! They had all sorts of stuff going on at Union Station; a model train exhibit, wine tasting information, giveaways and more. My wife picked up all sorts of goodies for her students, and I picked up a bunch of information on trains.

My sister is moving to Minnesota, and it seems like the perfect excuse to take the Amtrak Train from Seattle over to St. Paul. I learned today that the train ride is only 40 hours (I thought it would be longer!). It departs from Seattle at 4:45 PM. You spend the entire next day traveling through Montana and North Dakota which are both supposed to be beautiful. The following morning the train arrives in St. Paul at 7:50 AM. The timing seems ideal. We would definitely get a sleeper car, and as long as it is booked far enough in advance it doesn't look to be very expensive!









Saturday, April 11, 2009

The Getty



It has been a long time since my last post. In the last month we had a major software release at work, I went to my nieces dedication, and I have been on a ridiculous number of 'man dates'. At work we have a new coworker James who will be working from the opposite coast, however he spent his first three weeks over here for training. It just so happens that my wife and I live a block from the corporate condo where he stayed, so he has been joining me on the daily walk to work. Some might say I have a 'walking buddy'.

In addition to our daily walk my coworkers, wife and I have been showing him around town. We have been to the local pub a number of times, we went to the club Largo to see a Jon Brion show, and finally we went to the Getty!

My wife took her students on a field trip to the Getty not too long ago, and she received a free parking pass. We have been itching to go back, and having James around was finally a good excuse to go. It was a beautiful day, and the furniture exhibit was awesome. The 'Vexed Man' is pretty sweet too, although to me he looks like he is just dropping a deuce, not so much vexed.
































Sunday, March 22, 2009

Internet Explorer 8

Internet Explorer 8 was released three days ago on March 19, 2009. I installed it on my work machine as soon as it came out. Because I am a windows developer I feel a certain obligation to use Internet Explorer, although at home I have been using Google Chrome.

Overall the browser is way ahead of its predecessor. The search functionality is vastly improved. The search is now integrated, it can highlight results on the page, and it is much easier to step through the results. I also like the tab color coding feature. When opening a new tab from an existing tab, it will color code the two tabs to help with organization. Another nice usability improvement is that you can now paste a multi-line URL into the address bar, and it won't truncate the URL. Multi-line URLs happen all the time when trying to e-mail or IM long links.

However, there are several features that are still lacking and one that is seriously broken. I cannot believe that there is still not an integrated spell checker in IE8. This has been in FireFox for a long time, and made it into version 1 of Chrome. Also, I wish you could drag a tab out of the browser to make a new window. This is an incredibly important feature for users with multiple monitors, and something that Chrome supports. Finally, one of the main reasons that I use Internet Explorer is that in previous versions, it displayed web pages much better on a high resolution monitor.

At work I have a 24" Monitor with a resolution of 1920x1200. I run Windows at 120 DPI so that the text is readable. FireFox at that resolution will render the text much too small, and increasing the text size will make certain web pages ugly. Internet Explorer on the other hand takes the system DPI into account and renders the text at an appropriate size, without breaking the look of webpages. However, there is one major consequence, at 120 DPI by default Internet Explorer will scale images, which introduces blur and fugliness to web pages. Fortunately in Internet Explorer 6 and 7, there was a registry key 'UseHR' that would turn off the image scaling when set to 0, yet left the text rendering intact. Unfortunately, the 'UseHR' registry key no longer works in Internet Explorer 8. For this reason alone, unless I soon discover a workaround, I will probably have to go back to IE7.

The 'UseHR' Registry Key has been well documented by Microsoft. I can't believe that Microsoft would cripple this functionality because the world is moving to high resolution displays. Check out this Sony laptop. At an astounding 220 pixels per inch, Windows would be unusable at the default 96 DPI, one would need a microscope to read the text.

I have posted in the Microsoft discussion group about this, unfortunately there has yet to be a response.

Wednesday, March 18, 2009

Authenticode and Vista

This week at work our Authenticode signing certificate expired. The renewal process involves the Certificate Authority issuing us brand new keys. We had done this before, so I figured that it would not be a big deal. However, over the past year we have upgraded our entire development environment to Windows Vista.

Before I discuss the Vista situation, let me elaborate a little on what exactly Authenticode signing is. Basically, it is digitally signing software so that when an end user downloads and does an install, the software will appear to come from a reliable source. The Authenticode certificate is purchased from a 3rd party Certifcate Authority that has been blessed by Microsoft. Verisign is one such authority.

The digital signing technology uses public/private key pairs. Basically the software company signs the code with a special private key, and in doing so will embed the public key into the software. Only the public key is needed to perform verification. When the user installs the software the verification takes place and if everything checks out, a dialog will show that windows trusts the software.

The Certificate Authority delivers the keys to the software company as two separate files, a .pvk (Private Key) file, and an .spc (Public Key) file. To actually sign the software Microsoft provides a tool aptly named signtool.exe. However, this tool works best with .pfx files (Which contain both the public and private keys). Microsoft provides a difficult to find tool called pvk2pfx.exe that will merge the .pvk and .spc files into the required .pfx file.

Anyway, back to the Vista issue. These Certificate Authorities don't allow private keys to be downloaded normally. They instead rely on certificate enrollment functionality that is built into Windows and Internet Explorer. The process can't be done in Firefox. And Vista has changed the way that the Certificate Enrollment works. In Windows XP, it was very simple, the user could just select a file location where the .pvk file would be generated. In Vista, they instead install it into a special Certificate Store for pending Certificates. The .pvk data therefore is buried in the windows registry instead of sitting on the file system. Furthermore, the key is placed in the Certificate Store in such a way that exporting the private key is disabled, which essentially traps the key in the Certificate Store on that particular computer.

After some research, I contacted technical support at the Certificate Authority, and they immediately understood our issue (It must come up all the time). The only recommendation that they could provide was to redo the whole over again process in Windows XP. Thankfully we still have XP environments to be able to do this. It seems like Microsoft implemented this new behavior as a security "feature" without considering the implications for developers. I wonder if this will behave the same way in Windows 7?

Wednesday, March 11, 2009

Overpriced Pasadena Condo



On my way to work I often pass by this particular condominium complex that should be the poster child for our housing bubble. The complex has 19 units, and about 6 months ago at least 5 of those units were for sale all at the same time. I am not sure if any of those sold. However, at least one of those units is still on the market and is the subject of this blog post.

Unit #2 has been on the market for quite a long time. It is a 1200 sf, 2 bedroom, 3 bath condo that is currently listed for 659,900$. Now if that didn't jolt you, the kicker is the 445$ monthly HOA fee. Keep in mind that there are no amenities other than perhaps the landscaping.

Assuming a 30 year, 5% interest rate mortgage and a 10% down payment, the mortgage would be 3200$ per month, but add in property tax and that crazy HOA fee and suddenly it is 4300$. According to the flyer, they would also be willing to lease this unit for 2500$ per month, which includes utilities. The monthly rent price is therefore roughly half the total monthly price of ownership, because insurance and utilities would have to be added to that 4300$ figure.

According to Zillow (which I know is not always the most reliable resource), the current value of the unit is 485,000$. This figure is in my opinion still overpriced, but is at least somewhat in the range of the rental price. To truly match the rent I figure a 340,000$ sale price, which is basically half of the current price of 659,000$.

However, even if the condo was priced at 200,000$, I would still be hesitant to make a purchase because of that HOA fee. Either the association is very poorly managed, or there is something very wrong with the building. I cannot figure out why on earth the fees are so high. For a condo in the area, the fees are typically around 200$ with no amenities.

Zillow also states that the last sale was in 2004 for 525,000$. It also looks like a fair amount of upgrades were put in place, because they are advertising travertine tile and stainless steel appliances (note in the flyer that they don't even know how to spell travertine). Given that purchase price and all of the money that was poured into this condo, I can see why they are holding on to such a delusional price. I wonder if they had unloaded it for much less a year ago that in end they might not have ended up hemorrhaging as much money away.

Wednesday, March 4, 2009

Pasadena cutting down trees!

Over the past few weeks Pasadena has been cutting down trees along Colorado Blvd between Lake and Los Robles, which is where I work. It seems very odd to me that Pasadena would decide to do something like this, those trees were healthy, well established, and added irreplaceable character to the area. Pasadena decided to cut down the trees at night, which was done in my opinion to prevent protests. Someone wrote with a sharpie on the tree stumps urging people to contact the mayor's office to protest, but the city immediately spray-painted over the message. The next day there were printed signs attached to the stumps. I grabbed a picture with my cell-phone. According to this article in the Pasadena Star News, they hopefully will stop cutting down any more trees. However, the article states that Pasadena violated previous ordinances that prevents removing healthy trees! With luxury condos popping up every other block and now this ridiculous tree removal, Pasadena is deteriorating to an unrecognizable shell of its former self.

Sunday, March 1, 2009

Star Wars Legos - AT-AT



Yesterday we went to a baby shower for my Cousin in orange county. I convinced my wife that it would be a good idea to go to Downtown Disney on the way home. Coincidentally my parents were attending a convention in Anaheim so they met us there. We had a nice dinner at the Bakery restaurant at the far end of the strip. However, my main desire for going to Downtown Disney was the Lego store. Fortunately, my wife had never been to Downtown Disney and didn't know about the Lego store. I sort of told a little white lie by acting surprised when we got to the store, but I eventually came clean (she frowns on my Lego addiction). The best part of the store is that they have sets that aren't normally sold in other retail outlets. I have been eying set #10178 (Motorized Walking AT-AT), they had it in stock and I couldn't resist.

This set is probably my favorite Star Wars Lego set of all time, the thing actually walks! I also favor sets from the original three movies, this particular set is from the Empire Strikes Back and is from the scene where Luke blows up the AT-AT. You can see in the picture Luke dangling from the belly of the AT-AT. One particular Lego piece made me laugh pretty hard, the engineers had to have realized that this piece is very phallic, it must be an inside joke in the Worldwide Lego headquarters. Also check out my first YouTube video!









Thursday, February 26, 2009

Extreme Engineering

The series 'Extreme Engineering' from the Discovery Channel a few years back was recently added to the streaming section of Netflix. Thanks to my Roku Netflix box I can therefore watch them right on my TV. I have watched three of them so far, one on widening the Panama Canal, one on the Big Dig, and one on the Gotthard Tunnel in Switzerland. I have really enjoyed them! However, these construction projects really put the cost of the recent bailouts in perspective. For instance the Gotthard Tunnel is a 35 mile tunnel under the Swiss Alps that will end up being the largest tunnel ever built. They made a point in the documentary of trying to shock the viewer with just how expensive it is... 7 billion dollars. That is mice nuts compared to what our government recently gave to just AIG alone!

Sunday, February 22, 2009

Chicken Soup!






My wife Jena and I have been feeling a little sick off and on for the past few weeks. Today we have really been trying to recuperate. We have been drinking tea all day long, taking vitamin C, and basically just trying to rest. Jena is of Jewish heritage and her Grandmother has a terrific homemade chicken soup recipe. We figured it only right to cook up a batch while we are on the mend. I am actually enjoying it right now as I write this. It came out perfectly.

Wednesday, February 18, 2009

Readyboost



I received a new laptop at work not too long ago. It came with Windows Vista. I may be slightly biased because I am a .NET developer, but I think Vista is actually pretty good. Since the release of Vista I have been hearing about Readyboost and the laptop came with a built in SDHC slot so I figured, what the heck! From what I understand Readyboost is basically using flash memory as a cache for your hard drive. The benefit is that flash memory has a really low seek time, so it should be able to retrieve frequently used files very quickly. Some USB drives are rated as Readyboost capable, however any memory that is fast enough will work. I decided to go with the SanDisk Ultra II which supposedly transfers at 15 MB/s. Somewhere I remember reading that Readyboost requires 5 MB/s. At first I was looking at the Ultra III (which is 20 MB/s) online, but it felt just a little too pricey compared to other cards with similar capacity. I finally pulled the trigger when I saw the 4GB Ultra II on sale at Circuit City for 20$ (Although it is slightly cheaper on Newegg). 4GB is the maximum size supported by Readyboost.

All in all I am impressed with Readyboost. My computer feels more responsive. After booting into Windows, it feels like I can start running programs and doing work right away, whereas before there was more of a pause as the computer got going. I also like that I can basically forget about it because of the internal SD slot. It wouldn't be as convenient if I had to remember to keep track of a USB Thumbdrive.

Tuesday, February 10, 2009

Longs Drugs

Near where I live a Hollywood Video went out of business not too long ago. In its place arose a Longs Drugs. Longs was literally open for a month and now it has also closed. There is a giant sign on the Von's down the street about transferring prescriptions. I have searched all over the internet and I can't find any information on this. It just seems bizarre. There is a CVS down the block, and I believe that CVS just bought Longs, so maybe that is why they shut it down. But then why wouldn't the prescriptions then transfer to CVS? The whole thing smells fishy to me.

Thursday, February 5, 2009

Squeek!



Ouch, its been 9 days since I last posted. My flower almost died. Anyway, I have a pet snake named Squeek and here is his very own post. Squeek is a Ball Python, he is around 4 feet long, and he is like fourteen or fifteen years old. The story goes that the first time Squeek ate a mouse, the mouse made a 'squeek' like sound as it died, and that is how he got his name. He is a hand-me-down snake, I have had him for about five years now.

I fed Squeek a gourmet medium rat about five days or so. I actually recorded it on video and I have been meaning to finish editing it so I could post it online. The soundtrack is the version of Mad World from Donnie Darko. I am now having second thoughts about posting the video, it made my wife cry. Anyway, late last night the rat came out the back-end of Squeek in the form of white chalky feces and a whole lot of piss. I just finished cleaning it all up, and I gave Squeek a nice bath to make sure he is squeaky clean!

After the bath I was able to take a neat close-up photo of him with his tongue sticking out. Too bad looking at that photo made me realize that I probably need to vacuum. Writing this post has also made me realize that the correct spelling of his name should probably be squeak. I have always spelled it squeek, I guess he gets to be cool and have a special spelling.

Tuesday, January 27, 2009

Home Theater



I having been meaning to document my home theater for a while now. Here is a first attempt. Eventually I may have to devote some posts to the individual components. Unfortunately my setup is very outdated at this point, nothing supports 1080p. I bought my TV in 2005, before LCDs really came down in price, so I opted for a CRT HDTV, so even though it is only 26" it weighs around 100 pounds. It is also natively 1080i, which goes against the norm. All in all though, I am happy with the way everything is working. I don't plan on changing for a while, all efforts are currently pointed toward buying a house.

Components:

  • Samsung TXR2678WH 26" CRT HDTV

  • Series 3 TiVo

  • Samsung DVD-HD950 HD Upconverting DVD Player

  • Roku Netflix Box

  • 40GB Apple TV

  • Samsung AV-R601B DTS Receiver

  • Octava SW4A HDMI, Optical and Coax Switch

  • ConnectGear HSP12 HDMI Splitter

  • Sony LocationFree LF-B10 Media Streamer

  • Nintendo Wii





Above is a rough sketch of how everything is connected. As complicated as this looks, it is very easy to control thanks to my trusty Harmony 880 universal remote. The setup is also overly complicated because of certain limitations with individual devices. I had to go with the expensive Octava switch, over just a plain Monoprice HDMI switch because my TV does not support passing through surround sound from the HDMI port, and also because my the DVD player doesn't support HDMI audio. The Apple TV used to be connected to the Octava switch, but once I downloaded the 2.0 Firmware suddenly the Apple TV would become stuck showing the Apple logo when using HDMI. It is much more stable using the component cables. The Apple TV has all sorts of problems with many different HDMI devices, so I don't think the problem is with the Octava switch. In fact, the Octava switch has worked very well. It does a great job of auto-sensing signals and switching automatically.

I am also in a bit of a conundrum going forward because of my SACD collection. I own maybe a dozen or so SACD and DVD Audio discs, including Pink Floyd's Dark Side of the Moon and Nine Inch Nail's the Downward Spiral. Unfortunately at this point it is basically a dead technology. Most Blue-ray players don't support it. Only the first run of Playstation 3's supported SACD, but only through HDMI because it didn't have analog Multi-Channel output. I may have to keep my DVD player around forever because of this.

Another key feature of my setup is that I do not have cable or satellite TV. I use an antenna to pick up terrestrial HDTV channels. At first this wasn't by choice because I live in the one building in all of Pasadena that doesn't provide cable, and I would violate my lease by putting up a dish. However, I am now proud not to have that monthly bill and I am happy with the content that I do receive.

In terms of usage I would say that the TiVo is used 50% of the time, the Roku box is used 20% of the time, the Apple TV, the Wii and the DVD Player are each used around 10%. I am really a fan of the Netflix box. I like the subscription model much more than paying per rental. I pay 17.99$ a month to have 3 physical DVD's out at a time and on top of that I can stream as many movies as I want to my Roku box. We probably stream 2-3 movies per week, which is about 10 movies per month. With the Apple TV model, that would be at least 30$ per month, plus I still have the DVDs to fill in the gaps. I only have rented a few movies on the Apple TV, mainly new release action movies to take advantage of HD and Surround Sound. The only downside to the Netflix box is the availability of content, but it is getting much better. Netflix recently partnered with Starz, and that has brought in a much better selection. As of recently the Roku box supports HD as well, although with a very limited selection.

The Apple TV usage has gone up lately. I recently got an iPod Touch, and it has a nifty remote control application for the Apple TV so that selecting music to listen to is a breeze. I also like the photo screen saver functionality. When I first bought the Apple TV my intention was to convert all of my DVDs to MPEG-4 and make them available to the Apple TV. I was using Handbrake to rip the movies and I was running into all sorts of stability problems. However, Handbrake is much more mature now. It is much more stable. It also now supports retaining the surround sound made possible by the 2.0 version of the Apple TV. However, this introduces another conundrum. Do I rip each movie twice, once for Apple TV compatibility, and once for iPod compatibility? Or do I just live with the iPod quality on the Apple TV. I also wish that iTunes included built in support for ripping movies, because it is fair use. They support ripping CDs, why not DVDs?

Another thing that has deterred me from starting this project are rumors flying around that internet that Apple may soon release some sort of media server product. I want to wait a bit to see if this thing is real before I invest a lot of time converting my DVD collection, because it may influence my decisions. I have also been reading a lot about Boxee lately. Boxee is an application that can be installed on many things including the Apple TV that includes Netflix, Hulu, and much more. I have yet to do it because it is not supported by Apple, and it makes me a little nervous. Hulu may be the tipping point though. If I install it I will definitely write a follow up post.

I am now kicking myself a bit for being an early adopter because it seems that all of my gadgets are slowly starting to converge. I can now watch Youtube on the Wii, Apple TV, and TiVo. I can stream Netflix to my Roku Box, TiVo, and even the Apple TV with Boxee. The TiVo and the Apple TV can both stream video from my computer. Oh well.

Sunday, January 25, 2009

Blog Flower Code

This article is the second in a two part series on the Blog Flower Gadget. In the previous post I described how I created the artwork using InkScape. In this post I will describe the programming behind the gadget.

There are two parts to the gadget. The first part which is the gadget itself is contained in a JavaScript file, the second part contains all of the 'Add to Blogger' submission functionality, it is a combination of an html form and another JavaScript file.

The gadget is built using the Google Data API, which provides the content of a blog as either an XML feed or a JSON feed. I primarily work on a Windows Forms application using the .NET Framework, so this was the first time I had even heard of JSON. It is a data format somewhat like XML, except that it is much more compact, and is built specifically for JavaScript. In fact the Google API returns it as an already parsed collection of JavaScript obejcts, which couldn't be easier to work with.

Here is the first JavaScript file, BlogFlower.js which is the gadget.

BlogFlower.js

// (C)2009 by Peter Noyes
function blogFlower(root)
{
var feed = root.feed;
var entries = feed.entry;
if (entries.length == 0)
return;

var entry = entries[0];
var ds = entry.published.$t;
var d = new Date(ds.substring(0,4), ds.substring(5,7) - 1, ds.substring(8,10));
var days = Math.floor((new Date() - d) / 86400000);
document.write('<div class="blogFlower">');

var flower;
if (days < 5)
flower = 'http://www.geeklounge.org/script/Flower1.png';
else if (days < 10)
flower = 'http://www.geeklounge.org/script/Flower2.png';
else
flower = 'http://www.geeklounge.org/script/Flower3.png';

document.write('<img src="' + flower + '">');
document.write('<br>');

switch (days)
{
case 0:
document.write('updated today');
break;
case 1:
document.write('updated yesterday');
break;
default:
document.write('updated ' + days + ' days ago');
}

document.write('</div>');
}


The blogFlower function is called by the Google API, and the root variable is the JSON object that the API constructs. The blog post is retrieved from root.feed.entry, which is an array of all the entries. Google has a good description of this here. The only real trouble I had with JSON was compatibility with the date format. I did find a Google Date API that may have helped, but it added a tremendous amount of JavaScript to this project, which seemed overkill. In the end I used substrings to pluck the year, month, and day from the JSON date. To find the number of days since the last posting, I subtracted the parsed date from the current date, which returns the time span in milliseconds. The conversion factor of 86,400,000 is built up by 1000ms * 60s * 60m * 24h. The corresponding image and text is then written to the document as HTML.

The submission code uses the syntax described here, in order to add the gadget to Blogger. It also sets up the API call to the Google Data API and provides the callback to the blogFlower function.

First is the submission HTML that I placed in the blog post, it is followed by SubmitBlogFlower.js which is referenced by the HTML. I first wanted the submission code to be in the blog post as well, however the syntax checker in the blog post editor barfed on the JavaScript and wouldn't let me post it.

HTML in Blog Post

<script src="http://www.geeklounge.org/script/SubmitBlogFlower.js"></script>
<form name="blogFlowerForm" method="post" action="http://www.blogger.com/add-widget">
<span>http://<input type="text" name="blogName" onkeypress="return noEnter()">.blogspot.com</span><br><a href="javascript: submitForm()"><img src="http://www.blogger.com/img/add/add2blogger_sm_w.gif" style="border:0px"/></a>
<input type="hidden" name="infoUrl" value="http://peternoyes.blogspot.com"/>
<input type="hidden" name="widget.title" value="Blog Flower"/>
<textarea name="widget.content" style="display:none;"></textarea>
</form>


SubmitBlogFlower.js

// (C)2009 by Peter Noyes
function submitForm()
{
var content1 = '\<script type="text/javascript" src="http://www.geeklounge.org/script/BlogFlower.js"\>\</script\>';
var content2 = '\<script type="text/javascript" src="http://';
var content3 = document.blogFlowerForm.blogName.value;
var content4 = '.blogspot.com/feeds/posts/default?orderby=published&max-results=1&alt=json-in-script&callback=blogFlower"\>/</script\>';
document.blogFlowerForm['widget.content'].value = content1 + content2 + content3 + content4;
document.blogFlowerForm.submit();
}

function noEnter(evt)
{
var evt = (evt) ? evt : ((event) ? event : null);
var node = (evt.target) ? evt.target : ((evt.srcElement) ? evt.srcElement : null);
if ((evt.keyCode == 13) && (node.type=="text")) {return false;}
}

document.onkeypress = noEnter;


The gadget is added to Blogger using an html form. I used all hidden form fields except for a visible text field for the user to enter the name of their blog. When the user clicks the submit button it calls the function submitForm, which dynamically constructs code for the widget.content field. This code first references the BlogFlower.js, and then it references the Google Data API. It builds up the feed URL using the blogName text field. I send the following parameters to recover the JSON feed:

  • orderby=published, This ensures that I will be returned the latest posts.

  • max-results=1, This instructs Google to only send back a single post. When doing research I came across a popular Blogger gadget that shows a list of recent posts. Even though they only consumed a few posts, they omitted this parameter which causes Google to return a feed containing every single blog post. This is a complete waste of bandwidth.

  • alt=json-in-script, This instructs Google to return the feed as JSON instead of XML, and to use a callback.

  • callback=blogFlower, This is the callback function implemented in BlogFlower.js


The noEnter function is used to prevent the user from being able to submit the form by pressing 'Enter' in the blogName text field, because doing so would submit the gadget incorrectly.

To get this to all to work took a decent amount of research. At first I kept stumbling across the Widget Tags for Layouts which is the syntax used to create a Blogger Layout. Some gadgets are written using this API, however I couldn't find a way to create the Blog Flower this way. Once I found the Google Data API the implementation went pretty quickly. Creating the artwork actually took up most of the time.

Thursday, January 22, 2009

Blog Flower Art







In a previous post I introduced the Blog Flower Gadget. I have decided to go into some detail about how I created the gadget, and I will split the information into two posts. In this first post I will talk about how I created the artwork. In the second post I will describe the programming implementation.

First of all, part of the inspiration for creating this gadget is that I am currently doing some work involving bezier curves, and as part of my research I downloaded and played with Inkscape. Inkscape is an open source vector graphics editor. I decided to try and trace something using the Bezier curve feature.

I started by sketching the three stages of the flower on paper. I then took a picture of the sketch using my digital camera and imported it into Inkscape. Once in Inkscape I turned the opacity of the image way down so that I could see what I was doing. The actual tracing using the bezier curve tool was pretty easy. Basiclly single-clicking will place corners, and a drag-click will create control points for a curve. It takes a minute to get the hang of it. For each shape I would create a rough outline, and then I would clean it up by moving the points around. It is also possible to add or remove points.

Once I had completed each stage of the flower, I copied and pasted it into a new document and shrunk it down to a smaller size. I first tried actually using .svg files as the final output format for the gadget. It seemed to work best using the <object> tag in the HTML. However, after I finally got it working in Firefox and Internet Explorer I realized that Chrome doesn't support SVG at all, so I decided to fall back to using PNG files instead. It is not a total loss because in the end the .png files were about half the size of the .svg files, even though logically one would think a vector format should end up smaller than a raster version. Although SVG is vector, it uses a very verbose XML syntax and is uncompressed, which explains the difference in file size.

Anyway, I had fun working on this project. It is my first attempt at doing vector based artwork so I am considering it a success.

Sunday, January 18, 2009

Indie 103.1 and Roku SoundBridge



It is sad to see Indie 103.1 go off the air. As an experiment I just decided to see if I could access it on my Roku SoundBridge. Roku has gained a lot of fame recently by partnering with Netflix to produce a set-top box for streaming movies (I own one of those too), but it got its start with the SoundBridge which allows streaming music from a computer, and more recently internet radio. I was able to search for the station using its old call letters, KDLD. I never could pick up the station very well when it was on the air, I am glad I tried this!