Archive for the ‘Projects’ Category

Some excellent WordPress plugins I found recently - Breadcrumbs and better Links page management

I’m working on a new site relating to Gramm-Leach-Bliley Act compliance (it will replace the useless site that is currently up at grammleachblileyact.com) and was looking for breadcrumb functionality and a better way to manage outputting links from the Blogroll on the links.php page.

I had searched for a good WordPress breadcrumbs plugin a while ago, and the ones I found didn’t really impress me. I’m really happy with the one I ended up finding this time. It’s called Breadcrumb Navigation XT and it does exactly what I was looking for. I’ll be using this probably for any future needs when it comes to breadcrumbs and WordPress.

The second plugin that I found was related to fixing how WordPress currently outputs links using the default get_links_list() function used in most links.php template pages right now. I had used on the XyzAnt.com links page another WordPress function (wp_list_bookmarks()) that only works for WordPress 2.1 and higher, and is still undergoing active development / documentation. That function, however, only allows you to output the description, and doesn’t appear to include the functionality to show notes. Since there is a larger amount of allowable text for the notes field, and that is what I needed, I still needed to find (or write) a solution to outputting all links, ordered by category, displaying the notes field as well as link title, url, image, etc. This is the plugin that I found that does just this (found it after writing about 80% of the same functionality myself). It does just what I was looking for, shows all the categories that contain links and the links within each category.

Plugin author’s latest post about WordPress 2.1 support: Link Library now supports Wordpress 2.1

Popularity: 7% [?]

RSS2.com is fast again, thanks to a new and improved SQL database schema

For quite a while, RSS2.com has been slow. Ever since it hit, oh, around 1.4 million items in its database (now up over 2 million) the queries that were responsible for building the home page view had gotten slower and slower.

The old design

The problem was one of normalization, and the desire to not have data going into two places. The design originally worked this way:

  1. Look up the latest posts. Find all the latest ones that have a distinct feed_id. This was running against the feed_data table, which now has over 2 million rows.
  2. Next, look up the feed information for each feed_id found. Originally, I couldn’t figure out a way to do this all in one query. So this was another 10 individual SQL queries, looking up information about the feed needed to display on the home page (like the name of the feed, URL, etc.) This query did a join of the feed_data with the feed_info tables. This is what took progressively longer and longer, the more rows in the feed_data table.
  3. Next, combine the results of finding the 10 most recent posts from the 10 most recently updated feeds into an array using PHP, then pass those results from the Data Access Object (DAO) to the presentation layer for output on the home page.

This ended up being really, really slow on the homepage load (like over 2 minutes). This was obviously too slow. I implemented caching at a number of layers to mitigate the problem, which made for a very speedy second page load, but the first one was still way too slow.

After consulting with my friend Ben, he agreed that it was an inherently expensive query to run. We agreed that it needed to be re-architected to be able to significantly improve performance.

The new design

The new design required creating a new table dedicated to the home page posts where, when a RSS feed is read, it inserts the most recent new item into the new table.

The new process works like this:

  1. RSS feed is read. Any new items are first inserted into the main feed_data table, and the feed_info table is updated as well with a last checked timestamp.
  2. Next, the new table is updated, using a MySQL REPLACE command, with the combined feed information as well as item information
  3. The complicated 11 queries that used to be run are now replaced by a dead-simple single query that will only ever have to search through the total number of feeds in the system (currently 753 rows), instead of the over 2 million rows before.

These new changes have made using RSS2.com much more usable again, and it is way faster. The homepage loads in under a 1/2 second now, just like it should.

Check it out: RSS2.com - Really Simple News For You

Popularity: 3% [?]

Home - Find Car Wallpapers, Car Desktops and Car Pictures at FastWallpapers.com

New FastWallpapers.com logo

Bruce and I just finished getting the template finished for the new FastWallpapers.com site.

Porsche CGT wheel picture that Bruce took

Check it out: Home - Find Car Wallpapers, Car Desktops and Car Pictures at FastWallpapers.com

Popularity: 4% [?]

New site is up for Kristin Joy Pratt-Serafini - Award-winning author and illustrator

I’m happy to announce that Kristin’s new site is now finally live. It’s all converted to a full WordPress site now.

New website is finally live for Kristin

Check it out: Kristin Joy Pratt-Serafini - Award-winning author and illustrator

Popularity: 3% [?]

Travelling to China, returning April 18th

Passport + tickets to Seoul, Hong Kong

I’m currently travelling on my way to visit my friend Damon who is living in Guangdong, China with his lovely wife Wenhui and their awesome baby Jackson. I’ll be returning home on April 18th.

Things we’ll probably be doing:

  • Hanging out in Guangzhou
  • Doing art
  • Nerding
  • Working on our super-duper top secret game idea
  • Visiting Macau
  • Taking a train ride to the famous mountains (the ones you see in the background of many Chinese paintings)
  • Getting rained on (probably)
  • Trying to get by in a place where everyone speaks Cantonese, not Americanese
  • Taking lots of pictures
  • Making new friends
  • Filling Moleskines
  • Playing with the baby
  • Cooking
  • Goofing around

Should be a fun time. I plan on being available via email as often as possible (gserafini [at] gmail.com) and via the usual IM channels also whenever possible. If you have an emergency, please send me an email and I will see if I can help. I will probably not be available via phone, although if I am probably the best bet would be to call my friend Damon’s cell # 159 8643 6868 (country code 86 I think..?) Calling China would probably be ridiculously expensive, so I wouldn’t recommend it. Email would be best.

I will be hopefully doing regular updates of my Flickr stream and posting into my China Trip 2007 set, so check back there every couple of days to see what I’ve been up to. If I can’t post easily from China then I may have to wait until I’m back stateside to post all the pics.

I also may be updating my Twitter page (kind of like small little micro blog updates) with what I’m doing at any given time so you can keep up with the adventures that way too maybe.

See you when I get back! :)

P.S. - Posted this using my Palm Treo 700p using USB modem from the airport in Chicago. Yay for mobile Internet!

Popularity: 3% [?]

How I used the Unix command line to do a multi-file search and replace to fix over 4,700 individual files

Evil hackers attack!

Some customers of mine recently reported some suspicious behavior on one of their sites. I discovered, with dismay, that a number of months ago there was a nasty cPanel exploit that some evil hackers had used to insert a malicious line of code into the bottom of every HTML page on this server. After verifying that the cPanel installation had been fixed, I used grep to search through all the files on the server to see if any other files had been touched by the hackers. I found over 4,700 individual files that had malicious code added and knew that something needed to be done immediately to address this problem.

Not the best way to start my day…

(more…)

Popularity: 6% [?]

DiddleBug Extractor 2.1 - Palm DiddleBug image extractor script for OS X, Windows, Linux (Replaces Didcon 2.0)

DiddleBug Extractor 2.1

DiddleBug drawing - crow

Drawing pictures on your Palm

I use an excellent free Open Source program called DiddleBug on my Palm Treo 700p for doing small black and white drawings. The latest version of DiddleBug creates 320×320 pixel size drawings. These are referred to on their site as “high-res” pictures instead of the 160×160 pixel size drawings that older versions of the software created.

Getting DiddleBug pictures off your Palm

I used to use a nice converter on my Windows laptop called WindleBug but wanted to be able to just use my Mac laptop by itself instead.

The DiddleBug FAQ mentions using a Perl script called Didcon on Windows, Linux and OS X which hadn’t been updated yet to extract the new 320×320 pixel sized images. When I ran the Didcon script for the first time, it saved out a 160×160 graphic that had weird lines running throughout it, due to the fact that it wasn’t reading out the data for a 320×320 pixel sized graphic.

After hacking at it for a little while, including researching how to correctly indicate the pixel size of an image in a Windows bitmap in the header of the file, I managed to get a working script that correctly outputs a 320×320 .bmp file.

This is the modified script, and I’m also including a second script that you can double-click in the Finder to run the extraction process.

(more…)

Popularity: 8% [?]

Space Invaders pixel art, scarf and moleskine

Just created a set of space invader related pictures.

See them all here: Space Invaders

Popularity: 3% [?]

Orange 10mm LED throwie dog leash modification - night light tracer for walking in the park with Kuma

LED throwie dog leash modification

So, I finally got my packages of 300 LEDs (ordered on Ebay from a Chinese manufacturer) and 100 watch batteries for the purpose of experimenting with the concept of the LED throwies today.

I made my first one with scotch tape and an orage 10mm LED. It was so exciting when it lit up. Silly, I know, to get excited about such a small thing. By the way, I had ordered the parts for my LED throwie kit earlier this week, before the city of Boston came to a screeching halt due to freaking out about a street art promotion for a cartoon show made of LED lights that caused a bomb scare. Because, well, gosh darnit, those lights must be… a BOMB! In my opinion what happened in Boston was the same result as crying FIRE in a crowded theatre. Except the theatre is the United States of America, and the person crying FIRE is the Bush/Cheney White House. Somebody is winning when our response to new promotional art is to call in the bomb squad. Somehow, though, I don’t think it is Osama bin Laden who has instilled this fear in the American people. Who wins when everyone in the country is afraid? Who gains more power?

Anyways, I was very excited to open the packages and construct my first LED throwie. The magnets haven’t arrived yet, so it’s not quite a true throwie but it is still fun to play with. Then it was time for my nightly dog walk with Kuma, going to Tower Grove Park. Tonight it is about 14° F out (pretty cold) and the park still has a light covering of snow and ice from yesterday. As I was walking along, holding my ever so precious glowing orange LED and playing with it, it occured to me that it might be neat if I attached it to Kuma’s leash so that it would track her movements as she ran around sniffing different squirrel tracks.

This is a short movie I made of her dancing movements with her own personal LED throwie light tracer dog leash modification.

It’s kind of neat to see Kuma’s movements captured by light. I took the video using my Treo 700p cameraphone. You can hear the crunch of my footsteps on the snowy pavement.

More pictures from the walk are here.

Popularity: 5% [?]

Searchball - Google Pagerank checker for Safari

Howto check Google Pagerank using Safari:

  1. Go here Searchball - Google Pagerank checker for Safari and add the bookmarklet to your browser bookmark toolbar.
  2. Click the bookmarklet whenever you want to know the Pagerank for the site your are viewing
  3. A small window will appear telling you the Pagerank.

I just finished making some adjustments to Searchball. This is a small little service that gives you a bookmarklet that lets you check the Google Pagerank for any site simply by clicking it. This is really nice if you are using Safari or any other browser that doesn’t have a Google Toolbar or browser extension (like Firefox) that supports showing you the Pagerank of the site you’re viewing.

Check it out: Searchball - Google Pagerank checker for Safari

Popularity: 4% [?]