Saturday, February 27, 2010

Relaxation on the Cheap

So what has the best ROI (Relaxation on Investment)? Before we get to that, it is of course going to depend on the person. Different people receive differing amounts of relaxation from things. Now, I'm sure a few will argue that if you can't afford to relax, then you shouldn't. But that is a myopic point of view. We have to look at the larger picture, build up of stress will make us sicker, and this will most likely cause us to have trouble making a living. Thus, relaxation is more like taking a shower. Sure, can skip it and save money in the short term, but in the long term, it will stink.

Since I am a man, I know, at least for me, alcohol tends to have the highest ROI. Now this isn't the case for all men, it may induce more stress in some cases. But, generally, for men, alcohol tends to have the highest ROI. This is probably why more men have become alcoholics (although I have heard that the number of women becoming alcoholics is on the rise, is that due to the recession?)

What about for women? I don't know. I would like to hear your opinion on it. So, simply rate things by how much stress they relieve and then divide that by the cost of the thing. So, for instance, going on retreat: let's use a 0-100 scale for the stress relief. Maybe it has a 90 for stress relief, but it ends up costing 500$ for the plane ticket and 1 week of pay. Whereas, a date might have a 30 for stress relief, but only cost 50$.

What are your ideas for relaxation?

Friday, February 26, 2010

What is a living wage?

So I may have started some controversy when I claimed that I paid no Federal Income taxes last year (none was deducted from my paychecks). I have a simple and legal step by step method that can work for almost anyone1:
  1. Get two jobs.
  2. Have 25% inflation between the year 2000 and 2010.
  3. Receive a 7% pay decrease from one job over 10 years.
  4. Receive a 7% pay increase from the other job over 10 years.
  5. Increase your number of dependents by a factor of 8.
Now, having a drastic cut in effective income is not always a bad thing. I have learned and experienced a lot of generosity over the years. There are still many generous people in the world that will help out people in need. It also shows how it is possible for one to live on a meager income. As many people decrease their income due to the recession, there are some tips I think I can give:

Don't spend money! Ok, ok, you've heard it before, don't spend more than you can afford. This is not what I mean. I mean don't spend more than you absolutely need. Do you need to buy new furniture? No! I have not bought a single piece. What about new clothes? Nope. So many people buy new clothes, I am able to use what they toss. Also, you can wear the same clothes for 20 years. It is possible! I wear the same coat I got second hand more than 15 years ago. Vacation? Have a staycation---just kidding. But really, if you can't afford it, you should find a cheaper way to relax. There are many other things as well, but it seems these are ones that many people forget. Folks, it's time to learn to tighten your (used) belt---time to learn how to not spend money.

1 Possible side effects may include nausea, vomiting, diarrhea, high blood pressure, and alcoholism. Please talk to your tax accountant before considering this approach. This approach is known to the state of California to cause cancer.

Friday, February 12, 2010

Communications

First there was speech, but then someone said something bad, so speech was bad.
Then there was writing, but someone wrote something bad, so reading was bad.
Then there was smoke signaling, but someone burned down their house, so smoke signaling was bad.
Then there was the telegraph, but someone sent a bad telegram, so telegraphs were bad.
Then there was the telephone, but someone said something bad, so the telephone was bad.
Then there was the internet, but someone did something bad on it, so the internet was bad.
Then there was email, but someone sent something bad, so email was bad.
Then there was the blog, but someone posted something bad, so blogs were bad.
Then there was the social networks, but someone wrote something bad, so social networks were bad.

It is strange that as every new communication medium comes, some people snap to say that the medium is bad/evil. But, in a few years, they use it like they never said that.

It's not the medium that is bad, any medium can be abused. Only the naive use the logic above and, in the end, distract from the real evil.

Monday, February 08, 2010

Scripts

I've been doing some grading for a course and I wanted to automate somewhat sending feedback to the students. I am able to get a CSV file with the roster information and their submissions follow a particular format (Lastname_Firstname_...). So when I'm done grading and commenting, I want to be able to blast out the comments in emails. There are about 50 students in the course so sending an email to each one would take a long time.
Here is the first script:

#!/bin/bash
HW_DIR=$1
SUBJECT=$2
ROSTER=CIS_111_RosterExport.csv
C_DIR=$( pwd )
cd $HW_DIR
for file in *; do
LAST_NAME=$( echo $file | cut -d _ -f1 )
FIRST_NAME=$( echo $file | cut -d _ -f2 )
FOUND=0
while read line; do
RLAST_NAME=$( echo $line | cut -d "," -f2 | tr -d \" )
RFIRST_NAME=$( echo $line | cut -d "," -f3 | tr -d \" )
if [ "$LAST_NAME" == "$RLAST_NAME" -a "$FIRST_NAME" == "$RFIRST_NAME" ]; then
EMAIL=$(echo $line | cut -d , -f4 | tr -d \" )
$C_DIR/sendmail "$FIRST_NAME $LAST_NAME" $EMAIL "$SUBJECT" "Results: " $C_DIR/$HW_DIR/$file
FOUND=1
fi
done < $C_DIR/$ROSTER
if [ $FOUND -eq 0 ]; then
echo "Oh NO!"
echo $file
fi
done


It takes as input the directory with the files I want to send and a subject line for the email.

And here is my sendmail script:

#!/usr/bin/osascript
on run argv
set _name to (item 1 of argv)
set _to to (item 2 of argv)
set _subject to (item 3 of argv)
set _body to (item 4 of argv)
set _attachment to (item 5 of argv)
tell application "Mail"
set theMessage to make new outgoing message with properties {visible:true, subject:_subject, content:_body}
tell theMessage
make new to recipient at end of to recipients with properties {name:_name, address:_to}
end tell
tell content of theMessage
make new attachment with properties {file name:_attachment} at after last paragraph
end tell
send theMessage
end tell
end run