20090114

Princess Bride Ambigram

I love ambigrams. I first discovered what one was when my 9th grade English teacher, Mrs. Tomayko, showed us the newest cover of our high school literary magazine, Silver Quill. It was a beautifully done ambigram reading "Silver Quill" both upside down and right sight up. I was instantly mesmerized.

From then on, I have designed a handful of ambigrams myself. My favorite one I did was for my college ultimate team, Pansy. I doodled it over the course of a few lectures. I never did show my teammates though. I had hoped it would be printed on one of our discs, but I never got it scanned and sent out to my team.

What brought all of this about? Well I just ran into the cover of the The Princess Bride (20th Anniversary Edition):



Yes, it is an ambigram. Look:



Gorgeous.

BTW, if you love the movie, read the book. Seriously. If you someone who will bump into me in person, borrow my copy. You will learn of why Inigo seeks the 6 fingered man and how Buttercup rose to become the most beautiful woman in the world. You will love it.


20081203

Eat Out a Lot? Save Money with No Effort with Rewards Network

I rarely cook. By rarely, I mean I make food at home at most once a month. Otherwise, I go out to eat, get carry out, or delivery. As I've mentioned before, though I know I should really learn to spend less and save more, I love my lifestyle and do not want to change my habits. That's why I was super psyched when I learned about Rewards Network. I just signed up for free and told them what credit card I wanted to enroll and that was it! Whenever I dine at any restaurant on their list and use that credit card, I automatically get 5-10% of my bill including tax and tip back credited to my credit card about 2 days later. I don't have to carry a membership card or a coupon. I don't have to notify the waiters or the restaurant that I'm part of this program. I don't have to request my money after I reach a certain amount of credit or anything since I get credited directly on my credit card no matter how small the amount. Really, once I'm enrolled, I don't have to do a thing but just do what I normally do.

True, I could save more money by actually looking online ahead of time and seeing what restaurants are part of this program and only going to those, but like I said, I don't want to change my habits and I want to dine where I want. But I'm surprised to find that many of the restaurants I already dine at are already part of the program! I have no clue even until I do my regular check on mint.com to see how my budget is looking, and am surprised to find money credited to my account thanks to this program!

What was the most amazing thing was that the day I signed up, I happened to dine at one of the restaurants in their program, and I was credited! I didn't expect my account to be activated and working so quickly.

Honestly, I'm not completely certain how they make money off this program. I assume restaurants pay the program an amount greater than we get back each time we dine there. Perhaps other people really do change their habits and purposely look up restaurants on their list and it does draw business for the restaurants, but I dine out all the time so it will not personally draw me to be more likely to go to their restaurants. All I know is that I found another way to save money without exerting effort. And that excites me.


20081110

Monthly Personal Update



As promised, here's the delayed monthly personal update.

I'm typing from my bed and fully plan to turn off the lights and computer once this post is done to go to sleep, so I'm already in my pjs and everything. That's a pillow behind me, instead of the usual couch. I just took that picture, and am impressed how though my hair is messy right now, it turned out ok.

Anyhow, October I moved to a place only about half the size of my previous place. Since the middle of college, I've had a group of boxes that move along with me even though they haven't been unpacked. They followed me for six moves, with more and more boxes being added in this group. It got so bad that at my last apartment, a one bedroom and den (the den was very large and could definitely be used as a second bedroom), I used the whole spare room for these boxes. There wasn't much floor space in that room to walk between the boxes. Well, I finally went through each and every one of these boxes and threw out what was now trash, and reorganized the contents I wanted to keep in boxes according to what they were. Now some of those are in storage and some are with me. I donated most of my furniture to the Salvation Army, and have several boxes (currently living in my car) to donate to a food bank, Toys for Tots, Dress for Success, and Goodwill. I was awful stressed during the whole process though.

A few family members celebrated birthdays in October. My ultimate team ended our regular season losing only one game at the very beginning. I played a session of bridge at the Silver Spring Sectional, and one at the local unit game one night. Some dear friends came into town for a conference, bringing their two kids. I took the oldest of the kids to see the National Archives, the WWII memorial, FDR memorial, and paddle boating in the tidal basin.

For Halloween, I dressed up as a gypsy at work and brought in candy for everyone. I also baked cupcakes and gave those out to my fellow coworkers also in costume. The best was Pee Wee Herman.

The last weekend of October I went hiking in the Shenandoah. Also stopped by Luray Caverns, which I hadn't gone to since I was a little girl, and The Garden Maze. The website claims the maze to be one acre. Looking at it from the outside, I was disappointed because it didn't seem like an acre, but once inside, it seemed huge, and it was certainly of good relative difficulty. You could kind of see through the hedge to the path adjacent to you, but that didn't help you get there in the slightest. Next time in Luray, I would def suggest trying it even though it looks gimmicky. And look for the stamp stations (there are 4 landmarks to find). If you have younger children though, be warned that I saw many poor parents whose kids had run ahead be terribly lost and unsure of how to get to their kid that appears to just be a few feet away.


20081105

Novel Writing Tools

For those participating in NaNoWriMo (National Novel Writing Month, something I often claim I'll do but never have gotten close to succeeding in), Macworld had an excellent article on Mac novel writing tools. The tools featured in their article feature 30 day (or more) free trials, and a discount on the purchase if you decide to keep it. The goal of NaNoWriMo is to start and finish a novel of at least 50,000 words all in the month of November. These trials are plenty long enough for this whole goal!

As you may have guessed, the software featured in the Macworld article is indeed Mac-only. PC users may want to look at Liquid Story Binder XE, also available for a 30-day free trial and at a discount for those who want to purchase it. Another great PC-only tool is Q10. Those are the top two I've seen PC users use. Meanwhile, Writer's Cafe is available for both Windows and Mac.

Personally, I had started in TextEdit on my Macbook Air, and then decided to try Scrivener after reading the article. Unfortunately, I haven't had time to work on my novel since then, so no review from me yet!


20081103

Poll Open and Close Times by State

I know, first Monday of the month is supposed to be my personal update, but I decided to postpone it a week this month for a more important message.

If you're a US citizen, no matter what state you're in and no matter which candidates or issues you support, get out there vote!

For those who have already voted via absentee or early voting, good for you! But if you're state doesn't have early voting, please don't let long lines, weather, or what the polls claim be excuses. Even if you feel like your presidential election vote doesn't count, there are other important candidates and issues on the ballot besides the presidential election where your vote will definitely count. And be an informed voter! Don't just vote for the name you recognize because they are the incumbent. You can look up how your senator or representative has voted in the past on various bills, and decide whether or not you really do want to keep them in office.

If you lost the little card with your polling site, you can go to http://maps.google.com/vote.

What time do polls open/close?
I couldn't find a good resource with a nice table of all the poll times for all the states so I looked them all up for you (ok halfway through making the chart I found Vote411 had information for all the states, but it still wasn't an easy chart). Yes, I took the time to do this. You can make sure to schedule some time in your day tomorrow to go vote. All times in local time unless noted. Feel free to send me corrections if you find a mistake.

Alabama8am to 6pm
Alaska7am to 8pm
American SamoaNo voting rights in national elections at this time
Arizona6am to 7pm
Arkansas8am to 6pm
California7am to 8pm
Colorado9am to 7pm
Connecticut6am to 7pm
Delaware7am to 8pm
DC7am to 8pm
Florida7am to 7pm
Georgia7am to 7pm
GuamNo voting rights in national electionsat this time
Hawaii7am to 6pm
Idaho8am to 8pm
Illinois6am to 7pm
Indiana6am to 6pm
Iowa7am to 9pm
Kansas7am to 7pm
Kentucky6am to 6pm
Louisiana6am to 8pm
Maine10am-8pm (though most polls open earlier)
Maryland7am to 8pm
Massachusetts7am to 8pm
Michigan7am to 8pm
Minnesota7am to 8pm
Mississippi7am to 7pm
Missouri6am to 7pm
Montana7am-12pm (varies) to 8pm
Nebraska8am to 8pm CST and 7am to 7pm MST
Nevada7am to 7pm
New HampshireVaries. In general, open between 6am and 11am and close at either 7pm or 7pm
New Jersey6am to 8pm
New Mexico7am to 7pm
New York6am to 9pm
North Carolina6:30am to 7:30pm
North DakotaMostly 7am-7pm
Northern Marianas IslandsNo voting rights in national elections at this time
Ohio6:30am to 7:30pm
Oklahoma7am to 7pm
OregonNo polling sites. All vote by mail drop. Drop off by 8pm
Pennsylvania7am to 8pm
Puerto RicoNo voting rights in national elections at this time
Rhode Island7am to 9pm
South Carolina7am to 7pm
South Dakota7am to 7pm
Tennessee7am to 7pm (mostly) but all must close by 8pm EST/7pm CST and be open at least 10 hours and at most 13 hours
Texas7am to 7pm
Utah7am to 8pm
Vermont10am to 7pm (most locations open earlier)
Virginia6am to 7pm
Virgin IslandsNo voting rights in national elections at this time
Washington7am to 8pm in King and Pierce counties. Otherwise, varied
West Virginia6:30am to 7:30pm
Wisconsin7am to 8pm
Wyoming7am to 7pm


20081027

Sweet Dreams Security

As you may have noticed, for personal reasons, I'm not going to be posting here as regularly for a while. Don't worry, I'll return to regular posts soon.

This isn't really technology related, but it does appeal to my the wannabe-design-geek in me.

You know how on some walls, they put that broken glass stuff on the top so people can't really climb over it? Here's an attractive version of that:



Barbed wire:



But here's my favorite:



These products were all designed by UK company, Sweet Dreams Security.


20081016

Boxy jQuery Plug-in

I've been playing around with jQuery's AJAX capabilities lately in some PHP reports I have to do for work. I wanted to have pop-up forms to prompt the user for information and update the database without using a real pop-up window and without needing to submit the page. I found the Boxy jQuery Plug-in and found it to suit my needs nicely.

While I can't post my exact work code, I wanted to post some notes about how I did it for future reference and for others who may be just picking it up themselves.

Installation
Installation of Boxy was simple; all I had to do was copy three folders from their zipfile into my html directory.

Implementation
My page already included a jquery.js script since I was already using jQuery to do my database submits. I had to add these two lines to be able to use boxy:

<script type='text/javascript' src='javascripts/jquery.boxy.js'></script>
<link rel="stylesheet" href="stylesheets/boxy.css" type="text/css" />


I also put my "images" directory in a different place than the css expected, so I had to edit that.

For work, I had a table displaying data which was stored in the database. In one column of cells were dropdowns with the value from the database selected. I needed the user to be able to change the value and have it save to the database. I also wanted to prompt the user to enter a comment for why they were modifying the dropdown. I started with a call to a javascript function in my onchange portion of my select.

Here is my javascript code (with proprietary information modified):

function prompt_user(rowid) {
new Boxy("
<h2>Please enter a comment for the change:</h2>
<center>
<input type=\"text\" id=\"comments\"
onchange=\"update_db("+rowid+");
Boxy.get(this).hide();\"/>
</center>",
{modal:true}
);
}


I use rowid since each row in the table refers to a different row in the database and I need to be able to pass that on to the next function that will do the db update. The onchange will activate when the user either pressed enter, tab, or clicks away from the textbox. It will not activate if they just change the value of the textbox without doing one of those things (that would be an onkeypress).

The modal:true option makes the rest of the screen inactive until the user supplies the prompted information.

For my update_db function, I use jQuery to help me out. Now this isn't the best way, passing the whole db statement from here but for me it was easier to write and debug for now and it will be fixed in the final version.

function update_db (rowid) {
var comments=document.getElementById('comments').value;
$.post("submit_sql.php", {
sql_query: "update my_table set
choice='" + document.getElementById('choice_select_'+rowid).value + "',
comments='" + comments + "'
where id="+rowid},
function(error) {
if (error != '') {
Boxy.alert(error, null, {modal: true});
} else {
document.getElementById("comments_"+rowid).innerHTML=comments;
new Boxy("<h2>Success</h2>", {
afterShow: function() {
var self = this;
setTimeout(function() { self.hide(); }, 1000);
},
modal: true,
closeable: false
});
}
}
);
}


Here, I am sending the SQL query as a parameter to a separate php script. In the callback, I create a Boxy alert if there's a problem. It's a modal again, so the user cannot ignore it and has to close it before doing anything else. If there's no error, then in the callback I make sure the page updates with the comments and I alert "Success", but I have this Boxy auto-close (actually I just hide it) after 1 second (1000 milliseconds).

For reference, here is some sample html code for submit_sql.php:

<?
include('dbinfo.inc');

$conn = pg_connect( 'host=' . $dbhost
. ' dbname=' . $dbname
. ' user=' . $dbuser
. ' password=' . $dbpass )
or die ("Can't connect to db");

$queryString = $_POST['sql_query'];
$result = pg_query( $conn, $queryString );
#echo pg_affected_rows($result);
if ( !$result ) {
echo(pg_last_error());
}
?>