Morning Linkage (Apr 7)

For play. Using a “rub­ber band” inter­face to explore words and their
connections:
http://www.visuwords.com/
http://www.visualthesaurus.com/

Reporting on Reading Rights and the National Federations of the
Blind’s protest of Amazon’s cav­ing to the Author’s Guild over the
text-to-speech fea­ture of the kin­dle. Show some love. Write a letter.
http://gadgets.boingboing.net/2009/04/06/reading-rights-coali.html

Best round up of the report­ing on the Google books set­tle­ment. I’m
still work­ing my way through the links here.
http://lisagoldresearch.wordpress.com/2009/04/05/the-controversy-over-google
‑book-search/

more tomor­row,

Morning Linkage (Apr 6)

In case you don’t have a suf­fi­cient­ly rad busi­ness card. Make up a few
of these. A must for MEs.
http://www.instructables.com/id/Cardapult-the-Business-Card-Catapult/

Too bad these are art prints. I would love to take them down to the
local. I’d final­ly be cool­er than the 20 some­things out to show their
girls a hot Saturday night.
http://www.offworld.com/2009/04/nice-shot-olly-mosss-shoot-the.html

A musi­cal inter­lude. A lit­tle Beautiful Day in the Neighborhood
nos­tal­gia mixed with a lit­tle swing. There’s a link to a pre­view. No
audio on the lap­pie so I can’t tell you if it’s any good. The cov­er is
a can’t miss though.
http://www.boingboing.net/2009/04/06/jazzy-covers-of-mist.html

Lastly two exam­ples of home fur­nish­ings mixed up into art.
http://www.designobserver.com/archives/entry.html?id=39237
http://sleepmachine.tumblr.com/post/93051352/handa-classics-secretary-rita

(Note that Sleep Machine is in Japanese. Other mate­r­i­al on Sleep
Machine is NSFW.)

more tomor­row,

Morning Linkage (Apr 2)

Heavy on the visu­als today.

Touching pho­tos of Mexicans in America who sup­port fam­i­lies at home
doing mun­dane jobs dressed as superheros.
http://dulcepinzon.com/superheroes.htm

I will make time to see this mod­el and all the rest dur­ing my spring road trip:
http://www.matchstickmarvels.com/Comingin2009.htm

I am fas­ci­nat­ed by pho­tographs of decay­ing infra­struc­ture. From
Abandoned Britain, Helling Asylum: I chose one of the 8 pages of
pho­tos. Be aware that you can spend hours on this site.
http://www.abandoned-britain.com/PP/hellingly/5.html

Another vari­a­tion on plumb­ing mate­ri­als used as in light­ing design. I
like that he’s solved the switch prob­lem with­out resort­ing to a hidden
tog­gle or some­thing else non-plumbing.
http://www.dezeen.com/2009/03/31/kozo-lamps-by-david-benatan/

Useful key­board mod­i­fi­ca­tion soft­ware for any­one whose work involves
lots of get­ting all those pesky lit­tle typo­graph­ic glyphs to appear in
print and on line.
http://www.smashingmagazine.com/2009/04/02/typography-keyboard-layout-download-now/

More tomor­row,

Morning Linkage (Apr 1)

Every morn­ing I send JimH a quick sum­ma­ry of my morn­ing cruze around
the net. He sug­gest­ed that you all might like to see the results as
well.

From Core77 a snarky short descrip­tion of how the US Mint makes coins
(cool pho­tos) there’s a link to the longer COINage mag­a­zine ver­sion at
the bot­tom. The oth­er entries in their Production Methods Series are
worth a look.
http://www.core77.com/blog/object_culture/production_methods_coining_12577.asp

Funny Kindle case. (Yes I love my kindle)
http://blog.craftzine.com/archive/2009/04/kindle_2_case_mod.html?CMP=OTC-5JF307375954

Schneier has begun the annu­al “movie-plot” threat chal­lenge. Ignore
the first cou­ple of com­ments, the good ones are at the bot­tom. Check
back often.
http://www.schneier.com/blog/archives/2009/04/fourth_annual_m.html

Probably an April Fool’s joke and cer­tain­ly the only way you’ll ever
get me to play gui­tar hero.
http://www.crunchgear.com/2009/04/01/guitar-hero-leonard-cohen-coming-this-summer/

There’s a new xkcd. It’s only sor­ta fun­ny. (IMHO)
http://xkcd.com/563/

More tomor­row if you all would like.

rebuilding an array without unused elements

the weath­er station/software gen­er­ates a csv file of that col­lects val­ues from the sen­sors every 20 minutes.

it’s not a very nice file — it con­tains all the pos­si­ble val­ues (if you where using all the avail­able sen­sor chan­nels) for me that means that 49 of the fields are unnec­es­sary and do not exist in the track­ing database.

some­how i have to clean them out.

i do this by read­ing the por­tion of the file that i need into an array and then after clean­ing up a few fields that are stored in the wrong type I have to move every­thing into a new array so that i can write it to a file that i can feed to MySQL.

(in the fol­low­ing exam­ple $rawRowArray is the array that holds of all of the fields from the csv after the lit­tle prob­lems have been corrected.)

$cleanRowArray = array();

for ($i=1; $i=14; $i++) {
$k = $i — 1; // to get the array keys right
$cleanRowArray[$k] = $rawRowArray[$k]; //add the field to the array
}
//skip ele­ments 14 — 18 (not used)
for ($i=19; $i=37; $i++) {
$k = $i — 1; // to get the array keys right
$cleanRowArray[$k] = $rawRowArray[$k]; //add the field to the array
}

//skip ele­ments 38–46 (not used)
for ($i=47; $i=66; $i++) {
$k = $i — 1; // to get the array keys right
$cleanRowArray[$k] = $rawRowArray[$k]; //add the field to the array
}
//skip ele­ments 67 ‑103 (not used)

there has got to be some­thing more ele­gant but I like this. there’s no mis­tak­ing whats going on and it will be easy to change if we add more sen­sors to the sys­tem. (just change which ele­ments are skipped.)