A Promise To Go Green

FileDropper and SmashingApps are teaming up to do their part for the environment. Average American consumes more than 700 pounds of paper per year, highest compared to anywhere else in the world. Hundreds of thousands of trees are cut down per day to support the consumption of paper that can be easily avoided.

You can get in on the free storage action here.

I'll be honest... I'm already pretty green. I recycle and reuse as much as I can. Both sides of my family have always been pretty good about reducing and reusing any resources we can. I drive a fuel efficient sedan and make a (somewhat) good effort to drive at speeds which ensure high gas mileage.

BUT! I did sign up for a free account, so I'll make some pledges to go even further:

  • I pledge to start composting as soon as all of the snow is gone.
  • I pledge to never print something I can read digitally.
  • I pledge to make a (better) effort to drive at speeds which ensure high gas mileage.

I really enjoy the Paid Until date of 2038. Nice.

Originally via BeantownBloggery.

Jan 23rd, 2009

6 Words That Make Your Resume Suck

Are you experienced? Sexy. Rather than cite Jimi Hendrix on your resume, pleeease just say what your experience entails. Saying you’re experienced at something and giving the facts on that experience are two very different approaches.

Via Lifehacker

Jan 23rd, 2009

Book A Month - January 2009

For a couple of years, I've been trying to set aside some time to read regularly. I'd set goals. I'd put a stack of books next to my bed or desk and hope it would just happen. Nothing really worked.

I'm not 100% certain I've figured out the best way to get past my inability to act just yet, but I'm going to give it another go. This year I'm aiming to read a book a month. To motivate me, I'll post on the 1st of each month which book I plan to read, and whenever I finish it, I'll post about that. Yes, I'm a little late this month. Since it's, well, a bit later than the first, and I've actually already finished a book this month, I'll claim marginal success and be encouraged to succeed next month!

I read The Blogging Church by Brian Bailey and Terry Storch. I'd been thinking about how best to re-implement my church's web site1 and wondered if blogging would be a useful tool or not. I've always been a big proponent when it's the right fit, but my church isn't that big or that technologically advanced; it would be a big step for them. I'm still not sure it's the right time, but I'm going to put the tools in place to let them get started when and if they decide it's the right next step.

The Blogging Church helped me to put some ideas about blogging and its ministry applicability into better perspective. It was an excellent read, and certainly a very timely one as I'd just started the rebuild project when I received the book.


  1. Which isn’t quite done — the link is to the current, and not new, design.

Jan 20th, 2009

Inserting video content into a LiveJournal comment

Yesterday I was looking for good instructions on inserting video content into a LiveJournal comment (for someone else) and couldn't find any. So, after being successful, I felt it my geek duty to write up my directions in case, some day someone else needs them. It's a calling, I guess?

LiveJournal's post editor very easily supports inserting media content into posts. There's a semi-friendly GUI which lets you insert an <embed> block from any major video hosting site (e.g. youtube, photobucket, vimeo, etc.) quickly and easily. The comment editor, however, is just a textarea, so if you want any formatting you're left to write the HTML yourself. This is no big deal for some, but even most HTML novices only know the basic five html 4.01 tags (a, img, b, i, u), which are fine for 99% of such situations.

As an aside, I would love to rid the world of the non-xhtml-compliant formatting tags, but perhaps that's just me.

Posting video is a tad more work, though youtube, for instance, makes it painfully easy. They provide a handy dialog to the right of any video with all of the necessary <object> code. You can even customize the background, size, inclusion of related videos, etc. I have to hand it to the folks at youtubegoogle for understanding that their videos should be able to be seen from anywhere, not just their main site.

Well, anyway, youtube wasn't my problem. Photobucket was. They provide you with an <embed> link only, and while that's fine for the LJ post editor, it's incomplete. Here's a few quick steps to add the code necessary to adapt what Photobucket gives you to what is needed for a video to show up in a LiveJournal comment.

Photobucket

1
<embed width="448" height="361" type="application/x-shockwave-flash" wmode="transparent" src="http://i32.photobucket.com/player.swf?file=http://vid12.photobucket.com/albums/abc/UserName/Video/fileName.flv">

Youtube

1
2
3
4
5
6
<object width="480" height="295">
    <param name="movie" value="http://www.youtube.com/v/9hIQjrMHTv4&amp;hl=en&amp;fs=1"></param>
    <param name="allowFullScreen" value="true"></param>
    <param name="allowscriptaccess" value="always"></param>
    <embed src="http://www.youtube.com/v/9hIQjrMHTv4&amp;hl=en&amp;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="295"></embed>
</object>

Using the Youtube code as a reference, you only have to make a couple of changes:

1. Replace the <embed src=""> code with what Photobucket provides:

1
2
3
4
5
6
<object width="480" height="295">
    <param name="movie" value="http://www.youtube.com/v/9hIQjrMHTv4&amp;hl=en&amp;fs=1"></param>
    <param name="allowFullScreen" value="true"></param>
    <param name="allowscriptaccess" value="always"></param>
    <embed src="http://i32.photobucket.com/player.swf?file=http://vid12.photobucket.com/albums/abc/UserName/Video/fileName.flv" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="295"></embed>
</object>

2. Your photobucket video dimensions may be different, so you'll need to fix the height and width in both locations: the <object> tag and the <embed> tag.

1
2
3
4
5
6
<object width="448" height="361">
    <param name="movie" value="http://www.youtube.com/v/9hIQjrMHTv4&amp;hl=en&amp;fs=1"></param>
    <param name="allowFullScreen" value="true"></param>
    <param name="allowscriptaccess" value="always"></param>
    <embed src="http://i32.photobucket.com/player.swf?file=http://vid12.photobucket.com/albums/abc/UserName/Video/fileName.flv" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="448" height="361"></embed>
</object>

...and that's it. It's not at all difficult, but if you're someone (else) that doesn't need or want to know the difference between an <object> tag and an <embed> tag and why you need both to properly display inline video, a couple of simple steps to make your online life easier can make all the difference.

Jan 16th, 2009

Adding SyntaxHighlighter QuickTag Support to Wordpress

Edit: The latest version of the SyntaxHighlighter plugin, called SyntaxHighlighter Evolved, now supports version 2.0 and has built-in shortcode support which is way cooler than what I did here. :-)

I've been using SyntaxHighlighter to highlight code portions on my site for a while. Ok, I haven't posted in seven months, but when I was posting more often, I did all of the code formatting by hand, and the capabilities were about 90% of what I wanted them to be. There were a few brushes that didn't quite work right -- (The perl brush, for instance, replaced all of the >'s with >. Thankfully, one of the user community stepped up and fixed it.) -- but, on the whole, it really did a nice job. Posting said code, however, was a bit of a formatting pain and I was looking for a more convenient way to do so.

Scott Hanselman blogged that he uses a plug-in for Windows Live Writer called PreCode which works pretty well. Since I tend to use the web-based editor to craft 90% of my posts, that wasn't as appealing to me, though I did play with it a bit and should I ever convert myself to WLW, I'd certainly go that route. Also, I had finally converted the site to use a plug-in for SyntaxHighlighter which has really excellent BBCode support rather than the manual javascript includes that I had before.

The end result was that, to save myself about 2-3 minutes per piece of code, I added a QuickTag to the wordpress HTML editor so that I could wrap code in the proper [code=''] block with a single click. To so requires editing {wordpress_install_dir}/wp-includes/js/quicktags.js:

1. Just past line 125, add:

1
2
3
4
5
6
7
edButtons[edButtons.length] =
new edButton('ed_sh'
,'syntax'
,''
,'[/code]'
,'h'
);

2. A bit further down, in edShowButton(), add an additional else if() block:

1
2
3
else if (button.id == 'ed_sh') {
    document.write('<input type="button" id="' + button.id + '" accesskey="' + button.access + '" class="ed_button" onclick="edInsertSH(edCanvas, ' + i + ');" value="' + button.display + '" />');
}

3. Finally, you need to provide edInsertSH(). I just re-used edInsertLink() at what is now line 391:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
function edInsertSH(myField, i, defaultValue) {
    if (!defaultValue) {
        defaultValue = 'sh';
    }
    if (!edCheckOpenTags(i)) {
        var SH = prompt('Enter Syntax Type', defaultValue);
        if (SH) {
            edButtons[i].tagStart = "[code='" \+ SH + "']";
            edInsertTag(myField, i);
        }
    }
    else {
        edInsertTag(myField, i);
    }
}

If you happen to post a lot with a particular language, feel free to change the defaultValue to something more relevant. I chose sh because it's short. You could, alternatively, choose nothing.

Jan 13th, 2009

Holy Poop!

My post about making a floppy disk pen holder just made lifehacker! Sweet!

Jun 28th, 2008

Math Education: An Inconvenient Truth

I've been sitting on this post for a solid two months. I left it out of my baffle-clearing the other day because these thoughts are something I want to keep in text rather than being lost to the ether of ideas.

I am not a teacher, nor a parent of children attempting to learn math in a public school. I did, however, learn math in a public school. In addition (obvious pun), I am a geek who loves numbers and enjoys not needing a calculator for tipping, knowing how much something costs with sales tax, doing my own taxes, etc.

I also annually celebrate π day as well as Almost-Pi day (22/7), which is just about a month away.

I happened upon a youtube video the other day (embedded below) and found its topic irksome1. The idea that math pedagogy this country is trending toward what's "easier" and "fun" for "all students" will never create the next generation of engineers, accountants, computer scientists and other nerdy and non-nerdy professions who use even basic math skills on a daily basis. We need kids to struggle a little to find an answer, not learn shortcuts. The result is certainly important, but being able to readily produce results to other similar problems quickly and understand why you got the consequential result is essential.

Being able to quickly do 2- and 3-digit mathematics is a skill that my current generation arguably lost with the plenitude of calculators being produced. (Curse you Texas Instruments!) Some will disagree, but I think math should actually be a challenge that extends beyond simple addition and subtraction. By the end of 5th grade EVERY student should be able to do long division without hesitation or n-digit multiplication on paper of n+3 lines without fear of "OMG the numbers are so big, I'll never be able to do it!". True, both of these things still rely on simple operations adding/subtracting to a final value, but you have to know why that's so, and know that your method will work reliably every time to attack problems with larger and larger numbers without trepidation.

I also don't think it should be a tough thing to expect a 5th grader to do long division with decimal points, but this is coming from the guy who previously used prime number theory to determine why his php rand() function call was returning the number 24 somewhere around a quarter of the time it was run. Details.

Anyway, I was appalled. The adage of "I'm going to be an X, why would I ever need to know math" is a fallacious argument at best, and at worst, a total cop-out for the lazy. How about grocery shopping? Living securely on a budget? Buying a house and not getting screwed on your mortgage? Planning for retirement? Investing? Do you not need math for those things?2

Even if you reach for a calculator, you still need to understand what you're calculating! Do you plan to carry a calculator with you everywhere?

From the video, one of the methods is TERC's reasoning method, which seems to suggest that if kids feel their way through a math problem, they'll get smarter. The concept is based on talking out the simpler pieces of a difficult problem which you've seen before and using those simpler problems to build a solution to a harder one. That sounds familiar, but it isn't based on a repetitive set of steps, rather it's based on the pre-existing experiences and knowledge of the student, which will vary from student to student. "Well, I know that 10 x 20 is 200, so 13 x 19 (247) must be about 200."3

Reasoning is actually a really great technique for troubleshooting, attacking a complicated design issue, breaking out of prison with only a paperclip, duct tape and a screwdriver, etc. It is not, however, a smart way to teach arithmetic. You need to understand the fundamentals before you can use them to attack harder problems like, say, designing the next generation of fuel-efficient vehicles, or figuring out how to put a colony on Mars, or Warp Drive. With teaching methods like this, who is going to figure out Warp Drive?!?!

I know that's not really important as the answer is, as we all know, Zephram Cochrane, and he was probably home-schooled anyway.

Even worse, however, is their attitude about algorithmic techniques (e.g. traditional step-wise multiplication and long division):

The mathematical payoff is not worth the cost, particularly because quotients can be found quickly and accurately with a calculator.

With. A. Calculator.

throws a chair

Seriously? A math book that advocates that students should start relying on a calculator in grade school? Are you kidding me??

throws a second, larger chair

Way to tell kids their way too d–mn stupid to learn how to divide! They even have entire chapters dedicated to calculator use rather than entire chapters dedicated to, say, learning about how to do the problem yourself. Catering to the lowest common denominator4 is the best way to get smart people to stop trying, to disengage the interested few for the sake of the dumbest one.

The narrator's notes on the major problems of today's high school graduates' math skills from her personal experience of going back to college are telling:

  1. An inability to work alone to solve problems without checking in with other people.5
  2. A lack of fluency in the symbolic language of math or an ability to think logically.
  3. Lack of mastery and confidence with basic math skills (trig, algebra and arithmetic)
  4. Complete dependence on a calculator

All of these are frightening, but to me, someone who considers himself to be a somewhat critical thinker, the scariest is "an ability to think logically". How on earth are we supposed to expect a person to make a difficult decision on their own without a simple understanding of logic? Not even "if a and b then c", but just the basic concept of causality which is utterly crucial to critical thought.

Why should these people vote??? (Ok... that's a different post entirely.)

Every high school math teacher I had would be appalled that dependence on a calculator is now a common ailment of college students. Almost never was I allowed to use, let alone bring, a calculator to math class in high school. The only exception to that was that we used TI-8x calculators for some graphing examples in pre-calculus and calculus for a month or so.6

The TERC method also fails to introduce the simple concept of an algorithm at an early age. There is no concept of "finite steps" in a method requiring you to break a problem down into simpler pieces that you have to reason. Algorithm-based arithmetic is simple, straight-forward, and it always works.

So here’s the crux of what’s bothering me: By teaching someone the basic fundamentals and then the easier/more creative techniques, a few things happen:

  1. A person appreciates the techniques
  2. A person might see other better/faster/more productive techniques (read: innovate)
  3. A person can master a subject and can teach others
  4. Goto 1

Every single sports coach will tell you the same thing – master the fundamentals and you can be good. If you asked an athlete to go out onto the field and reason their way through the game, what would happen? Imagine tennis. Not so bad. Now imagine football. Rugby.

And, for the sake of further argument – Any student who wants to be a professional athlete and says they don’t need to know math has never seen the contracts those athletes sign. I passed Differential Equations (admittedly by the skin of my teeth) and I don’t understand how a modern baseball player gets paid. Seriously, professional athletes should be forced to have math degrees.

Well, from a school that’s actually going to teach math, anyway. My kids certainly won’t go to a school that teaches them how to “feel their numbers”.

puts both chairs back


  1. The video itself is great.

  2. I suppose you can pay someone to advise you, but then how would you know when they are ripping you off?

  3. Well, kinda, but what about 13456 x 19344.32? Is that as reason-able? What if you thought, for some reason, that 10 x 20 was 100? What happens to the reliability of your solution then?

  4. A concept which you probably won’t learn about from that textbook.

  5. Apparently TERC’s method suggests you discuss your thought process with others… what if they ALL think 10 x 20 = 100 ???

  6. Those of us who learned TI’s version of BASIC to write neat procedural programs were also given some lenience, but that’s because we already understood the math needed to write said programs. Admittedly, we were writing games…

Jun 20th, 2008

Set Up WebDAV for iCal Sharing on ubuntu 8.04

Enabling WebDAV for iCal publishing/sharing is fairly straightforward:

0. Install apache2 (if it's not already installed):

bash
1
sudo apt-get install apache2

1. Create a WebDAV directory in your DocumentRoot with the proper permissions:

1
2
mkdir -p /var/www/webdav
chmod -R 777 /var/www/webdav

2. Edit Apache2's dav_fs.conf file:

1
2
cd /etc/apache2/mods-available
sudo vi dav_fs.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
DAVLockDB /var/lock/apache2/DAVLock

<Directory "/var/www/webdav">
    DAV On
    DAVMinTimeout 600
    DAVDepthInfinity On

    AllowOverride AuthConfig
    AuthName "DAV Restricted"
    AuthType Basic
    AuthUserFile /etc/apache2/.htaccess

    Require valid-user
</Directory>

3. Create symlinks to the proper DAV module files: (Some of these will already exist. Leave them alone.)

1
2
3
4
cd ../mods-enabled
sudo ln -s ../mods-available/dav.load
sudo ln -s ../mods-available/dav_fs.conf
sudo ln -s ../mods-available/dav_fs.load

4. Create the 'AuthUserFile' indicated in step 2:

1
sudo htpasswd -m -c /etc/httpd/.htaccess webcal

5. Restart apache:

1
sudo /etc/init.d/apache2 restart

6. Publish your iCal!

Your url for publishing should now look like http://mywebhost/webdav/iCal/. Enjoy!

Based on a guide for Fedora at millan.info.

May 31st, 2008

Spread Firefox - Download Day 2008

Spread Firefox - Download Day 2008

May 29th, 2008

iTunes Playlist Export

One of my long-time gripes with iTunes is that the only ways to export its playlists are to text and xml which aren't particularly useful by themselves. I've been doing more processor- and memory-intensive work on my laptop lately, and wish to augment said work with tunes whilst also not killing my machine. iTunes isn't exactly a RAM-lightweight, so in situations like this I tend to fire up the ever-trusty install of WinAmp. Recently, however, I've been listening to the same massive playlist over and over again, and re-creating it in WinAmp would be a bit of a pain.

Lucky for me, someone else thought that automating this would be a good idea. Enter iTunes Export, which does exactly what it says it does, quickly and to several useful formats. As great single-purpose software does, it just plain works.

There are four screens, each of which are, as you can see, pretty straightforward. Screen 3 is where all of the fun options are. I didn't need to re-copy all of my music to a new location, but I can see how that would be useful if you wanted to, say, burn a DVD of a large playlist for someone who doesn't have iTunes. For me, the M3U export without copy was perfect, and I haven't opened iTunes in days.