Monday, December 26, 2011

Edith Page video

This is a video I made of Edith Page, a very special person to me. I shot this video about 10 years ago but just got around to making an edit in the last few days. It's filled with good Christmas spirit. :-) (I just talked to Edith today -- she is still doing well at 93!)

Saturday, November 12, 2011

Infinite Uniqueness -- MAKER edition


This is two of my students working on cutting out their clothing designs. The class is about creating parameterized clothing and the students have created some really fun designs. See an example of how it works here at happyfuncoding. Scroll down to the twiddler section, press the "Move this panel to side of canvas" link and try adjusting the various parameters by dragging up and down on them to change the clothing design. Works best in Chrome.

Monday, October 10, 2011

More cathedral

More progress on my algorithmic cathedral. This is a fun little project. :-)

Thursday, October 6, 2011

Algorithmic cathedral v 1



Inside my algorithmic cathedral -- code generated in Sketchup Ruby. Standing in the main nave looking up and towards the side nave. Next I'm going to lessen the bulk of the cross vaults and build a roof (which is going to be hard!)

Monday, September 26, 2011

Acrophilia



The other day I made up a game with Leah Davis. I've play-tested it three times now and it is certainly the funniest game I've ever played -- it induces almost nonstop laughing.

The game is simple. Each player takes seven letters from a scrabble set. One player is declared to be the judge on the first round. The judge uses his or her letters to make a acronym-sentence: one letter per word. Everyone else then makes up their own acronym-sentence with their letters and tries to make their sentence a logical follow-on of the previous sentence(s). The judge writes down all of the sentences and picks a winner based on whatever criteria he or she likes. The winning sentence is then moved into the middle of the table, the judge rotates one position, and another round ensues until there are no more letters.

Additional rules:
  • You must use all of your letters, no skipping "a", "of", "the", etc.
  • You can add any amount of punctuation you want. The more, the better.
  • Bonus points for punning or word-play
  • Bonus points for proper names
  • Bonus points for a sentence that is a direct response to the previous one.
  • Super bonus if you can make a palindromic sentence where you use all of the letters forwards and backwards to make a 14 word sentence!
A warning, this game gets ridiculous very fast. In all three play-tests it turned obscene, racist, sexist, etc. within a few turns. I've kept some of the play papers but decorum prevents copying any of it here. :-)

Friday, September 23, 2011

Happy Fun Coding v 2.0 now up!



After a massive re-write, Happy Fun Coding version 2.0 is now up. New features include: better UI, source code highlighting, ability to change the canvas size, and better program navigation.

Tuesday, September 13, 2011

Cathedral in sketchup, v0.1


I got it into my head today to create a cathedral in Google Sketchup. I really want to do this my writing a Ruby Sketchup plugin so that I'd have an all parameterized cathedral, but I started by just messing around by hand in the editor. It's tricky stuff getting Sketchup to make the weird geometry -- doing it algorithmically is going to be easier in some ways.

Friday, August 19, 2011

Web development testing: Cucumber & Capybara


It's taken days to get my head around these web testing tools and more to get the tools working, but I finally got cucumber and capybara to work under both Mac and Windows.

I originally thought that cucumber seemed too high level but now that I've got it running, it's actually kind of fun and nice. Here's how it works.

Cucumber (and its backengine(s)) is an integration testing tool -- that is it tests the whole chain with a simulated web browser using the capybara gem as the back-engine interface to the simulated web browser. This is in contrast to rspec which is opening the models and controllers as actual ruby objects without the browser -- thus rspec is more limited in scope but way faster. You can apparently make cucumber/capybara do ajaxy things with special flag but I haven't tried that yet -- so far I've just filled in a form and pressed buttons without ajax.

Before running cucumber there's a bunch of little details you have to get right -- gems, dev kits, and then generate cucmber blah blah blah. Too much to document here. It was a multiday pain and required that I get a Gemfile from Sarah who had versions that worked. Also, I only got it working under rails 3 so I had to install ruby version managers and other stuff. It took tons of googling to get it all working.

It works like this. The cucumber generator creates a directory under the project root called "features" and under that folders called "step_definitions" and "support".

Into the features folder you put ".feature" files. Here is an actual one I just wrote (excuse the line spacing, this blog doesn't deal with "pre" tag very well):

Feature: Create account

As a new user
In order that I be able to store programs and data permanently
I want to be able to create an account

Scenario: Create a valid account
Given I am on /users/new
When I fill in the following:
| Name | zack |
| Password | password |
| Confirmation | password |
And I press "Create account"
Then I should be on /users/account_created
And there should exist a user named "zack"

Scenario: Create a invalid account due to mismatching passwords
Given I am on /users/new
When I fill in the following:
| Name | zack |
| Password | password |
| Confirmation | passwo |
And I press "Create account"
Then I should be on /users
And I should see "Errors"
And there should not exist a user named "zack"


The first four lines are pure documentation, cucumber ignores them. But the madlib style is standard and quite nice.

Each scenario is what's actually parsed. Think of each line under the scenario as a function call with various parameters.

The "function call" of the line is actually a regular expression that is put into the step_definitions folder. Cucumber installs a bunch of default "steps" (think functions) that are very handy and are in the step_definitions/web_step.rb file. I'm using a bunch of them here. Here's a sampling of one:


Given /^(?:|I )am on (.+)$/ do |page_name|
visit path_to(page_name)
end


That is a "function" definition that says: when you see the pattern "Given I am on XXX" then run the command "visit" which is a capybara command that loads that page in the simulated web browser.

You can either use their existing steps or you create your own. If the step isn't found it emits a handy regular expression that you can copy and paste into your own step file.

So the long and short of it is that cucumber is a list of actions in very readable language that drives "steps" (i.e. test functions) in the "steps_definitions" folder that calls capybara (and maybe other gems?) to do the heavy lifting of running the simulated web browser.

The output of cucumber is a fairly well formatted color output that highlights each step in green if it passed, red if it failed, and yellow if it is pending (not yet implemented).

As Sarah said to me, it's actually kind of fun. You have a sense of pseudo-programming gathering your thoughts together as you edit the feature file and obviously the feature files are easy to read by non-technical types as they have no magical code incantations.

Thanks to @fablednet for help!

Saturday, July 30, 2011

Vitalism: alive and well


Yet another demonstration that the intuitive ideas of vitalism are alive and well. This NY Times article about Joyce's RNA self-replicator is dripping with vitalistic language starting with the title. For example: "They can make their own RNA and see if they can then breathe life into it."

Of course there is no bright line that separates the living from the inanimate -- at least they point out that "Biologists do not agree on what the definition of life should be or whether it is even useful to have one.". As Andy Ellington says: "'Life' is a word for poets, not scientists."

Geometric proof of the dot product



This is a geometric proof of the dot product that I submitted to Mathematics Magazine for the "Proof without words" section. They rightly rejected it because it's only valid for the first quadrant. Cynthia and I tried to rework it for the other quadrants but it lost its elegance so we gave up.

Wednesday, July 27, 2011

(Oldish) images of my house

These are nice pics that Bruce and Anne had taken of my house soon after it was completed.

Sunday, June 19, 2011

Tutorials #10, #11, #12, #13

Tutorials #10, #11, #12, #13 are now posted on happyfuncoding.com

Enjoy.

Friday, June 17, 2011

Vector Projection Demo



Use your mouse to move around vector A

Happyfuncoding Tutorial #8 -- for loops

Trigonometry refersher.



This is a simple little reminder of cos and sin written in happyfuncoding.com Roll your mouse over it.

Thursday, June 16, 2011

Tuesday, June 14, 2011

Monday, June 13, 2011

Saturday, June 11, 2011

Embed of Happyfuncoding content!



You can now embed programs from happyfuncoding.com onto your own website as demonstrated here!

Monday, June 6, 2011

Hypatia artwork by Hollyana Melear






I commission a triptych about Hypatia from my friend Hollyana Melear for my garden. For those who don't know, Hypatia was a nerd martyr -- the only female curator of the great library of Alexandria, she was kill by an angry Christian mob for being an smart uppity female.

There are three panels shown from left to right. The center has Hypatia holding the scroll of knowledge while the angry Christian mob attacks her. Some versions of her demise have her splayed with an abalone shell so there's a real abalone shell in the center bottom. On the left panel is the light house of the Alexandria as the mob chases her down under the christian cross while on the right panel Cyril plots her demise while destroying a scroll symbolic of rationalism. Incidentally, Cyril, who many have blamed for orchestrating her murder was sainted for his troubles.


Happy Fun Coding Tutorial #2 -- Variables and animation



Happy Fun Coding Tutorial #2 -- Variables and animation


Sunday, June 5, 2011

Happy Fun Coding Tutorial #1




This is the first of many tutorials I'm going to make about programming with happyfuncoding.com. If you've been curious about programming, it doesn't get any simpler than this!

Wednesday, June 1, 2011

More happyfuncoding!


In the last few days I've put a lot of work into happyfuncoding.com -- my collaborative online programming environment that creates a place where you can fiddle with graphics code in an easy to use Javascript environment. It includes lots of samples, tutorials and challenges as well as a wiki so more experienced programmers can write tutorials and challenges for less experienced programmers.

Please, please pass it along! It needs people using it! :-)


Thursday, May 26, 2011

happyfuncoding.com



I'm please to announce the first version of my new learn-to-program environment called "happyfuncoding.com". It's a Javascript environment that allows novice programmers to create simple graphical programs with minimal fuss all from the web browser.

It also features an editable mini-browser with tutorial and challenge sections where more advanced programmers can create content to teach and challenge less experienced programmers.

I haven't added much in the way of tutorials yet, so if you're a programmer please come and help fill it out!

If you've never programed before, here's your chance to write your first "Hello world!"

Create an account to save your programs or edit the pages. Please report bugs by editing the "bugs and features" page off the home page in the mini-browser.

Tuesday, May 24, 2011

Traitwise, PGP, data standards and the OSI model


I spent the day with Jason Bobe of the Personal Genomes Project. PGP is a public effort sequence a large number of genomes. Traitwise has formed a partnership with them to serve as part of the phenotyping solution.

Jason's role at PGP puts him in the center of a growing number of people who have competing desires to control / provide services around personal health (or "quantified self" as some are calling it). Jason therefore is in the unique position to promote and evangelize.

An interesting part of the conversation focused around the need for open standards of public health and trait related data. I used the OSI networking protocol framework as a model of how conceptual standards can be incredibly useful to increase innovation. One of the best things about the OSI model is that it didn't attempt to actually define any standards but rather it serves as a conceptual framework that defines how standards interface with each other. From that model has emerged a number of interoperable standards at all levels and without it we certainly wouldn't live in the networked world we live in.

One of the aspects of the human data problem is privacy which has "levels of data privacy" and this, it occurred to us, was somewhat analogous to the OSI layer framework.

Layer 1 - Raw identifiable data (post-privacy)
Layer 2 - Anonymized raw data (HIPPA compliant)
Layer 3 - Algorithmically open data (sand-boxed, machine readable)
Layer 4 - Aggregated data


Layer 1 data is non-private. It requires a consent certificate of some sort to go along with the data.

Layer 2 data is considered by many scientists to be adequate for protection in many research circumstances and indeed HIPPA seems satisfied with this. However, for open projects such as Traitwise I personally don't think that it suffices as de-anonymization has been shown in many circumstances such as the infamous AOL search records scandal.

Layer 3 is perhaps the most interesting and least discussed. A Layer 3 system would allow an algorithm written by a researcher to run against raw data but within a sandbox that only allows the aggregated results to emerge. I haven't put a huge amount of thought into this, but it seems plausible to write an API that could enforce such constraints. But, even without such an API, a human code reviewer could accomplish the same thing.

Layer 4 is what Traitwise and others are currently focusing on -- aggregated data that is not deanonymizable.

This is just one aspect of the data and communications problem, but it is an important one and it was fun talking to Jason about it today.

Monday, May 16, 2011

Freshman Research Initiative -- First Semester Results




We just finished our first semester of the Freshman Research Initiative on Genetic Algorithms for Pattern Design. We paired up students from Computer Science with students from the Fashion/Textiles department and had them create algorithmic patterns that could be bred genetically. The results are on this page. Next semester we're going to print these patterns on fabric and make clothing from them.

Sunday, February 27, 2011

Fire pit - Day 2


Filled in the seat corner.

Sunday, February 20, 2011

Fire pit day 1


I started on the brick fire pit in the back yard. There'll be one more layer on top of this one.