<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	>

<channel>
	<title>Jim's Random Notes</title>
	<atom:link href="http://blog.mischel.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.mischel.com</link>
	<description>Musings on technology and life</description>
	<pubDate>Tue, 30 Dec 2008 13:59:52 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Free Enterprise?</title>
		<link>http://blog.mischel.com/2008/12/29/free-enterprise/</link>
		<comments>http://blog.mischel.com/2008/12/29/free-enterprise/#comments</comments>
		<pubDate>Tue, 30 Dec 2008 04:17:08 +0000</pubDate>
		<dc:creator>Jim</dc:creator>
		
		<category><![CDATA[Odds 'n Ends]]></category>

		<guid isPermaLink="false">http://blog.mischel.com/?p=347</guid>
		<description><![CDATA[Long ago, I was a staunch supporter of laissez faire capitalism, believing that private enterprise was much more efficient and effective at self regulation than any kind of government intervention.  But my support of laissez faire was based on two assumptions that proved wrong:

Businesses would operate morally.  That is, they would give value for value, [...]]]></description>
			<content:encoded><![CDATA[<p>Long ago, I was a staunch supporter of <a href="http://en.wikipedia.org/wiki/Laissez-faire"><em>laissez faire</em></a> capitalism, believing that private enterprise was much more efficient and effective at self regulation than any kind of government intervention.  But my support of <em>laissez faire</em> was based on two assumptions that proved wrong:</p>
<ol>
<li>Businesses would operate morally.  That is, they would give value for value, and not take advantage of customers, employees, or suppliers.</li>
<li>People could choose who to do business with, and had the means to find out about companies&#8217; business practices.</li>
</ol>
<p>All too often, one or both of those assumptions turned out to be wrong.  I found that businesses would often operate dishonestly and would make it difficult for others to find out about it.  In addition, at the time I was re-thinking my position (late 80s and early 90s), significant natural barriers existed which prevented the average person from finding out about a company&#8217;s business practices.</p>
<p>In theory, government&#8217;s role in <em>laissez-faire</em> capitalism is to serve as an arbiter&#8211;to supply a system of courts where disputes can be resolved.  But in practice, the game is rigged in favor of the party with the most money.  Rarely can an individual emerge victorious from a dispute with an unscrupulous corporation.</p>
<p>After a lot of internal turmoil, I came to the uncomfortable conclusion that some bit of government regulation is required.  I don&#8217;t <em>like</em> that conclusion, because I have a very strong (and I think well-placed) distrust of government.  But when the kids won&#8217;t play nice together, somebody has to be the daddy and enforce some civility.  The question, then, becomes &#8220;How much government regulation is best?&#8221;  My answer for the last 20 years has been, &#8220;as little as possible.&#8221;</p>
<p>I believed that minimal government regulation would keep companies in line: forcing them to operate more transparently, and preventing the most egregious abuses.  It&#8217;s like putting a simple lock on a door to keep honest people honest.  My belief in limited government regulation was based on something that I thought was universally true:  Individuals and corporations will operate in their own self interest, and enlightened self interest is a much better regulator than any government.</p>
<p>I still believe the second part to be true, but the assumption that people will act in their own self interest turned out to be wrong.  Shockingly so.</p>
<p>Some people will lay <em>all</em> of the blame for the credit crisis and the current economic situation on government.  Extremists on one side will say that laws such as the <a href="http://en.wikipedia.org/wiki/Community_Reinvestment_Act">Community Reinvestment Act</a> and its ilk caused the problem.  The other side holds that government didn&#8217;t do enough to pump liquidity into the market, or that it didn&#8217;t regulate enough.  I&#8217;ve seen that debate go back and forth like a tennis ball.</p>
<p>The problem isn&#8217;t near that simple.  There&#8217;s certainly plenty of blame to be laid on government&#8217;s doorstep.  Encouraging (one might say <em>requiring</em>)<em> </em>banks to make high-risk loans was a bad idea that was compounded by failing to exercise any oversight.  Failing to issue any kind of warning or institute any kind of control over high-risk investment vehicles was another huge mistake.</p>
<p>The majority of the blame for the current situation rests, not on government&#8217;s shoulders, but on the shoulders of the individuals who made a lot of really stupid mistakes for a very long time.   No, that&#8217;s being too charitable.  They didn&#8217;t make mistakes.  They consciously chose short-term gain over long-term consequences, most often with the certain knowledge that at some point they would have to pay.  The best recent example of that is <a href="http://en.wikipedia.org/wiki/Bernard_Madoff">Bernad Madoff Investment Securities</a>, although one only has to look at any bank that&#8217;s failed or taken government bailout money over the last year to see that the problem was wide-spread.</p>
<p>Plenty of people warned about the dangers inherent in the kind of &#8220;investing&#8221; that had become popular over the last few years.  It&#8217;s inconceivable to me that boards of directors and company CEOs didn&#8217;t know that they couldn&#8217;t keep it up forever.  And yet they kept trying!  Not only that, but they actively discouraged their employees from warning about the dangers.  I&#8217;ve seen several reports of employees being fired because they cautioned against participating in the madness.</p>
<p>Companies and individuals did not act in their own self interest.  They acted like a mob in a frenzy, trying to get as much as they could as quickly as possible, damn the long-term consequences.  I can understand individual employees acting in that manner.  I cannot understand it being condoned and even encouraged by CEOs and boards of directors.  It has shaken my belief in free enterprise.</p>
<p>Understand, banks and financial institutions are not the only ones who acted so stupidly.  Any mortgage broker who made a &#8220;stated income loan&#8221; or some such, any builder who over-extended himself in the hopes he could make a quick buck before sanity was restored, and anybody else who knowingly acted against his own long-term self interest is equally to blame.  I&#8217;ll lump in the Big Three auto makers there, as well.  The financial crisis didn&#8217;t wipe them out.  They were doing a fine job of wiping themselves out over the past 10 years or so.</p>
<p>Free enterprise assumes that people will act in their own self interest.  The idea is that what&#8217;s good for a business long term is also good for its customers and employees.  But if we can&#8217;t count on businesses to operate in their own self interest, then what can we do?  Government regulation can help in some ways, mostly to prevent businesses from defrauding their customers or taking advantage of their employees, but it can&#8217;t force businesses to make a profit.  On the contrary:  whether intended or not, much government regulation seems to be aimed at <em>preventing</em> profits of any kind.  In any case, we know that complete regulation is a bad idea that&#8217;s been tried and failed many times.</p>
<p>I&#8217;ve heard the argument that we haven&#8217;t really tried free enterprise:  that any government intervention in business destroys the system such that we can&#8217;t say whether or not the system would work.  Do the <em>laissez faire</em> propopents expect us to believe that companies will all of a sudden start acting morally if all regulations are eliminated?  There is no evidence that such a thing would happen, and plenty of evidence to the contrary.</p>
<p>That said, I continue to be highly skeptical of government regulation, and I&#8217;m strongly opposed to government control of or even intervention in economic matters.  But events of the last few years have left me almost equally skeptical of private enterprise, particularly large corporations whose boards of directors appear to be more concerned with today&#8217;s share price than with running a profitable business.</p>
<p>How do we ensure ethical business practices without stifiling the free and fair exchange of goods and services?  Can it be done through private regulation (i.e. market forces)?  If not, is there a &#8220;sweet spot&#8221; of government regulation that can do the same unobtrusively and efficiently?</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mischel.com/2008/12/29/free-enterprise/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Resetting a Nikon Coolpix 4600</title>
		<link>http://blog.mischel.com/2008/12/21/resetting-a-nikon-coolpix-4600/</link>
		<comments>http://blog.mischel.com/2008/12/21/resetting-a-nikon-coolpix-4600/#comments</comments>
		<pubDate>Sun, 21 Dec 2008 16:25:56 +0000</pubDate>
		<dc:creator>Jim</dc:creator>
		
		<category><![CDATA[Odds 'n Ends]]></category>

		<guid isPermaLink="false">http://blog.mischel.com/?p=345</guid>
		<description><![CDATA[My Nikon Coolpix 4600 digital camera stopped working the other day.  It just wouldn&#8217;t turn on.  When I hit the power button, the LED on the top would start blinking.  For a while.  The camera must have been doing something, though, because it&#8217;d drain a pair of batteries in just a few minutes.
An online search [...]]]></description>
			<content:encoded><![CDATA[<p>My Nikon Coolpix 4600 digital camera stopped working the other day.  It just wouldn&#8217;t turn on.  When I hit the power button, the LED on the top would start blinking.  For a while.  The camera must have been doing something, though, because it&#8217;d drain a pair of batteries in just a few minutes.</p>
<p>An online search revealed a number of people who had the same problem.  The &#8220;solutions&#8221; offered usually fell into one of two categories:  send the camera off to be repaired (a hard reset and a firmware upgrade) at a cost of $30 to $100, or pitch the camera and buy a new one.</p>
<p>I finally stumbled onto the answer:  remove the memory card, put in new batteries, and hold down the &#8220;Image Review&#8221; button while simultaneously pressing the &#8220;On&#8221; button.  That reset whatever weird mode the camera was in, and now it&#8217;s working just fine.  Sure beats either of the recommended solutions.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mischel.com/2008/12/21/resetting-a-nikon-coolpix-4600/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Adventures in mass storage</title>
		<link>http://blog.mischel.com/2008/12/20/adventures-in-mass-storage/</link>
		<comments>http://blog.mischel.com/2008/12/20/adventures-in-mass-storage/#comments</comments>
		<pubDate>Sat, 20 Dec 2008 20:30:37 +0000</pubDate>
		<dc:creator>Jim</dc:creator>
		
		<category><![CDATA[Computers]]></category>

		<guid isPermaLink="false">http://blog.mischel.com/?p=339</guid>
		<description><![CDATA[We&#8217;ve been using a number of different computers as file servers here at the office, but we&#8217;re to the point now that we really need some kind of centralized data storage.  It&#8217;s one thing to have a single machine storing a few hundred gigabytes of data.  It&#8217;s something else entirely to scatter multiple terabytes across [...]]]></description>
			<content:encoded><![CDATA[<p>We&#8217;ve been using a number of different computers as file servers here at the office, but we&#8217;re to the point now that we really need some kind of centralized data storage.  It&#8217;s one thing to have a single machine storing a few hundred gigabytes of data.  It&#8217;s something else entirely to scatter multiple terabytes across four or five machines, and then struggle to remember what&#8217;s where.</p>
<p>Last week we picked up two network attached storage (NAS) boxes:  a <a href="http://www.thecus.com/products_over.php?cid=10&amp;pid=8">Thecus N5200</a>, and a <a href="http://www.thecus.com/products_over.php?cid=11&amp;pid=82">Thecus N7700</a>.  The 5200 supports 5 drives and will be used primarily for offsite backup.  The 7700 supports 7 drives and will be our primary (only, hopefully) file server.</p>
<p>Setting these things up turned out to be quite an experience.  Not because of any problem with the Thecus boxes.  No, those things are wonderful, with very good documentation and a nice browser-based administration interface.  We had problems with the drives we bought to put in our fancy new RAID arrays.</p>
<p>Seagate recently released their <a href="http://www.seagate.com/ww/v/index.jsp?vgnextoid=511a8cf6a794b110VgnVCM100000f5ee0a0aRCRD">Barracuda 7200.11, 1.5 terabyte drive</a>.  We managed to get a great deal on the drives (about $110 each), and we picked up enough to populate the NAS boxes, plus a few high-powered machines here.</p>
<p>It turns out that early versions of the drive&#8217;s firmware have a bug that causes the drive to freeze and time out for minutes at a time, which in turn causes RAID controllers to think that the drive has failed.  The results aren&#8217;t pretty.  Fortunately, there&#8217;s a firmware upgrade available.  I downloaded mine from the <a href="http://www.newegg.com/Product/Product.aspx?Item=N82E16822148337">NewEgg page</a> for the drive.  Look on the right side about halfway down.  (This wasn&#8217;t a surprise.  We knew about the problem and about the firmware upgrade before we bought the drives.)</p>
<p>Applying the firmware upgrade turned into quite an experience.  You see, in order to apply the upgrade you need a DOS prompt.  <em>Not</em> a Windows command line prompt.  Once you manage to get a machine set up and booting FreeDOS from diskette or CD (you can&#8217;t boot from the hard drive because the firmware  upgrade program wants to see only one hard drive), you can run the firmware upgrade.  It takes less than two minutes to boot the machine and apply the update.  Then the drive is ready to go, right?</p>
<p>Silly me.  I upgraded the firmware on five drives, put them in the N5200, and started the thing up.  Surprisingly, the N5200 reported that the drives were 500 GB, not the 1.5 TB that I thought I had.  But the label on the drive says 1.5 TB.  Whatever could be going on?</p>
<p>It turns out that one of the many things you can do in the drive&#8217;s firmware is set the size.  Want to turn your terabyte drive into a 32 gigabyte drive?  No problem!  A set of utilities from Seagate called <a href="http://www.seagate.com/www/en-us/support/downloads/seatools">SeaTools</a> (download the ISO and burn to CD, then boot from the CD) includes diagnostics and an interface for setting the drive&#8217;s capacity.  One option is &#8220;Set capacity to max native&#8221;.  For me, SeaTools reports that setting the drive&#8217;s capacity failed, and adds &#8220;be sure that drive has been power cycled.&#8221;  When I turn the machine off and back on, the drive reports 1500.301 gigabytes.  There&#8217;s my 1.5 terabyte drive.</p>
<p>After upgrading the firmware on all drives and using SeaTools to set their capacities, I finally managed to get the RAID arrays set up.  The N5200 is running RAID-5, giving us about 5.4 terabytes for our offsite backup.  The N7700 is running RAID-6, giving us about 6.5 terabytes of live data in a single place.  That should hold us for a while.</p>
<p>A couple of notes on the Thecus boxes:</p>
<ul>
<li>Initial setup of the Thecus is a little inconvenient.  The default IP address is 192.168.1.100, so I had to cobble together a network from an old switch and hook my laptop to it.  Once I changed the IP address to fit on our subnet (10.77.76.xxx), setup went quickly.  There might be a way to change the IP address from the front panel.  If so, that would probably be easier than throwing a network together.</li>
<li>The N5200 took almost 24 hours to format and create the RAID-5 array with five 1.5 terabyte drives.  The N7700 took about 8 hours to format and create the RAID-6 array with seven 1.5 terabyte drives.  I suppose this is just the result of better hardware and firmware.</li>
<li>There must be some magic incantation to configuring the date and time settings.  If I set the date and time, and tell it not to update with an NTP server, everything works just fine.  But if I enable NTP update (manual or automatic), then the time is totally screwed up.  One box was 11.5 hours slow, and the other was a few hours fast.  (As an aside, I have another piece of equipment that insists on reporting the time in UTC, even though I&#8217;ve set the time and told it that I&#8217;m in the US Central time zone.  I&#8217;m beginning to believe that *nix-based servers don&#8217;t like me.)</li>
<li>The Thecus boxes do way more than just serve files.  We probably won&#8217;t use all those features, but others might.  I especially like the support for USB printers, and the built-in FTP server.  With DHCP enabled and machines connected to a switch off the LAN port, one of these things is a  single-box subnet.  I don&#8217;t know what kind of traffic will pass from the WAN to the LAN ports on these things, but if it&#8217;s fully blocked it&#8217;d make an effective home router to connect to a cable modem.</li>
</ul>
<p>Anyway, we&#8217;re in the middle of copying data and retiring or re-tasking some of our old file servers.  This is going to take some time.  A gigabit network is quick until you start copying multiple terabytes. . .</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mischel.com/2008/12/20/adventures-in-mass-storage/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Memory Upgrades</title>
		<link>http://blog.mischel.com/2008/12/16/memory-upgrades/</link>
		<comments>http://blog.mischel.com/2008/12/16/memory-upgrades/#comments</comments>
		<pubDate>Tue, 16 Dec 2008 16:52:05 +0000</pubDate>
		<dc:creator>Jim</dc:creator>
		
		<category><![CDATA[Computers]]></category>

		<guid isPermaLink="false">http://blog.mischel.com/?p=337</guid>
		<description><![CDATA[It&#8217;s been an interesting few weeks here.  We&#8217;ve been collecting data much faster than we anticipated, and we&#8217;ve had to upgrade hardware.  One thing we&#8217;ve had to do is bring several of our servers from 16 gigabytes of RAM to 32 gigabytes.
Memory is surprisingly inexpensive.  You can buy four gigabytes of RAM (2 DIMMs of [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s been an interesting few weeks here.  We&#8217;ve been collecting data much faster than we anticipated, and we&#8217;ve had to upgrade hardware.  One thing we&#8217;ve had to do is bring several of our servers from 16 gigabytes of RAM to 32 gigabytes.</p>
<p>Memory is surprisingly inexpensive.  You can buy four gigabytes of RAM (2 DIMMs of 2 gigabytes each) for $55.  That&#8217;s fine for maxing out your 32-bit machine, or you can bring a typical 64-bit machine to eight gigabytes with those parts for only $110.</p>
<p>Most server RAM is more expensive&#8211;about double what desktop memory costs.  In addition, most servers only have eight memory slots, making it difficult or hideously expensive to go beyond 16 gigabytes.  The reason has to do with the way that memory controllers access the memory.  Controllers (and the BIOS, it seems) have to know the layout of chips on the DIMM, and most machines are set up to use single-rank or dual-rank RAM.  A 2-gigabyte DIMM that uses single-rank RAM will have eight (or nine, if ECC) 2-gigabit chips on it.  A dual-rank DIMM will have 16 (18) 1-gigabit chips.  Dual-rank will typically be less expensive because the lower density chips cost less than half of the higher density chips.</p>
<p>The inexpensive 2-gigabyte DIMMs are typically dual-rank, meaning that the components on it are 1-megabit chips.  If you want a 4-gigabyte DIMM, then you have to step up to 2-gigabit chips.  And those are very expensive.  The other option is to buy quad-rank memory, which uses the 1-gigabit chips.  Quad-rank 4-gigabyte DIMMs for servers are currently going for $70 or $80.  Figure $20 per gigabyte.</p>
<p>The only catch is that most older computers&#8217; memory controllers don&#8217;t support the quad-rank DIMMs.  I do know that Dell&#8217;s PowerEdge 1950 server with the latest BIOS supports quad-rank.  The Dell 490 and 690 machines do not.</p>
<p>If you&#8217;re in the market for a new computer that you expect to load up with RAM, you should definitely make sure that it supports quad-rank memory.  If you&#8217;re adding memory to an older machine, you might save a lot of money by doing some research to see if you can upgrade the BIOS to support quad-rank.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mischel.com/2008/12/16/memory-upgrades/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Burning CDs on Windows Server 2008</title>
		<link>http://blog.mischel.com/2008/12/10/burning-cds-on-windows-server-2008/</link>
		<comments>http://blog.mischel.com/2008/12/10/burning-cds-on-windows-server-2008/#comments</comments>
		<pubDate>Wed, 10 Dec 2008 18:56:21 +0000</pubDate>
		<dc:creator>Jim</dc:creator>
		
		<category><![CDATA[Computers]]></category>

		<guid isPermaLink="false">http://blog.mischel.com/?p=333</guid>
		<description><![CDATA[Updated 2008/12/13, see below
A while back I mentioned that I was unable to burn a CD on my Windows Server 2008 box.  At that point I didn&#8217;t have time to figure out what was going on.  Today I needed to burn a CD, and had some time to fiddle with it.
On my Windows XP development [...]]]></description>
			<content:encoded><![CDATA[<p><span style="color: #ff0000;">Updated 2008/12/13, see below</span></p>
<p>A while back I mentioned that I was unable to burn a CD on my Windows Server 2008 box.  At that point I didn&#8217;t have time to figure out what was going on.  Today I needed to burn a CD, and had some time to fiddle with it.</p>
<p>On my Windows XP development box, I used <a href="http://isorecorder.alexfeinman.com/isorecorder.htm">ISO Recorder</a> to burn ISO images to CD.  There&#8217;s not much to the program:  just right-click on a .iso file and select &#8220;Burn to CD&#8221; from the popup menu.  It&#8217;s simple and it works.  I wish all software worked so well.  Unfortunately, it doesn&#8217;t appear to work on my Server 2008 box.  The program doesn&#8217;t recognize my CD/DVD burner.</p>
<p>A bit of searching located <a href="http://www.imgburn.com/">ImgBurn</a>, a free CD/DVD reader and recorder that works on all versions of Windows, including 64-bit versions.  This is more of a full-featured application than ISORecorder, but still quite easy to use.  It took me no time at all to start the program and tell it to burn an ISO image to CD.</p>
<p>I don&#8217;t know why ISORecorder won&#8217;t recognize the CD burner on my box.  The program says it works for Vista, so I imagine it should also work on Server 2008.  But it doesn&#8217;t and I don&#8217;t have the time or inclination to figure out why.  I&#8217;ve found ImgBurn, and I&#8217;m happy.</p>
<p><span style="color: #ff0000;">Update 2008/12/13:</span></p>
<p>I tried to burn another CD today, and ImgBurn failed to recognize the recorder.  It turns out that I have to run the program with elevated privileges (i.e. &#8220;Run as Administrator&#8221;).  I didn&#8217;t have to do that the first time, because I started ImgBurn from the installation program, which was already running as Administrator.</p>
<p>Also of note:  ImgBurn will not work if Windows Media Player is running.  At least, it won&#8217;t on my machine.  Media Player apparently locks or otherwise allocates the optical drive by default.  Perhaps there&#8217;s a way to turn that &#8220;feature&#8221; off, I don&#8217;t know.</p>
<p>I suspect that ISORecorder will work, too, if I try it in Administrator mode.  The beauty of ISORecorder is that all I have to do is right-click on a .ISO file, and it will be written to the CD.  But I don&#8217;t know how to make that program run with Administrator privileges.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mischel.com/2008/12/10/burning-cds-on-windows-server-2008/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Charlie</title>
		<link>http://blog.mischel.com/2008/12/09/charlie/</link>
		<comments>http://blog.mischel.com/2008/12/09/charlie/#comments</comments>
		<pubDate>Wed, 10 Dec 2008 00:29:00 +0000</pubDate>
		<dc:creator>Jim</dc:creator>
		
		<category><![CDATA[Pets]]></category>

		<guid isPermaLink="false">http://blog.mischel.com/?p=329</guid>
		<description><![CDATA[We noticed Charlie having some trouble walking about two weeks ago, and the Saturday after Thanksgiving it got bad enough that we had to take him to the vet.  His back legs were working, but not well, and he was whimpering a bit as if in pain.  When that dog starts showing pain, you know [...]]]></description>
			<content:encoded><![CDATA[<p>We noticed Charlie having some trouble walking about two weeks ago, and the Saturday after Thanksgiving it got bad enough that we had to take him to the vet.  His back legs were working, but not well, and he was whimpering a bit as if in pain.  When that dog starts showing pain, you <em>know</em> there&#8217;s something wrong.  After x-rays of Charlie&#8217;s spine and a night of observation, we were referred to a specialist.</p>
<p>We went to the specialist on Tuesday of last week.  He did a <a href="http://en.wikipedia.org/wiki/Myelography">myelogram</a>, consulted with a radiologist, and diagnosed a ruptured disk or some other type of blockage that was preventing Charlie&#8217;s back legs from working fully.  He recommended surgery, as those kinds of injuries don&#8217;t typically fix themselves.  The surgery was yesterday (Monday).</p>
<p>Charlie came through the surgery fine.  He&#8217;s still at the vet, though, recovering.  Unfortunately, the doctor didn&#8217;t find what he was looking for:  no evidence of a ruptured disk or other type of injury to the spinal column that would cause the blockage.  He did, however, see some swelling in the area, which would present as a spinal injury in the myelogram.</p>
<p>The most likely diagnosis now is a <a href="http://www.shakervet.com/case_studies.html">fibrocartilaginous embolism</a> (FCE):</p>
<p style="padding-left: 30px;">FCE results when material from the nucleus pulposus (the gel-like material which acts as a force-absorbing cushion between two vertebrae) leaks into the arterial system and causes an embolism or plug in a blood vessel in the spinal cord. The condition is not degenerative, and therefore does not worsen. FCE is not painful for the pet, but some permanent nerve damage is likely. Roughly half of all patients diagnosed with FCE will recover sufficient use of their limbs.</p>
<p>Searching for &#8220;fce dogs&#8221; on the Internet will bring up some frightening pages, many of which indicate that the neurological damage is permanent.  After last night&#8217;s reading, I was resigned to Charlie being partially paralyzed for the rest of his life.  But after talking with the doctor today and reading some case studies, I&#8217;m much more hopeful.  The doctor, based on his experience with about 200 FCE cases, says that there&#8217;s a 60 to 70 percent chance that Charlie will recover fully.</p>
<p>It&#8217;s unfortunate that he had to go through what turned out to be an unnecessary surgery, but all the tests indicated that the surgery was the proper course of action.  Charlie&#8217;s pretty miserable right now, but he&#8217;s still relatively young (7 years old), and very strong.  I expect he&#8217;ll be recovered from the surgery very quickly, and then we can see about getting some of his mobility back.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mischel.com/2008/12/09/charlie/feed/</wfw:commentRss>
		</item>
		<item>
		<title>More bailout madness</title>
		<link>http://blog.mischel.com/2008/12/05/more-bailout-madness/</link>
		<comments>http://blog.mischel.com/2008/12/05/more-bailout-madness/#comments</comments>
		<pubDate>Fri, 05 Dec 2008 18:08:16 +0000</pubDate>
		<dc:creator>Jim</dc:creator>
		
		<category><![CDATA[Finance]]></category>

		<category><![CDATA[Idiocy]]></category>

		<guid isPermaLink="false">http://blog.mischel.com/?p=325</guid>
		<description><![CDATA[In a very thinly reported move last week, the Federal Reserve announced that it will spend up to $600 billion buying up obligations of government-sponsored enterprises, and mortgage backed securities, many of which were the original targets of the $700 billion &#8220;bailout&#8221; plan back in October.
To me, the most interesting thing about this move is [...]]]></description>
			<content:encoded><![CDATA[<p>In a very thinly reported move last week, the Federal Reserve <a href="http://www.federalreserve.gov/newsevents/press/monetary/20081125b.htm">announced</a> that it will spend up to $600 billion buying up obligations of government-sponsored enterprises, and mortgage backed securities, many of which were the original targets of the $700 billion &#8220;bailout&#8221; plan back in October.</p>
<p>To me, the most interesting thing about this move is that it won&#8217;t cost the Federal Reserve anything.  Well, whatever it costs for paper, ink, and the electricity to run the presses while they print up $600 billion in crisp new bills.  That&#8217;s right, they&#8217;re going to &#8220;pay&#8221; for those assets by increasing the amount of money.  Not a bad racket if you can get it.  All of a sudden the Fed has $600 billion to spend that it didn&#8217;t have to get by running, hat in hand, to Congress.  Nope.  Just print up the bills and nobody&#8217;s the wiser.  Never mind that the dollars you&#8217;re holding today are worth slightly less than they were yesterday.</p>
<p>Something similar is happening when the Treasury injects money into the banks.  In exchange for their $25 billion, a bank gives the government shares of stock.  They&#8217;re special non-voting shares, which is a good thing, but they&#8217;re new shares that dilute the value of existing shares.  Stockholders end up paying for it in two ways:  the value of their shares is diluted, and they have to pay increased taxes to offset the government expense (or, if new money is printed, pay the hidden tax of inflation).</p>
<p>How about a simple example to illustrate the concept.  Imagine that your neighborhood creates a lawnmower co-op.  For $10, you get one of 10 shares in the co-op.  But the co-op falls on hard times&#8211;needs to upgrade the mower, maybe.  The co-op issues 10 new shares, bringing the total number of shares to 20, and sells those shares to new members at $5 each.  All of a sudden, your share of the co-op is worth 50% less.  That&#8217;s bad enough, but you also get hit with an assessment from the co-op for increased maintenance costs.  That&#8217;s pretty much what&#8217;s happening to stockholders when the banks take the bailout money.</p>
<p>I thought, back in September, that Bernanke, Paulson, and company had a real plan, backed up with solid reasoning, and some idea of what effects their proposed policies would have on the financial system and the economy.  I didn&#8217;t agree with their ideas, but I thought I could at least respect their reasoning.  But three months later, I&#8217;m not so sure.  I think that they, just like Congress and the Bush Administration in general, are trying <em>anything</em> in an attempt to get a short-term boost, regardless of the long-term consequences.</p>
<p>The best bet for everybody would be for governments to step back and take an honest critical look at the situation, study possible responses and their likely outcomes, announce a plan, and then <em>stick with it</em>.  The current <a href="http://en.wikipedia.org/wiki/Whack-a-mole">whac-a-mole</a> approach is worse than doing nothing (which, come to think of it, still doesn&#8217;t sound like a bad idea).  Changing approaches every few weeks does nothing but add uncertainty, causing people to overreact and creating chaos when the thing we need most right now is stability. </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mischel.com/2008/12/05/more-bailout-madness/feed/</wfw:commentRss>
		</item>
		<item>
		<title>No IEnumerable.ForEach?</title>
		<link>http://blog.mischel.com/2008/12/03/no-ienumerableforeach/</link>
		<comments>http://blog.mischel.com/2008/12/03/no-ienumerableforeach/#comments</comments>
		<pubDate>Wed, 03 Dec 2008 23:54:17 +0000</pubDate>
		<dc:creator>Jim</dc:creator>
		
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://blog.mischel.com/?p=322</guid>
		<description><![CDATA[Overall, I like working with C# and the .NET Framework.  But sometimes I just can&#8217;t imagine what the designers were thinking when they put some things together.  High on the list of things I don&#8217;t understand is the lack of a ForEach extension method for the generic IEnumerable interface.
IEnumerable extension methods were added in .NET [...]]]></description>
			<content:encoded><![CDATA[<p>Overall, I like working with C# and the .NET Framework.  But sometimes I just can&#8217;t imagine what the designers were thinking when they put some things together.  High on the list of things I don&#8217;t understand is the lack of a <tt>ForEach</tt> extension method for the generic <tt>IEnumerable</tt> interface.</p>
<p><tt>IEnumerable</tt> extension methods were added in .NET 3.5 to support LINQ. These methods enable a more functional style of programming that you just couldn&#8217;t do with earlier versions of C#. For example, in earlier versions of C# (before 3.0), if you wanted to obtain the sum of items in an array of <tt>int</tt>s, you would write:</p>
<pre><code>int[] a = new int[100];
// some code here to initialize the array
// now compute the sum
int sum = 0;
foreach (int x in a)
    sum += x;
</code></pre>
<p>In .NET 3.0, the <tt>Array</tt> class implements the generic <tt>IEnumerable</tt> interface, and that interface has a <tt>Sum</tt> method to which you pass a Lambda expression. Computing the sum of items becomes a one-liner:</p>
<pre><code>int sum = a.Sum(x =&gt; x);</code></pre>
<p>That syntax looks pretty strange, but it takes very little getting used to and you begin to see how very powerful this functional style of programming is.</p>
<p><tt>IEnumerable</tt> extension methods let you do <em>lots</em> of different things as one-liners. For example, if you have a list of employees and you want to select just those who are female, you can write a one-liner:</p>
<pre><code>var FemaleEmployees = Employees.Where(e =&gt; e.Gender == 'F');</code></pre>
<p>There are extension methods for many specific things: determining if all or any items in the collection meet a condition; applying an accumulator function over the list; computing average, minimum, maximum, sum; skipping items; taking a specific number of items, etc. But there is no extension method that will allow you to apply a function to all items in the list. That is, there is no <tt>IEnumerable.ForEach</tt> method.</p>
<p>I do a lot of list processing and my code is littered with calls to the <tt>IEnumerable</tt> extension methods. It&#8217;s very functional-looking code. But when I want to do something that&#8217;s not defined by one of the extension methods, I have to drop back into procedural mode. For example, I want to apply a function to all the items in the list:</p>
<pre><code>foreach (var item in MyEnumerable)
{
    DoSomething(item);
}</code></pre>
<p>That&#8217;s crazy, when I should be able to write:</p>
<pre><code>MyEnumerable.ForEach(item =&gt; DoSomething(item));</code></pre>
<p>The lack of <tt>ForEach</tt> is terribly annoying. What&#8217;s worse is that <tt>ForEach</tt> does exist for arrays and for the generic <tt>List</tt> class. It&#8217;s kind of strange, though. With arrays you have to call the static <tt>Array.ForEach</tt> method:</p>
<pre><code>Array.ForEach(MyArray, item =&gt; DoSomething(item));</code></pre>
<p>For generic <tt>List</tt> collections, it&#8217;s an instance method:</p>
<pre><code>MyList.ForEach(item =&gt; DoSomething(item));</code></pre>
<p>And other collection types simply don&#8217;t have a <tt>ForEach</tt> method.</p>
<p>It&#8217;s simple enough to add my own <tt>ForEach</tt> extension method:</p>
<pre><code>public static class Extensions
{
    public static void ForEach&lt;T&gt;(this IEnumerable&lt;T&gt; source, Action&lt;T&gt; action)
    {
        foreach (var item in source)
        {
            action(item);
        }
    }
}</code></pre>
<p>That&#8217;s what I did, and it works just fine.  But it seems such an obvious addition (i.e. everybody would want it) that I can&#8217;t for the life of me understand why it wasn&#8217;t included in the first place.</p>
<p>I know the guys at Microsoft who designed this stuff aren&#8217;t stupid, so I just have to think that they had a good reason (at least in their mind) for not including a <tt>ForEach</tt> extension method for the generic <tt>IEnumerable</tt> interface. But try as I might, I can&#8217;t imagine what that reason is. If you have any idea, I&#8217;d sure like to hear it.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mischel.com/2008/12/03/no-ienumerableforeach/feed/</wfw:commentRss>
		</item>
		<item>
		<title>An Assumption of Competence</title>
		<link>http://blog.mischel.com/2008/11/23/an-assumption-of-competence/</link>
		<comments>http://blog.mischel.com/2008/11/23/an-assumption-of-competence/#comments</comments>
		<pubDate>Sun, 23 Nov 2008 07:19:37 +0000</pubDate>
		<dc:creator>Jim</dc:creator>
		
		<category><![CDATA[Debugging]]></category>

		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://blog.mischel.com/?p=317</guid>
		<description><![CDATA[My second programming job was with a small commercial bank in Fresno, CA, where I helped maintain the COBOL account processing software.  I was still pretty inexperienced, having only been working in the industry for about 18 months.  My previous job involved maintaining software, also in COBOL, for small banks in western Colorado.
One of the [...]]]></description>
			<content:encoded><![CDATA[<p>My second programming job was with a small commercial bank in Fresno, CA, where I helped maintain the COBOL account processing software.  I was still pretty inexperienced, having only been working in the industry for about 18 months.  My previous job involved maintaining software, also in COBOL, for small banks in western Colorado.</p>
<p>One of the first things my new boss asked me to look at was a program that computed loan totals by category:  a two-digit code that was assigned to each loan.  Federal regulations required that we report the total number and dollar amount of all loans, by category, as well as the number and dollar amount that were 30, 60, and 90 days or more past due.  The problem was that the report program was taking way too long to run.  The bank had recently acquired a bunch of new loans, and the program&#8217;s run time had increased sharply—several times more than what one would expect from the increase in the number of loans.</p>
<p>Understand, this was a very simple program.  All it had to do was go through the loans sequentially and compute totals in four columns (total, 30 days past, 60 days past, 90+ days past) for each of the 100 categories.  The data structures are very simple.  I don&#8217;t remember enough COBOL to write it intelligently, so I&#8217;m showing them translated to C#:</p>
<pre><code>struct CountAndTotal
{
    public int Category;
    public int Count;
    public double Total;
}

// Arrays for Total, 30, 60, and 90+ days past due
CountAndTotal[] TotalAllLoans = new CountAndTotal[100];
CountAndTotal[] Total30Past = new CountAndTotal[100];
CountAndTotal[] Total60Past = new CountAndTotal[100];
CountAndTotal[] Total90Past = new CountAndTotal[100];</code></pre>
<p>I&#8217;ll admit that I was a little mystified by the <tt>Category</tt> field in the <tt>CountAndTotal</tt> structure, but figured it was an artifact from early debugging.</p>
<p>Those definitions and the description of the problem above lead to a simple loop:  for each loan, determine its category and payment status, and add the totals to the proper items in the arrays. The program almost writes itself:</p>
<pre><code>while (!LoanFile.Eof)
{
    LoanRec loan = LoanFile.ReadNext();
    AddToTotals(loan, TotalAllLoans);
    if (loan.PastDue(90))
        AddToTotals(loan, Total90Past);
    else if (loan.PastDue(60))
        AddToTotals(loan, Total60Past);
    else if (loan.PastDue(30))
        AddToTotals(loan, Total30Past);
}</code></pre>
<p>What surprised me when I looked at the code was the implementation of the <tt>AddToTotals</tt> function. You would expect it to be a simple index into the array from the loan&#8217;s category code. After all, the category was guaranteed to be in the range 0-99. That just <em>begs</em> for this implementation:</p>
<pre><code>void AddToTotals(LoanRec loan, CountAndTotal[] Totals)
{
    ++CountAndTotal[loan.Category].Count;
    CountAndTotal[loan.Category].Total += loan.Balance;
}</code></pre>
<p>What I found was quite surprising. Rather than directly index into the array of categories, the program would do a sequential search of the array to see if that category was already there. If it was, the total was added. Otherwise the program made a new entry at the next empty spot in the array. That explained the mysterious <tt>Category</tt> field and the absurdly long run time. The code is much more complicated:</p>
<pre><code>void AddtoTotals(LoanRec loan, CountAndTotal[] Totals)
{
    int i = 0;
    while (i &lt; 100)
    {
        if (Totals[i].Category == loan.Category)
        {
            ++Totals[i].Count;
            Totals[i].Total += loan.Balance;
            break;
        }
        else if (Totals[i].Category == -1)
        {
            // Unused position.  The category wasn't found in the array.
            Totals[i].Category = loan.Category.
            Totals[i].Count = 1;
            Totals[i].Total = loan.Balance;
            break;
        }
        ++i;
    }
}</code></pre>
<p>The difference in run times is enormous! The first implementation accesses the array directly from the <tt>loan.Category</tt> field. The second has to search the array sequentially—an operation that involves, on average, looking at 50 different items every time.  The second version of the program is <em>50 times slower</em> than the first.  In addition, the second required a subsequent sort to put things in the proper order before printing the results.</p>
<p>Being new at the job, I went to my boss, explained what I&#8217;d found, and said, &#8220;What am I missing?&#8221;  His response:  &#8220;Why do you think you&#8217;re missing something?&#8221;</p>
<p>He went on to explain that my analysis was correct, and that the industry (at least back then) was full of programmers who had no business sitting at a terminal.  It was something of a revelation to me, because I had assumed that the people who wrote this stuff really knew what they were doing.  It also taught me to question everything when faced with a problem.  It&#8217;s always a good idea to assume competence when you start debugging somebody else&#8217;s (or your own) code, but when things stop making sense, it&#8217;s time to re-evaluate that assumption.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mischel.com/2008/11/23/an-assumption-of-competence/feed/</wfw:commentRss>
		</item>
		<item>
		<title>More Whittling</title>
		<link>http://blog.mischel.com/2008/11/16/more-whittling/</link>
		<comments>http://blog.mischel.com/2008/11/16/more-whittling/#comments</comments>
		<pubDate>Sun, 16 Nov 2008 18:46:46 +0000</pubDate>
		<dc:creator>Jim</dc:creator>
		
		<category><![CDATA[Carving]]></category>

		<guid isPermaLink="false">http://blog.mischel.com/?p=314</guid>
		<description><![CDATA[After I whittled that knife a couple of weeks ago, I tried to make a small decorative spoon.  I made two mistakes on that project:  1) I selected the wrong kind of wood and; 2) I used the wrong knife.  I took a branch that I&#8217;d cut from the pear tree a [...]]]></description>
			<content:encoded><![CDATA[<p>After I whittled that knife a couple of weeks ago, I tried to make a small decorative spoon.  I made two mistakes on that project:  1) I selected the wrong kind of wood and; 2) I used the wrong knife.  I took a branch that I&#8217;d cut from the pear tree a few months ago and started whittling on it.  I noticed immediately that the pear wood is much harder than the juniper I&#8217;d whittled the knife from.  I found out later that it&#8217;s about four times as hard.  No wonder I had trouble with it.</p>
<p>The knife I selected is a cheap pocket knife (I was going to say &#8220;utility knife,&#8221; but that describes a particular kind of knife) that I&#8217;d been carrying around for a few months.  Like the Buck 112 &#8220;hunting&#8221; knife I used previously, this one is just too large for detail work.  It works fine for day-to-day box opening and such.  As a carving tool it leaves a lot to be desired, in large part because the handle is so thin.</p>
<p>Anyway, here&#8217;s a picture of the spoon and the knife.  By the time I got the basic shape of the thing roughed out, I was so frustrated that I just wanted to call it done.</p>
<p><img class="alignnone size-full wp-image-311" title="Spoon and knife" src="http://blog.mischel.com/wp-content/uploads/2008/11/spoon_and_knife.jpg" alt="" width="500" height="374" /></p>
<p>I&#8217;m not particularly proud of the way the spoon turned out, but I certainly learned a lot making it.  The pear is a beautiful wood, but I don&#8217;t yet have the skill to work with it.  I&#8217;ve put a few branches up in the rafters of the garage while I work on my technique.</p>
<p>I picked up a small-ish Buck pocket knife and visited the local <a href="http://www.woodcraft.com/">WoodCraft</a> store to pick up a carving glove, a thumb protector (the spoon cost me two cuts), and a small box of basswood blocks.  Then I searched online for a simple project and came across instructions to carve a <a href="http://www.littleshavers.com/PineCone.html">pinecone tree ornament</a>.  It&#8217;s a great beginner&#8217;s project.  I&#8217;m sure it took me an absurdly long time to complete the project (I spread it out over about 10 days).  I obviously have a lot to learn, but I&#8217;m pretty happy with the result:</p>
<p><img class="alignnone size-full wp-image-312" title="cone1_2" src="http://blog.mischel.com/wp-content/uploads/2008/11/cone1_2.jpg" alt="" width="252" height="462" /><img class="alignnone size-full wp-image-313" title="cone2_1" src="http://blog.mischel.com/wp-content/uploads/2008/11/cone2_1.jpg" alt="" width="263" height="462" /></p>
<p>I had planned to paint them and add some &#8220;snow&#8221; at the top, but Debra says she&#8217;d like to keep them raw.  Who am I to argue?</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mischel.com/2008/11/16/more-whittling/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
