Microsoft SongSmith… Let the Hilarity Begin
June 8, 2009 Oh So Random, Tunes and Grooves No Comments
I have to hand it to Microsoft… if this is a supposed to be a serious tool (the promo seems to sell it as such) then they should just throw in the towel now before they tarnish their image anymore. The idea behind SongSmith is that you sing the melody and it will auto-generate the backing music… I’m sure you can already see where this is going. Many people have run the lyric tracks from popular songs through it with funny results. I’ll let you find the actual SongSmith demo video on YouTube yourself… I’m posting my favorite SongSmith results below.
(requires Adobe Flash plugin… click HERE to watch it on YouTube)
(requires Adobe Flash plugin… click HERE to watch it on YouTube)
(requires Adobe Flash plugin… click HERE to watch it on YouTube)
Visualizing Obama’s $100 million Budget Cuts
April 28, 2009 Government, The Harsh Reality No CommentsMy friend Nick brought this video to my attention. It shows how small $100 million dollars is compared to the entire US budget. What really stood out to me was how much of the budget is dominated by welfare handouts… looks like over 80%. I guess we are “all socialists now.”
(requires Adobe Flash plugin… click HERE to watch it on YouTube)
Video: Charlie Hunter - Recess
April 28, 2009 Tunes and Grooves No CommentsI found my Charlie Hunter CD recently and I’ve been enjoying listening to him again. He’s an amazing musician apart from the fact that he plays the bass and guitar simultaneously. YouTube didn’t exist when I first got into him, and it’s nice now to be able to watch him play. Enjoy!
(requires Adobe Flash plugin… click HERE to watch it on YouTube)
If this video ever gets deleted from YouTube, you can download it HERE.
The Harsh Reality: Obama’s Deficit Reductions
April 24, 2009 The Harsh Reality No Comments
Well, I wasn’t planning of having 2 of these posts in a row be about Obama, but I guess the President is always an easy target.
President Obama claims that his 2010 budget will save American taxpayers $2 trillion over the next 10 years… $2 trillion compared to what? His numbers all depend on what the baseline is. According to Politifact, it appears Obama’s stretching the numbers, and rates his claim as “barely true”.
Keep in mind that the deficit is a number that reflects income minus expenses over the course of a single year…
When we talk about the deficit getting “smaller,” though, you have to ask “smaller compared to what?”
The answer: smaller than it would have been without Obama’s proposed changes…
Obama’s critics contend he’s inflating the baseline. In particular, they say, Obama claims we would have spent a pile of money on “overseas contingency operations,” which means the wars in Iraq and Afghanistan. Obama’s budget then posits that he wouldn’t spend that much money…
“It’s the equivalent to assuming an expensive vacation, then not taking it, and saying you’ve cut your family’s budget,” he (Brian Riedl) said. “To claim savings off that baseline is ridiculous.”
The left-leaning Center on Budget and Policy Priorities… said a more realistic number for deficit savings was $900 billion, a little less than half of Obama’s estimate.
… Obama’s budget increases revenues by letting the Bush tax cuts expire… The Obama budget document shows a deficit reduction of $636 billion over 10 years from those tax increases.
You can read the entire article HERE.
Sed Regular Expression: Find Lines Not Matching A String
April 17, 2009 Code Monkey No CommentsAfter some digging, I finally found out how to create a regex for Sed (stream editor) that will find a line that does NOT contain a particular string. First, I used ‘find’ to list all the *.cpp files in my source tree:
find . -name “*.cpp” -print
Then I piped the files to ’sed’ via ‘xargs’ (Note: replace the ‘-e’ with ‘-i’ to actually modify the files inline):
find . -name “*.cpp” -print | xargs sed -e ‘/STRING_TO_INGORE/! { d }’
The trick is adding the ‘!’ (exclamation point) after the search expression. Without it, ’sed’ would think you only want lines with the string, not without it.
This is different than another syntax I’ve seen used: /(?!STRING_TO_IGNORE)/.
Here’s another example. Say you want to replace STRING1 with STRING2 only if the first characters of the line (ignoring white space) are NOT “//”… i.e. skip the string replacement in code comments:
sed -i ‘/^[ \t]*\/\/.*/! { s/STRING1/STRING2/ }’
NOTE: ‘[ \t]*’ means ignore 0 or more spaces or tabs.
Snipers vs. Somali Pirates
April 15, 2009 Government, Tech and Security 1 Comment
I heard several people now tell me how amazing it is that the snipers landed 3 kills with 3 shots from a boat. Having known a sniper and seen him hit skeet one-handed with a 9mm, I can tell you that this doesn’t surprise me at all. I’m actually more surprised at the public’s reaction. Here’s a great excerpt from a DefenseTech article I read on the incident:
A shot of 80-90 feet — even at night and in rolling seas — is a cakewalk for DevGru SEALs.
“These guys can put three rounds onto the head of a quarter at that range,” Allen told me.
…A multi-thousand ton destroyer is a pretty stable platform in any but the most tumultuous sea states and makes dialing in a shot on an admittedly tossing life raft more doable — a smart platform for the Team to operate from. …
I think the American public doesn’t fully appreciate the talent of these teams. Props to SEAL Team VI!
Video: Mr T World Of Warcraft Ad
April 14, 2009 Oh So Random No CommentsI’m sorry, but this is too funny not to post…
(requires Adobe Flash plugin… click HERE to watch it on YouTube)
If this video ever gets deleted from YouTube, you can download it HERE.
Find & Replace in Files on Linux
April 13, 2009 Code Monkey 2 Comments
A lot of solutions I’ve found for recursively replacing text in files is implemented using shell scripts, perl, php, or some other inconvenient way. Rushi got it right by using the Linux command line. Here it is (slightly modified) from his blog:
find . -name “*.cpp” -print | xargs sed -i ’s/[find]/[replace]/g’
where “[find]” and “[replace]” are the things you are searching for and substituting.
To search files with multiple file extensions, use:
find . -name “*.cpp” -o -name “*.h” -o -name “*.c” | xargs sed -i ’s/[find]/[replace]/g’
ADDED 4-13-2009: See comments for other variations.


