Recently in Programming Category

So I've been having a problem with my "Send To Flickr" Bookmarklet functionality on Flickr, and been in a foul mood about it. I finally got to the right person at Flickr who set me in the right direction and give me permission to post the javascript contents for the bookmarklet here.

"Send To Flickr" Bookmarklet Code:

<20050906 Edit>How Do I Use This?

Highlight the text in this box and drag it onto your "Bookmarks Toolbar" (Netscape/Mozilla) or ":Personal Toolbar" (Opera.) Optionally, you can manually make a bookmark. For the 'Location' field (Mozilla) or 'Address' field (Opera) paste in the javascript from above. (It needs to be copy-and-pasted as one line.) Then go load the page with the picture you want to upload to Flickr. Click on the bookmark(let) and it will list all images on that page. Click the image you want to upload. Login to Flickr if it asks you to. Choose "Upload To Flickr" button. Voila! Your file should be uploaded into your account on Flickr.

To make this really useful, add the bookmark to your "Bookmarks Toolbar" (Mozilla) or "Personal Toolbar" (Opera) under View->Toolbars, so you can use your bookmarklet easily while browsing. If at this point, you can't figure it out, please wait for Flickr's new Bookmarklet coming to a browser near you soon.

</20050906 Edit>

I believe this is the exact JavaScript from Flickr (they wrote the code, not me), but I can't guarantee it. It works correctly and YOU can scan through the JavaScript, there doesn't appear to be anything untoward in the code. Flickr is reworking their bookmarklet upload function currently, so keep an eye on their Upload Tools page (you must be logged in to use that link) and be sure to use their new bookmarklet when they post it. (I'll modify this blog entry when they do...)

</20070323 Edit>

I've stopped using YahooFlickr, so I can't verify whether or not this still works. I'll leave it here for history's sake, and in case anyone finds it useful. As before, this code came from Flickr, I do not support it or provide any warranty to it working or working correctly for any of your needs. Your mileage may vary, use at your own risk/benefit.

My Digital Photo Workflow Notes

| | Comments (0)

I am currently using a Canon Rebel XTi DSLR camera that records onto Compact Flash media. I'm primarily interested in filing, categorizing and annotating my image files. Post-processing (raw conversion, adjustments, etc.) is usually minimal unless I really messed up my settings or am working commercially.

  1. Transfer the images, as taken, to fileserver in a working directory. This is done via USB-connected Compact Flash reader attached to my fileserver (I'm considering adding a built-in card reader if my motherboard provides USB connections internally, need to investigate.) The files are written to a dedicated RAID 1 share on my Fedora Core 6 (currently) Linux fileserver.
  2. Set the Compact Flash card aside, just in case...
  3. From Unix shell, check that the file ownership and permissions are set correctly on the copied files. File permissions are all changed to 0544 for my purposes, so the files are read-only, but my automated system can access the files.
  4. If necessary, renumber (rename) files. Canon stores 10,000 photos per folder, then automatically increments to the next folder. I prefer to append the folder number to the image number to form individual file names like so:
    DCIM/CANON101/IMG_2345.JPG becomes IMG_1012345.JPG. The little shell script I use to rename my files looks like this:
    for i in `ls -1`
          do
          j=`echo $i |sed `s/IMG_/IMG_101/g'`
          mv $i $j
          chmod 0544 $j
       done
    
    I currently keep all my photos in one directory (may rethink this later) so it is important for me to keep filenames unique.
  5. Record the filenames of the new files in the work directory, move them to the production directory.
  6. Process the photos through raw conversion using Bibble Pro
  7. Process the new files (recorded in the previous step) through the script that loads the image records, vital statistics and meta data (EXIF) into the database:
    • sample the image and record the average color in HEX
    • record default values (photographer, photographer e-mail, photographer URL, file directory, filename, url
    • extract EXIF data with jhead and load that data
    • create appropriate .html files which call scripts via SSI and verify new .html file permissions
    • categorize photos where I can by date/time and other extracted information
  8. Create test lightbox view of thumbnails
  9. Correct any images that need their orientation (rotation) adjusted. Usually this is a rotate operation -90 degrees to counteract the camera being used vertically instead of horizontally.Now done in Bibble Pro, so not an issue.
  10. Rebuild thumbnail files for new images. Other than thumbnails, all images are resized on-demand, real-time, and fed as a BLOB from my server to your browser. Neat tricks with Perl, Imagemagick, and Apache.
  11. Rebuild category files to account for new files assigned to categories.
  12. Verify that everything works correctly and looks sane/sober/kosher.
  13. Format Compact Flash media.
At this point, I've got all the information about the image into the database and appropriate web pages have been built to index and display the photos on my online photo galleries. Now I can sleep restfully. Additional notation, categorization, sorting, filing, etc. is an on-going task (with 20,500+ photos and growing, it may never be finished.) The photo files and databases are backed up on a RAID 1 partition locally (to protect against hardware failure) and are also mirrored remotely (using rsync) so I'll always have a copy off-site (in case of local catastrophe (weather, fire, etc.))

I'm in a constant development process with this project, right now. The to-do list is long. Here are some details of the current implementation.

All photos have appropriate copyright notation and all rights are reserved. All photos are available for licensing. All photos are available in their original, unmodified resolution and format. Please contact me for specific information about licensing.

VLC Media Player

| | Comments (1)
Anyone else out there tired of messing with junk video players that do everything but play the video you want to watch? They all work 90% of the time and leave you hanging the rest.

I've found the Golden Video Player: VLC Media Player
Get VLC media player

This thing has a library of useful features and supports Windows, WinCE, BeOS, and every version of Unix (Mac OS/X, Linux, Solaris, BSDs) you could ever want. It plays almost every format on one player, across multiple platforms, reliably. Wow! Did I mention it's free and the source code is available! As if this wasn't enough, it can also be used as a video streaming server as well.

The install on Windows platforms is absolutely painless. My install on Fedora Core 4 was a bit more challenging, but I finally got all the pieces together. I highly recommend using apt-get and making sure you've got the "dag" repository in your /etc/apt/sources.list file, then, as root, issue the command:
apt-get install videolan-client
(Note: not 'vlc'.) There will be a bunch of dependent packages that will tag along for the install automatically.

This is what Free Software is all about. This project sits on the shoulders of many other quality free and open source software efforts. No contribution is required, but if you'd like to contribute your time, materials, skills, or anything else the VideoLAN team, I'm sure they would appreciate it.

Public Feedback to mkt10.com

| | Comments (0)

I read about the "next generation" of job posting/searching sites and in particular was interested in one, mkt10.com, which purported to be taking a new, more effective approach to matching potential employees with employers. They've got a nice site with some basic Web 2.0 (AJAX) functionality, but when I tried to use the site, I started having problems. From my e-mail I (unsuccessfully) attempted to send to them:

I keep getting trapped in dead ends in your interface while trying to fill out the questions in "Step 2."

Please consider making your user interface more user-friendly by offering at least a "None" and "Other" option at each decision point with a chance to further explain the "Other" response. Forcing people to choose bogus responses to questions that aren't applicable or answers that aren't correct only muddies the waters of your database.

For instance your "What standards/methodologies did you follow" question lists a selection of standards and methodologies that I haven't used. I can't indicate "none of these" or "I have used Six Sigma" and am forced to stop answering your questionnaire completely (i.e. you lost a potential customer/user) or I can choose a bogus answer in order to continue to the next question.

Your site seems very interesting, and I'd like to list myself on it, but when I get stuck on the question flow with no way out, I'm just going to abandon my efforts to use your site.

This is a basic user interface design. You should never force a user to enter invalid data in order to successfully navigate your interface, it invalidates your data and frustrates your users. You should also always leave a user an easy way to opt-out or pass on optional questions, not force them to choose a provided, default answer when it is not applicable.

I tried to use the "Contact Us" link on their website to provide this feedback, but the e-mail address ( admin.mkt10@mkt10.com ) linked from there bounced my mail back with the following error message:

This is an automatically generated Delivery Status Notification

Delivery to the following recipient failed permanently:

admin.mkt10@mkt10.com

Technical details of permanent failure:
PERM_FAILURE: SMTP Error (state 12): 550 5.7.1 Requested action not taken: message refused

Oh yeah, you should also make sure you "Contact Us" link works so people can provide feedback. I hope this is just a beta site that is still under development. It looks promising, but has a couple significant road blocks to fix before it is ready for prime-time...

I just placed a pre-order for the new DVD Rush DVD R30 30th Anniversary Deluxe Edition (includes two Rush guitar picks and a souvenir backstage pass) on Amazon. Their price was $27.99, free shipping, and I had a gift certificate balance of $11.71. My total should have been $16.28 that I need to pay Amazon. Instead, the checkout page displayed the following:

Looks like Amazon owes me $9,999,999,971.01 (that's a negative total.) I'm still wondering who bought me a $10 (big-B) Billion dollar gift certificate. By the time they credit this amount into my account, their profits this quarter will be significantly impacted, so I figured I put this notice out. :-) I'm not sure I can handle a refund that large on the card I'm using, maybe I should use the American Express...

(Yes, this is a real screenshot taken at 11:50am on Tuesday, November 15, 2005.)

Do you suppose this reveals the upper dollar limit Amazon designed their e-commerce software to handle? I can't imagine the programming error that would cause a problem like this. I hope this doesn't foul up their systems or my accounts... Click...

If you'd like to try your luck, or just want to pre-order a copy of Rush's (the band, not the man) new DVD (release date is next Tuesday, November 22, 2005) please use the links below.

Google Sitemaps

| | Comments (0)

Webmasters, please go check out Google Sitemaps. Google once again shows that they "get it" when it comes to what is going on in web searching and web indexing worlds.

Google can automatically discover only so much of the web by following links from page to page. Some of the roadblocks are the sheer volume of pages, massive interlinking of pages, which can obscure which links are the most relevent, and sometimes a document simply doesn't have direct links to it.

For instance, I've got many thousands of web pages involved in my Photo Gallery project. They all interact with and point to each other and have extensive links to other "nodes" or categories in the gallery complex. It would take a long time for Google to completely traverse the set of them through discovery. (In fact, it wouldn't discover the different sort variations in my example as they are linked by logic done in JavaScript that point to the appropriate URL for each sort type.)

Now, with Google Sitemaps, I can run a script on my server that will build an XML file representing all the HTML files on my server (from the server's point-of-view), then point Google at the resulting "sitemap". This way, Google starts out with a list of all the pages on my site, including the file's last modified time, change frequency (hourly, daily, weekly, monthly), and priority (of a given page in relation to the other pages on your site.) Better still, I can control the change frequency and priority as the site owner, allowing me to properly characterize my pages using my specific knowledge of my site. Additionally, I can rebuild my sitemaps when it is appropriate, and Google will check them regularly and note the changes.

I went to download a new copy of Quicktime from Apple today and noticed they bundled iTunes in the install. The installer clearly asked me where I wanted iTunes installed, so I chose the default:

c:\Program Files\iTunes\
I went back into the directory to delete iTunes and noticed another directory:
c:\Program Files\iPod\
had been created as well.

Apple:

I know the name of the game is getting your software onto my computer, but this is just scummy. What's next, are you going to tack on a copy of OS/X next time I upgrade my Quicktime? What else was installed when all I wanted to install was Quicktime?

I download and install Quicktime because I want Quicktime, not iTunes, not iPod software, nothing else. Even with full disclosure in the agreement, your bundling of software in this way is obnoxious at best and will turn off Windows/Apple fence-sitters in the worst case. We're all intelligent out here, why not let us download the individual software packages we want by ourselves?

[Edit: July 26, 2005]
I now also notice that Apple created two now processes that come up at startup. I've got an iPodService.exe running (I don't own and probably won't own an iPod, ever...) and an iTunesHelper.exe (remember, I didn't want iTunes in the first place.) Off to go clean up my registry and directories.
[/Edit]

[Edit: July 27, 2005]
I also had to remove approximately 50 different entries in my Windows Registry, by hand, in order to disable the services and file associations.
[/Edit]

Thanks, Apple, for making Quicktime more work than necessary. I hear that VLC plays Quicktime videos just fine, and so does QuickTime Alternative. Both of those choices quickly install only what I want and provide most of the same functions. Is this what the Apple Marketing types had in mind when they brainstormed the idea to bundle Quicktime and iTunes?

Putting a link to iTunes download on the Qucktime download page is cool. Bundling the software together (and not providing an iTunes/iPod uninstaller) is not.

To finish things off, my InstallShield for my QuickTime install has locked up part-way through and won't finish. There are no (visible) dialogs waiting for a response.

Be good net citizens, Apple, and do the right thing. Or is this your idea of "different thinking"?

The best Windows software by my accounting. If this you are starting with a blank Windows computer, this list should get you the basic kit for almost anything you need to do on it.

The Best:
PuTTY
Mozilla Firefox (Best browser right now.)
Eudora (I've been using this since 1994. I'd like to try Thunderbird, but it doesn't seem ready for prime-time the last time I tried it.)
WinAmp (Classic Skin!)
Ad-aware Personal
WinRAR
AntiVir PE Classic
IrfanView (The best image-viewing software.)
VLC (The best video/media viewing/listening software.)
Cygwin (X on Windows)
BartPE (Windows SAs, check this out.)

s/HTML/xhtml/g

| | Comments (0)

I started writing web pages in 1994. Not quite the beginning of the Internet, but right on the crest of the first widespread consumer access to the Internet. At the time I had started and was running an ISP.

I've done thousands of web pages over the years for fun and profit. I don't use web editors, all my pages are hand-crafted with some combination of the finest vi/vim or perl for most of the CGI stuff. I've always used CAPITAL letters in my HTML tags. That's 11 years of hand-coded HTML, and millions of tags all in CAPITALS.

The RFCs documented the tags in CAPS and it was generally understood to be good style to use CAPS for tags so they stood out more clearly when reading an unrendered (source) HTML document. The browsers don't care (and heck, I didn't care.) That was the way things were done back then.

(Did you know Yahoo gets 80 Billion hits per day according to Alexa.Com?)

Now we are transitioning into the case-sensitive worlds of XHTML and XML and the times they are a changing.

Do you know how hard it is to start typing HTML tags in lower case? I'm guessing a few of you out there do. Those of you who don't will run into the wall soon. I waited as long as I could...

I've made the switch to lower and am in the process of converting my existing HTML to XHTML with CSS.

Many of my HTML pages are script- and database-driven, so it's only a matter of changing the HTML in my code and all the pages are corrected. A smaller group (but significant number) of my pages are static HTML. I've enlisted the help of 'sed' and 'vim' in my quest to 'lc' my HTML.


About this Archive

This page is a archive of recent entries in the Programming category.

Linux is the previous category.

Software is the next category.

Find recent content on the main index or look in the archives to find all content.