Monday, October 20, 2008

Syntax Highlighting via Javascript with SHJS




After doing my own code syntax highlighting for the web by injecting span tags into code snippets using lisp functions inside emacs, I realized it's not the way to go. The right way to do this would be a javascript function that would decorate the code after it's been sent to the browser. I ran across SHJS, Syntax Highlighting in JavaScript on sourceforge. SHJS is very easy to set up and gives great results in many languages.
I've attached two graphics, one using Watir in Ruby and the other a little C#.
If you publish code on the internet you should use SHJS or something like it. It's just too easy not to use and it leaves your HTML very clean.
You can see my results for Ruby, C#, Java, Perl, JavaScript.


Monday, October 13, 2008

TV shows now on Youtube




Youtube has just announced a major deal to start showing full-length TV shows like StarTrek with commercials. This puts Youtube in direct competition with Hulu, Joost, imdb, and a host of others showing tv shows over the web. Although Youtube's initial lineup is paltry, it shows a lot of promise.
The most exciting angle is the Tivo one. TiVo can access Youtube videos right now if the TiVo is connected to the internet. Since TiVo sits right next to my TV I don't have that PC-to-TV 10-yard gap. So, instead of taking up space on my TiVo, I can use Youtube's storage to host my old tv shows. But since I don't really watch old tv series, it doesn't mean a lot to me at the moment, but I can foresee in the not too distant future that first run shows are on Youtube which makes it interesting. It would help if TiVo could also access Hulu.com content.
What if all first run shows were available on Youtube?
1. I won't need a terabyte TiVo. In fact, I wouldn't need any disk space at all. Tivo will just get the shows on demand.
2. What is a TV network then? Independent producers could just make shows to go directly on Youtube without a network exec saying, "That will never work.". With production costs dropping, it's easier than ever to make your own tv shows and sell them on youtube.
3. Google, the owner of Youtube, would shake up the tv advertising market. Google would disintermediate a lot of advertising firms that specialize in buying/selling tv ad time. Companies could just bid for slots on tv shows just like they do for adwords. Also Google could target specific audiences on the fly with just-in-time advertising. Google can estimate your age (from your gmail account, past searches, etc) which would help, but they would be able to deduce your zip code, which tells a lot about you.
With a TiVo, Youtube tv on demand, and a fast internet connection, the world will be an interesting place. I can just envision Dr. McCoy leaning over the prone body of network tv, turning to Kirk and saying, "He's dead Jim.".

Friday, October 10, 2008

Time Warner Tuning Adapters now available for preorder in Austin TX!!


Oh happy day!
I've been waiting for 6 months for the Tuning Adapters from TimeWarner Austin so my Tivo can pick up all the Switched Digital Video (SDV) signals. Many of the high-def stations on TimeWarner are delivered via SDV which one-way cable cards, like the one in my TiVo, can't see. SDV channels are only sent to your home when requested, unlike regular channels which are always being broadcast to everyone. When a viewer requests an SDV channel the set-top box sends a message to a TimeWarner computer saying, "Send me History International", and the computer will say, "OK, I sending that to you on channel 3423". The set-top box then tunes to channel 3423, which just seconds ago was empty. In theory, this frees bandwidth for more channels.
You can now pre-order your free Tuning Adapter at http://www.timewarnercable.com/centraltx/Products/Cable/sdv/default.html.
It's a happy thing - trust me.

Wednesday, October 08, 2008

Agile Austin's Meeting Tuesday Night


book

The Agile Austin user group had sixty-seven people attend a great talk given by John Heinz of gistlabs.com entitled "Test Automation: The Big Picture". John started with a slide saying, "Testing is hard, coding is fun." which was a good start to talk about testing automation.
He reiterated some of the Toyota Production System mantras: Eliminate waste, only work on valuable products for your customer; optimize the whole, not the parts; build quality in, don't test for quality.

He also made it a point to say you shouldn't test everything, because testing is expensive. Testing does have a point of diminishing returns.
John recommended Implementing Lean Software Development by Mary Poppendieck and Tom Poppendieck.

John also recommended the Simian project to detect duplicate code.

Thursday, October 02, 2008

How to Protect Against Credit Card Fraud


1. If you're like me, you get zillions of unrequested offers for credit cards. I thought these just wasted my time (I've got to open them, sort generic parts from those with my name, and then shred the parts with my name). But they are a big credit fraud risk. If the applications are stolen from your mail box, or delivered to the wrong address (never happens right?), you could be in big trouble. The best thing to do is to stop all unsolicited offers of pre-approved credit cards.
You can call 1-888-567-8688 to stop the mailing of these. (Don't take my advice on the number. A less scrupulous blogger could give you a phone number to call and get your ssn). Check out the phone number here at a .gov site, www.ftc.gov



2. The other big thing to do is check you credit report at www.annualcreditreport.com. Only try this site. A lot of sites disguise themselves as this one and only real site to get you to buy a fraud detection service and other products. Here again don't just trust me for the web address look at a good .gov site for the address, http://www.ftc.gov. You can get a copy from each credit agency once a year. So every four months you can check to make sure no one has opened a new credit card account in your name. Be care at their sites, because they will try to upsell you on various products. Be firm, only get your credit report, not your credit score, or credit monitoring.

3. It's also good to stop junk mail at www.dmachoice.org website. This reduces the times your personal details travel around the universe of companies trading/selling your data.

4. While your at it, opt out of sales calls at www.donotcall.gov/

Eternal vigilance is the price of good credit. Perhaps Congress should take note?