<?xml version="1.0" encoding="iso-8859-1"?>

<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
<title type="text">James Dobson's blog</title>
<subtitle type="html"><![CDATA[
Many wonderful things about programming and life in general.
]]></subtitle>
<id>http://www.softwarepunk.com/blog/index.atom</id>
<link rel="alternate" type="text/html" href="http://www.softwarepunk.com/blog" />
<link rel="self" type="text/xml" href="http://www.softwarepunk.com/blog/index.atom" />

<author>
<name>James Dobson</name>
<uri>http://www.softwarepunk.com/blog/index.atom</uri>
<email>dobson@softwarepunk.com</email>
</author>
<rights>Copyright 2007 James Dobson</rights>
<generator uri="http://pyblosxom.sourceforge.net/" version="1.3.2 2/13/2006">
PyBlosxom http://pyblosxom.sourceforge.net/ 1.3.2 2/13/2006
</generator>

<updated>2007-05-07T20:35:10Z</updated>
<!-- icon?  logo?  -->

<entry>
<title type="html">Flushing Firefox Preferences</title>
<category term="" />
<id>http://www.softwarepunk.com/blog/2007/05/07/firefox-preferences-flush</id>
<updated>2007-05-07T20:35:10Z</updated>
<published>2007-05-07T20:35:10Z</published>
<link rel="alternate" type="text/html" href="http://www.softwarepunk.com/blog/firefox-preferences-flush" />
<content type="html">
&lt;p&gt;
The Firefox preferences system is quite amazing, but it has a tendency
to cache preference settings in memory, and only seems to write to disk
(the prefs.js file in the current profile folder) when Firefox exits. This
means that if Firefox should crash for some reason after changing preferences,
the changes would be lost.
&lt;/p&gt;

&lt;p&gt;
I looked and I looked for some sort of XPCOM call that would flush the
preferences cache to disk, but couldn&apos;t find anything. The best I could
find was the savePrefFile call on &lt;a href=&quot;http://www.xulplanet.com/references/xpcomref/ifaces/nsIPrefService.html&quot;&gt;nsIPrefService&lt;/a&gt;. Unfortunately, this
procedure takes a file argument, so it isn&apos;t really a flush.
&lt;/p&gt;

&lt;p&gt;
Fortunately, I did some digging around in the
&lt;a href=&quot;http://lxr.mozilla.org/mozilla1.8.0/source/modules/libpref/src/nsPrefService.cpp#240&quot;&gt;code that implements the preferences service&lt;/a&gt;. It turns
out that SavePrefFile calls SavePrefFileInternal, which includes a special
check for a null parameter. If the parameter is null, then it writes
to the mCurrentFile member, which I assume is equivalent to doing the flush.
&lt;/p&gt;

&lt;p&gt;
In summary, while Firefox provides no explicit method to flush the preferences
cache to disk, calling the savePrefFile method of nsIPrefService with a
null parameter should do the trick.
&lt;/p&gt;


</content>
</entry>

<entry>
<title type="html">Why the new Mozilla Addons Site is Better(TM)</title>
<category term="" />
<id>http://www.softwarepunk.com/blog/2007/04/13/why-amo-update-is-better</id>
<updated>2007-04-13T20:06:11Z</updated>
<published>2007-04-13T20:06:11Z</published>
<link rel="alternate" type="text/html" href="http://www.softwarepunk.com/blog/why-amo-update-is-better" />
<content type="html">
&lt;p&gt;As a &lt;a href=&quot;http://www.softwarepunk.com/ffclickonce/&quot;&gt;Firefox extension
developer&lt;/a&gt;, I probably interact with the
&lt;a href=&quot;http://addons.mozilla.org/&quot;&gt;Mozilla Addons Site&lt;/a&gt; more than
most people. There has been a fair amount of commenting on whether the recent
upgrades to the Mozilla Addons Site are good or bad (take a look at the
&lt;a href=&quot;http://blog.mozilla.com/webdev/&quot;&gt;Mozilla Webdev Blog&lt;/a&gt; for
information about the AMO upgrades, which is spread across several posts).&lt;/p&gt;

&lt;p&gt;I reserved judgement about the AMO upgrades initially, but have now made
my decision: the new Mozilla Addons Site is better than the old one. Well,
I&apos;ll qualify that: it&apos;s better for &lt;i&gt;me&lt;/i&gt;. To see why, take a look at the
email I just got when version 0.6 of my extension was approved:&lt;/p&gt;

&lt;p&gt;&lt;blockquote&gt;&lt;pre&gt;The following files of FFClickOnce 0.6 have been
made public by a Mozilla Add-ons editor:

FFClickOnce 0.6 - Windows

Review Information:
Reviewer: Olive
Tested on WinXP with Fx 2.0.0.3
Comments: Thanks for the update!

If you have questions about this review, please
e-mail amo-editors@mozilla.org or join #addons on
irc.mozilla.org.

Mozilla Add-ons
http://addons.mozilla.org&lt;/pre&gt;&lt;/blockquote&gt;&lt;/p&gt;

&lt;p&gt;Compare that with the message I got from the old AMO site, the last time
a version of my extension was approved:&lt;/p&gt;

&lt;p&gt;&lt;blockquote&gt;&lt;pre&gt;FFClickOnce 0.5 - Approval Granted
Your item, FFClickOnce 0.5, has been reviewed by a Mozilla Update editor who took the following action:
Approval Granted

Please Note: It may take up to 30 minutes for your extension to be available for download.

Your item was tested by Olive using Fx 2.0.0.3pre on Win XP.
Editor&apos;s Comments:
 Approving update, thanks -olive
----
Mozilla Update: https://addons.mozilla.org/&lt;/pre&gt;&lt;/blockquote&gt;&lt;/p&gt;

&lt;p&gt;Notice the difference? It may seem rather subtle, but it makes a huge
difference for addon developers. Know what it is yet? The grand answer is:
&lt;b&gt;They give me an email address to contact!&lt;/b&gt; That&apos;s it. That&apos;s the one
thing they had to do to make the Addon development experience immeasurably
better for me. My extension has failed review several times for reasons that
were never really that clear to me. Important bug fixes that really needed to
get out to my users were delayed due to review failures by reviewers who
suddenly found some issue with my extension that wasn&apos;t really an issue and
had never been pointed out by any previous reviewer. It was so frustrating,
because I didn&apos;t have any way to contact them. And the fact that it took
several weeks to a month to get through the review queue again just made it
all the more frustrating.&lt;/p&gt;

&lt;p&gt;To the Mozilla people&apos;s credit, somewhere in the addons documentation it did
say that addons developers could go onto the #addons IRC channel, but as
someone who doesn&apos;t know how to use IRC and doesn&apos;t want to waste his time
wading through chatrooms, this was never an option. Email is the de facto
standard of communication nowadays, and if I can&apos;t reach you through email
you might as well not exist. I know it&apos;s harsh, but it&apos;s (almost) true.&lt;/p&gt;

&lt;p&gt;In summary: The Mozilla Addons people can now be contacted via email, the
email address is provided to Addons developers when their extension is
reviewed, this makes my work as an Addons developer much less
frustrating, and makes me really happy =)&lt;/p&gt;

&lt;p&gt;Of course, just having an email address isn&apos;t enough: hopefully there&apos;s
someone checking it and responding to it, too...&lt;/p&gt;

</content>
</entry>

<entry>
<title type="html">Pencil Lead Resistors</title>
<category term="" />
<id>http://www.softwarepunk.com/blog/2007/04/12/pencil-lead-resistors</id>
<updated>2007-04-13T01:37:42Z</updated>
<published>2007-04-13T01:37:42Z</published>
<link rel="alternate" type="text/html" href="http://www.softwarepunk.com/blog/pencil-lead-resistors" />
<content type="html">
&lt;p&gt;My mom wanted me to cut some Styrofoam. I had a nichrome wire that had been
crudely attached in place of a blade on a small saw. I think I made this
in Grade 6, when my teacher gave me a small length of nichrome (Nickel/Chromium)
wire especially for this purpose. Unfortunately, finding a power supply that
could power it was another problem.&lt;/p&gt;

&lt;p&gt;The nichrome wire has a fairly low resistance, and would draw too much
current from a small power cube, even a 5V one. I eventually realized that
I could power it off a 12V backup car battery, but when I connected it to
the 12V source directly, the approximately 4.5A current caused it to glow red
hot within a matter of seconds.&lt;/p&gt;

&lt;p&gt;I knew I had to limit the current, so I searched through my resistors for
my highest power resistor: a 20ohm, 5W, brick-like thing. Unfortuantely, it
limited the current too much: the resulting 0.5A flow didn&apos;t warm up the
cutting element enough to make a dent in the styrofoam. From fooling around
with the nichrome wire, I figured that I&apos;d need about three times that amount,
1.5A, to be able to cut the styrofoam.&lt;/p&gt;

&lt;p&gt;My first thought was to add a second 20ohm, 5W resistor in parallel with
the first resistor, giving twice the current flow. Unfortunately, our local
&quot;The Source&quot; (what Radio Shack got renamed to in Canada) didn&apos;t have anything
appropriate. So the project was dead.&lt;/p&gt;

&lt;p&gt;Until I realized that I could use pencil leads as my resistors. I knew they
would have a low resistance, that they would be able to sink a lot of power,
and that their resistance would be adjustable (just slide the electrodes along
the lead, increasing the distance between the electrodes and therefore also
increasing the resistance). I quickly abandoned the idea of taking a perfectly
good wood pencil and splitting it open and instead pulled out a tube of 0.9mm
diameter mechanical pencil leads that I bought in England when I was 13. (I
lost the pencil long ago, and never managed to find a wide-enough replacement
pencil at any stores in Canada).&lt;/p&gt;

&lt;p&gt;Using my multi-meter, I measured the resistance of one lead to be almost
right on 1 ohm. Since I was using a 12V source, I knew that 6 leads (6 ohms)
would give me a current flow of about 2A. But I had to take into account the
resistance of the nichrome wire itself, so I figured that 5 leads would
probably provide enough resistance to limit the current to my desired 1.5A,
when also in circuit with the nichrome wire. So I made the following
circuit:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://www.softwarepunk.com/pictures/displayimage.php?album=5&amp;pos=27&quot;&gt;&lt;img src=&quot;http://www.softwarepunk.com/pictures/albums/userpics/10001/normal_IMG_2350.JPG&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I initially had some difficulties, as my multimeter would initially show
a small current that very quickly decreased to zero. I thought that perhaps
my resistance measurements of the pencil leads had been incorrect, so I moved
the alligator clips on a number of the leads closer together, and still had the
same result when I applied power. After a few attempts at decreasing the
resistance, I noticed a puff of smoke come off of one of the leads! I looked
at my multi-meter again and realized that the mode switch was stuck somewhere
between DC Amps and AC Amps, and so the meter was in AC Amps mode, and my
circuit had been working fine all along.&lt;/p&gt;

&lt;p&gt;I moved all my alligator clips back to their original positions at either end
of each pencil lead, put the meter into the correct mode, and switched on the
power:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://www.softwarepunk.com/pictures/displayimage.php?album=5&amp;pos=28&quot;&gt;&lt;img src=&quot;http://www.softwarepunk.com/pictures/albums/userpics/10001/normal_IMG_2351.JPG&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As you can see, I got a current flow between 1.5 and 2.0 amps, which is
exactly what I wanted. The nichrome wire didn&apos;t glow, yet it slid through the
styrofoam like a hot knife through butter =). Here&apos;s a picture of my pencil
lead resistor network:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://www.softwarepunk.com/pictures/displayimage.php?album=5&amp;pos=29&quot;&gt;&lt;img src=&quot;http://www.softwarepunk.com/pictures/albums/userpics/10001/normal_IMG_2352.JPG&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Sure, it&apos;s a bit of a rat&apos;s nest of wires, but it got the job done and was
easy to set up and tear down. Finally, here&apos;s a close-up of one of the pencil
lead resistors:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://www.softwarepunk.com/pictures/displayimage.php?album=5&amp;pos=30&quot;&gt;&lt;img src=&quot;http://www.softwarepunk.com/pictures/albums/userpics/10001/normal_IMG_2355.JPG&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So, the next time you need a high-power, low-resistance conductor, just
look around your desk--the solution is probably staring you in your face!&lt;/p&gt;





</content>
</entry>

<entry>
<title type="html">FFClickOnce v0.6 Uploaded</title>
<category term="" />
<id>http://www.softwarepunk.com/blog/2007/04/10/ffclickonce-v6-uploaded</id>
<updated>2007-04-10T23:20:21Z</updated>
<published>2007-04-10T23:20:21Z</published>
<link rel="alternate" type="text/html" href="http://www.softwarepunk.com/blog/ffclickonce-v6-uploaded" />
<content type="html">
&lt;p&gt;After a number of bug reports that my Firefox extension wasn&apos;t installing
properly from the &lt;a href=&quot;https://addons.mozilla.org/en-US/firefox/addon/1608&quot;&gt;installation page at Mozilla Addons&lt;/a&gt; due to download corruption, I&apos;ve
finally tracked down the problem as best I can, and will try to elaborate
on it later in this entry. But the real thing I&apos;m writing about is that I
just uploaded version 0.6 of the extension to the Addons site.&lt;/p&gt;

&lt;p&gt;Though it is pending review by the Mozilla Addons people and likely won&apos;t
be visible for a month or so, I might as well say what it includes:
localization support, and translations into Spanish, Italian, French, Dutch,
and both Chinese Traditional and Chinese Simplified. The first four
translations are courtesy of the &lt;a href=&quot;http://www.babelzilla.org/&quot;&gt;Babelzilla
 Project&lt;/a&gt;, and the latter ones are my feeble attempt at trying to learn
and use technical vocabulary in Chinese.&lt;/p&gt;

&lt;p&gt;As far as the installation corruption problem goes, it&apos;s actually because
the hashcode for my extension that is stored in the Mozilla Addons database
is wrong. In fact, as I pointed out in &lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=345505&quot;&gt;Mozilla Bug 345505&lt;/a&gt;, this erroneous hash code is
the same for several extensions!&lt;/p&gt;
</content>
</entry>

<entry>
<title type="html">New Blog</title>
<category term="" />
<id>http://www.softwarepunk.com/blog/2007/04/03/firstpost</id>
<updated>2007-04-03T22:58:18Z</updated>
<published>2007-04-03T22:58:18Z</published>
<link rel="alternate" type="text/html" href="http://www.softwarepunk.com/blog/firstpost" />
<content type="html">
&lt;p&gt;Well, I&apos;ve updated my blog to some new software and am in the process
of moving my site from my old web host to my new web host (webfaction.com).
I&apos;m also hoping this means that I&apos;ll be able to start blogging with a bit
more frequency than I have in the past.&lt;/p&gt;

</content>
</entry>

<entry>
<title type="html">China Pictures</title>
<category term="" />
<id>http://www.softwarepunk.com/blog/2006/03/04/china-pictures</id>
<updated>2006-03-04T08:22:00Z</updated>
<published>2006-03-04T08:22:00Z</published>
<link rel="alternate" type="text/html" href="http://www.softwarepunk.com/blog/china-pictures" />
<content type="html">
&lt;p&gt;Well, having arrived in Shanghai, China for Mandarin Studies, it&apos;s now time for me to start taking pictures and posting them online! I&apos;ll be running my &lt;a href=&quot;http://www.softwarepunk.com/pictures/thumbnails.php?album=15&quot;&gt;China 2006 Pictures&lt;/a&gt; album from my regular photo site.&lt;/p&gt;

&lt;p&gt;As a teaser, here&apos;s a thumbnail picture of the panoramic shot I took from my bedroom window:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://www.softwarepunk.com/pictures/displayimage.php?album=15&amp;pos=6&quot;&gt;&lt;img src=&quot;http://www.softwarepunk.com/pictures/albums/userpics/10001/thumb_myview.jpg&quot;/&gt;&lt;/a&gt;&lt;/p&gt;

</content>
</entry>

<entry>
<title type="html">Freestyle Solve Released!</title>
<category term="" />
<id>http://www.softwarepunk.com/blog/2006/01/20/freestyle-solve-released</id>
<updated>2006-01-20T22:42:00Z</updated>
<published>2006-01-20T22:42:00Z</published>
<link rel="alternate" type="text/html" href="http://www.softwarepunk.com/blog/freestyle-solve-released" />
<content type="html">
&lt;p&gt;Well, I&apos;m really happy to announce that I have been able to release &lt;a href=&quot;http://www.softwarepunk.com/solve/&quot;&gt;Freestyle Solve version 0.3&lt;/a&gt;. This is the first public release of Freestyle Solve.&lt;/p&gt;

&lt;p&gt;Freestyle Solve is a school project that my friends and I did for our final year of Computer Engineering at the University of Waterloo. It is a tablet PC application that recognizes handwritten math and uses 3rd party software to simplify, differentiate, and otherwise manipulate the equations that the user writes. It is released under an open source license, so if you&apos;re interested you can see how it works!&lt;/p&gt;

</content>
</entry>

<entry>
<title type="html">Firefox Extension Finally Approved!</title>
<category term="" />
<id>http://www.softwarepunk.com/blog/2006/01/16/firefox-extension-approved</id>
<updated>2006-01-16T06:30:00Z</updated>
<published>2006-01-16T06:30:00Z</published>
<link rel="alternate" type="text/html" href="http://www.softwarepunk.com/blog/firefox-extension-approved" />
<content type="html">
&lt;p&gt;Hoorah! My first Firefox extension ever was approved. It is FFClickOnce, which runs ClickOnce apps from Firefox--I&apos;ve mentioned it previously in this blog. It is available on the &lt;a href=&quot;https://addons.mozilla.org/extensions/moreinfo.php?application=firefox&amp;id=1608&quot;&gt;Mozilla addons site at.&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The email notifying me of the approval came in on Sunday, January 15, 2006 (yesterday). So it was a bit over a month to get this approved. Ah well, people are busy over the Christmas holidays.&lt;/p&gt;

</content>
</entry>

<entry>
<title type="html">ClickOnce File Updating (Continued)</title>
<category term="" />
<id>http://www.softwarepunk.com/blog/2006/01/01/clickonce-updating2</id>
<updated>2006-01-02T05:28:00Z</updated>
<published>2006-01-02T05:28:00Z</published>
<link rel="alternate" type="text/html" href="http://www.softwarepunk.com/blog/clickonce-updating2" />
<content type="html">
&lt;p&gt;My initial observation about how doing a publish in Visual C# 2005 Express always rebuilds all assemblies was flawed: I had a pre-build script in that particular project that puts version numbers into the AssemblyInfo.cs file. Even if the version number did not change, the AssemblyInfo.cs file timestamp was updated, triggering a full rebuild of every project in my solution. My bad. It&apos;s a good reminder to always test a behaviour using the simplest possible setup.&lt;/p&gt;

&lt;p&gt;The default behaviour of Visual C# 2005 Express (in the absence of any special pre-build scripts) is that, if you click on the &quot;Publish Now&quot; button twice in a row, without making any changes (direct or indirect) to any of the files, only the current project gets rebuilt; all the referenced projects are not rebuilt. This seems pretty reasonable.&lt;/p&gt;

&lt;p&gt;Still, the current ClickOnce versioning is problematic. Try this:
&lt;ol&gt;&lt;li&gt;Publish the application.&lt;/li&gt;&lt;li&gt;Execute the &quot;Rebuild Solution&quot; menu item in the &quot;Build&quot; menu.&lt;/li&gt;&lt;li&gt;Publish the application. Notice that all assembly hashes have now changed.&lt;/li&gt;&lt;/ol&gt;&lt;/p&gt;

&lt;p&gt;So, if the solution gets rebuilt  between publishes, then the second publish will do a total update, regardless of whether it is really needed.&lt;/p&gt;

&lt;p&gt;This is not the behaviour that I want for my project. I often do a &quot;rebuild all&quot;, for example before running FxCop or doing unit tests: I like to point both tools at my release binaries. I want ClickOnce to only update those assemblies whose version number has been bumped. I think that, if I control the publish manually, I should be able to get the desired behaviour.&lt;/p&gt;

</content>
</entry>

<entry>
<title type="html">ClickOnce Always Updates All Files!</title>
<category term="" />
<id>http://www.softwarepunk.com/blog/2005/12/19/clickonce-updating</id>
<updated>2005-12-20T04:01:00Z</updated>
<published>2005-12-20T04:01:00Z</published>
<link rel="alternate" type="text/html" href="http://www.softwarepunk.com/blog/clickonce-updating" />
<content type="html">
&lt;p&gt;Arrgh!&lt;/p&gt;

&lt;p&gt;Microsoft&apos;s ClickOnce is supposed to make deployment easy--and one of the things it does is that when the application is updated, it is only supposed to transfer those DLL files that have changed. Unfortunately, this isn&apos;t working for me: ClickOnce is always updating the entire application.&lt;/p&gt;

&lt;p&gt;I found out from a post on &lt;a href=&quot;http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=122628&amp;SiteID=1&quot;&gt;MSDN Forums&lt;/a&gt; that ClickOnce doesn&apos;t use the assembly version numbers to determine what has changed. Instead, it uses a hash of the assembly file contents.&lt;/p&gt;

&lt;p&gt;This seems reasonable, because a developer may screw up and forget to increment assembly version numbers before doing a publish. Reasonable, until you do some poking around and realize that every time you publish the app (in Visual C# 2005 Express Edition, at the very least) all of the assemblies are rebuilt, whether you have changed the code or not, and the rebuild causes the files to change! ARRGH!&lt;/p&gt;

&lt;p&gt;You can see this from the following console session:&lt;/p&gt;

&lt;pre&gt;
-bash-2.05b$ hexdump -C Solve_0_3_0_0/Freestyle.Solve.AppConfig.dll.deploy  &gt; v0.txt
-bash-2.05b$ hexdump -C Solve_0_3_0_1/Freestyle.Solve.AppConfig.dll.deploy  &gt; v1.txt
-bash-2.05b$ diff v0.txt v1.txt
9c9
&lt; 00000080  50 45 00 00 4c 01 03 00  98 61 a7 43 00 00 00 00  |PE..L....a.C....|
---
&gt; 00000080  50 45 00 00 4c 01 03 00  5c 63 a7 43 00 00 00 00  |PE..L...\c.C....|
539,541c539,541
&lt; 00002f90  73 3e 7b 46 44 36 36 43  44 31 38 2d 41 45 45 39  |s&gt;{FD66CD18-AEE9|
&lt; 00002fa0  2d 34 43 38 43 2d 39 33  42 38 2d 38 33 42 33 30  |-4C8C-93B8-83B30|
&lt; 00002fb0  31 44 44 37 32 43 39 7d  00 43 6f 6d 70 69 6c 65  |1DD72C9}.Compile|
---
&gt; 00002f90  73 3e 7b 44 43 33 37 45  36 32 34 2d 44 36 46 31  |s&gt;{DC37E624-D6F1|
&gt; 00002fa0  2d 34 30 36 44 2d 41 32  38 45 2d 35 36 33 46 36  |-406D-A28E-563F6|
&gt; 00002fb0  31 36 30 44 37 32 44 7d  00 43 6f 6d 70 69 6c 65  |160D72D}.Compile|
1130,1131c1130,1131
&lt; 00005480  00 79 00 4e 00 61 00 6d  00 65 00 00 18 cd 66 fd  |.y.N.a.m.e....f.|
&lt; 00005490  e9 ae 8c 4c 93 b8 83 b3  01 dd 72 c9 00 08 b7 7a  |...L......r....z|
---
&gt; 00005480  00 79 00 4e 00 61 00 6d  00 65 00 00 24 e6 37 dc  |.y.N.a.m.e..$.7.|
&gt; 00005490  f1 d6 6d 40 a2 8e 56 3f  61 60 d7 2d 00 08 b7 7a  |..m@..V?a`.-...z|
-bash-2.05b$
&lt;/pre&gt;


&lt;p&gt;I used ildasm to look at my assemblies. The first difference is in the &quot;Time-date stamp&quot;. Okay, that makes sense enough.&lt;/p&gt;

&lt;p&gt;The second difference has to do with some sort of private class that is being created because I&apos;m using a static array initializer. I guess it uses a GUID to guarantee that its custom name won&apos;t conflict with anything that gets used in my program.&lt;/p&gt;

&lt;p&gt;The third difference is the pure hex representation of the GUID.&lt;/p&gt;


&lt;p&gt;So, how can this be fixed? I&apos;ve looked for an option in Visual C# 2005 Express to only rebuild changed source files when a publish is done, but I haven&apos;t found anything. So, I&apos;m left with two possible solutions:&lt;/p&gt;

&lt;p&gt;1) Do the publish manually, using the commandline tools.&lt;/p&gt;
&lt;p&gt;2) Write a program to fix up a ClickOnce publishing folder &lt;b&gt;after&lt;/b&gt; a publish is done, and correct entries in the manifest file. I could compare assembly versions instead of file hashes. The only problem will be ensuring that the ClickOnce manifest files maintain cryptographic integrity (I&apos;ll probably have to re-sign them, *bleh*)&lt;/p&gt;

</content>
</entry>

<entry>
<title type="html">Firefox and ClickOnce</title>
<category term="" />
<id>http://www.softwarepunk.com/blog/2005/12/10/firefox-clickonce</id>
<updated>2005-12-10T19:55:00Z</updated>
<published>2005-12-10T19:55:00Z</published>
<link rel="alternate" type="text/html" href="http://www.softwarepunk.com/blog/firefox-clickonce" />
<content type="html">
&lt;p&gt;Well, Microsoft&apos;s wonderful new ClickOnce technology for installing .NET applications doesn&apos;t cooperate with browsers other than IE. :&apos;(&lt;/p&gt;

&lt;p&gt;I&apos;m using ClickOnce to deploy my handwritten math recognition software, and I wanted people to be able to use Firefox to download it. So the first thing I did was make a helper application. When you click on a link to a ClickOnce application, the XML file that describes the application gets downloaded to your computer and then my helper application takes over. It reads the URI to the application itself from the XML file and uses rundll to do a call to the appropriate DLL function to get the install started.&lt;/p&gt;

&lt;p&gt;Unfortunately, that approach only works for some ClickOnce applications (those applications that are configured to install to the local machine). Other ClickOnce applications don&apos;t have the URI in the XML file, and so they fail.&lt;/p&gt;

&lt;p&gt;So, I went back and made a Firefox extension that solves this. My first Firefox extension, ever! Extending Firefox is really cool and surprisingly easy--it isn&apos;t just an application, but a whole platform for application development! Geez... I wish the applications that I write could be so easily extendable.&lt;/p&gt;

&lt;p&gt;Anyway, the extension is available at &lt;a href=&quot;http://www.softwarepunk.com/ffclickonce/&quot;&gt;http://www.softwarepunk.com/ffclickonce/ .&lt;/a&gt; I&apos;ve submitted it to the Firefox addons site, but it has been &quot;pending approval&quot; for about a week now.&lt;/p&gt;

</content>
</entry>

<entry>
<title type="html">Laptop Overheating</title>
<category term="" />
<id>http://www.softwarepunk.com/blog/2005/05/03/laptop-overheating</id>
<updated>2005-05-04T03:23:00Z</updated>
<published>2005-05-04T03:23:00Z</published>
<link rel="alternate" type="text/html" href="http://www.softwarepunk.com/blog/laptop-overheating" />
<content type="html">
&lt;p&gt;My laptop has been giving me problems for a while... it would shut off all of a sudden as I was using it and I had no idea why. It is a Dell SmartStep 200N, and I&apos;ve had it for about 2.5 years.&lt;/p&gt;

&lt;img src=&quot;http://www.softwarepunk.com/pictures/albums/userpics/10001/normal_109_0961.JPG&quot;/&gt;

&lt;p&gt;After a while, I began to realize that it was shutting off because it was getting too hot. The primary indication of this was that these shutdowns only happened when the fan was running at full speed. Secondary indications were that the shutdowns would happen when the machine was under heavy load, and that the shutdowns happened more frequently when my room was hot. But I didn&apos;t think I could do anything about it... obviously, Dell had done their best to ensure that my laptop had a good cooling system.&lt;/p&gt;

&lt;img src=&quot;http://www.softwarepunk.com/pictures/albums/userpics/10001/normal_109_0962.JPG&quot;/&gt;

&lt;p&gt;That was until I read &lt;a href=&quot;http://seb.closs.free.fr/articles/tutoP4_en.php&quot;&gt;http://seb.closs.free.fr/articles/tutoP4_en.php.&lt;/a&gt; This site describes a chronic overheating problem in this kind of laptop. The laptop is from the era of &quot;desktop replacements&quot; and embodies the particular idea of using a desktop processor instead of a mobile processor. I bought it knowing full well that this was the case, because I wanted the performance of a desktop processor without having to pay for a mobile processor. From what I&apos;ve read, it sounds like this design didn&apos;t have sufficient cooling. Also, a number of manufacturers used the same internals as Dell used in its SmartStep, so this problem appears in a number of other models from other manufacturers.&lt;/p&gt;

&lt;img src=&quot;http://www.softwarepunk.com/pictures/albums/userpics/10001/normal_109_0963.JPG&quot;/&gt;

&lt;p&gt;However, the problem can be fixed! It turns out that the thermal compound between the CPU and the heatsink was poorly applied, and in some cases missing altogether. After disassembling my computer, I discovered that there was thermal compound in my system, but there was actually a piece of aluminum foild sandwiched between the processor and the heatsink, with thermal compound on either side. Apparently this isn&apos;t the best situation, so with a fair amount of effort I managed to remove the thermal compound and clean off the processor and heatsink, apply some fresh thermal compound, and reattach the heatsink.&lt;/p&gt;

&lt;img src=&quot;http://www.softwarepunk.com/pictures/albums/userpics/10001/normal_109_0964.JPG&quot;/&gt;

&lt;p&gt;While it was open, I also dusted off the fins on the heatsink (to increase heat transfer) and dusted off the rest of the computer (because I&apos;m a clean freak). The computer was a bit difficult to open up... Flipping out the keyboard was difficult because there are plastic tabs holding it down, and you just have to pull it up, past those tabs, and hope that nothing breaks. And getting the processor off the heatsink when it is glued on by thermal compound was challenging, also. I used 70% rubbing alcohol to soften some of the compound, and then I slid a razor blade between the processor and the heatsink and managed to pry them apart. I cleaned thermal compound from the heatsink using 99% isopropanol (*strong* rubbing alcohol). To my surprise, the 99%-strength stuff was actually available on the shelf in the drug store--I have never been able to find it this easily in the past.&lt;/p&gt;

&lt;img src=&quot;http://www.softwarepunk.com/pictures/albums/userpics/10001/normal_109_0965.JPG&quot;/&gt;

&lt;p&gt;Now my computer doesn&apos;t shut itself off anymore, unless I tell it to.&lt;/p&gt;
</content>
</entry>
</feed>
