Posts in Category: General

Photo Management Software: First Update

It’s really inefficient to try writing software in 20 minute chunks of time, on alternating days. You spend most of the 20 minutes just figuring out whatever it was you were working on last time (at least, that’s what you do if you’re going prematurely senile, like me). That’s how I’ve been proceeding on my photo management software, since 20 minutes is about all the time I can spare most days. At this point I have the database tables in place and I’ve started on the administrative interface. I’m realizing just how big of a project this is going to be – there’s a reason applications like Coppermine and Gallery consist of hundreds of files and thousands of lines of code! My application won’t be that big though. That’s because I’m not going to pack everything plus the kitchen sink into it – i.e. it won’t include emailing photos, photo comments, rating photos, etc. I like the WordPress model, where those sorts of things would be plug-ins you could add if you want, not part of the core program. Also, I’m trying to design it with the goal of maximizing code reuse, which will hopefully keep the codebase compact and robust.

Here’s the concept of my approach:

  • Collections: a typical installation would have just one collection of photos. But I wanted to include the possibility of multiple collections, so that you can support more than one user with a single installation of the software. Collections have a one-to-many relationship with…
  • Categories: this is the same as the Coppermine concept of categories. They provide a way of organizing your albums into groups. So categories have a one-to-many-relationship with…
  • Albums: photos are organized into albums. My approach differs from Coppermine and Gallery in two respects: 1. you can specify an order for the photos (Coppermine and Gallery order them by filename), and 2. you can have a photo in more than one album (in the real world you can only put a picture in one album, but why replicate such a physical constraint in the digital world?). So albums have a many-to-many relationship with…
  • Photos: the database table for the photos will include the file path, a (short) caption and a (long) description, the shoot date and the upload date, and an “exclude from random” flag that will allow you to exclude it from a random photo display.
  • Slideshows: this is a concept I haven’t seen in other photo management tools. Slideshows are part of a Collection, but otherwise they stand alone. The idea is to provide for an organized presentation of photos that’s distinct from albums. My Things you Don’t See in the US blog entry is a good example of a slideshow. In the album for our Japan trip, I would present these pictures chronologically (since that’s the way to organize trip photos), but I also want to be able to present them in a non-chronological, thematic way.
  • Blog integration: this is also something I haven’t seen in other photo management tools. As I described before, I did a lot of hacking to psnGallery2 and Coppermine to provide at least some level of integration. But what’s under the hood is ugly and hard to maintain. To my way of thinking, blogs and on-line photo management are separate things, but conceptually there’s a natural fit between them that should be brought to life. psnGallery2 has handy tags that make it easy to put a Coppermine photo into a WordPress blog – I want to extend that concept to slideshows. That is, I’d like to just put a tag in a WordPress entry that would expand into an entire slideshow display. What I do now is build the slideshow in WordPress by hand, looking up the photo id numbers in Coppermine one at a time, and that’s a silly way to spend my time. I also want to have the connection reciprocated from the slideshows and photos that appear in the blog, so if you’re just browsing through the photos, you can link to the blog entries where they appear.

So that’s what I’m working on. The development is still very much in it’s early stages, and it’s going to be a long time before I have a working prototype, so if any of my geeky readers (and you know who you are) have any suggestions, please let me know!

Photo Management Software

I’ve mentioned before that I’m using Coppermine to manage the photos on my website. I was happy with it at first, but recently I’ve been finding it to be limiting and poorly written. The most frustrating aspect is that the UI and the application logic are not separated – I’ve had to hack the code all over the place to make simple design changes, which means it’ll be impossible for me to upgrade to a future version (at least, not without doing my hacks all over again). Another annoyance is that the only way to re-order photos in an album is to rename them: the order is determined alphabetically by filename. That’s…really lame.

Something I’ve been looking for, but haven’t found in any photo management software, is the separation of “slideshows” from “albums.” To me, an album is used to thematically organize photos, while a slideshow can be used for a one-off presentation of photos that might come from more than one album. I’d also like to be able to put pictures in more than one album. For example, Baby X will get his own photo album, just like Kai, but I’m sure we’ll have pictures of the two of them together that I’d like to make available in both albums. Lastly, I really like the “random photo” that I’ve got on the blog, but I have no ability to exclude photos from appearing in the random display, which is something I’d like to be able to do.

So I’ve started work on my own photo management software. My approach is a completely OO design. This allows me to rationalize the effort as an opportunity to start learning the new objects implementation in PHP 5, since we’re still using PHP 4 at my job. I don’t have a lot of time to work on it though, so we’ll see how far I get with it.

Building a PVR with Mike & Chris

My blogging has been sparse recently because my usual blogging time has been taken over by my Personal Video Recorder (PVR) assembly project. A PVR is a do-it-yourself TiVo. The main advantage over TiVo is that you don’t have to pay anyone a monthly subscription fee. The disadvantage, especially if you want to use your PVR with a TV instead of a computer monitor, is that you’re dealing with bleeding edge technology. That means you’ll find lots of debates about the “right way” to configure the system and you’ll inevitably hit a few snags while setting things up. But if you’re a geek, that’s also what makes it fun. And besides, according to the New York Times, everybody’s doing it.

My friend and co-worker Chris wanted to build one too, so we decided to pool our expertise and save on shipping costs by buying our components together. We built our systems from scratch. Where things got tricky was deciding what to do for the TV tuner card, video card, and PVR software. We did lots of Googling and browsed through the SageTV forums to assess our options (the Build Your Own PVR site was also helpful). The only thing everyone agreed on is that you need a TV tuner card with hardware-based encoding, so that writing your favorite TV shows to files doesn’t slow your PC to a crawl.

Where folks disagreed was on how to get the best picture when decoding the files back to your screen. If you use an ordinary TV tuner card (like the Hauppauge PVR-150) with an ordinary video card, and run the output via S-video to your TV, the picture quality will, at best, be about the same as a VHS tape. I started with a configuration like that, and was disappointed with the results. Cartoons, with their limited use of color and detail, looked fine, but live action scenes, especially if they involved hard-to-digitize video elements like smoke, looked lousy.

There are two ways to a better picture. One is to go with a higher-end video card that’s designed for gaming (specifically, an ATI or NVIDIA card). Most of the folks in the forums who were watching on a TV instead of a computer monitor used the S-video out on these cards. Some of the new cards apparently have a component out as well. Some used a VGA-to-component adapter (but you have to be careful not to blow up your TV!).

The other approach is to go with the Hauppauge PVR-350, which is a tuner card that has a hardware-based decoder and S-video out built-in. This is supposed to give the best possible picture, but there’s a major drawback: it will only output data that was processed through the tuner. That is, you can’t use it as a substitute for a video card (e.g. it won’t show your Windows desktop). The big breakthrough for this card came last year when the SageTV folks figured out how to run their TV scheduling video overlays through it, so you could at least see that much through your TV.

I currently have the PVR-150, which I’m going to give to Chris (as he hasn’t bought his TV tuner card yet, and that’s the one he wants). I’m going to get the PVR-350. Since I don’t want to have a computer monitor sitting next to the TV, I’m also going to get an S-video selector box. My TV only has one S-video input, so I can use the selector box to switch between the output from the TV tuner card and the output from the video card. I’ll probably only need access to the desktop every once and a while, so it should work out fine.

My main motivation for doing all this was to provide time-shifting and commercial-removal for the shows Kai watches. SageTV is really cool: you can easily search the TV schedule for a show (say, Sesame Street) and then tell it to record every new instance (i.e. so it won’t record a re-run if you’ve already recorded it), and then you can tell it to keep, say, the 10 most recent episodes on the hard drive, and to just delete older ones. And I’ll finally be able to keep up with The Daily Show! I’m putting Kai to bed when it’s on at 7, and I’m asleep when it’s on at 11. Since The Daily Show seems to have more than your average number of commercials, I bet I can watch an entire episodes in 15 minutes after skipping them.

The other cool thing is that you can hook up your VCR to it, so you can transfer your videotapes to DVD. We have some infant videos of Kai I’d like to digitize! And I guess it’s the only way I’ll ever see the non-Special Edition of Star Wars on DVD…

Keeping up with P2P

Back in the day, (all of 2 years ago), I found good stuff on Napster. The concerns over copyright weren’t significant in regard to my interests, as I was mostly looking for obscure tracks (B-sides, concert bootlegs, etc.) from obscure bands (NoMeansNo, Ed’s Redeeming Qualities, Steroid Maximus, etc.) – not the kind of stuff that’s going to hurt anybody’s record sales. (Rather than fighting new technology like most of the music industry, insound.com has embraced it, and they’re making a bundle, but that’s another topic…).

There were two reasons Napster had such a huge library: 1. it was the only significant online P2P system around at the time, and 2. it got a huge amount of free publicity from the news media. Now we have a number of different P2P networks and a variety of client software packages to choose from. Venturing into this world, I stumbled around for a while before figuring out the best approach. There are a lot of client software options: Morpheus, Limewire, BearShare, Xolox, Phex, neoNapster, Shareaza, and more. There are also different networks you can connect to: Gnutella1, Gnutella2, the eDonkey network, bitTorrent, and probably more.

I started out with Morpheus but it was a huge resource hog. It also came with spyware. I then tried LimeWire, which was much nicer to my PC and did not contain spyware. But my searches would not persist. What I mean is this: I’d enter a search, and it would chug away for 10-15 minutes, and then it would essentially forget about. My search would continue to display, but if I didn’t get any results right away, then I would never get any at all. I’d have to keep re-running the search to keep up with changes on the network. I’ve now settled on using Shareaza, which runs nicely, has no spyware, connects to all the major networks, and diligently runs my searches continuously.

The eDonkey network is better at finding what you’re looking for and has sophisticated handling for large files, which means a lot of the action, especially for movies, has moved there. The downside is that the queues on eDonkey can be mighty long (I often get a queue position over 1,000) so you have to be willing to leave your PC on continuously (and hope your network connection doesn’t go down, which will force you out of your queue position if you can’t get back online quickly). Out of curiosity I downloaded a couple of movies. I found the quality to be poor: really major compression artifacts were always a problem, and some of the movies were just recorded by someone in a theater with a camera, so you sometimes get people walking in front of the camera, ambient noise, etc. But given the ever-increasing bandwidth capacity of networks, and the ever-improving compression technologies, I imagine Hollywood is soon going to fully join up with the music industry in its war against filesharing.

AIM Users Beware

If you use AOL instant messenger, it has probably installed a program called wildtangent on your system. This is an online gaming plugin. According to the company that makes it, it’s not doing anything pernicious. But spyany.com says it that will share your name, address, phone number and email address (if it can get them, presumably from your AOL profile) and track your software product usage. They also tell you how to uninstall it.

What’s interesting is that AOL didn’t modify their EULA to cover the inclusion of wildtangent until after they began distributing it with AIM. So even if you actually bothered to read the fine print, you wouldn’t have known about it.

I discovered wildtangent installing itself on my system when my spybot system monitor caught it trying to make changes to my system registry. I’ve been refusing my AIM client’s recent attempts to upgrade itself, but that apparently doesn’t stop the wildtangent installation from happening. If you’re using Windows, I highly recommend spybot – you can download it for free.

Technorati is Broken

You may have noticed I added a link to Technorati in the right-hand column about six weeks ago. I have removed it. Technorati is supposed to be the Google of blogs. The trouble is, it doesn’t work. I have repeatedly tried to “claim” my blog, but it never goes through. When I try to sign in, my password never works (I end up having to reset it every time I want to sign in). I’ve attempted to change my contact email address with them 3 times, and it never sticks (it keeps reverting back to the email address I initially signed up with). At first I thought maybe they were having a bad day, but I’ve tried several times over the past month or so, and I have the same trouble every time. The idea behind their site is cool, but the implementation is a disaster.

Contiki!

This is probably my geekiest post ever: the other day I finally got my Commodore 64 up and running with Contiki and RR-Net. It took some doing to get it talking to my router, but I finally succeeded. I have to hand it the the folks who developed the hardware and software for this, considering that the electronics in a C64 are less sophisticated than what you’d find in your average gas pump these days.

The web browser is text-only; it’s similar to Lynx. I haven’t used a text-only browser in years, and I found it amazing how few sites support them now. Google was the only major site I found that didn’t look like a big undecipherable mess.

For the fun of it, I’m going to try to make my C64 available on the web for a while, using the Contiki web server (my ISP doesn’t allow you to run a web server, but maybe I can sneak it through with some port switching – we’ll see). For security reasons, I’d normally never consider running a web server from my personal computer, but I figure there are probably zero “known exploits” for a C64 web server!

Here are some pictures:



The Job

It’s dawned on me that I haven’t said much about my new job yet. One of the major downsides to leaving California was giving up my job at HighWire, but I’m happy to report that I like my new job at U Penn’s School of Medicine even better. I’m in the Information Services group. I don’t have as much customer contact as I did at HighWire (which I miss), but on the technical side, there is a much greater breadth to the work. Instead of having a primary focus on just scripting, I’m doing a lot of application design and database development. My current projects are a web-based email account application system, and revamping the Med student online application process. All the tools used here are new to me – PHP, Oracle, Smarty, and some home-grown tools – so that also helps keep things fresh. I’m working in a small group of about a dozen very likeable people, so I’m making new friends too. Unfortunately, my position is funded for only one year. It looks like there’s a good chance it’ll be extended for a second year, or made permanent, so I’m crossing my fingers. I’ll find out when the budget is finalized for the next fiscal year, which will happen around the end of the summer.

The application architecture that’s been deployed here is the best I’ve seen. A typical architecture for web applications consists of a database backend, Java or CGI scripts as a middle “application” layer, a templating system for the front end, and maybe a security layer (typically handled through the web server or the application layer). The architecture here has 4 layers: 1. the database (Oracle) back-end; 2. the LDL (Logical Data Layer), which provides role-based access to the database (you define your queries in XML, along with column and row based access rules, and it’s then compiled for better performance); 3. the “WI-Engine” which serves as the application layer, written in PHP (it allows you to design your pages in an object-oriented fashion – using “panels,” “subpanels,” and “dialogs” which can communicate with each other); 4. a template layer, using Smarty.

The WI-Engine took the most getting used to, as I had to orient myself to thinking of all the page components as objects. Once you get going with it though, it’s very efficient. The LDL is cleverly constructed. Since the applications we design are for use within the School, you always run into issues such as what a student can do with an application vs. what an administrator can do with it. All those access rules are clearly defined in one place, and it’s sitting just above the database itself, so it’s quite unlikely that someone could hack through any loopholes in the application layer.

The Mike Toppa Archiving Project

I’ve begun work on a daunting task: the Mike Toppa Archiving Project. I have many shoeboxes full of floppy disks: Commodore 64 5 1/4″ disks, old PC 3 1/2″ disks, Zip disks, and a few Mac disks. These contain research papers, correspondence, software (including programs I’ve written), games, and lots of data. With my current PC, I obviously can’t access the C64 disks, and I can’t read about half the data on my old PC and Mac disks due to file format incompatibilities. For current versions of MS Office, Microsoft no longer provides filters for my old Ami Pro (word processor) and Quattro Pro (spreadsheet) files.

Aging computer files are actually a very serious, worldwide problem, as described in this excellent Technology Review article: Data Extinction. “The layman’s view is that digital information is more secure, when in fact it’s far more ephemeral…We know how to keep paper intact for hundreds of years. But digital information is all in code. Without access to that code, it’s lost…more and more of what matters to us is digitally produced, and we can’t guarantee that any of it will be usable 100, or 10, or even five years from now.” The article describes four possible solutions (see the table at the bottom of the article) but the only one that’s practical for your average person is “migration,” so that’s what I’m doing.

I mentioned in an earlier post that I got may hands on a newly developed network card and a web server for my C64. I spent some time this weekend trying to get it talking to my home network, but haven’t succeeded yet. Once I do, I can transfer C64 disk images through its web server, onto my PC. At that point, there’s a PC program I can use that will extract files from the disk images. My primary goal is to get at text I’ve written (mainly letters and research papers – I used my C64 all the way through 1992). The C64 used a variation of ASCII, so I should be able to extract the majority of the text. It would take forever to migrate the hundreds of games that I have, and others have already migrated most of the old games anyway, so I don’t think I’ll bother (you can download C64 games to your PC from various sites and then run them with C64 emulator software).

For my old PC files, I still have the install disks for the old software that can read them. But I don’t want to pollute my PC with those programs (since they’re Windows 3.1 programs, I doubt they’d uninstall properly). Maria’s old laptop is overdue for a full re-install of the OS, so before doing that, I’ve installed my old versions of Ami Pro and Quattro Pro there. I’m converting everything to rtf and csv format, which I’m hoping are generic enough to keep them compatible with whatever kind of software we’re all using 10 years from now.

The last step is to put everything on CD-Rs. I’ll go from 5 shoeboxes of floppy disks to probably less than a dozen CDs. Of course the problem there is – despite claims that they’ll last 100 years – you can actually end up with unreadable disks in as little as two years. See The Myth Of The 100-Year CD-Rom. So I guess I’ll just have to regularly make copies of them until something more durable comes along.

Wish me luck!

Phonatic.org status

Update: I ended up abandoning this project, because of lack of time, and the rise of the excellent pho-king site.

In an earlier post I mentioned a new site I’m working on – phonatic.org. My goal is to make it THE pho destination site on the web (pho is Vietnamese beef noodle soup). One thing going for it already is that there’s no competition (if you Google “pho” you won’t find much beyond individual restaurant sites and recipes). The main feature will be restaurant reviews. For the traveler seeking pho, the site will be a godsend, as there are few things that are more satisfying than a good bowl of pho, and few things more disappointing than a bad one. I’m hoping that the content will be community driven, so I won’t have to do much beyond admin once the site is up and running.

I’ve been building the site with TikiWiki, but it’s been an exercise in frustration, so I’m going to try something else. I started with TikiWiki because I was unfamiliar with CMS (content management systems) and TikiWiki was the first one I came across. I was dazzled by the massive feature set. But TikiWiki is just big and ugly. The installation requires installing the files for all the features, even if you only want to use a fraction of them – it can really eat into your disk quota. The admin screens are a maze, and it takes a lot of effort to become familiar with where all the controls are. Many of the included themes don’t really work (bad css), and it’s fairly opaque in terms of understanding the modularity (i.e. figuring out how to customize anything involves a lot of hacking). Even with the nicer themes, it also just doesn’t look very good.

So I’ve been exploring some other options. I was on the verge of installing PHP Nuke, but then I found XOOPS. XOOPS looks like it’s very lean and modular. It appears to have a slower development cycle than PHP Nuke, which is a good thing (with only a handful of new versions of the core each year, module developers have a more stable environment to work in). Also, it seems to have a smaller and more professional community of developers – there aren’t a bazillion maybe-it-works-maybe-it-doesn’t add-on modules, and from what I can see the add-ons they do have are fairly stable. Lastly, it looks like someone already developed a “reviews” module, which may save me some work (XOOPS, like most CMS systems, comes with a built-in news/articles module, but that doesn’t quite provide everything you need for doing something like restaurant reviews).

If anyone reading this knows a thing or two about any other good CMS options, feedback is appreciated, Thanks.

Newer EntriesOlder Entries