Gett APIs

Over the past couple of weeks, I’ve written two bindings for the Ge.tt REST APIs.  One is in Perl, of course: Net::API::Gett and the other is written in Python: pygett.  It was a good exercise in learning python and how to put together a complete package for distribution through the package index (PyPI).  I’m lucky that I had a lot of help on the python side of things from my coworker, Glen Zangirolami (aka glenbot).

Anyway, check either one out. I have some refactoring work to do on the Perl side of things now. Writing in python really made me clarify how I wanted the object structure to work and I like the way things were organized on the python side of the implementation.

It’s not that Perl can’t do objects well, or intelligently – more that the Perl implementation was kind of a “first draft.” Now that I’ve had a lot of time to think about the object design, it’s time to update the Perl implementation.

1 Comment

Using Windows 7 themepacks in Mac OS X or Linux

Autumn in Japan ThemepackHere are a few of the desktop backgrounds in a recent Windows 7 themepack.  If you don’t use Windows 7 you might not know about all of the amazing images that Microsoft has provided from a host of different interest areas – everything from nature scenes like this pack to recent movies and video games to architecture.

Anyway, the themes come packaged as a binary file with a .themepack extension.  But it’s really just a Microsoft CAB style archive file. On Unix you can unpack CABs with the exceptionally useful cabextract program. Most Linuxes should have binary packages available in your package manager. Something as simple as

sudo yum install cabextract (or)
sudo apt-get install cabextract

should get the program installed.  On Mac OS X, there are prebuilt binaries in .pkg format which offers quick and convenient installation.

Once you have unpacked the themepack file, you’ll see there is a directory called “Desktop Backgrounds” and one or more jpgs inside of that directory.  That would be the pictures included in the themepack for your desktop.  The easiest way to display your new backgrounds is by opening the “Desktop” or “Background” area in the system settings.  On Mac OS X, you can hit the + button at the bottom of the left-side scroll area and then browse to the location of your unpacked pictures.  Then if you individually select the pictures and choose “Change photo” on each picture, they will rotate amongst themselves.  Many Linux distros support a similar type of picture rotation functionality – in Fedora, for example, you can check out the

fedora-wallpapers-extra

package which demonstrates how it works.

No Comments

Speaking at OSCON 2011

I am very excited that I will be speaking at OSCON 2011 on Dancer.  I plan to revise my current slide deck to be “OSCON worthy.”  I think this is going to include a new tutorial application.

No Comments

Frozen Perl 2011

I was excited and gratified to see that my talk on Dancer was well received by many participants at the Frozen Perl workshop at the University of Minnesota today.  I hope I can do the talk again at some other venues later in 2011.

If you missed the slides on the wiki site, you can find them here.

No Comments

Perl Shared Hosting on BlueHost

This blog (and several other websites that I run) are hosted on Bluehost which has been a pretty decent, fair and inexpensive hosting provider to me. They offer SSH/shell access, too, which is definitely a plus.

Recently there’s been a bit of a movement to explore Perl support on shared hosting providers like Bluehost led by the website perlsharedhosting.com. The site is a clearing house of information about hosting providers which support Perl web frameworks (like Dancer, Mojolicious, CGI::Application, Web::Simple) – and providing instructions to set up live demos.

Well, I’ve got a live demo of the Dancer and Titanium frameworks running on my account on bluehost. You can find them here:

http://byte-me.org/dancertest/dispatch.cgi/ (yes, you need the trailing slash)
http://byte-me.org/titanium/test.cgi/

It’s pretty awesome to think you can write a webapp in Perl and host it using modern Perl frameworks like Dancer and Plack on account that costs under $10 a month.

No Comments

Testing new version of Feedwordpress Duplicate Post Filter

UPDATE: I checked in a new revision of 1.3 in rev 187105. This one readds some diagnostic logging and checks the num_rows class scalar to see if any rows were returned in the DB query which is probably the Right Way To Do It(tm).

I’ve recently gotten a couple of emails from people that my Duplicate Post Filter was broken or not working properly. This came as a surprise to me because I haven’t regularly been running the site I originally created the plugin for since around January of 2009. I originally thought maybe my plugin was using deprecated calls or actions, but that’s not it at all.

When I reviewed the code for the first time in over a year, sure enough, there was a really dumb typo in the SQL query which would have caused it to return a false negative every time it was executed, meaning that every post would come back as “not a duplicate” even if it really was. And since I had the opportunity, I refactored the SQL query to more safely and better use the wpdb class methods.

I’ve updated my SVN trunk to 1.3 and I’m going to email the filter to the people who emailed error reports so they can test it. My own limited smoke testing shows that it seems to be functioning. If the other testers report back with success, I’ll tag the 1.3 release on/around Christmas as a little gift. At that point, the WordPress plugin website will do its magic and people will be able to auto-update if they like (which they will I’m sure!)

7 Comments

DIY Mac Book Pro RAM upgrade

I have an early 2007 vintage MacBook Pro. I bought it when the local CompUSA store was having its going out of business sale – got it for 5% off list which I felt was a pretty good deal considering that Macs (non-refurb ones) never go on sale.

It came with 2 GB of RAM from the factory and because Apple memory always cost an arm and a leg, I hesitated to upgrade it – besides it wasn’t broken. Since RAM has gotten so cheap, I finally decided I’d take the plunge and upgrade.

There’s even a YouTube video (go on – it’s only 2 minutes long. I’ll wait…) that shows exactly how to do it yourself.

One helpful tip that was omitted from the video, though: you need a #00 philips screwdriver to take the cover off after you remove the battery. After searching around teh Interwebs, I found this screwdriver set at Radio Shack. (Mine varies cosmetically from the picture but it’s the same price and set of bits.)

I just used it to install the new 2 GB SO-DIMM in the laptop. The tool is perfect for the job; but the case is rubbish.

No Comments

HDHomerun and Windows 7 Media Center

The HDHomerun is an ethernet based dual television tuner. It’s compatible with Linux, Mac and Windows and since I have a mixed OS household, thought it would be the way to go.

On the Silicondust forum, I’ve noticed a number of posters who reported problems in the Windows 7 release candidate. Although I’ve only had the Homerun on my network for about 4 days, so far it’s been entirely straightforward and easy to use.

It was literally:

  • Unpack box
  • Plug in cable
  • Plug in power
  • Install drivers
  • Use Media Center to scan for TV channels
  • Watch TV

Since my whole house aside from the little hub around my cable modem is wireless, the picture quality, especially on HD broadcasts can be a bit choppy when I’m “doing other stuff” on the Internet and trying to watch/record TV at the same time. But when the wireless network is quiescent, the picture quality is great.

Originally, I had dismissed the idea of a MythTV box “just” to record television, but I’m thinking now it might be a good idea.  I could record the TV shows on the Myth server, and copy the files to my Home Server, and then from the Home Server, all the PCs and Macs in my house could watch the shows. Probably not a good idea to toss this idea to the wife right now, but it’s in the back of my head. :)

No Comments

First impressions of Windows 7 RC

I’ve been running Windows 7 RC on two of my home systems for about a week now.

System 1 is a Lenovo S10 Netbook with an N270 ATOM processor, 1 GB of RAM and an 80GB disk slice. (Dual-boots OpenSolaris B111; see this post for more about that.) The netbook is where I installed Windows 7 beta back in February.

System 2 is a self-built PC with a Q8400 quad-core Intel processor, 8 GB RAM, 1TB of disk, Nvidia 8800 GTX (with the G93 GPU) and a TrendNet Wireless N USB adapter.  It was previously running Vista SP1 Ultimate x64 and was built around November 2008. (This system used to have a Linksys PCI Wireless N interface, but I had problems with it under Vista and Windows 7. It was solid under XP SP3, for whatever that’s worth.)

I did a Vista->W7 upgrade of System #2, and a clean install on System #1. The upgrade process was very smooth. I was a tiny bit frustrated by the upgrade advisor though.  It was great that it pointed out incompatible Windows 7 software (daemon-tools) that I had on Vista, but it was annoying because it only identitfied one show-stopper at a time. So everytime I corrected an issue and restarted the upgrade I felt like I was gambling on whether I’d pass the upgrade advisor check.  It would be better if the installer identified all of the potential conflicts on the same screen, so at least it’s clear that when those problems are resolved you can immediately start an upgrade.  The upgrade itself took about an hour and when it was finished I was amazed that all of my old software was seemingly automagically reinstalled.  I’ve had absolutely zero problems with the software and since Nvidia is on the ball with WQHL-certified Windows 7 video drivers, I was able to start several 3D gaming engines quickly.  The Windows Experience Index on this system was rated at 5.9 (out of a possible 7.9) the lowest performing component being the hard drive.

With the netbook, I did a clean install on that system since Microsoft clearly expressed the desire that W7 Beta installs get fresh installations instead of in-place upgrades. This time, I installed Windows 7 32 bit using a 16GB USB stick, following the directions here.  Since this was a clean install and from flash memory it took much less time than the DVD-based system #2 upgrade. After the upgrade was complete, the system tested out with a WEI score of 2.1, with the CPU being the weakest system component. I was a bit surprised the netbook scroed so low, because according to Microsoft guidelines, a system should have a minimum WEI of 3 to run Aero. The native Intel 945 graphics controller seems to do a fine job with Aero, however.  The one area where sluggishness is especially noticable on the netbook is on websites under IE8 with a lot of fancy javascript (like Yahoo Mail, for example.) That isn’t really a Windows 7 issue, per se, but more a function of IE8′s rather slow Javascript engine. And although I have Firefox installed on both computers, I’ve been trying to be a good tester and use IE8 for my every day browsing.

Other impressions of W7: The desktop artwork themes that come “out of the box” are stunning.  I have the landscape photo theme on System #2 and the “United States” photo theme on system #1. Both of them are really really “Oooh” factor type photos. I love that Gadgets are no longer forced along the side of display 1. I have dual LCD panels on system #2 and although you can undock gadgets in Vista, the sidebar app itself still has an overlay on the right side of display 1. Performance wise, I’ve noticed that system shutdown and start up are noticably faster than Vista – much more in line with XP.  On system #2 I have a CPU/Memory gauge gadget running all the time and I’ve noticed that memory usage is 10-15% better and CPU usage, even during peak use is about 5-20% lower.

All in all?  This is the best version of Windows I’ve used. Yep, even better than XP which looks really long-in-the-tooth compared to Aero. W7 looks amazing, functions well and so far has been very stable on all of my applications.  I will definitely upgrade all of my PCs to W7 RTM once its available.

3 Comments

Building OpenSolaris USB installer from Windows

The “official” way to build a USB install of OpenSolaris is to run usbcopy from a command prompt inside a running OpenSolaris system.  Well, ok, that’s not very convenient for me, so I was so happy to see Hiroshi Chonan’s Live USB creator for Windows.

Grab the USB image from genunix.org and you’re about 97% complete with this task.

I wanted to post here because a) this is extremely useful and cool, and b) it’s not explicitly stated on Hiroshi’s webpage, but if you’re running the USB creator on Vista or Windows 7, you need to right-click the program file and choose “Run as administrator” to make sure that the boot sector is appropriately installed on your USB stick.

As you can see in my next post, I’ve installed Windows 7 and OpenSolaris 2009.06 preview (B111a) on my Lenovo S10 netbook using USB sticks for both operating systems.

1 Comment