<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss'><id>tag:blogger.com,1999:blog-8451817541345985506</id><updated>2010-01-30T12:44:21.971-05:00</updated><title type='text'>The Paleotechnologist</title><subtitle type='html'>Using high-tech methods to preserve old-school goodness. Or vice-versa. Or just figuring out cool things to do with technology.</subtitle><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8451817541345985506/posts/default'/><link rel='alternate' type='text/html' href='http://www.paleotechnologist.net/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/8451817541345985506/posts/default?start-index=26&amp;max-results=25'/><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://www.paleotechnologist.net/atom.xml'/><author><name>M. Eric Carr</name><uri>http://www.blogger.com/profile/12503325087243338069</uri><email>noreply@blogger.com</email></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>56</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-8451817541345985506.post-6387188294886028092</id><published>2010-01-30T12:31:00.004-05:00</published><updated>2010-01-30T12:42:44.418-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='bible'/><category scheme='http://www.blogger.com/atom/ns#' term='humor'/><category scheme='http://www.blogger.com/atom/ns#' term='analog'/><category scheme='http://www.blogger.com/atom/ns#' term='God'/><category scheme='http://www.blogger.com/atom/ns#' term='digital'/><title type='text'>Digital Is Better Than Analog. God Said So!</title><content type='html'>It's true. God (at least the Christian one, as Jesus) said so Himself:&lt;br /&gt;&lt;br /&gt;"But let your communication be, Yea, yea; Nay, nay: for whatsoever is more than these cometh of evil."&lt;br /&gt;(&lt;a href="http://www.biblegateway.com/passage/?search=Matthew%205:37&amp;version=KJV"&gt;Matthew 5:37, King James Version&lt;/a&gt;)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8451817541345985506-6387188294886028092?l=www.paleotechnologist.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/8451817541345985506/6387188294886028092/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=8451817541345985506&amp;postID=6387188294886028092' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8451817541345985506/posts/default/6387188294886028092'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8451817541345985506/posts/default/6387188294886028092'/><link rel='alternate' type='text/html' href='http://www.paleotechnologist.net/2010/01/digital-is-better-than-analog-god-said.html' title='Digital Is Better Than Analog. God Said So!'/><author><name>M. Eric Carr</name><uri>http://www.blogger.com/profile/12503325087243338069</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='00036077788250198290'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8451817541345985506.post-4185874966365240909</id><published>2010-01-23T15:52:00.003-05:00</published><updated>2010-01-23T16:01:43.621-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='windows 7'/><category scheme='http://www.blogger.com/atom/ns#' term='files'/><category scheme='http://www.blogger.com/atom/ns#' term='Windows'/><category scheme='http://www.blogger.com/atom/ns#' term='IT'/><category scheme='http://www.blogger.com/atom/ns#' term='directory tree'/><category scheme='http://www.blogger.com/atom/ns#' term='Windows XP'/><title type='text'>Directory Size Management</title><content type='html'>I'm in the process of organizing and backing up the rather large directory structure on my desktop box, in preparation to try out Windows 7 and Ubuntu Linux.&lt;br /&gt;&lt;br /&gt;Until I finally buy a BD-R drive (which will probably happen sometime this year), this means backing up to DVD-R discs. My mail spool is no problem at 2.3GB or thereabouts, but the \docs directory is another story entirely. There is content in there -- probably large, unused content -- from at least as far back as the first Clinton administration. I don't mind keeping old data around if it's reasonably sized, but how to tell where the disk-hogging directories are?&lt;br /&gt;&lt;br /&gt;Googling "directory tree size," I came across &lt;a href="http://windirstat.info/"&gt;WinDirStat&lt;/a&gt;. It's a freeware application to scan a given directory structure and show how much is taken up by which subdirectories. &lt;br /&gt;&lt;br /&gt;It also takes this data and maps it into pretty fractal pictures.&lt;br /&gt;&lt;img src="http://windirstat.info/images/windirstat.jpg" /&gt;&lt;br /&gt;&lt;br /&gt;I'll post my thoughts on Ubuntu and Windows 7 when I get to them. I may even try out the 64-bit version of XP, depending on how much I like or dislike Win7. (With 64-bit support and newer versions of DirectX, I *want* to like it -- but I have concerns about the way the GUI has been evolving since Office 2007 and Vista.)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8451817541345985506-4185874966365240909?l=www.paleotechnologist.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/8451817541345985506/4185874966365240909/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=8451817541345985506&amp;postID=4185874966365240909' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8451817541345985506/posts/default/4185874966365240909'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8451817541345985506/posts/default/4185874966365240909'/><link rel='alternate' type='text/html' href='http://www.paleotechnologist.net/2010/01/directory-size-management.html' title='Directory Size Management'/><author><name>M. Eric Carr</name><uri>http://www.blogger.com/profile/12503325087243338069</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='00036077788250198290'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8451817541345985506.post-6694135930294994103</id><published>2010-01-23T15:01:00.001-05:00</published><updated>2010-01-23T15:03:40.647-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='data'/><category scheme='http://www.blogger.com/atom/ns#' term='data.gov'/><category scheme='http://www.blogger.com/atom/ns#' term='government'/><category scheme='http://www.blogger.com/atom/ns#' term='politics'/><title type='text'>Data.gov</title><content type='html'>This looks interesting: the US Federal Government has released some 300 data sets to the public via &lt;a href="http://www.data.gov/"&gt;Data.Gov&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;They say sunshine is the best disinfectant; making as much data as possible as public as possible sounds like a great idea to me.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8451817541345985506-6694135930294994103?l=www.paleotechnologist.net' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://www.data.gov/' title='Data.gov'/><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/8451817541345985506/6694135930294994103/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=8451817541345985506&amp;postID=6694135930294994103' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8451817541345985506/posts/default/6694135930294994103'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8451817541345985506/posts/default/6694135930294994103'/><link rel='alternate' type='text/html' href='http://www.paleotechnologist.net/2010/01/datagov.html' title='Data.gov'/><author><name>M. Eric Carr</name><uri>http://www.blogger.com/profile/12503325087243338069</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='00036077788250198290'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8451817541345985506.post-6152187037889599864</id><published>2010-01-19T22:41:00.005-05:00</published><updated>2010-01-19T23:05:38.430-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='walking'/><category scheme='http://www.blogger.com/atom/ns#' term='heat dissipation'/><category scheme='http://www.blogger.com/atom/ns#' term='Philadelphia'/><title type='text'>Paleotech Transportation</title><content type='html'>In other words, bipedal locomotion -- walking!&lt;br /&gt;&lt;br /&gt;My friend &lt;a href="http://says.dosquatch.com"&gt;DOSquatch&lt;/a&gt; (not his real name, but it's quite appropriate) has recently started a personal weight-loss program (and is &lt;a href="http://says.dosquatch.com/2010/01/practical-milestones/"&gt;doing quite well&lt;/a&gt;.) He has inspired me to get back into my routine of walking home from work (at least part of the way; it's 4.7 miles, so I only do the entire distance when it's reasonably light out.) &lt;br /&gt;&lt;br /&gt;An interesting way to stay motivated, doing something like this, is to add up your mileage and then use a mapping program to chart your progress towards some distant goal. The "Virtual Me" is currently walking -- very slowly -- towards the Space Needle, in Seattle, WA. He's very nearly to Harrisburg now (~90 miles), having started in Philadelphia!&lt;br /&gt;&lt;br /&gt;Some geek observations on the art of walking:&lt;br /&gt;* Cool weather is your friend. There are limitations to speed, and one of them is heat dissipation. I go a lot slower when it's 80 degrees out than when it's 50.&lt;br /&gt;* Uphill can be just as easy as straight and level, provided you're willing to go slower. Shorten your stride and pull it down a gear or two -- no problem.&lt;br /&gt;* People generally don't walk very fast. I'm by &lt;i&gt;no&lt;/i&gt; means athletic, but my standard cruising speed when walking tends to be a lot faster than most (~3 mph / ~5 km/hr). I'm not sure why this is, since I know many of these people could run circles around me if they cared. Weird.&lt;br /&gt;* Know your neighborhoods. The nice thing about my route home is that there are plenty of options to stop and take the train along the way -- there are twelve subway/trolley stations along the way, including the two near work and where I live. Some neighborhoods (and some SEPTA stations) are nicer than others, and that factors into my planning, too.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8451817541345985506-6152187037889599864?l=www.paleotechnologist.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/8451817541345985506/6152187037889599864/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=8451817541345985506&amp;postID=6152187037889599864' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8451817541345985506/posts/default/6152187037889599864'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8451817541345985506/posts/default/6152187037889599864'/><link rel='alternate' type='text/html' href='http://www.paleotechnologist.net/2010/01/paleotech-transportation.html' title='Paleotech Transportation'/><author><name>M. Eric Carr</name><uri>http://www.blogger.com/profile/12503325087243338069</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='00036077788250198290'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8451817541345985506.post-3433745407078252781</id><published>2010-01-12T22:31:00.005-05:00</published><updated>2010-01-17T22:14:47.986-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Model 100'/><category scheme='http://www.blogger.com/atom/ns#' term='BASIC'/><category scheme='http://www.blogger.com/atom/ns#' term='paleotechnology'/><category scheme='http://www.blogger.com/atom/ns#' term='Compaq'/><category scheme='http://www.blogger.com/atom/ns#' term='navigation'/><category scheme='http://www.blogger.com/atom/ns#' term='Loran'/><title type='text'>So long, Loran; we hardly knew ye</title><content type='html'>I guess it had to happen eventually. The US Coast Guard apparently &lt;a href="http://www.insidegnss.com/node/1806"&gt;intends to turn off Loran-C&lt;/a&gt; next month.&lt;br /&gt;&lt;br /&gt;Just as Loran took over from Omega, GPS is now making Loran-C obsolete. Still, we dinosaurs will miss it. Loran has long been associated with marine and aircraft navigation, of course, but it also has a special place in my heart as the first navigation technology that I used.&lt;br /&gt;&lt;br /&gt;Back in the day (mid '90s?), I found a surplus Loran-C receiver at a hamfest. I didn't really know how they worked at the time, but it was cheap ($10 or $20, I think), and it came with a book that explained what voltage and polarity it needed on the power connector, so I bought it.&lt;br /&gt;&lt;br /&gt;After a little reading, some soldering, and some programming in TRS-80 Model 100 BASIC (an awesome little laptop -- more about it later), I actually had a functional navigation system! That is, I could tell my latitude and longitude, and calculate line-of-sight distance to various waypoints that I set. Not the most practical thing in the world to mount in a car, but it was a lot of fun.&lt;br /&gt;&lt;br /&gt;It actually did help with navigation, too. A few days after installing it, I was driving home from a friend's house in Norfolk, and turned the wrong way onto Tidewater Drive. I'd have found this out soon enough myself, but I happened to glance down at the Loran, saw that my heading was 360ish when it should have been 180ish, and did a U-turn. That was pretty cool -- I never expected it to actually do something practical.&lt;br /&gt;&lt;br /&gt;I got a lot of programming experience out of it, too. The Loran would output its latitude and longitude (in degrees, minutes, and seconds) once a second. Even compressed into bytes, this was three bytes for latitude and three for longitude, every second. Today, this is a ridiculously low data rate -- but on a Model 100 laptop with a whole 22k of free memory (including the logger program code), six bytes a second was WAY too much for logging a long trip -- it wouldn't even last an hour.&lt;br /&gt;&lt;br /&gt;So I got creative. I realized that the latitude and longitude *degrees* hardly ever changed -- and that the minutes didn't change much, either. I came up with a scheme to compress the data: two bytes were normally recorded each second for the latitude and longitude, except when one or the other rolled over to the next minute and/or degree. In those cases, an "!" was inserted in the data, telling the plotting program that a full six-byte frame would follow.&lt;br /&gt;&lt;br /&gt;With that scheme, I was able to record over eight hours' worth of data in the M100's 22k of memory -- including the recording/compression program! My friend Jason and I took the whole setup (ported to a larger Compaq Plus computer) along on a road trip to Milwaukee and back. It worked pretty well -- even when we had to shift it over onto the Great Lakes Loran chain.&lt;br /&gt;&lt;br /&gt;I don't know how good its accuracy (repeatability) was, but its precision was sometimes pretty good. On the way back from one roadtrip, I decided to drive all the way around a cloverleaf interchange (four 270-degree turns) as a test. When I got back home and looked at the data using a quick-and-dirty plotting program I wrote, the whole cloverleaf was clearly visible, albeit squashed a bit in places due to only having one update per second. Not bad for several-decades-old technology.&lt;br /&gt;&lt;br /&gt;I know it had to go -- but I'm still going to miss it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8451817541345985506-3433745407078252781?l=www.paleotechnologist.net' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://www.insidegnss.com/node/1806' title='So long, Loran; we hardly knew ye'/><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/8451817541345985506/3433745407078252781/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=8451817541345985506&amp;postID=3433745407078252781' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8451817541345985506/posts/default/3433745407078252781'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8451817541345985506/posts/default/3433745407078252781'/><link rel='alternate' type='text/html' href='http://www.paleotechnologist.net/2010/01/so-long-loran-we-hardly-knew-ye.html' title='So long, Loran; we hardly knew ye'/><author><name>M. Eric Carr</name><uri>http://www.blogger.com/profile/12503325087243338069</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='00036077788250198290'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8451817541345985506.post-5568331455574511459</id><published>2009-12-13T23:08:00.001-05:00</published><updated>2009-12-13T23:12:32.293-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='winter'/><category scheme='http://www.blogger.com/atom/ns#' term='Fail'/><category scheme='http://www.blogger.com/atom/ns#' term='funny'/><category scheme='http://www.blogger.com/atom/ns#' term='snow'/><category scheme='http://www.blogger.com/atom/ns#' term='physics'/><category scheme='http://www.blogger.com/atom/ns#' term='whatcouldpossiblygowrong'/><title type='text'>Newtonian Physics Demonstration</title><content type='html'>...courtesy of Mother Nature. &lt;br /&gt;&lt;br /&gt;Guys, &lt;a href="http://en.wikipedia.org/wiki/WOPR"&gt;Joshua/WOPR&lt;/a&gt; said it best: &lt;br /&gt;   "A strange game. The only winning move is not to play."&lt;br /&gt;&lt;br /&gt;&lt;object width="660" height="525"&gt;&lt;param name="movie" value="http://www.youtube-nocookie.com/v/5OTc5sZ1Z94&amp;hl=en_US&amp;fs=1&amp;rel=0&amp;border=1"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube-nocookie.com/v/5OTc5sZ1Z94&amp;hl=en_US&amp;fs=1&amp;rel=0&amp;border=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="660" height="525"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8451817541345985506-5568331455574511459?l=www.paleotechnologist.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/8451817541345985506/5568331455574511459/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=8451817541345985506&amp;postID=5568331455574511459' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8451817541345985506/posts/default/5568331455574511459'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8451817541345985506/posts/default/5568331455574511459'/><link rel='alternate' type='text/html' href='http://www.paleotechnologist.net/2009/12/newtonian-physics-demonstration.html' title='Newtonian Physics Demonstration'/><author><name>M. Eric Carr</name><uri>http://www.blogger.com/profile/12503325087243338069</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='00036077788250198290'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8451817541345985506.post-2433472710615034009</id><published>2009-12-04T00:05:00.004-05:00</published><updated>2009-12-04T00:12:11.029-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Bad Code'/><category scheme='http://www.blogger.com/atom/ns#' term='GOTO Considered Harmful'/><category scheme='http://www.blogger.com/atom/ns#' term='DailyWTF'/><title type='text'>Just -- WOW.</title><content type='html'>Speaking of Bad Code, I just ran across &amp;quot;&lt;a href="http://thedailywtf.com/Articles/The-Who-Knows-Code.aspx"&gt;The Who-Knows Code&lt;/a&gt;&amp;quot;.&lt;br /&gt;&lt;br /&gt;Either someone out there has a very VERY sick sense of humor, or otherwise he or she should be tracked down (we might want to put the FBI on this) and restrained by whatever means necessary from ever using a programmable piece of technology ever again.&lt;br /&gt;&lt;br /&gt;Don't believe me? Go see for yourself. "&lt;a href="http://www.cs.utexas.edu/users/EWD/ewd02xx/EWD215.PDF"&gt;GOTO Considered Harmful&lt;/a&gt;," indeed!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8451817541345985506-2433472710615034009?l=www.paleotechnologist.net' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://thedailywtf.com/Articles/The-Who-Knows-Code.aspx' title='Just -- WOW.'/><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/8451817541345985506/2433472710615034009/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=8451817541345985506&amp;postID=2433472710615034009' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8451817541345985506/posts/default/2433472710615034009'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8451817541345985506/posts/default/2433472710615034009'/><link rel='alternate' type='text/html' href='http://www.paleotechnologist.net/2009/12/just-wow.html' title='Just -- WOW.'/><author><name>M. Eric Carr</name><uri>http://www.blogger.com/profile/12503325087243338069</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='00036077788250198290'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8451817541345985506.post-1360185241744642501</id><published>2009-12-03T23:33:00.004-05:00</published><updated>2009-12-03T23:58:31.728-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C'/><category scheme='http://www.blogger.com/atom/ns#' term='Bad Code'/><category scheme='http://www.blogger.com/atom/ns#' term='BASIC'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='Bad Code Contest'/><category scheme='http://www.blogger.com/atom/ns#' term='C++'/><category scheme='http://www.blogger.com/atom/ns#' term='assembly'/><title type='text'>Bad Code Contest!</title><content type='html'>They don't know it yet, but several of my fellow geeks at Drexel are about to be the recipients of some &lt;a href="http://codeoffsets.com/"&gt;Bad Code Offsets&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;They're like carbon offsets, only for lazy geeks who take the easy (and often ugly) way out when writing code. Things like allocating a huge honkin' array at runtime instead of coding a linked list, or doing a sort in n&lt;sup&gt;2&lt;/sup&gt; time instead of n*log(n), just because you couldn't be bothered to implement &lt;a href="http://en.wikipedia.org/wiki/Quicksort"&gt;Quicksort&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;I know I'm guilty. My code gets more maintainable as I get older, but not very quickly. If style violations were actually illegal, I'd be on a first-name basis with most of the folks at the Criminal Justice Center downtown, just on the basis of the last microcontroller project I did alone. It's part assembly (some of it autocoded by a hacked-together &lt;a href="http://www.freebasic.net/"&gt;FreeBASIC&lt;/a&gt; program), part macros, and there would have been some C thrown in for good measure if I hadn't run out of time. Prior to that, I did another project where a VBasic GUI running on one machine worked alongside a QBasic program running on another, driving a microcontroller running a program written in assembly -- and none of it presentable. (I guess I'm one of those programmers that &lt;a href="http://www.cs.odu.edu/faculty_show.shtml?p=15"&gt;Dennis Ray&lt;/a&gt; warned us about, way back when!)&lt;br /&gt;&lt;br /&gt;The best part about these offsets is that the money goes to open-source projects. (I chose &lt;a href="http://www.apache.org/"&gt;Apache&lt;/a&gt; as the beneficiary for the offsets I bought.)&lt;br /&gt;&lt;br /&gt;I plan on putting these offsets to good use by starting an impromptu Bad Code Contest. No rules, except that the badness has to be confined to one egregiously bad line of code in the language of your choice. Something of such horribleness that it would make &lt;a href="http://en.wikipedia.org/wiki/Edsger_W._Dijkstra"&gt;Dijkstra&lt;/a&gt; shudder from half a world away, in the same way Obi-Wan Kenobi felt a &lt;a href="http://www.entertonement.com/clips/ykktsspbvt--Disturbance-in-the-ForceStar-Wars-Episode-IV-A-New-Hope-Alec-Guinness-Obi-Wan-Kenobi-"&gt;disturbance in the Force&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Bonus points for the Bad Line Of Code being implemented in assembly!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8451817541345985506-1360185241744642501?l=www.paleotechnologist.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/8451817541345985506/1360185241744642501/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=8451817541345985506&amp;postID=1360185241744642501' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8451817541345985506/posts/default/1360185241744642501'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8451817541345985506/posts/default/1360185241744642501'/><link rel='alternate' type='text/html' href='http://www.paleotechnologist.net/2009/12/bad-code-contest.html' title='Bad Code Contest!'/><author><name>M. Eric Carr</name><uri>http://www.blogger.com/profile/12503325087243338069</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='00036077788250198290'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8451817541345985506.post-2762474950586142480</id><published>2009-11-15T20:47:00.005-05:00</published><updated>2009-11-15T21:10:52.800-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='credit'/><category scheme='http://www.blogger.com/atom/ns#' term='identity theft'/><category scheme='http://www.blogger.com/atom/ns#' term='stoopid'/><category scheme='http://www.blogger.com/atom/ns#' term='whatcouldpossiblygowrong'/><category scheme='http://www.blogger.com/atom/ns#' term='notjustnobuthellno'/><title type='text'>Not just no but HELL no</title><content type='html'>Some things just go together. You know, peanut butter and jelly; summertime and Beach Boys music; apple juice and Graham crackers; credit-reporting sites and Facebook... &lt;br /&gt;&lt;br /&gt;&lt;b&gt;Wait, WHAT?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;I've been using &lt;a href="http://www.creditkarma.com"&gt;CreditKarma&lt;/a&gt; for a while now, since it charges no fees, appears to be ad-based (which is okay by me since they're providing a service), and generally above-board. &lt;br /&gt;&lt;br /&gt;But browsing the site today, I came across a reminder of why you have to really watch what you click on the 'Net. &lt;br /&gt;&lt;br /&gt;I have a Facebook account (mostly to keep people from bothering me to do so, but also to keep in touch with friends and acquaintances whom I don't see very often.) I'm generally leery of linking other applications and sites to my Facebook account, though (this blog being a notable exception) -- and as of this evening, I can now point to at least one concrete example of why this is not (just) paranoia.&lt;br /&gt;&lt;br /&gt;(Image heavily redacted, but you get the point...)&lt;br /&gt;&lt;br /&gt;&lt;img src="http://www.paleotechnologist.net/uploaded_images/CreditKarma-792385.jpg" border="0" alt="" /&gt;&lt;br /&gt;&lt;br /&gt;Why oh WHY would anyone want to post his or her credit score on Facebook? I know I'm over 30 and therefore at least two generations removed from being uber-cool (or so Madison Avenue would have the world believe) -- but seriously, folks: no good can possibly come of this, no matter &lt;i&gt;what&lt;/i&gt; your credit score is. That little check box might as well read: &amp;quot;Check this box if you're STOOPID-spelled-with-two-Os.&amp;quot;&lt;br /&gt;&lt;br /&gt;If your credit score is bad, you absolutely don't want to put it on Facebook. 'Nuff said, right?&lt;br /&gt;&lt;br /&gt;If it's good, why would you publicize &lt;i&gt;that&lt;/i&gt; on Facebook, and invite identity theft? (I mean, they're already browsing your Facebook account -- and if you posted your credit score there, they probably already have your DOB, SSN, ZIP -- and you're SOL.)&lt;br /&gt;&lt;br /&gt;That leaves &amp;quot;mediocre&amp;quot; (whatever &lt;i&gt;that&lt;/i&gt; is.) Chances are that there's overlap between &amp;quot;good&amp;quot; and &amp;quot;bad&amp;quot; -- in that a score high enough to be able to qualify for some credit cards and invite identity theft could still well be low enough that you wouldn't want friends, family, and employers (potential or actual) to see it. &lt;br /&gt;&lt;br /&gt;Such things are private for a reason, folks. &lt;i&gt;Caveat emptor.&lt;/i&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8451817541345985506-2762474950586142480?l=www.paleotechnologist.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/8451817541345985506/2762474950586142480/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=8451817541345985506&amp;postID=2762474950586142480' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8451817541345985506/posts/default/2762474950586142480'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8451817541345985506/posts/default/2762474950586142480'/><link rel='alternate' type='text/html' href='http://www.paleotechnologist.net/2009/11/not-just-no-but-hell-no.html' title='Not just no but HELL no'/><author><name>M. Eric Carr</name><uri>http://www.blogger.com/profile/12503325087243338069</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='00036077788250198290'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8451817541345985506.post-7379071684835749369</id><published>2009-10-29T22:40:00.002-04:00</published><updated>2009-10-29T22:51:35.852-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='hibernate'/><category scheme='http://www.blogger.com/atom/ns#' term='Windows'/><category scheme='http://www.blogger.com/atom/ns#' term='Remote Desktop'/><title type='text'>Lights-out, remotely</title><content type='html'>Ever been logged in to a computer via Remote Desktop, and wanted to put said computer into Hibernate mode? Yeah, neither had I, until today. I was running an experiment in the electronics lab and wanted to put my laptop (back at my desk) into hibernation, in preparation for heading to class later.&lt;br /&gt;&lt;br /&gt;A quick Google search later, I found the answer:&lt;br /&gt;&lt;b&gt;rundll32.exe powrprof.dll,SetSuspendState Hibernate&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Have fun!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8451817541345985506-7379071684835749369?l=www.paleotechnologist.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/8451817541345985506/7379071684835749369/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=8451817541345985506&amp;postID=7379071684835749369' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8451817541345985506/posts/default/7379071684835749369'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8451817541345985506/posts/default/7379071684835749369'/><link rel='alternate' type='text/html' href='http://www.paleotechnologist.net/2009/10/lights-out-remotely.html' title='Lights-out, remotely'/><author><name>M. Eric Carr</name><uri>http://www.blogger.com/profile/12503325087243338069</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='00036077788250198290'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8451817541345985506.post-2398605002524121720</id><published>2009-10-26T14:47:00.003-04:00</published><updated>2009-10-26T14:54:04.067-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='windows 7'/><category scheme='http://www.blogger.com/atom/ns#' term='bluescreen'/><category scheme='http://www.blogger.com/atom/ns#' term='installation'/><category scheme='http://www.blogger.com/atom/ns#' term='BSOD'/><category scheme='http://www.blogger.com/atom/ns#' term='Microsoft'/><category scheme='http://www.blogger.com/atom/ns#' term='Windows XP'/><title type='text'>Well, this isn't encouraging...</title><content type='html'>Just stopped by our IT department at work; our sysadmin guru was installing Windows 7 on a test PC (one of our standard configurations -- a Dell GX620.) According to him, it had already bluescreened once on him. While I was there, he was running into a bunch of other errors -- during the install process. Admittedly, he was trying to upgrade an existing XP installation, but this is still not a good sign.&lt;br /&gt;&lt;br /&gt;Very often, Windows installation errors are due to user error; I've seen this happen many times. But this guy knows his stuff -- if he made a mistake, it's because it's there waiting to be made.&lt;br /&gt;&lt;br /&gt;Looks like XP or Linux for the foreseeable future, for me...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8451817541345985506-2398605002524121720?l=www.paleotechnologist.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/8451817541345985506/2398605002524121720/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=8451817541345985506&amp;postID=2398605002524121720' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8451817541345985506/posts/default/2398605002524121720'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8451817541345985506/posts/default/2398605002524121720'/><link rel='alternate' type='text/html' href='http://www.paleotechnologist.net/2009/10/well-this-isnt-encouraging.html' title='Well, this isn&apos;t encouraging...'/><author><name>M. Eric Carr</name><uri>http://www.blogger.com/profile/12503325087243338069</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='00036077788250198290'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8451817541345985506.post-4685412009144401564</id><published>2009-10-01T09:30:00.001-04:00</published><updated>2009-10-01T09:50:01.287-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Automatic Updates'/><category scheme='http://www.blogger.com/atom/ns#' term='reboot message'/><category scheme='http://www.blogger.com/atom/ns#' term='reboot'/><category scheme='http://www.blogger.com/atom/ns#' term='annoyances'/><category scheme='http://www.blogger.com/atom/ns#' term='Windows XP'/><title type='text'>Do not pass Reboot, do not collect $200...</title><content type='html'>One of the annoying things about Windows XP is its tendency to keep pestering the user to reboot after updates have been installed. I'm sure I'm not the only one who's been working on a document, only to have the "Reboot Now?" dialog box pop up, accept the spacebar keypress that was meant for your document, and happily reboot the machine -- three days into that loooong simulation you're running in &lt;a href="http://www.freebasic.net"&gt;FreeBASIC&lt;/a&gt;. Grr.&lt;br /&gt;&lt;br /&gt;At least there's a &lt;a href="http://asymptomatic.net/2005/08/11/831/how-to-disable-that-blasted-restart-now-message-from-windows-update"&gt;solution.&lt;/a&gt; If you stop the Automatic Updates service, the insipid messages go away and don't come back until after you reboot. Peace at last...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8451817541345985506-4685412009144401564?l=www.paleotechnologist.net' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://asymptomatic.net/2005/08/11/831/how-to-disable-that-blasted-restart-now-message-from-windows-update' title='Do not pass Reboot, do not collect $200...'/><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/8451817541345985506/4685412009144401564/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=8451817541345985506&amp;postID=4685412009144401564' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8451817541345985506/posts/default/4685412009144401564'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8451817541345985506/posts/default/4685412009144401564'/><link rel='alternate' type='text/html' href='http://www.paleotechnologist.net/2009/10/do-not-pass-reboot-do-not-collect-200.html' title='Do not pass Reboot, do not collect $200...'/><author><name>M. Eric Carr</name><uri>http://www.blogger.com/profile/12503325087243338069</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='00036077788250198290'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8451817541345985506.post-1786624483831842280</id><published>2009-09-30T18:34:00.003-04:00</published><updated>2009-09-30T18:53:54.083-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Port 25'/><category scheme='http://www.blogger.com/atom/ns#' term='Port25'/><category scheme='http://www.blogger.com/atom/ns#' term='Sendmail'/><category scheme='http://www.blogger.com/atom/ns#' term='Port 587'/><category scheme='http://www.blogger.com/atom/ns#' term='SMTP'/><category scheme='http://www.blogger.com/atom/ns#' term='Verizon'/><category scheme='http://www.blogger.com/atom/ns#' term='spam'/><category scheme='http://www.blogger.com/atom/ns#' term='Port587'/><title type='text'>How To Lose Friends And Irritate Customers</title><content type='html'>&lt;a href="http://www.verizon.net"&gt;Verizon&lt;/a&gt;, in its eternal quest for World Domination Through Customer Annoyance, has decided that Spam Is A Problem.&lt;br /&gt;&lt;br /&gt;Good for them, you might say -- nobody likes spammers, and doing something about it must be a Good Thing&amp;trade;, right?&lt;br /&gt;&lt;br /&gt;Of course, there's a right way and a wrong way to do something like this. The right way would be to, say, traffic-shape or selectively block outbound Port 25 connections for users who were sending copious amounts of email to many different addresses (I'm sure &lt;a href="http://www.spamhaus.org"&gt;SpamHaus&lt;/a&gt; and similar organizations could give them many a pointer along those lines.)&lt;br /&gt;&lt;br /&gt;The wrong way (and unfortunately the easy way), of course, would be to decree that Port 25 is a Bad Thing&amp;trade;, and to &lt;a href="http://www.verizon.net/port25"&gt;block outbound Port 25 connections&lt;/a&gt; for all Verizon end-users. &lt;br /&gt;&lt;br /&gt;So a few days ago, my email client could mysteriously no longer connect to the mailserver for outbound mail. Diagnosing it, I found that I was otherwise still connected to the 'Net, and that the mailserver (gotta love &lt;a href="http://www.openhosting.com"&gt;Linux-based hosts with shell access&lt;/a&gt;) was still happily accepting connections from everyone but me. In fact, it was still talking to me, too -- but only via POP.&lt;br /&gt;&lt;br /&gt;The next step was to try from somewhere else. Being lazy, I fired up my Drexel VPN connection. Sure enough, everything started working again. HMM.&lt;br /&gt;&lt;br /&gt;A Google search quickly fingered Verizon as the culprit -- but the problem was, what to do about it? Verizon's advice (&amp;quot;Just Use Port 587!&amp;quot;) was very unhelpful, as my mailserver had no idea WTF they were talking about.&lt;br /&gt;&lt;br /&gt;Not having many other options, I found several pieces of advice on the 'Net, including advice to forward Port 25 to 587 (a nasty hack that I didn't want to inflict on a production host), to modifying the Sendmail configuration (always scary). I ran out of other options, though, and so started playing with the Sendmail configuration. &lt;br /&gt;&lt;br /&gt;After one attempt that didn't work so well (Sendmail started working on Port 587 but no longer bound to Port 25 -- OOPS!), I finally found &lt;a href="http://forum.parallels.com/pda/index.php/t-78847.html"&gt;a helpful site&lt;/a&gt; that showed how to add an entry to the sendmail.mc file to make it listen on both ports. (This involved editing the sacred "Do Not Edit This File" sendmail.mc file -- but that only added to the fun.)&lt;br /&gt;&lt;br /&gt;The story has a more-or-less happy ending, with the usual trope of the &lt;a href="http://www22.verizon.com/about/"&gt;villian&lt;/a&gt; skulking off to do yet more evil deeds in the sequel. My mail is working again, and I have actually managed to modify Sendmail without causing a huge mess. &lt;br /&gt;&lt;br /&gt;I gotta get a real ISP one day.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8451817541345985506-1786624483831842280?l=www.paleotechnologist.net' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://www.verizon.net/port25' title='How To Lose Friends And Irritate Customers'/><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/8451817541345985506/1786624483831842280/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=8451817541345985506&amp;postID=1786624483831842280' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8451817541345985506/posts/default/1786624483831842280'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8451817541345985506/posts/default/1786624483831842280'/><link rel='alternate' type='text/html' href='http://www.paleotechnologist.net/2009/09/how-to-lose-friends-and-irritate.html' title='How To Lose Friends And Irritate Customers'/><author><name>M. Eric Carr</name><uri>http://www.blogger.com/profile/12503325087243338069</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='00036077788250198290'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8451817541345985506.post-1562148571534341406</id><published>2009-09-25T22:21:00.003-04:00</published><updated>2009-09-25T22:33:08.606-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='silence'/><category scheme='http://www.blogger.com/atom/ns#' term='SSD'/><category scheme='http://www.blogger.com/atom/ns#' term='mass storage'/><category scheme='http://www.blogger.com/atom/ns#' term='solid state drive'/><category scheme='http://www.blogger.com/atom/ns#' term='quiet'/><title type='text'>The Sound of Silence</title><content type='html'>New toys are always fun, especially when you've heard about them but never actually gotten to play with one. The hard drive in my laptop at work had taken to making slightly disconcerting clicking sounds -- nothing really ominous, but the kind of noise that makes you notice, if you're a computer geek. I mentioned this to my supervisor (also a techie). I figured he'd agree I ought to get a new hard drive. What I didn't figure on was his suggestion that we look into a solid-state drive. (It's a great idea -- but I didn't think it had a chance of being approved.)&lt;br /&gt;&lt;br /&gt;Well, it did. I just finished cloning the &lt;a href="http://www.newegg.com/Product/Product.aspx?Item=N82E16820139005"&gt;drive&lt;/a&gt; across this afternoon, and it's amazing. These things are probably the future of storage (at least until the Next Big Thing comes along); they're fast (think NO access time to speak of and better throughput), durable (no moving parts means I don't have to worry as much about the laptop rattling around in my backpack), and efficient (running on the old HD yesterday, the batteries gave up after about 2 hours of note-taking in class; today, with the new HD, it ran for 3+ hours, with intermittent Wi-Fi use, and still had juice left when class ended. No need to put an ammeter on it -- I'm convinced. This will definitely help in my classes (one of which is in a turn-of-the-last-century building designed long before students had a need for power outlets).&lt;br /&gt;&lt;br /&gt;Solid-state drives are also silent. Not "quiet" -- not "whisper quiet" -- SILENT. When running non-CPU-intensive tasks, it's amazing how quiet the laptop is, now. If you hold it up to your ear, you can hear the CPU fan. I never realized just how much noise the old HD made (relatively speaking).&lt;br /&gt;&lt;br /&gt;I gotta get one of these for my desktop. Well, someday -- when I'm not broke.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8451817541345985506-1562148571534341406?l=www.paleotechnologist.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/8451817541345985506/1562148571534341406/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=8451817541345985506&amp;postID=1562148571534341406' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8451817541345985506/posts/default/1562148571534341406'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8451817541345985506/posts/default/1562148571534341406'/><link rel='alternate' type='text/html' href='http://www.paleotechnologist.net/2009/09/sound-of-silence.html' title='The Sound of Silence'/><author><name>M. Eric Carr</name><uri>http://www.blogger.com/profile/12503325087243338069</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='00036077788250198290'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8451817541345985506.post-8074702377812063446</id><published>2009-09-12T11:47:00.005-04:00</published><updated>2009-09-12T12:56:50.067-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='TCP'/><category scheme='http://www.blogger.com/atom/ns#' term='webserver'/><category scheme='http://www.blogger.com/atom/ns#' term='IP'/><category scheme='http://www.blogger.com/atom/ns#' term='webservers'/><category scheme='http://www.blogger.com/atom/ns#' term='HTTP'/><category scheme='http://www.blogger.com/atom/ns#' term='TCP/IP'/><category scheme='http://www.blogger.com/atom/ns#' term='Ethernet'/><category scheme='http://www.blogger.com/atom/ns#' term='Internet'/><category scheme='http://www.blogger.com/atom/ns#' term='protocols'/><title type='text'>Under the hood</title><content type='html'>One of the most important reasons the Internet is both cool and interesting is its &lt;a href="http://blog.dosquatch.com/2009/07/art-of-troubleshooting.html"&gt;modularity&lt;/a&gt;. Different layers of the &lt;a href="http://en.wikipedia.org/wiki/OSI_model"&gt;network model&lt;/a&gt; do their thing, without needing to care what the layers above or below them are doing. It makes writing Internet-based applications relatively straightforward, which means we get a lot of cool, shiny toys to play with. This is, of course, a Good Thing &amp;trade;. &lt;br /&gt;&lt;br /&gt;For technology geeks, though, this modularity also means that individual pieces of technology can be learned in relative isolation. You don't have to know or care how (most of) the rest of the stack works in order to teach yourself a new piece of the puzzle.&lt;br /&gt;&lt;br /&gt;(A brief and more-or-less-correct description of how the Internet does its thing follows. Feel free to read, skim, or ignore it; the "cool stuff" is below.)&lt;br /&gt;&lt;br /&gt;&lt;font color="#007700"&gt;&lt;br /&gt;There are generally two basic approaches to learning how the stack of Internet protocols works: &lt;a href="http://en.wikipedia.org/wiki/Top-down_and_bottom-up_design"&gt;"bottom-up" and "top-down."&lt;/a&gt; At the bottom of the stack is the &lt;a href="http://en.wikipedia.org/wiki/Physical_Layer"&gt;physical layer&lt;/a&gt; -- the wires, fiber optic cables, or radiofrequency links that actually move the information around. &lt;a href="http://en.wikipedia.org/wiki/Data_Link_Layer"&gt;The&lt;/a&gt; &lt;a href="http://en.wikipedia.org/wiki/Network_Layer"&gt;next&lt;/a&gt; &lt;a href="http://en.wikipedia.org/wiki/Transport_Layer"&gt;few&lt;/a&gt; &lt;a href="http://en.wikipedia.org/wiki/Session_Layer"&gt;layers&lt;/a&gt; deal with the electronics that translate the information back and forth and get it where it's going. Higher up are layers that handle authentication (where needed), and the &lt;a href="http://en.wikipedia.org/wiki/Application_Layer"&gt;Application Layer&lt;/a&gt; -- which is concerned with actually doing the task at hand. Information travels up and down these layers every time any action is initiated on the Internet (or other TCP/IP network).&lt;br /&gt;&lt;br /&gt;For instance, suppose you click on &lt;a href="http://www.paleotechnologist.net"&gt;a link to this blog&lt;/a&gt;. Your browser, at the Application layer, translates this into a request to the appropriate web server (www.paleotechnologist.net). It then uses knowledge of &lt;a href="http://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol"&gt;HTTP&lt;/a&gt; (HyperText Transfer Protocol) to formulate a request in a way the webserver can understand. Once this specific, formal request is created, the browser passes it to your computer's network protocol stack, which looks up the &lt;a href="http://en.wikipedia.org/wiki/Internet_Protocol"&gt;IP address&lt;/a&gt; of the webserver, packages the request into a &lt;a href="http://en.wikipedia.org/wiki/Transmission_Control_Protocol"&gt;TCP/IP&lt;/a&gt; packet, and sends it off to your computer's default gateway router, with its destination marked as &lt;a href="http://en.wikipedia.org/wiki/TCP_and_UDP_port"&gt;Port 80&lt;/a&gt; at the webserver's IP address. The packet passes through your computer's &lt;a href="http://en.wikipedia.org/wiki/Network_Interface_Controller"&gt;network adapter&lt;/a&gt; (or &lt;a href="http://en.wikipedia.org/wiki/Modem"&gt;modem&lt;/a&gt;, if you're on dial-up), to the &lt;a href="http://en.wikipedia.org/wiki/Gateway_%28telecommunications%29"&gt;gateway&lt;/a&gt;, which starts &lt;a href="http://en.wikipedia.org/wiki/Ospf"&gt;routing&lt;/a&gt; it across the Internet.&lt;br /&gt;&lt;br /&gt;Once the packet gets where it's going, the information makes its way back through the layers in reverse order. The network card on the webserver computer receives the request, strips out the relevant information, and passes it to the webserver program. This program inspects it and finds that it understands the request, gets the information requested from local memory or the hard drive, and creates a reply packet (or many reply packets) containing the requested information. These go back through the same process to your computer, where the information is processed into a web page. &lt;br /&gt;&lt;br /&gt;The amazing part is that all of this (usually) happens in a few milliseconds' time.&lt;br /&gt;&lt;br /&gt;&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;The HTTP protocol is one of those things that don't always get a lot of attention. It does its thing, so most folks don't think about it. I recently came across a post on Slashdot that suggested taking a look at the HTTP headers being sent out by the Slashdot web server. It suggested running the following command in Linux:&lt;br /&gt;&lt;br /&gt;&lt;font color="#0000FF"&gt;&lt;br /&gt;&lt;blockquote&gt;echo -e "HEAD / HTTP/1.1\nHost: slashdot.org\n\n" | netcat slashdot.org 80&lt;/blockquote&gt;&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;Being an inquisitive sort (and not seeing anything really harmful-looking in the command), I decided to try it out. As it turns out, the Linux box I have available doesn't have netcat installed, so I decided to take the lazy way out and try telnetting to Port 80 using Windows.  ( C:\&gt; &lt;b&gt;telnet slashdot.org 80&lt;/b&gt; )&lt;br /&gt;&lt;br /&gt;Amazingly, it actually worked. Here's what I sent:&lt;br /&gt;&lt;br /&gt;&lt;font color="#0000FF"&gt;&lt;br /&gt;HEAD / HTTP/1.1   &amp;lt;enter&amp;gt;&lt;br /&gt;Host: slashdot.org  &amp;lt;enter&amp;gt;&lt;br /&gt;&amp;lt;enter&amp;gt;&lt;br /&gt;&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;...and I received:&lt;br /&gt;&lt;br /&gt;&lt;font color="#00FF00"&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;HTTP/1.1 200 OK&lt;br /&gt;Server: Apache/1.3.41 (Unix) mod_perl/1.31-rc4&lt;br /&gt;SLASH_LOG_DATA: shtml&lt;br /&gt;X-Powered-By: Slash 2.005001&lt;br /&gt;X-Bender: The laws of science be a harsh mistress.&lt;br /&gt;X-XRDS-Location: http://slashdot.org/slashdot.xrds&lt;br /&gt;Cache-Control: no-cache&lt;br /&gt;Pragma: no-cache&lt;br /&gt;Content-Type: text/html; charset=iso-8859-1&lt;br /&gt;Content-Length: 99945&lt;br /&gt;Date: Sat, 12 Sep 2009 16:14:08 GMT&lt;br /&gt;X-Varnish: 1558400757 1558400652&lt;br /&gt;Age: 6&lt;br /&gt;Connection: keep-alive&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;First of all, I just impersonated a Web browser -- and you can, too! How cool is that? You open a &lt;a href="http://en.wikipedia.org/wiki/Telnet"&gt;Telnet&lt;/a&gt; connection to the webserver's Port 80, send a properly-formatted request for information, and it replies. &lt;br /&gt;&lt;br /&gt;The other interesting part -- a little wasteful but still cool -- is the "X-Bender:" header. Slashdot's webservers apparently insert interesting little quotes from Bender and other staples of geek culture into their HTTP headers. (If the Internet is the Information Superhighway, think of this sort of thing like the "wash me" and "I may be slow, but I'm ahead of you" messages you sometimes see written in the dust on the back of eighteen-wheelers. The Muggles shopping at the Wal-Marts where the trucks deliver their goods will never see these messages, but they're there if you know where to look. Geeks being geeks, the dark steam tunnels of Internet protocols are no doubt full of such things.)&lt;br /&gt;&lt;br /&gt;Finally, a bit of philosophy. The reason it all works -- and the reason that it's so open and free -- is exactly this sort of modularity. Why is playing with the HTTP protocol cool? Not because it's particularly interesting, but because, out there, there's a document that shows the publicly-available, agreed-upon protocol for requesting information from a webserver -- and if this protocol is followed, it works no matter who wrote the webserver, what country it's in, what language the programmers used (or speak), or what information is on the server. HTTP, in turn, rests on other, similar layers, with other, similar protocols. With the proper (freely available) documentation in hand, you could build your own network from scratch -- blowing glass to make vacuum tubes and designing your own computer, and connect it to a cable or DSL modem in your house. If you did everything right, it would work. No magic, no proprietary "sorry, you don't get to see how this bit works," no smoke-and-mirrors. If you use an open-source OS like Linux, you can (in theory) literally understand every movement of every bit, all the way through the whole process. It's both a great way to learn about technology -- and a great way to show just how cool freedom is.&lt;br /&gt;&lt;br /&gt;We need to make sure it always stays this way.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8451817541345985506-8074702377812063446?l=www.paleotechnologist.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/8451817541345985506/8074702377812063446/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=8451817541345985506&amp;postID=8074702377812063446' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8451817541345985506/posts/default/8074702377812063446'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8451817541345985506/posts/default/8074702377812063446'/><link rel='alternate' type='text/html' href='http://www.paleotechnologist.net/2009/09/under-hood.html' title='Under the hood'/><author><name>M. Eric Carr</name><uri>http://www.blogger.com/profile/12503325087243338069</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='00036077788250198290'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8451817541345985506.post-7966887052118263844</id><published>2009-09-11T16:40:00.003-04:00</published><updated>2009-09-11T16:57:46.592-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='youredoingitwrong'/><category scheme='http://www.blogger.com/atom/ns#' term='pigeon'/><category scheme='http://www.blogger.com/atom/ns#' term='ISP'/><category scheme='http://www.blogger.com/atom/ns#' term='paleotechnology'/><category scheme='http://www.blogger.com/atom/ns#' term='pigeonbaud'/><category scheme='http://www.blogger.com/atom/ns#' term='bandwidth'/><category scheme='http://www.blogger.com/atom/ns#' term='South Africa'/><title type='text'>Really for the birds</title><content type='html'>Now I know what my friend Leon is talking about when he complains about slow Internet speeds in Durban, South Africa.&lt;br /&gt;&lt;br /&gt;A company in South Africa, annoyed with the slow ISP connectivity available, decided to stage a race between their ISP and a carrier pigeon, to see which was a faster method of transferring 4GB of call center data logs to their branch office 80km away.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://ca.news.yahoo.com/s/reuters/090909/odds/odd_us_safrica_pigeon"&gt;The pigeon won&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Not only that, but it blew their ISP away. In the two hours, six minutes, 57 seconds it took to complete the data transfer (one hour eight minutes flight time, plus uploading, downloading, etc), their ISP (Telkom) managed to transfer only 4% of the data. For this particular application, that's 1/25 of a pigeonbaud, I suppose.&lt;br /&gt;&lt;br /&gt;As Andrew S. Tanenbaum famously noted, "Never underestimate the bandwidth of a station wagon full of tapes hurtling down the highway."&lt;br /&gt;&lt;br /&gt;...Or, apparently, of a homing pigeon carrying an SD card. And this one wasn't even highly &lt;a href="http://blog.dosquatch.com/2009/03/dosquatch-vs-pigeon.html"&gt;motivated&lt;/a&gt;!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8451817541345985506-7966887052118263844?l=www.paleotechnologist.net' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://ca.news.yahoo.com/s/reuters/090909/odds/odd_us_safrica_pigeon' title='Really for the birds'/><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/8451817541345985506/7966887052118263844/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=8451817541345985506&amp;postID=7966887052118263844' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8451817541345985506/posts/default/7966887052118263844'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8451817541345985506/posts/default/7966887052118263844'/><link rel='alternate' type='text/html' href='http://www.paleotechnologist.net/2009/09/really-for-birds.html' title='Really for the birds'/><author><name>M. Eric Carr</name><uri>http://www.blogger.com/profile/12503325087243338069</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='00036077788250198290'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8451817541345985506.post-4075113233282437988</id><published>2009-09-08T22:33:00.003-04:00</published><updated>2009-09-08T22:44:04.736-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='RSS'/><category scheme='http://www.blogger.com/atom/ns#' term='blogging'/><category scheme='http://www.blogger.com/atom/ns#' term='Twitter'/><category scheme='http://www.blogger.com/atom/ns#' term='paleotechnology'/><title type='text'>For the birds...?</title><content type='html'>Not understanding what all the fuss is about, but being both curious and bored, I decided to &lt;a href="http://twitter.com/FlyByPC"&gt;sign up for Twitter&lt;/a&gt;. Apparently I'm now officially a "Twitterer." &lt;br /&gt;&lt;br /&gt;Now, to figure out what to tweet about. (Never mind figuring out whether anyone cares or not -- I have two followers already. Welcome, whoever you are. Good to see there's someone out there more bored than I am, I guess!)&lt;br /&gt;&lt;br /&gt;Philosophically, I don't "get" all of this emphasis on social networks. My take on ubiquitous connectivity and IT automation is that one of the really cool benefits of all of this is the extent to which it *reduces* necessary interpersonal contact. For instance, online banking and e-commerce.&lt;br /&gt;&lt;br /&gt;However, I may be a curmudgeon and "born old" according to several friends -- but no technologist should dismiss technologies out of hand without a good reason. Twitter seems harmless enough, providing one is careful about the information tweeted -- so why not give it a try?&lt;br /&gt;&lt;br /&gt;Right now, though, I'm blogging about tweeting -- and have connected Twitter to this blog via the &lt;a href="http://www.paleotechnologist.net/atom.xml"&gt;RSS feed&lt;/a&gt;. There's a whole lot of connectivity there -- but it's all self-referential. Is there a point? I guess I'll see.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8451817541345985506-4075113233282437988?l=www.paleotechnologist.net' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://twitter.com/FlyByPC' title='For the birds...?'/><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/8451817541345985506/4075113233282437988/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=8451817541345985506&amp;postID=4075113233282437988' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8451817541345985506/posts/default/4075113233282437988'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8451817541345985506/posts/default/4075113233282437988'/><link rel='alternate' type='text/html' href='http://www.paleotechnologist.net/2009/09/for-birds.html' title='For the birds...?'/><author><name>M. Eric Carr</name><uri>http://www.blogger.com/profile/12503325087243338069</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='00036077788250198290'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8451817541345985506.post-8308188127116779505</id><published>2009-09-03T21:57:00.006-04:00</published><updated>2009-09-03T22:25:15.255-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PIC18F4620'/><category scheme='http://www.blogger.com/atom/ns#' term='PIC18F'/><category scheme='http://www.blogger.com/atom/ns#' term='PIC'/><category scheme='http://www.blogger.com/atom/ns#' term='temperature sensor'/><category scheme='http://www.blogger.com/atom/ns#' term='one-wire'/><category scheme='http://www.blogger.com/atom/ns#' term='embedded'/><category scheme='http://www.blogger.com/atom/ns#' term='timing'/><category scheme='http://www.blogger.com/atom/ns#' term='DS18B20'/><category scheme='http://www.blogger.com/atom/ns#' term='Maxim'/><category scheme='http://www.blogger.com/atom/ns#' term='assembly'/><title type='text'>ROMfoolery</title><content type='html'>"I spy, with my little eye, a ROM address beginning with the sequence 0001010000011001..."&lt;br /&gt;&lt;br /&gt;I've recently been playing with &lt;a href="http://www.sparkfun.com/commerce/product_info.php?products_id=245"&gt;DS18B20 One-Wire digital temperature sensors&lt;/a&gt; (from &lt;a href="http://www.sparkfun.com"&gt;Sparkfun&lt;/a&gt; -- big surprise there). They're fun little devices -- accurate and cheap. They're also insanely easy to wire up, having only three leads (they look just like 2N2222 transistors). &lt;br /&gt;&lt;br /&gt;When Maxim says "one wire," they &lt;b&gt;mean&lt;/b&gt; it (not counting ground); you can even power it using the data line if you're careful about timings and provide a strong pull-up when needed. Developing microcontroller code to drive them is nontrivial, though (various layers include bit timings, commands and ROM codes etc), but once it's working, they're very reliable.&lt;br /&gt;&lt;br /&gt;Temperature A-to-D conversion takes up to 750ms, but you can issue a broadcast command to get all devices on the line to start a conversion at once, then read the results back at your leisure.&lt;br /&gt;&lt;br /&gt;Here's the first interesting part.&lt;br /&gt;&lt;br /&gt;With a one-wire interface, timing and coordination of reliable two-way communications gets tricky. There's no synchronization line -- and from the description in the datasheet, the timing accuracy of these sensors isn't all that wonderful, anyway. The scheme that Maxim worked out was that a short low pulse represents a one, and a longer low pulse represents a zero. A really long (more than 480 microseconds long) pulse resets the bus altogether.&lt;br /&gt;&lt;br /&gt;But wait, there's more.&lt;br /&gt;&lt;br /&gt;The interface is specified so that multiple slave devices (I.E. multiple sensors) can share the bus. This takes not only coordination, but implementing the bus with an open-drain configuration (in other words, you use a fairly weak resistor to put 5V on the bus -- and devices are only allowed to short the bus to ground, not pull it high.) This keeps communication collisions between devices on the bus from causing short circuits and burning up output transistors -- but it also complicates timings and the basic communications protocol.&lt;br /&gt;&lt;br /&gt;Now for the really interesting part.&lt;br /&gt;&lt;br /&gt;Each sensor has a unique 64-bit serial number, which you need to know in order to interface with it. It's not marked on the package (too small) or in the literature you get when you order the part (that would make too much sense), so Maxim provides a "Search ROM" feature, which uses a bizarre take on Manchester coding to send the address back. Two bits are read out at a time for each bit position in the 64-digit ROM code. 01 means the bit is a 0; 10 means it's a 1; 00 means a conflict (someone on the bus sent a 1 and someone else -- maybe a lot of someone elses -- sent a 0); and 11 means that nobody is listening (check the circuit?). By going through bit by bit (with a lot of backtracking, if addressing a lot of these on one line), you can eventually determine the ROM codes for all devices on the line. It's very Byzantine -- but when you think about it, that's really a result of the one-wire interface. &lt;br /&gt;&lt;br /&gt;Here's an example of how it would work with simpler devices that only had 4-bit ROM codes. &lt;br /&gt;&lt;br /&gt;Suppose you had three devices on the bus, with ROM codes 0110, 1110, and 0101. &lt;br /&gt;&lt;br /&gt;The least-significant bit is sent first; this comes back in two-bit Manchester coding as an "00." (I.E. there's at least one of each variety.)&lt;br /&gt;&lt;br /&gt;The master (microcontroller) makes a decision at this point, and sends a one or zero. Any devices which match this bit in the first position keep listening; all others go idle and wait for a bus reset. In this case, we'll default to zeros first. The master notes a conflict here, and sends a zero.&lt;br /&gt;&lt;br /&gt;Sensor 0101 reads the zero and goes idle. Sensors 0110 and 1110 read the zero and continue, since it matches the least-significant bit in their ROM code.&lt;br /&gt;&lt;br /&gt;The master then continues with reading the second bit. This comes back as a "10" -- apparently all remaining devices agree that there is a "1" here. The master records a "1" and continues.&lt;br /&gt;&lt;br /&gt;The master reads a third bit, which comes back as another 10. Another "1" is recorded and transmitted.&lt;br /&gt;&lt;br /&gt;The master reads a fourth bit, which reads "00". (Another conflict.) The master sends a zero; device 1110 goes idle, while 0110 is made active (having passed all the way through its ROM code). The master records 0110 as the ROM code of one of the devices on the bus -- and records 1110, since it can deduce that; this being the last bit, that's the only possibility.&lt;br /&gt;&lt;br /&gt;The master then resets the bus, starts the ROM search process again, but sends a "1" this time when it reaches the conflict in the first bit. Device 0101 remains active this time while 1110 and 0110 go idle. The master then continues with the process; since 0101 is the only device left on the bus, no more conflicts occur.&lt;br /&gt;&lt;br /&gt;Think of this process, expanded to 64 bits, and you have an idea of the situation. And not only that -- you then have to figure out which sensor is which, if they are in different positions!&lt;br /&gt;&lt;br /&gt;The amazing part is, once the code for this is written, it's all over in a few milliseconds, and the ROM codes appear on the LCD...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8451817541345985506-8308188127116779505?l=www.paleotechnologist.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/8451817541345985506/8308188127116779505/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=8451817541345985506&amp;postID=8308188127116779505' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8451817541345985506/posts/default/8308188127116779505'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8451817541345985506/posts/default/8308188127116779505'/><link rel='alternate' type='text/html' href='http://www.paleotechnologist.net/2009/09/romfoolery.html' title='ROMfoolery'/><author><name>M. Eric Carr</name><uri>http://www.blogger.com/profile/12503325087243338069</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='00036077788250198290'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8451817541345985506.post-892194720785535057</id><published>2009-08-26T13:12:00.003-04:00</published><updated>2009-08-26T17:23:29.147-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PIC18F4620'/><category scheme='http://www.blogger.com/atom/ns#' term='PIC18F'/><category scheme='http://www.blogger.com/atom/ns#' term='PIC'/><category scheme='http://www.blogger.com/atom/ns#' term='microcontroller'/><category scheme='http://www.blogger.com/atom/ns#' term='embedded'/><category scheme='http://www.blogger.com/atom/ns#' term='8-bit'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='assembly'/><title type='text'>PIC programming, Cadillac style!</title><content type='html'>I've been working with the &lt;a href="http://www.microchip.com/wwwproducts/Devices.aspx?dDocName=en010304"&gt;PIC18F4620&lt;/a&gt;, and am impressed by how easy it is to program, compared to the smaller PICs. I think I'm in love. Or at least in lust.&lt;br /&gt;&lt;br /&gt;Here are some of the improvements from an embedded developer's point of view, as contrasted to the (still very cool) &lt;a href="http://www.microchip.com/wwwproducts/Devices.aspx?dDocName=en026561"&gt;16F887&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;32MHz max internal clock speed instead of 8MHz&lt;/b&gt;&lt;br /&gt;This alone would be worth it -- a PIC running at 8MIPS! It will go to 10MIPS with an external 10MHz clock, but 32MHz with no external parts needed is very cool. For us PIC16 afficionados, it's like finding out that your new car can go 400km/hr on the freeway, legally, when the old one only did 100.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;MULWF and MULLW instructions&lt;/b&gt;&lt;br /&gt;You can tell the PIC16 programmers in the audience; they just started drooling. Hardware multiply -- and not only that, but hardware multiply that executes in a single instruction cycle. I see a re-writing of some of my math libraries in the cards!&lt;br /&gt;&lt;br /&gt;&lt;b&gt;(almost) NO MORE PCLATH!&lt;/b&gt;&lt;br /&gt;Ding, dong, the witch is (almost) dead! GOTOs and CALLs on PIC18s access the entire memory space directly. So, unless you're doing a computed GOTO, you don't have to worry anymore about the value of the high bits of the program counter. No more save-the-old-PCLATH-value-then-set-the-new-one-then-call-the-routine-then-return-then-restore-the-old-PCLATH business. Just GOTO or CALL your routine! And with PIC18s, you really don't want to do computed GOTOs anyway, because now, you have...&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;TBLRD* and TBLWRT* instructions&lt;/b&gt;&lt;br /&gt;PICs are Harvard architecture parts -- meaning they have separate memory spaces for instructions and data. Before the PIC18s, there was no way to access the program memory at runtime -- lookup tables were handled by a series of RETLW statements, whether specific or produced by the assembler from "dt" statements. The TBLRD* and TBLWRT* instructions allow PIC18s to read from and write to program memory. One use of this is to use the (relatively huge) 64kB of program space Flash memory (32 kWords, but addressable as bytes for data use). Large, verbose diagnostic messages can now be programmed relatively easily, with just a little more work than calling printf() from C.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;ADDWFC&lt;/b&gt;&lt;br /&gt;Add W to F with Carry. This is a bigger deal than it sounds. It will speed up the ADD32 and SUB32 libraries quite a bit, I think.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;MOVFF instruction&lt;/b&gt;&lt;br /&gt;With MOVFF (which takes two instruction cycles), you can copy a byte directly from one memory location to another, without going through the W register. This doesn't always save time (although it's always at least as fast as the old way), but not having to go through the W register can be very helpful.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Branch instructions&lt;/b&gt;&lt;br /&gt;Branch-if-zero. Branch-if-not-zero. Branch-if-carry. Branch-if-not-carry. Branch-if-the-moon-is-in-the-seventh-house, for all I know. Well, maybe not that last, but PICs now have more branch statements than just BTFSS and BTFSC. This doesn't quite rank up there with MULWF or TBLRD as far as I'm concerned, but I'm told it makes the compiler guys happy.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;RRNCF and RLNCF&lt;/b&gt;&lt;br /&gt;Rotates that don't go through carry. Huh. And RRF/RLF are now RRCF/RLCF, just to break older code, I suppose.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;TSTFSZ&lt;/b&gt;&lt;br /&gt;Test F, Skip if Zero. Sounds like it could be useful.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;DCFSNZ and INFSNZ&lt;/b&gt;&lt;br /&gt;Now you can increment or decrement and skip if *not* zero. I'm confused now; this is backwards from how these are normally used. This smells like something a compiler would like to have available.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;CPFSEQ/CPFSGT/CPFSLT&lt;/b&gt;&lt;br /&gt;Compare F with W, Skip if equal, greater-than, or less-than. Hmm. Equality tests sound useful.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;BTG&lt;/b&gt;&lt;br /&gt;Bit Toggle, to go with BSF and BCF. Well, I guess it was the missing option...&lt;br /&gt;&lt;br /&gt;&lt;b&gt;DAW&lt;/b&gt;&lt;br /&gt;Decimal Adjust W. Something to do with BCD math. Sounds possibly useful.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;PUSH and POP&lt;/b&gt;&lt;br /&gt;More to the point, there's a real, honest-to-goodness stack now! This is a good thing. Low-range and mid-range 8-bit PICs have an 8-entry hardware stack. Except in simulation, it was anybody's guess just how deep into the stack a program already was when a particular subroutine was called. This made for very conservative use of the CALL statement -- and has prompted me more than once to do things with macros that I really shouldn't have.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;RCALL&lt;/b&gt;&lt;br /&gt;Relative Call. This sounds like a segfault waiting to happen. I hope it's not what I think it is...&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Two NOP opcodes&lt;/b&gt;&lt;br /&gt;To quote &lt;a href="http://www.wischik.com/lu/senses/ffemanual.pdf"&gt;Bob from Frontier: First Encounters&lt;/a&gt;, "My, oh my, what happened here?" &lt;br /&gt;&lt;br /&gt;&lt;b&gt;RESET&lt;/b&gt;&lt;br /&gt;There's probably a legit reason for this, but it escapes me at the moment. Why not just GOTO 0x0000?&lt;br /&gt;&lt;br /&gt;&lt;b&gt;MOVLB&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Move Literal to BSR? *looks up what BSR is, anyway*&lt;br /&gt;&lt;br /&gt;&lt;b&gt;LFSR&lt;/b&gt;&lt;br /&gt;Move Literal to FSR? *looks up what FSR is, too*&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;OK, now for some of the drawbacks:&lt;br /&gt;&lt;b&gt;Nonhomogenous instruction size&lt;/b&gt;&lt;br /&gt;In other words, some instructions are two words long, and others are one. This means that you can't just cavalierly do a GOTO $-5 to jump back five instructions anymore, without at least thinking about which instructions are which. If you inadvertently point to a location in the middle of an instruction, the assembler will tell you. If it happens to line up on another one, it won't know anything is wrong until you run it and it doesn't work as intended. Best is to come up with a consistent labeling scheme and make liberal use of good, mnemonic labels, aiming the GOTOs at them instead of using relative jumps. This will also stop you from breaking the code when you add more lines in the middle of the loop, later. (Anyone else been bit by this one?)&lt;br /&gt;&lt;br /&gt;&lt;b&gt;They're a bit more expensive&lt;/b&gt;&lt;br /&gt;Waah. They're worth it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8451817541345985506-892194720785535057?l=www.paleotechnologist.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/8451817541345985506/892194720785535057/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=8451817541345985506&amp;postID=892194720785535057' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8451817541345985506/posts/default/892194720785535057'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8451817541345985506/posts/default/892194720785535057'/><link rel='alternate' type='text/html' href='http://www.paleotechnologist.net/2009/08/pic-programming-cadillac-style.html' title='PIC programming, Cadillac style!'/><author><name>M. Eric Carr</name><uri>http://www.blogger.com/profile/12503325087243338069</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='00036077788250198290'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8451817541345985506.post-3746071155706582251</id><published>2009-08-13T16:36:00.005-04:00</published><updated>2009-09-11T19:03:12.872-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='progress'/><category scheme='http://www.blogger.com/atom/ns#' term='Walkman'/><category scheme='http://www.blogger.com/atom/ns#' term='technology'/><category scheme='http://www.blogger.com/atom/ns#' term='mp3'/><category scheme='http://www.blogger.com/atom/ns#' term='Millenials'/><category scheme='http://www.blogger.com/atom/ns#' term='Singularity'/><category scheme='http://www.blogger.com/atom/ns#' term='audio'/><category scheme='http://www.blogger.com/atom/ns#' term='paleotechnology'/><title type='text'>Paleotech, through the eyes of a Millenial...</title><content type='html'>What happens when you give a modern teenager a Walkman? &lt;a href="http://news.bbc.co.uk/2/hi/uk_news/magazine/8117619.stm"&gt;You get some interesting insights about technology.&lt;/a&gt; It's amazing how far technology has come -- and a reminder that yes, there really is such a thing as paleotechnology. (For us children of the 70s, the fact that cassette tapes have two sides is completely intuitive. For someone seeing a Walkman for the first time, perhaps not.) For how many other forms of technology &lt;a href="http://www.wired.com/geekdad/2009/07/100-things-your-kids-may-never-know-about"&gt;might we forget some of the nuances,&lt;/a&gt; or even some of the important things? &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Fellow paleotechnology expert &lt;a href="http://blog.dosquatch.com"&gt;DOSquatch&lt;/a&gt; writes about the subtle yet extremely important &lt;a href="http://blog.dosquatch.com/2009/07/art-of-troubleshooting.html"&gt;art of troubleshooting.&lt;/a&gt; He definitely has a point. I would also add that it's important to document technologies as they are developed, lest we end up having to reinvent them all over again to get them to work (or end up breaking them inadvertently).&lt;br /&gt;&lt;br /&gt;Actually, the comparison between a Walkman and modern mp3 players is a good example of how technology is not only progressing, but accelerating. When my grandparents went on a trip to Japan and brought back one of the first electronic calculators, it was definitely new -- but easily understood in a few minutes. When cassettes started to take over some of the role of record players*, they too were relatively easily understood. Increasingly, though, the capabilities of new devices are breaking down old barriers and requiring new ways of thinking about things. (This isn't necessarily a Bad Thing, but it bears mentioning.) &lt;br /&gt;&lt;br /&gt;For instance, try explaining the subtle relationship between mp3 files and playlists to someone who doesn't truly &lt;a href="http://en.wikipedia.org/wiki/Grok"&gt;grok&lt;/a&gt; filesystems, shortcuts, and links. You might be able to explain it, but it will take a lot of explaining. Try a more advanced topic, like why a satellite-modem connection works fine for streaming audio but is horrible for interactive websites -- and the explanation can take much longer. Bring DRM, P2P, streaming, file sizes, bitrates, codecs, protocols, IP addresses, connectivity, lag, bandwidth, Bluetooth, AC3 and oversampling into the conversation, and suddenly you're speaking a foreign language.&lt;br /&gt;&lt;br /&gt;Technological progress is definitely accelerating, and every year, I hear more and more people talk about the &lt;a href="http://en.wikipedia.org/wiki/Technological_Singularity"&gt;Singularity&lt;/a&gt;. I'm even starting to believe it myself. A lot of it does sound farfetched -- yet technical progress in many fields is starting to look asymptotic. We definitely live in interesting times: they say that by 2025, supercomputers should be sufficiently powerful to run realtime simulations of the human brain. With computer speeds doubling every year or two, we could well end up as spectators to the fastest and most profound changes in history.&lt;br /&gt;&lt;br /&gt;As long as we can control the direction things take, though, &lt;a href="http://itre.cis.upenn.edu/~myl/languagelog/archives/000399.html"&gt;I, for one, welcome our new robotic overlords.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* Yeah, yeah. Nobody, least of all me, is going to claim that cassettes beat LPs for audio quality. I draw the line at CDs, though. Maybe 44.1kHz/16bit isn't optimal, but it sure beats dragging a rock through a plastic groove.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8451817541345985506-3746071155706582251?l=www.paleotechnologist.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/8451817541345985506/3746071155706582251/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=8451817541345985506&amp;postID=3746071155706582251' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8451817541345985506/posts/default/3746071155706582251'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8451817541345985506/posts/default/3746071155706582251'/><link rel='alternate' type='text/html' href='http://www.paleotechnologist.net/2009/08/paleotech-through-eyes-of-millenial.html' title='Paleotech, through the eyes of a Millenial...'/><author><name>M. Eric Carr</name><uri>http://www.blogger.com/profile/12503325087243338069</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='00036077788250198290'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8451817541345985506.post-3196902846295168298</id><published>2009-08-11T00:32:00.004-04:00</published><updated>2009-08-11T01:02:35.487-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PIC'/><category scheme='http://www.blogger.com/atom/ns#' term='12F683'/><category scheme='http://www.blogger.com/atom/ns#' term='555'/><title type='text'>Digital blasphemy?</title><content type='html'>When is a &lt;a href="http://en.wikipedia.org/wiki/555_timer_IC"&gt;555&lt;/a&gt; not a 555?&lt;br /&gt;&lt;br /&gt;When it's really a &lt;a href="http://en.wikipedia.org/wiki/PIC_microcontroller"&gt;PIC&lt;/a&gt;!&lt;br /&gt;&lt;br /&gt;The design of the &lt;a href="http://www.paleotechnologist.net/2008_11_01_archive.html"&gt;DrACo/Z80 computer&lt;/a&gt; calls for a 555 timer (a great piece of paleotech, even if it still isn't sure after 38 years whether it's really a digital or analog part.) However, for running higher-speed programs on the DrACo, I wanted to have the option to, as Emeril might say, "kick it up a notch." I figured that a PIC12F683 would do nicely, since it could be programmed to provide a nice, stable TTL clock output without any external components.&lt;br /&gt;&lt;br /&gt;The only problem was, the PIC's ground lead is on Pin 8 and its power lead is on Pin 1; the 555 has the opposite configuration. The solution? Possibly the single ugliest soldering job I've done in a long time (and that's saying something, folks.) &lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.paleotechnologist.net/uploaded_images/PIC-555-stand-in-719281.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 346px;" src="http://www.paleotechnologist.net/uploaded_images/PIC-555-stand-in-719245.jpg" border="0" alt="" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Yet, it works -- and is a nice, drop-in replacement for the 555, swapping the astable oscillator mode for a much faster 2MHz clock output.&lt;br /&gt;&lt;br /&gt;This is also the single shortest program I've ever written for a PIC:&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;org 0x00&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;banksel OSCCON&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;movlw 0x70&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;movwf OSCCON&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;goto $&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;It sets the clock to 8MHz, then sits in a single-instruction loop and contemplates its navel. So, for that matter, when is a PIC not a PIC? When it's not doing any computing at all -- but just providing a 2MHz CLKOUT signal.&lt;br /&gt;&lt;br /&gt;But sometimes, the smaller the MCU, the more creative the applications. I've heard of people using microcontrollers in fireworks to provide split-second timing for the pyrotechnics. At 30 cents each for something like the 10F200, it only sounds crazy until you think about it. &lt;br /&gt;&lt;br /&gt;...and yeah, this project could have been very easily done with a less expensive PIC -- but 12F683s are so versatile that I keep a couple dozen of them on hand for various things. They're like digital LEGO...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8451817541345985506-3196902846295168298?l=www.paleotechnologist.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/8451817541345985506/3196902846295168298/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=8451817541345985506&amp;postID=3196902846295168298' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8451817541345985506/posts/default/3196902846295168298'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8451817541345985506/posts/default/3196902846295168298'/><link rel='alternate' type='text/html' href='http://www.paleotechnologist.net/2009/08/digital-blasphemy.html' title='Digital blasphemy?'/><author><name>M. Eric Carr</name><uri>http://www.blogger.com/profile/12503325087243338069</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='00036077788250198290'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8451817541345985506.post-4834715757305404760</id><published>2009-08-10T17:41:00.004-04:00</published><updated>2009-08-10T22:10:30.876-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ODU CS'/><category scheme='http://www.blogger.com/atom/ns#' term='bottlesofbeer'/><category scheme='http://www.blogger.com/atom/ns#' term='CS'/><category scheme='http://www.blogger.com/atom/ns#' term='Pascal'/><category scheme='http://www.blogger.com/atom/ns#' term='Dennis Ray'/><title type='text'>Thatsa lotta beer!</title><content type='html'>The statute of limitations is up on this by now, I think...&lt;br /&gt;&lt;br /&gt;Back in the day, several ne'er-do-well CS students were enrolled in a certain CS150/151 class/lab, taught by a certain D. Ray with a certain M. Ghose as a lab TA. As the legend goes, they were bored in lab one day (having finished the ridiculously easy assignment in a few minutes, but not being allowed to leave early). They got the idea to put into practice their newfound knowledge of unsigned long integers (32 bits of nonnegative goodness, on those machines) by writing a technological take on the age-old "bottles of beer" song known and loathed by school-bus-drivers everywhere.&lt;br /&gt;&lt;br /&gt;The technological take was to make the computers "sing" the verses of "Four billion bottles of beer on the wall" by writing the verses out to a disk. The code looked something* like the following:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;int main(){&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;unsigned long long beernum;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;for(beernum=4000000000;beernum&gt;0;beernum--){&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;printf("%llu bottle",beernum);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if(beernum!=1) printf("s");&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;printf(" of beer on the wall,\n");&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;printf("%llu bottle",beernum);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if(beernum!=1) printf("s");&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;printf(" of beer,\n");&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;printf("Take one down,\n");&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;printf("Pass it around,\n");&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;printf("%llu bottle",beernum-1);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if(beernum!=2) printf("s");&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;printf(" of beer on the wall...\n\n");&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;return(0);    //Outta beer, outta here!&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;They finished writing it, so the story goes, just before the lab period ended, and set it in motion, telling their friend in the next section that it might be a good idea to save his work. Apparently the sysadmins hadn't heard of disk quotas, because the drives rapidly filled up with the verses of what had to be the world's longest song. According to aforementioned friend, one of the sysadmins ran into the lab about halfway through the next section, asking for certain students by name. &lt;br /&gt;&lt;br /&gt;The interesting thing is, Moore's Law being what it is, while such files might not fit in a user's disk quota, they probably wouldn't crash the server, either; at about 124 bytes per verse, the "song" would take up about 496GB (depending on whose definition of a GB you use.) This would actually fit on the free space on my 1-TB drive on my workstation at home (MSRP of just under a hundred bucks.)&lt;br /&gt;&lt;br /&gt;Moore's Law rocks.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* OK, so this isn't the original code by a long ways -- but it gives the flavor. The original:&lt;ul&gt;&lt;br /&gt;&lt;li&gt; was written in Pascal, not C;&lt;/li&gt;&lt;br /&gt;&lt;li&gt; wrote to the disk instead of standard I/O, and&lt;/li&gt;&lt;br /&gt;&lt;li&gt; probably didn't have the fancy "bottle" / "bottles" code&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8451817541345985506-4834715757305404760?l=www.paleotechnologist.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/8451817541345985506/4834715757305404760/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=8451817541345985506&amp;postID=4834715757305404760' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8451817541345985506/posts/default/4834715757305404760'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8451817541345985506/posts/default/4834715757305404760'/><link rel='alternate' type='text/html' href='http://www.paleotechnologist.net/2009/08/thatsa-lotta-beer.html' title='Thatsa lotta beer!'/><author><name>M. Eric Carr</name><uri>http://www.blogger.com/profile/12503325087243338069</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='00036077788250198290'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8451817541345985506.post-2846335694672016018</id><published>2009-08-06T13:30:00.003-04:00</published><updated>2009-08-06T13:48:53.869-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C'/><category scheme='http://www.blogger.com/atom/ns#' term='Linus Torvalds'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='C++'/><title type='text'>Linus Has Spoken</title><content type='html'>I was reading a recent article ("&lt;a href="http://www.embedded.com/218600142?pgno=3"&gt;Real Men program in C"&lt;/a&gt;) recently, and came across a link in the comments to Linus Torvalds' opinion on the whole C-vs-C++ thing. Let's just say he doesn't mince words. (This is an excerpt, but it captures the flavor of the &lt;a href="http://article.gmane.org/gmane.comp.version-control.git/57918"&gt;original post&lt;/a&gt;.)&lt;br /&gt;&lt;br /&gt;What Linus said.&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;C++ is a horrible language. It's made more horrible by the fact that a lot of substandard programmers use it, to the point where it's much much easier to generate total and utter crap with it. Quite frankly, even if the choice of C were to do *nothing* but keep the C++ programmers out, that in itself would be a huge reason to use C.&lt;br /&gt;&lt;br /&gt;In other words: the choice of C is the only sane choice. I know Miles Bader jokingly said "to piss you off", but it's actually true. I've come to the conclusion that any programmer that would prefer the project to be in C++ over C is likely a programmer that I really *would* prefer to piss off, so that he doesn't come and screw up any project I'm involved with.&lt;br /&gt;&lt;br /&gt;C++ leads to really really bad design choices. You invariably start using the "nice" library features of the language like STL and Boost and other total and utter crap, that may "help" you program, but causes:&lt;br /&gt;&lt;br /&gt; - infinite amounts of pain when they don't work (and anybody who tells me that STL and especially Boost are stable and portable is just so full of BS that it's not even funny)&lt;br /&gt;&lt;br /&gt; - inefficient abstracted programming models where two years down the road you notice that some abstraction wasn't very efficient, but now all your code depends on all the nice object models around it, and you cannot fix it without rewriting your app.&lt;br /&gt;&lt;br /&gt;In other words, the only way to do good, efficient, and system-level and portable C++ ends up to limit yourself to all the things that are basically available in C. And limiting your project to C means that people don't screw that up, and also means that you get a lot of programmers that do actually understand low-level issues and don't screw things up with any idiotic "object model" crap.&lt;br /&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8451817541345985506-2846335694672016018?l=www.paleotechnologist.net' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://article.gmane.org/gmane.comp.version-control.git/57918' title='Linus Has Spoken'/><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/8451817541345985506/2846335694672016018/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=8451817541345985506&amp;postID=2846335694672016018' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8451817541345985506/posts/default/2846335694672016018'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8451817541345985506/posts/default/2846335694672016018'/><link rel='alternate' type='text/html' href='http://www.paleotechnologist.net/2009/08/linus-has-spoken.html' title='Linus Has Spoken'/><author><name>M. Eric Carr</name><uri>http://www.blogger.com/profile/12503325087243338069</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='00036077788250198290'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8451817541345985506.post-1139977709791101499</id><published>2009-08-05T16:56:00.004-04:00</published><updated>2009-08-05T17:09:21.433-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='WTF'/><category scheme='http://www.blogger.com/atom/ns#' term='intel'/><category scheme='http://www.blogger.com/atom/ns#' term='bloatware'/><category scheme='http://www.blogger.com/atom/ns#' term='Windows'/><category scheme='http://www.blogger.com/atom/ns#' term='Core i7'/><category scheme='http://www.blogger.com/atom/ns#' term='NOP'/><title type='text'>Random Thought Of The Day</title><content type='html'>I wanna know:&lt;br /&gt;&lt;br /&gt;Why does Windows' Task Manager list the size of the "System Idle Process" as nonzero? Also, why is it different, on different computers? My desktop apparently takes 16K of memory to do absolutely nothing, while my laptop (memory hog that it apparently is) takes 28K to do just as much nothing-per-second.&lt;br /&gt;&lt;br /&gt;Now, I know 16K or 28K is a drop in the bucket these days -- my laptop has 2GB of memory and my desktop has 3GB* -- but honestly, why should doing &lt;i&gt;nothing&lt;/i&gt; be anything more than a line or two of assembly?&lt;br /&gt;&lt;br /&gt;* Yeah, 3GB. Not only does the 32-bit version of WinXP not always play nicely with 4GB of memory, but Core i7 processors have three memory pipelines, rather than the more understandable two or four. (Maybe Intel decided they liked Google's "Don't be evil" and decided to go with "Don't be normal" or something. I dunno.) At any rate, Core i7s like their memory in threes. Go figure.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8451817541345985506-1139977709791101499?l=www.paleotechnologist.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/8451817541345985506/1139977709791101499/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=8451817541345985506&amp;postID=1139977709791101499' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8451817541345985506/posts/default/1139977709791101499'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8451817541345985506/posts/default/1139977709791101499'/><link rel='alternate' type='text/html' href='http://www.paleotechnologist.net/2009/08/random-thought-of-day.html' title='Random Thought Of The Day'/><author><name>M. Eric Carr</name><uri>http://www.blogger.com/profile/12503325087243338069</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='00036077788250198290'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8451817541345985506.post-140623004315771752</id><published>2009-07-24T00:56:00.004-04:00</published><updated>2009-07-24T01:08:39.372-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='welltheresyourproblem'/><category scheme='http://www.blogger.com/atom/ns#' term='robot'/><category scheme='http://www.blogger.com/atom/ns#' term='PIC'/><category scheme='http://www.blogger.com/atom/ns#' term='d&apos;OH'/><category scheme='http://www.blogger.com/atom/ns#' term='SIGMA'/><category scheme='http://www.blogger.com/atom/ns#' term='quadruped'/><title type='text'>A step in the right direction</title><content type='html'>Well, that would explain it...&lt;br /&gt;&lt;br /&gt;The reason that the quadruped robot was doing the "funky chicken" instead of walking smoothly was mostly due to a major bug in the gait angle calculations. The angle of the leg is the sum of the "shoulder" and "knee" joint angles -- but the angle commands to the knee servos weren't taking the shoulder angles into account. This caused a really inefficient, jerking motion, rather than the relatively smooth gait that was intended.&lt;br /&gt;&lt;br /&gt;Oops.&lt;br /&gt;&lt;br /&gt;It's fixed now (and has a new chassis and circuit board). The video shows it moving more-or-less in a straight line, but with a few modifications to the gait tables, it can turn, at least in shallow circles. &lt;br /&gt;&lt;br /&gt;Next on the list:&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;   &lt;li&gt;Rubber tips for the feet&lt;/li&gt;&lt;br /&gt;   &lt;li&gt;Improvements to the turning routines&lt;/li&gt;&lt;br /&gt;   &lt;li&gt;Turn-in-place functionality&lt;/li&gt;&lt;br /&gt;   &lt;li&gt;Reverse (basically, just run the gait tables in reverse order)&lt;/li&gt;&lt;br /&gt;   &lt;li&gt;Wireless control&lt;/li&gt;&lt;br /&gt;   &lt;li&gt;A second microcontroller to handle control and communications&lt;/li&gt;&lt;br /&gt;   &lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;&lt;object width="660" height="525"&gt;&lt;param name="movie" value="http://www.youtube.com/v/TnIV38C6NUI&amp;hl=en&amp;fs=1&amp;rel=0&amp;color1=0x3a3a3a&amp;color2=0x999999&amp;border=1"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/TnIV38C6NUI&amp;hl=en&amp;fs=1&amp;rel=0&amp;color1=0x3a3a3a&amp;color2=0x999999&amp;border=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="660" height="525"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8451817541345985506-140623004315771752?l=www.paleotechnologist.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/8451817541345985506/140623004315771752/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=8451817541345985506&amp;postID=140623004315771752' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8451817541345985506/posts/default/140623004315771752'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8451817541345985506/posts/default/140623004315771752'/><link rel='alternate' type='text/html' href='http://www.paleotechnologist.net/2009/07/step-in-right-direction.html' title='A step in the right direction'/><author><name>M. Eric Carr</name><uri>http://www.blogger.com/profile/12503325087243338069</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='00036077788250198290'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry></feed>