Renderings of measuring devices in an oak case – if each square formed a pyramid to the center of the earth, the enclosed shape would contain 1 gram of soil for every 0/1 on my hard drive.
Label Tests
Test labels for an upcoming sculpture/measuring device, based on vintage machine labels.
Bead Counter Mechanism
Law & Order Stats: Gender and Computer Counts
What are you looking at? From the final episode (season 20, episode 456).
Having finally finished all 456 episodes of “Law & Order” (totaling approximately 20,520 minutes or 342 hours or 14.25 days) I now have just under 11,000 screenshots of computers and people using them. While watching, I also gathered extra data: I recorded the victim and perpetrator’s gender, as well as the total number of computers per episode. Below are some thoughts on those stats, for those interested such ephemera.
While the Law & Order Database has some great data, surprisingly it is missing the gender of victims and perpetrators. Since the show is “ripped from the headlines”, it is especially interesting to compare those numbers from the show with real murder statistics in the US.
Continue reading “Law & Order Stats: Gender and Computer Counts”
0s and 1s > Pyramid
A lot of math today: if all the zeros and ones on my hard drive weighed 1 gram, they would form a pyramid running from the center of the Earth to a base of 6.2cm and 5.5cm respectively. If tipped on its side, that would mean the pyramid would run from NYC to Torino, Leipzig, Berlin, Senegal, or La Paz.
Map radius calculations via: Free Map Tools
Counting 0s and 1s
For the past several weeks, my (old) tower has been churning away, counting the number of 0s and 1s in a clone of my laptop drive – the sum total of all my files at present. The result:
0: 385,459,478,877
1: 297,575,823,747
How Many Lines of Code Did You Write This Year?
Filling out my pre-tenure paperwork (blech) I started to wonder. I sure wasn’t going to count them by hand, so I wrote a Processig sketch bash script to find out. Result: 208 sketches for a total of 20,944 lines or 590,670 characters! (2010: 232 sketches, 19,786 lines, 563,083 characters; 2012 so far: 9 sketches, 879 lines, 27,533 characters)
UPDATE:
The previous version used a Processing sketch to find the information, which seemed poetic. However, it seems that Java doesn’t do file handling very cleanly (curse you File variable). As I went to bed, it seemed a bash script would be much cleaner and likely faster, so I got up today and wrote one. Sorry Windows users, this is likely Mac/Linux only. You can still download the Processing sketch and try it yourself.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
#!/bin/bash # Jeff Thompson | www.jeffreythompson.org # enter the year you're looking for and the path to your Processing sketchbook lookFor="pde" # file extension to look (period optional) yearCreated="2011" # year to look at pathToCheck="/Users/jeffthompson/Documents/Processing" # where to look # pathToCheck=$HOME # alternatively, look everywhere (may be VERY slow) dateRange="01-Jan-$yearCreated" # set date to the first of the year we're looking for echo "" echo "HOW MANY LINES OF CODE DID YOU WRITE THIS YEAR?" echo -e "Path:\t\t$pathToCheck" echo -e "Extension:\t$lookFor" echo -e "Year:\t\t$yearCreated" # note: we don't need the . in front of the extension since * will match all preceeding characters find $pathToCheck -type f -name \*$lookFor -newermt "$dateRange" -and -not -newermt "$dateRange +12 month"> "$lookFor_files.txt" fileCount=$(wc -l < "$lookFor_files.txt") lineCount=0 charCount=0 while read line; do lines=$(wc -l < $line) # count lines in the file let "lineCount += lines" chars=$(wc -c < $line) # count characters let "charCount += chars" done < "$lookFor_files.txt" rm "$lookFor_files.txt" # be nice and delete the working file (optional) echo -e "Result:\t ${fileCount} files, ${lineCount} lines, ${charCount} characters" exit |