The year 2000 came and went, and the world went on. There were no horrific date rollover bugs, despite all the press. However, that doesn't mean that date rollover issues do not exist.
I just debugged a date rollover issue. It manifested as follows:
Our application worked fine in our local environment (of course), but when we deployed to a customer's server, the cookies didn't work. We took a look at the HTTP Headers using Chrome, and everything seemed fine. But still they didn't work.
However, when I took a close look at the headers in our test environment and the server environment, the issue jumped right out at me.
Here was the header from our local environment:
Set-Cookie:prop1=value1;Path=/ourapp;Expires=Mon, 10-Jun-2080 00:13:42 GMT
And on the customer's server:
et-Cookie:prop1=value1; Expires=Sun, 09-Jun-80 23:59:24 GMT; Path=/ourapp
Do you see it? It is rather obvious.
It is a date roll-over issue.
The problem was caused when we set the cookie expiration date to Integer.MAX_VALUE. This resulted in a date some time in 2080. In our local environment, Jetty handles this properly and uses a long date format for the year.
However, the production server uses IBM WebSphere, and it takes a short cut. It simply renders 2080 as 80.
So the browser sees the date and discards it as expired. Apparently it doesn't use the 'context clue' of Sun to determine which century the date is in...
By setting a realistic expiration date for the cookie, it works just fine.
We were distracted for a bit by IBM WebSphere adding: Cache-Control:no-cache="set-cookie, set-cookie2" However in the end that seems to be unrelated.
Hope this can help someone else.
Investing in Electronics
In a fast moving marketplace like Consumer Electronics, where your newest cellphone is out of date within a year and ancient after two, I thought it would be worthwhile celebrating some of the electronics that have served me well year after year.
Some of these are great investments because they are in a category that evolves more slowly. Others are examples where buying quality really pays off.
The HP 4L was replaced by a Dell 1320c, with a wired network connection. It has served well for 4 years now, and will hopefully continue for another 10. It was more expensive then an ink jet, but if it continues to serve it will be well worth it.
While it no longer has the features to be a primary Home Theatre Receiver, its amplifier still works great. It now powers the outdoor speakers by my patio.
It was replaced in my Home Theatre setup by a Yamaha RX-V992 in 1998.
With Dolby Digital Decoding, and multiple digital audio inputs, this receiver has stayed relevant in my system for the last 14 years, and is still my primary A/V Receiver.
Some of these are great investments because they are in a category that evolves more slowly. Others are examples where buying quality really pays off.
Printers
First, while it is no longer with me, I want to celebrate again my HP 4L Laser Printer. I finally retired the printer in 2008 after 14 years of great service. I wrote about its retirement here.The HP 4L was replaced by a Dell 1320c, with a wired network connection. It has served well for 4 years now, and will hopefully continue for another 10. It was more expensive then an ink jet, but if it continues to serve it will be well worth it.
Audio/Video Receivers
I still own and actively use ever receiver I've purchased since I started college, over 18 years ago. The oldest receiver is the Pioneer VSX-D503S.While it no longer has the features to be a primary Home Theatre Receiver, its amplifier still works great. It now powers the outdoor speakers by my patio.
It was replaced in my Home Theatre setup by a Yamaha RX-V992 in 1998.
With Dolby Digital Decoding, and multiple digital audio inputs, this receiver has stayed relevant in my system for the last 14 years, and is still my primary A/V Receiver.
Network Attached Storage
Finally, my ReadyNAS NV+ has been a great purchase and constant workhorse for me.
Purchased in 2007, it is relatively young compared to the previous two examples, but for a computer accessory, it is ancient.
At its base, it provides access to a set of RAID drives over the network. But it also has a rich eco-system of software add-ons, and has been well maintained by ReadyNAS (now Netgear). With SSH access, it is really a small linux box, which in addition to providing file hosting also serves as my DynDNS client, linux shell access, SVN server, and occasional Bit Torrent client. At the time it replaced a full 'desktop' linux server, and I've never looked back. While I did have to replace the power supply last year, it has worked flawlessly otherwise, and I'm happy to upgrade a power supply every 4 years if it keeps working great.
Keys To Longevity
What are the keys to finding great electronic investments? First, the Printer and A/V Receiver categories are places where the core technology isn't evolving that quickly. In areas like these, I think it makes sense to spend the additional money up front for a quality, 'top of the line' product that will last. If you buy 'as much receiver as you can afford', it will likely last you a long time.
Second, you need to be willing to augment them with accessories. While my receiver has several digital inputs, it didn't always have the right mix. I had to add a $30 Optical to Coax digital audio convert to connect up a new component. But a $30 accessory to keep a (original cost) $999 receiver working is a no-brainer.
For my Dell 1320c printer, it has wired internet but no wireless. But again, with the purchase of a wireless adapter, I was able to extend the life of the printer.
Third, flexibility extends a components life. By purchasing a receiver with a lot of inputs, it was able to continue to provide value over time. With the ReadyNAS NV+, I was able to evolve the features it provided, reducing the need to 'upgrade' to something newer.
And finally, buy quality. At the time, there were less expensive options for each of these purchases. But buy spending a bit more for a workhorse device, I saved money in the long run.
Posted 5/14/2012
Rapids Pre-Game Warm-up
I got to sit on the bench and watch the Rapids pre-game warm-up on Saturday (April 26) for the game against Chivas USA. I took some pictures of the team warming up. You can see the full set here. Below are some of the highlights.
Posted 5/04/2012
Debugging Android Web Traffic
Normally, I would use a packet sniffer, such as WireShark (OS X and Windows) to look at the network traffic and debug the application.
However, for Android development I do my primary development on a physical Android device. It is faster, and provides a more realistic experience during development and debugging. However, since the network traffic is no longer going through my computer, WireShark doesn't help.
To solve this, I use another program called Charles. Charles is a 'Web Debugging Proxy Application'. In short, it is a tool similar to WireShark, that allows you to easily debug network traffic. Charles is a bit 'higher level' than WireShark, and provides a simpler view of the web requests to developers.
It also has a great feature, called Reverse Proxy. This allows you to setup your local computer as a proxy for web traffic. You can set it up as follows:
If your normal Web Service host was targetwebserver.com:80, you would set it up like the image above. You can then change your mobile application configuration to point at the IP address of your computer, using port 64829 (or whatever you set it to).
Note: Make sure your mobile devices is on the same WiFi network as your computer!
Now, all traffic will be routed through your local machine, and Charles will capture all the traffic, allowing you to debug your network communications.
Charles also supports HTTPS proxies, so you can use it even if the web services are over HTTPS (as they probably should be).
Of course, this also works fine for iOS, although I find myself using the simulator more in iOS, which allows WireShark or normal Charles to work fine.
Charles is commercial software, but I've found it to be worth the price. I believe you could probably setup a reverse proxy on your computer using many different approaches (you could always run your own Apache), which would enable you to use the free WireShark application as well.
Does anyone have other approaches?
UPDATE:
And an intrepid reader (tehnoir) points out that you can also just use Charles as a 'normal' Proxy server, and then configure your device to use your computer as a proxy server, which will then proxy all traffic through. This allows you to sniff traffic without changing anything in your application (great for testing).
It would seem that simple Port Forwarding (another Charles feature) may also work as well.
However, for Android development I do my primary development on a physical Android device. It is faster, and provides a more realistic experience during development and debugging. However, since the network traffic is no longer going through my computer, WireShark doesn't help.
To solve this, I use another program called Charles. Charles is a 'Web Debugging Proxy Application'. In short, it is a tool similar to WireShark, that allows you to easily debug network traffic. Charles is a bit 'higher level' than WireShark, and provides a simpler view of the web requests to developers.
It also has a great feature, called Reverse Proxy. This allows you to setup your local computer as a proxy for web traffic. You can set it up as follows:
If your normal Web Service host was targetwebserver.com:80, you would set it up like the image above. You can then change your mobile application configuration to point at the IP address of your computer, using port 64829 (or whatever you set it to).
Note: Make sure your mobile devices is on the same WiFi network as your computer!
Now, all traffic will be routed through your local machine, and Charles will capture all the traffic, allowing you to debug your network communications.
Charles also supports HTTPS proxies, so you can use it even if the web services are over HTTPS (as they probably should be).
Of course, this also works fine for iOS, although I find myself using the simulator more in iOS, which allows WireShark or normal Charles to work fine.
Charles is commercial software, but I've found it to be worth the price. I believe you could probably setup a reverse proxy on your computer using many different approaches (you could always run your own Apache), which would enable you to use the free WireShark application as well.
Does anyone have other approaches?
UPDATE:
And an intrepid reader (tehnoir) points out that you can also just use Charles as a 'normal' Proxy server, and then configure your device to use your computer as a proxy server, which will then proxy all traffic through. This allows you to sniff traffic without changing anything in your application (great for testing).
It would seem that simple Port Forwarding (another Charles feature) may also work as well.
Posted 2/21/2012
The Path Ahead
At the end of 2011 I set out on a bit of a new path professionally. I am very excited about the opportunity and so far it is living up to expectations.
So as we begin the new year, I thought I'd share a few pictures of the path ahead...
Sometimes the path ahead is flat and well traveled...
And sometimes you need to watch your footing...
It can be steep...
And it can take you through beautiful places...
Sometimes you can barely make out the next marker...
And sometimes, there appears to be no path at all, even when you know others have been here before...
But always, we must travel on. And remember, it's the journey that counts, not the destination.
Best of luck to all in 2012.
See the Smugmug Gallery for larger versions and more pictures.
So as we begin the new year, I thought I'd share a few pictures of the path ahead...
Sometimes the path ahead is flat and well traveled...
And sometimes you need to watch your footing...
It can be steep...
And it can take you through beautiful places...
Sometimes you can barely make out the next marker...
And sometimes, there appears to be no path at all, even when you know others have been here before...
But always, we must travel on. And remember, it's the journey that counts, not the destination.
Best of luck to all in 2012.
See the Smugmug Gallery for larger versions and more pictures.
Posted 1/01/2012
Sunny Denver
Saturday we had our first snow of the year in Golden. It was just enough snow to have a great snowy soccer game, but by the afternoon it was a nice sunny fall day.
After the storm passed, my family and I headed up Lookout Mountain Road to check out the snow, and on the way down I captured a quick shot of Downtown Denver illuminated by the sun peaking through the clouds, while the rest of the area was still in the shade.
Even on cloudy days, it is always sunny in Denver.
After the storm passed, my family and I headed up Lookout Mountain Road to check out the snow, and on the way down I captured a quick shot of Downtown Denver illuminated by the sun peaking through the clouds, while the rest of the area was still in the shade.
Even on cloudy days, it is always sunny in Denver.
Posted 10/09/2011
The End of the Independent Device Maker
Sony, Panasonic, Motorola, Nokia, Samsung, HTC. All big names in the consumer electronics market. All struggling to find relevance in a newly connected world.
Enter Apple, and Amazon?
Apple begin the revolution with the iPod, and iTunes. Vertical Integration. They added the iPhone, and soon after added an App Store to iTunes. And then the iPad. And importantly (in the long run), the Apple TV.
Amazon joined the revolution along the way with the Kindle tied to their ebook store. It really is 'an iPod for books'. And guess what, people still read.
Amazon has been busy building up their ecosystem. They've gone from selling paper books to becoming the market leader at selling virtual hosting services (EC2). They've added cloud storage, and streaming video.
Today Amazon announced new Kindles, including a new 'tablet' Kindle, the Kindle Fire. The Fire aims to bring the web, native apps, music, video, and books to the palm of your hand, all brought to you by Amazon's 'Cloud Services'.
The Kindle Fire and the iPad make interesting competitors, but that isn't really the point here. (Short Version, they can both win). The point is, no one else can compete.
Barnes and Noble has some vertical integration with their Nook Reader, but they do not have anywhere near the ecosystem to compete with Amazon. They are doomed to be an also-ran in this space, and will eventually lose.
Sony, Samsung, HTC, RIM, HP, Motorola. None of these companies can deliver a product with this level of integration, this level of 'it just works'. Apple has realized the power of this for a long time. Amazon is a believer as well.
Does Google realize this? Is that why they bought Motorola Mobility? While there have been various reports about the justifications and plans for the acquisition, it is clear in my mind that their best long term play is to INTEGRATE with Motorola very closely. Regardless of whether they keep Android Open Source, they should focus on Motorola producing 'the one true Android' devices. But that isn't all. Google needs to figure out how to deliver the rich set of media offered by Apple and Amazon as well. Seamlessly. I'm certainly not counting them out, but they have a lot of work to do.
What about Microsoft? Well, aside from the fact that they are probably making more from selling Android phones then Windows phones (based on their Android licensing deals), they are still an interesting play. Their movement into the gaming space (XBox) has achieved market share, if not financial success. Their efforts with the Zune and their music services have built up some ecosystem. I think they need focus, and to break from 'Windows'. (Windows Phone 7, really?) But I wouldn't count them out. Yet.
However, if you are Samsung, Nokia, HTC, what can you do? I'd focus on the parts business.
Who else is in the cross-hairs? Netflix. Amazon is building a solid competitor to their video streaming service, and with the device integration (Kindle Fire) and set top box integration, they are serious competition.
The pendulum is swinging back to vertical integration. Nothing lasts forever, and I'm sure the pendulum will swing back some day, but I think we have a long road of vertically integrated devices ahead of us.
Enter Apple, and Amazon?
Apple begin the revolution with the iPod, and iTunes. Vertical Integration. They added the iPhone, and soon after added an App Store to iTunes. And then the iPad. And importantly (in the long run), the Apple TV.
Amazon joined the revolution along the way with the Kindle tied to their ebook store. It really is 'an iPod for books'. And guess what, people still read.
Amazon has been busy building up their ecosystem. They've gone from selling paper books to becoming the market leader at selling virtual hosting services (EC2). They've added cloud storage, and streaming video.
Today Amazon announced new Kindles, including a new 'tablet' Kindle, the Kindle Fire. The Fire aims to bring the web, native apps, music, video, and books to the palm of your hand, all brought to you by Amazon's 'Cloud Services'.
The Kindle Fire and the iPad make interesting competitors, but that isn't really the point here. (Short Version, they can both win). The point is, no one else can compete.
Barnes and Noble has some vertical integration with their Nook Reader, but they do not have anywhere near the ecosystem to compete with Amazon. They are doomed to be an also-ran in this space, and will eventually lose.
Sony, Samsung, HTC, RIM, HP, Motorola. None of these companies can deliver a product with this level of integration, this level of 'it just works'. Apple has realized the power of this for a long time. Amazon is a believer as well.
Does Google realize this? Is that why they bought Motorola Mobility? While there have been various reports about the justifications and plans for the acquisition, it is clear in my mind that their best long term play is to INTEGRATE with Motorola very closely. Regardless of whether they keep Android Open Source, they should focus on Motorola producing 'the one true Android' devices. But that isn't all. Google needs to figure out how to deliver the rich set of media offered by Apple and Amazon as well. Seamlessly. I'm certainly not counting them out, but they have a lot of work to do.
What about Microsoft? Well, aside from the fact that they are probably making more from selling Android phones then Windows phones (based on their Android licensing deals), they are still an interesting play. Their movement into the gaming space (XBox) has achieved market share, if not financial success. Their efforts with the Zune and their music services have built up some ecosystem. I think they need focus, and to break from 'Windows'. (Windows Phone 7, really?) But I wouldn't count them out. Yet.
However, if you are Samsung, Nokia, HTC, what can you do? I'd focus on the parts business.
Who else is in the cross-hairs? Netflix. Amazon is building a solid competitor to their video streaming service, and with the device integration (Kindle Fire) and set top box integration, they are serious competition.
The pendulum is swinging back to vertical integration. Nothing lasts forever, and I'm sure the pendulum will swing back some day, but I think we have a long road of vertically integrated devices ahead of us.
Posted 9/28/2011
Subscribe to:
Posts (Atom)





