70's futuristic technology

Programming focused drivel

Friday, October 19, 2007

I've never played with automating Adobe products, even though I do like to play with graphical programming.

Tonight for the first time I read the Adobe CS3 "Scripting Guide" pdf and gave it a go...

Patty made a cool template which we use with our button making machine. It is always tedious to copy and paste a grid of buttons once you are happy with once instance...

So I wrote this script which works with her template.

function not(value){
return ! value;
}

var layers = app.activeDocument.layers;
var layer = layers["Place Photo Here"];
if(layer == null || not(layer.locked)){
var origional = layer.placedItems[0];
for(var row = 0; row < 5; row++){
for(var col = 0; col < 4; col++){
if(row == 0 && col == 0){
//this is where original lives...
}else{
var aCopy =origional.duplicate();
aCopy.left = origional.left + (col * 135);
aCopy.top = origional.top - (row * 135);
}
}
}
}else{
alert("Expected a Layer \"Place Photo Here\"\nTo exists and be unlocked");
}

Labels:

Wednesday, August 22, 2007

New SICP focused blog
Updates to my SICP progress and thoughts will be posted on my livejournal account.
I will continue general techie focused drivel here.

Seattle SICP Study Group kick off meeting Thrs

The Seattle SICP Study Group kick off meeting is this Thursday 8/23 at Big Time Brewery 7pm.

Wednesday, August 15, 2007

I attended UW Technical Communications "New Perspectives" last night. It was a great set of presentations about how we find ideas and what to do with them.

Emma Rose talked about their search for problems in the former soviet union and finding mobile phone based solutions with her talk "Design Ethnography:
The Art of 'Deep Hanging Out'". Lee Lefever talked about a web application through the metaphor of throwing a party. His talk was titled "Your Online Community Is a Party
Waiting to Happen". Paul Ingram gave the low-down on "Inventrepreneurship". Jason Carmel also entertaining was a talk about website optimization entitled "Effective Use of Kittens: Site
Optimization and User Experience".

Labels:

Thursday, August 09, 2007

Timeline: New Mac Laptop thingie... buy or wait


  1. Jan 2001 Powerbook G4

  2. May 2001 iBook

  3. Jan 2002 14" iBook

  4. Jan 2003 12" Powerbook G4

  5. Sep 2003 new Alu 15" Powerbook

  6. Oct 2003 G4 iBook

  7. Jan 2006 15" Macbook Pro

  8. Apr 2006 17" Macbook Pro

  9. May 2006 13.3" Macbook



What I really want is a 7" or 10" UMPC thingie with multi-touch instead of keyboard and mouse. NAND flash hard drive for instant on/off. I want this to replace my PPC 12" Powerbook.

I put together the above timeline using MacTimeline.com to answer the question... Hold out, or update for now with a new 13" Macbook.

Hunch... Jan 2008 MacWorld San Fransisco, Apple will release my dream "MacPad", so I should base my decision on a 4 to 5 month window. Looks like an upgrade for now, or perhaps go back to Ubuntu at home and try out a UMPC form factor tablet thingie.

Labels:

Sunday, July 29, 2007

Seattle SICP Study Group



Attention Seattle area Programmers who are interested in learning Scheme or reading SICP.

I am organizing a Structure and Interpretation of Computer Programs study group. We will working though the book, videos, etc related to the excellent book by Harold Abelson, Gerald Sussman, and Julie Sussman. The group meets up once and week as well as discussing online. We will cover roughly one section of the book per week. It should take about 16 weeks to cover most of the book. We will be keeping a brisk pace, Fall 2007 break in Nov 07 for a month and then back at it Spring 2008.

If you are a graduate or undergraduate student, this would make a good independent study class or two class series.

There is a great SICP curriculum on MIT open courseware site. PLT Scheme provides a great implementation for use during the study group.

Nothing is set in stone for the Study Group structure. I started a Google Group
initially created as "restricted" and the postings invisible to non-members. We should decide as a group what the final policies are.

Interested? Questions? Email me My email address, Sorry no link to avoid Spam
or join the Google Group:
Seattle SICP Study Group on Google Groups.

Labels:

Thursday, July 26, 2007

I gave a brown bag lunch at work yesterday on a bunch of ReST research I had done over the last few months. It went pretty well, but I didn't make it though all 34 slides.

I uploaded the slides to Slideshare.net. You can check it out Rest vs SOA(P) ... yawn. Or below I will embed the flash movie.

It was also chosen as one of SlideShare's slideshows of the day and placed on their homepage.

Friday, July 13, 2007

Smell the taint
Okay, so I just lost 2 hours of my life that I will never get back do to a Ruby language feature and the built-in rss library's lack of a warning message.

I had a test with a path to an RSS feed, RSS:Parser.parse would return a fully populated object, but once I ran the real code it failed.

So I started to isolate the problem. The value coming out of the database looked the same as my test value.... wget, yep it's there....

db_value.class # => String
str_value.class # => String
db_value == str_value # => true
db_value === str_value # => true
Wow, there are the same! Why doesn't this work?

So I had to edit rss/parser.rb as root (?!?) to add print statements to isolate where the parser was rejecting the database value... drum roll... tainted?

Doh, String values obtained from un-trusted sources such as environmental variables, http requests, or databases are flagged tainted. A tainted string is equal to an untained string if the contents are the same. All I had to do was untaint the string before passing it to the parse method, but yikes.... There goes my 10:1 productivity ratio :)

Taint is a very cool language feature. RSS parse method really should have logged a warning that it ignores tainted sources though!

Labels: