16
May 12

Please Teach How To Code

I hate posting links about broadly discussed topics. I thought hard about the latest discussion1 around Jeff Atwood’s post and I still had something to say, so here it is.

To those who argue programming is an essential skill we should be teaching our children, right up there with reading, writing, and arithmetic: can you explain to me how Michael Bloomberg would be better at his day to day job of leading the largest city in the USA if he woke up one morning as a crack Java coder?

—Jeff Atwood

Jeff is very smart. I almost always agree with his posts, but I think he gets this one wrong.

Traditionally we2 have focused our primary educational institutions on Language, Math, Science and History. The presumption has been that teaching these basic topics also provides basic problem solving and critical thinking skills necessary to participate in society in a constructive way. Language provides communication skills. Math teaches us rules based problem solving. History teaches a sense of place. Science teaches general problem solving. By gaining a basic understanding of each area, a new graduate could competently perform a number of basic jobs.

Our social needs have out grown our educational curriculum. Basic empolyment now requires some fundamental understanding of computers. While we debate net neutrality and the internet as a basic human right, we are producing high school graduates that lack even the most rudimentary understanding of the tools needed to access the internet.

Later, Jeff writes:

The general populace (and its political leadership) could probably benefit most of all from a basic understanding of how computers, and the Internet, work. Being able to get around on the Internet is becoming a basic life skill, and we should be worried about fixing that first and most of all, before we start jumping all the way into code.
Please don’t advocate learning to code just for the sake of learning how to code. Or worse, because of the fat paychecks. Instead, I humbly suggest that we spend our time learning how to …
Research voraciously, and understand how the things around us work at a basic level.
Communicate effectively with other human beings.

At once, Jeff invalidates his own argument and gets to the heart of my philosophy.

I agree that teaching to code for a “fat paycheck” or just to make an app are poor drivers. But teaching to code is valuable for more fundamental reasons. Our Science education in primary school is failing. On average, people leave school without the most fundamental understanding of the scientific process. At all levels of childhood we have perverted science education. Science has become CSI and chemistry sets are no more than baking soda. Programming gives us a another method for teaching the same critical thinking skills. It gives us a method that provides an immediate benefit to a 10 year old.

I can teach a 10 year old how to measure a reaction rate, but the concept will always remain abstract and the process will always seem arcane and anachronistic. However, teaching a kid to code with something like Scratch teaches them the same critcial skills and shows them how it relates to their world.

I’m a realist. I would love for everyone to learn science. I would really love it if people understood the data supporting evolution, global thermodynamics and vaccines. The reality is that we are not teaching those things well and students are not learning the skills necessary to teach themselves.

As a scientist and a hacky computer programmer, I see a direct parallel between the two. They both teach the following skills:

  • Abstract problem solving through visualization
  • Cause and effect
  • Hypothesis generation
  • Hypothesis testing
  • Record keeping

But science and programming teach two important lessons as well:

  • The value of well executed failure
  • There is no such thing as a status quo

In all of these discussions, I replaced the word “programming” with the word “science”. If I may, I will take some liberty and rephrase Jeff’s question:

To those who argue science is an essential skill we should be teaching our children, right up there with reading, writing, and arithmetic: can you explain to me how Michael Bloomberg would be better at his day to day job of leading the largest city in the USA if he woke up one morning as a crack scientist?

Yes I can.


  1. Are we still calling it that when it all takes place on Twitter and blogs? 

  2. I am writing from the perspective of an ignorant American, because that’s what I know best. 


16
May 12

Byron Sonne [Link]

Remember kids, even when the judicial system works, you’re still pretty much screwed.

A moment of sanity from the Canadian judicial system, and all it cost was Sonne’s marriage, house, and freedom.


16
May 12

Selenophenol [Link]

From In the Pipeline:

The biggest stinker I have run across. . .Imagine 6 skunks wrapped in rubber innertubes and the whole thing is set ablaze. That might approach the metaphysical stench of this material.

Also known as things I have regrettably worked with. Every step of the chemistry sucked. Luckily, I spent so much time in lab, no one ever noticed that my skin and hair stunk for a couple of months. So when I see dapper scientists in nice white coats and perfect teeth, I known that it is mostly bullshit. A lot of basic science is done by smelly, unkempt, poorly dressed and often hung-over graduate students regularly sacrificing their wellbeing.


15
May 12

$10K to $15K a Day in Donations [Link]

The biggest Kickstarter in the world is still Congress. From This American Life:

I needed to bring in ten to fifteen thousand dollars a day [for two years]

Think about that. One congressman. $10K-$15K a day to get reelected. Not to build something. Not to create infrastructure. It’s to run ads to buy votes from people that do not understand what they vote for.

Another great one about the return on investment for a giant corporate tax break called the American Jobs Creation Act1:

22,000%. So For every dollar on average these firms spent on tax lobbying they received $220 in tax benefits from this repatriation provision.


  1. It passed in 2004. Sure, it had other provisions tacked on, but it was really a huge tax shelter. How’s that job creation working out? 


15
May 12

The Janitor from Columbia [Link]

It’s a feel good story about reaching beyond limitations and finding new potential. But I think it highlights how much a society loses by not creating an inexpensive route into higher education. Is there any downside to getting an education other than debt?

By way of Kaush’s Journal


15
May 12

Plumbum [Link]

Plumbum is a Python library for cross platform shell commands in Python? I’m not sure when I would use this instead of the Python OS modules. Maybe if I wrote more scripts that were intended to be cross platform. It’s something interesting to play with.

By way of Clark’s Tech Blog.


14
May 12

Purposeful Mistakes

This post at The Visual Exegesis was entertaining, but it’s the video embedded half way down that really stuck with me.1 I wouldn’t consider myself a comic book fan. I like them well enough and I have my own personal preferences, but I am no Andy Ihnatko. That also means I don’t really know anything about Neal Adams who is the artist in the video.

Here’s the video:

I watch that video and I see someone making hundreds of directed mistakes. He has many false starts and ideas flow out onto the page while he works through his process. He doesn’t seem to filter out his ideas, but rather builds upon each one and abandons what he doesn’t like. Part way through he obliterates almost the entire work except for the skeleton left by all of those mistakes. His art is made from continuing to move forward beyond the individual faults and failures. His art is a product of many mistakes he makes on purpose in pursuit of the greater perfection.2


  1. Sorry, I don’t remember where I first heard about this. I have some strange sources in my RSS feeds. 

  2. I’m not a philosopher, this is just something I thought was “magical”. I know it made me pause and think about how I make things. Before anyone comments, I also know a purposeful-mistake is an oxymoron. Some people take all the fun out of the internet. This footnote is for you. Dicks. 


14
May 12

Haircut [Link]

Am I the only one that wants more political writing from Andy Ihnatko?


14
May 12

Purposeful Mistakes

This post at The Visual Exegesis was entertaining, but it’s the video embedded half way down that really stuck with me.1 I wouldn’t consider myself a comic book fan. I like them well enough and I have my own personal preferences, but I am no Andy Ihnatko. That also means I don’t really know anything about Neal Adams who is the artist in the video.

Here’s the video:

I watch that video and I see someone making hundreds of directed mistakes. He has many false starts and ideas flow out onto the page while he works through his process. He doesn’t seem to filter out his ideas, but rather builds upon each one and abandons what he doesn’t like. Part way through he obliterates almost the entire work except for the skeleton left by all of those mistakes. His art is made from continuing to move forward beyond the individual faults and failures. His art is a product of many mistakes he makes on purpose in pursuit of the greater perfection.2


  1. Sorry, I don’t remember where I first heard about this. I have some strange sources in my RSS feeds. 

  2. I’m not a philosopher, this is just something I thought was “magical”. I know it made me pause and think about how I make things. Before anyone comments, I also know a purposeful-mistake is an oxymoron. Some people take all the fun out of the internet. This footnote is for you. Dicks. 


14
May 12

The New Simperium API is the Future of Data Availability

Simperium is the company behind Simplenote. It’s now also a data syncing service. Simperium announced the Simperium API and it looks nothing short of amazing.1

Here’s a fantastic example from their API Samples page:

Simperium is offering libraries to incorporate this impressive data sync into iOS, Javascript and Python based apps.

There are a number of other concept videos showing how developers can think about the Simperium service. I’m not sure if this could be done with iCloud in iOS, but I do know that this is not something that can be done with JavaScript and iCloud. To be fair, this is not like iCloud’s data sync. Simperium is syncing much more simple (and much smaller) objects. JSON is really just text.

Just some highlights from the Simperium overview:

Simperium persists your data for you in buckets. Buckets are application-wide namespaces and exist as a convenience for you to organize your application’s data. Every Simperium object is JSON data that is stored in a bucket.

Simperium uses an inherently schema-less datastore. Objects in the same bucket need not have the same structure…

If you are a fan of the Simplenote versioning system, Simperium provides that for all objects automatically. Grab the scrubber and watch the data roll back through time. Restore to any point along that timeline. Now imagine that option in sketching apps, games, or image editors.

Proper versioning and roll-back is something that I would like to see spread into new contexts. Rather than roll back an entire document, I would love to retrieve an old state of an isolated sentence or paragraph.

While the Simplenote app has not changed much in the past 3+ years, behind the scenes they were building the future. I have high expectations for this project.

The three integrations I expect in apps now: Dropbox, TextExpander, Simperium.

By way of Shawn Blanc


  1. No, I’m still not using Simplenote. I can’t go back until it stops messing with URL encoding in my text notes. That doesn’t detract from how impressive this service is. 


12
May 12

Upload to Amazon S3 from Dropbox using Hazel

I’ve been fiddling with my Hazel Dropbox to FTP rule lately. But in the middle of it, I received a polite prompt to make it work with Amazon S3 instead. I’m a sucker for learning something new so I made this Python based Hazel rule.

I Installed the boto module for working with Amazon AWS. This is a mature library of methods for doing all sorts of stuff with Amazon AWS. I really only needed a few methods though.

sudo easy_install boto

Then this script goes into a new Hazel rule.

import boto
from boto.s3.connection import S3Connection
import os
import sys
import urllib
from datetime import date, datetime
import subprocess
# This is how Hazel passes in the file path
hazelFilePath = sys.argv[1]
# Obviously, you'll need your own keys
aws_key = 'AWESOME_KEY'
aws_secret = 'SUPER_SECRET_KEY'
# This is where I store my log file for these links. It's a Dropbox file in my NVAlt notes folder
logFilePath = "/Users/weatherh/Dropbox/Notes/Linkin_Logs.txt"
nowTime = str(datetime.now())

# Method to add to clipboard
def setClipboardData(data):
    p = subprocess.Popen(['pbcopy'], stdin=subprocess.PIPE)
    p.stdin.write(data)
    p.stdin.close()
    retcode = p.wait()

# This is the method that does all of the uploading and writing to the log file.
# The method is generic enough to work with any S3 bucket that is passed.
def uploadToS3(localFilePath, S3Bucket):
    fileName = os.path.basename(localFilePath)
    # Determine the current month and year to create the upload path
    today = date.today()
    datePath = today.strftime("/%Y/%m/")
    # Create the URL for the image
    imageLink = 'http://'+urllib.quote(S3Bucket+datePath+fileName)
    # Connect to S3
    s3 = S3Connection(aws_key, aws_secret)
    bucket = s3.get_bucket(S3Bucket)
    key = bucket.new_key(datePath+'/'+fileName)
    key.set_contents_from_filename(localFilePath)
    key.set_acl('public-read')
    logfile = open(logFilePath, "a")

    try:
        # %% encode the file name and append the URL to the log file
        logfile.write(nowTime+'  '+imageLink+'\n')
        setClipboardData(imageLink)
    finally:
        logfile.close()

# How's this for terrible design. The actual body of the script is one line. I'm my own worst enemy.
uploadToS3(hazelFilePath, 'media.macdrifter.com')

This is very similar to the FTP rule. I add a file to a folder and Hazel will upload it to the designated S3 account and add a link to my Link Log file in NVAlt and my clipboard stack. Since the folder I use is in Dropbox, I can add an image or video right to Dropbox and get back an Amazon S3 link.

The Link log looks something like this:

Notes

My S3 bucket name is “media.macdrifter.com” so that I could use it as a subdomain for this site.

I structured the bucket folders like they are in my WordPress content directory. They exist as YEAR/MO, for example “2012/05″. I added a couple of extra lines to get this structure for me. If the folder does not already exist, the new_key method will create it for me.

If a file already exists with the same name as the one being uploaded, this script will overwrite it without warning. You’ve been warned.

It’s actually convenient that files will be overwritten. It means I can browse to the Dropbox folder that Hazel is watching and edit the image directly. Any saved changes are immediately pushed up to Amazon S3. It’s like directly editing images on S3 (with Acorn of course)

I don’t really use Amazon S3 for image hosting. I have no problem hosting the images myself. This was just something that struck me as interesting and someone else might find it useful.

I was quite impressed with the Boto module’s ease of use. Amazon’s S3 was also fairly easy to get going with. Configuring the CName on my DNS was the hardest part of the entire process. If I didn’t care about having a nice looking URL for the hosted images, I could have skipped the CName and gotten on with wasting my time in some other way. I like the nice looking URL’s though.


11
May 12

Read Later Update [Link]

Read Later is one of my favorite Mac apps and one that I use the heck out of. Macstories points out how good it is getting for Pocket users1. What a great app for archiving.

Still on my wish list: support for downloading a lot more records and better search functionality. Those are minor wishes.


  1. I don’t use Pocket. I already have too many buckets. 


11
May 12

Humanity [Link]

There is nothing that anyone can do more important than helping a child that is hurting.1

I think most charities are a scam but St. Jude Children’s Hospital is one of the few I give money to regularly and include at the top of my donations page. Thomas Brand says it better than I have.

There’s a lot of good things to do on the internet today.

By way of 512 Pixels


  1. If you think your job is important, it’s highly likely it is not. That’s ok, but try not to get too high about yourself. 


11
May 12

American Prometheus

American Prometheus is the biography of American scientist Robert Openheimer. It’s a wonderful and sad story of a passionate person caught in the machinations of lesser men.

I listened to the 26 hour audio book which is tolerable but not great. As an unabridged audio book it is complete but somewhat disjointed. It was compeling and fascinating none the less.

I can recommend this book to anyone that has the slightest interest or enjoyment of any of the following topics:

  • Science
  • History
  • Politics
  • American Culture
  • The Manhattan Project
  • Psycology
  • Beautiful language
  • The human condition

10
May 12

The Best General Purpose Pot

I bought this 7.5 quart cast iron dutch oven from Amazon.1 It’s a little pricey at $80 but it is the single best pot I own. It is non-stick thanks to the enamel coating. It’s very easy to clean. But the real benefit is that it holds an entire meal and cooks better than an pot or device I have used. I threw in a large pack of chicken quarters with carrots, scallions, garlic, celery and tomatoes, cooked in the oven for two hours and got out a terrific meal. There’s really no reason to own a crock pot or many other pots now that we have this 20lb beast.

Cast iron is the future.


  1. Affiliate link