Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Impressing Your Significant Other III

by Limbic~Region (Chancellor)
on Jun 23, 2009 at 17:53 UTC ( #774123=perlmeditation: print w/ replies, xml ) Need Help??

All,
In the spirit of Impress Women and Impress Women II, I am wondering what you have used perl for that has impressed your significant other. I have chosen Meditations for this post because Where should I post X? suggests one of the topics appropriate for this section is 'life as a programmer'. This fits my story nicely since I didn't set out to impress my wife - it just happened as a result of a couple of the 3 virtues (laziness and impatience). So after reading my story, I welcome you to share your own. Your significant other may or may not be a geek and you may or may not have set out to impress them - what is important is that they were impressed.

Shortly after the birth of my first daughter, I created a family website. Despite going with a very user friendly WYSIWYG CMS, my wife doesn't help keep the website up to date. This can be a very time consuming process as we sometimes go more than a month without downloading pictures from the camera. A typical session goes like this:

  1. Download photos from camera to computer
  2. Seperate photos by person in the photo and by date taken
  3. Choose photos to upload with appropriate title and caption
  4. Upload picture to website which consists of:
    1. Logging on to website as appropriate family member
    2. Creating a new photo entry
    3. Setting the title
    4. Setting the caption
    5. Setting the publish date to when (date and time) the photo was taken
    6. Selecting the photo to upload
    7. Clicking on the create button

This process only got longer after my second daughter was born. Not too long ago I became sufficiently frustrated that I wrote code heavily leveraging WWW::Selenium and Image::ExifTool so that my process is now:

  1. Download photos from camera to computer
  2. Seperate photos by just person
  3. Choose photos to upload with appropriate title and caption
In windows explorer, when you right-click on a file and go to the summary tab you can add meta data to that file. With JPEGs, it gets stored as EXIF data which was perfect for my purposes (title and caption). I can also view the images as thumbnails which makes separating them by who is in the photo a breeze. My code then:

  1. Loops over all JPEGs in the current directory
  2. Reads the EXIF data to determine when the photo was taken
  3. If it contains the title/caption meta data it logs on to the website and posts it to the appropriate family members location (using CWD)
  4. Moves the picture to a folder based on when the photo was taken (previously a manual step)

Simple right? After announcing to my wife that I was going to update the website, she took the kids for a walk. When she came back I was sitting on the couch watching TV. She asks "I thought you were going to update the website?" to which I replied "I am". She looked over and the computer, all by itself, is pointing and clicking and updating as if by magic. She was so impressed that she sat there watching it telling me I was "amazing".

Cheers - L~R

Comment on Impressing Your Significant Other III
Re: Impressing Your Significant Other III
by hossman (Prior) on Jun 24, 2009 at 00:55 UTC
Re: Impressing Your Significant Other III
by roho (Monsignor) on Jun 24, 2009 at 08:33 UTC
    I use Perl to generate the family Christmas gift exchange list. This was a dreaded yearly chore because the exchange list had the following "rules": 1. Men exchanged gifts with men. 2. Women exchanged gifts with women. 3. Children exchanged gifts with children. Our family is composed of 5 siblings and their spouses with a total of 18 children among them. In addition, the children's exchange had to be weighted to compensate for one family with lots of childen so they didn't wind up exchanging gifts mostly within their own family. The Fisher-Yates shuffle algorithm is used to randomize the results so different pairings are generated each time it is run. This program has transformed a yearly chore into a breeze, and my wife no longer has to ask multiple times to have the list created.

    "Its not how hard you work, its how much you get done."

Re: Impressing Your Significant Other III
by bduggan (Pilgrim) on Jun 28, 2009 at 15:44 UTC
Re: Impressing Your Significant Other III
by telemachus (Friar) on Jun 30, 2009 at 12:34 UTC

    Three things that I have written for my wife:

    • A small script to gather her the latest ten tweets from the MarsPhoenix lander. (I actually posted this one on this site when I originally wrote it.)
    • An even smaller script to get her the current weather and three-day forecast using Weather::Google. (Then a cron job to send it to her Monday through Friday at 3:30. As in one of the responses to the original Impress Women, my wife was unamused when she figured out that the little email that the cron job sent was scripted.)
    • A series of scripts to (1) massage a truly funky CSV file into something approximating sense and then (2) turn the resulting data into a tag cloud that she could view in a browser. The data concerned assemblies and speakers at her school, and the tag cloud helped her to get a quick visual sense of who had done more (or less) inviting, what areas the speakers work in, etc. This one had the added bonus that she could brag about me to her coworkers. "Your husband wrote this?" "Oh, sure, he cooks up stuff like this all the time..." This one gets reused as she gets new data.
Re: Impressing Your Significant Other III
by robmueller (Novice) on Jun 30, 2009 at 15:02 UTC

    My wife is a bit of a movie trivia buff, six degrees of Kevin Bacon is a fun distraction. At a party a few months back, someone asked a nice trivia question, "Name actors/actresses that have been in two different sets of trilogies? (voice overs are allowed)". We came up with about six I think it was (eg Stallone, Sylvester - Rocky & Rambo; Damon, Matt - The Bourne * & Ocean's *; Weaving, Hugo - The Matrix & The Lord of the Rings; others I can't remember now...)

    However I wanted to know if there were more. Take perl + imdb data (http://www.imdb.com/interfaces) + wikipedia (http://en.wikipedia.org/wiki/List_of_film_trilogies, http://en.wikipedia.org/wiki/List_of_film_tetralogies, etc), stir, shake and voila

    Some more obscure (Mars, Kenneth - The Land Before Time & The Little Mermaid) or in movies you might not want to watch (Davis, Warwick - Leprechaun * & Harry Potter and the * - you decide which I was referring to), or in one of a billion westerns from the 30's/40's (which then raises the question of what a "trilogy" really is...)

    Some older movies I didn't know (Goodwin, Harold - Charlie Chan at * & Ma and Pa Kettle *), but also some we should have got (Fox, Michael J. (I) - Stuart Little & Back to the Future; Bloom, Orlando - Pirates of the Caribbean & The Lord of the Rings; Allen, Tim - The Santa Clause & Toy Story)

    Some that might have been on the edge of what we'd have gotten (Diesel, Vin - The Fast and the Furious & Pitch Black/The Chronicles of Riddick; Reinhold, Judge - The Santa Clause & Beverly Hills Cop; DeLuise, Dom - All Dogs Go to Heaven & An American Tail; Lee, Christopher - The Lord of the Rings & numerous Dracula movies; Lane, Nathan - Stuart Little & The Lion King; Bronson, Charles - Death Wish & Family of Cops; Wagner, Robert - Austin Powers & Pink Panther movies; Jones, James Earl - Star Wars & The Hunt for Red October/Patriot Games/Clear and Present Danger;)

    There's the "why no, i definitely haven't seen those" movies (Dough, Jon - Babewatch & Debbie Does Dallas '99/4/TNG)

    And of course, we should have just said "Christopher Walken", because he does always seem to turn up when you least expect (Walken, Christopher - The Prophecy & Sarah, Plain and Tall/Skylark)

    The movie trivia buffs were impressed... and I was a bit chuffed :)

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlmeditation [id://774123]
Approved by moritz
Front-paged by Arunbear
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (5)
As of 2014-09-21 17:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (173 votes), past polls