<?xml version="1.0"?>
<!-- name="generator" content="blosxom/2.0" -->
<!DOCTYPE rss PUBLIC "-//Netscape Communications//DTD RSS 0.91//EN" "http://my.netscape.com/publish/formats/rss-0.91.dtd">

<rss version="0.91">
  <channel>
    <title>Michael's musings   </title>
    <link>http://www.sandelman.ca/mcr/blog</link>
    <description>mcr.ca is a kook!</description>
    <language>en</language>

  <item>
 <title>Active Scaffold obscures internal errors</title>
 <pubDate>Thu, 01 Dec 2011 11:50:00 GMT</pubDate>
 <link>http://www.sandelman.ca/mcr/blog/2011/12/01#active_scaffold_obscures_internal_errors</link>
 <description>&lt;p&gt;In a newly scaffold'ed model and controller, created with ActiveScaffold
3.0.5, on rails 3.0.9, I was getting errors from the default created rspec
code that I could not diagnose:
&lt;pre class=&quot;example&quot;&gt;
  1) Admin::ConnectionsController POST create with valid params creates a new Connection
     Failure/Error: post :create, :connection =&amp;gt; valid_attributes
     NoMethodError:
       You have a nil object when you didn't expect it!
       You might have expected an instance of Array.
       The error occurred while evaluating nil.each
     # ./spec/controllers/admin/connections_controller_spec.rb:54
&lt;/pre&gt;&lt;/p&gt;

&lt;p&gt;Worse, these things were working just fine in RAILS_ENV=development.&lt;/p&gt;

&lt;p&gt;Well, of course, it is failing on the line where the :create is invoked.
But, where is the nil.each occuring?&lt;/p&gt;

&lt;p&gt;I ran things with:
&lt;pre class=&quot;example&quot;&gt;
bundle exec rspec -d spec/controllers/admin/connections_controller_spec.rb \
   -e &amp;quot;POST create with valid params creates a new Connection&amp;quot;
&lt;/pre&gt;&lt;/p&gt;

&lt;p&gt;after putting &amp;quot;debugger&amp;quot; in before the test case:
&lt;pre class=&quot;example&quot;&gt;
  describe &amp;quot;POST create&amp;quot; do
    describe &amp;quot;with valid params&amp;quot; do
      it &amp;quot;creates a new Connection&amp;quot; do
        # expect {
          debugger
          post :create, :connection =&amp;gt; valid_attributes
        #}.to change(Connection, :count).by(1)
      end
&lt;/pre&gt;&lt;/p&gt;

&lt;p&gt;(I'm still looking for a good ruby-debug mode that works like gdb-mode in
Emacs works, that can show me the code around where I am...)&lt;/p&gt;

&lt;p&gt;One winds up in the rescue in:
&lt;pre class=&quot;example&quot;&gt;
/var/lib/gems/1.8/gems/actionpack-3.0.9/lib/action_controller/metal/rescue.rb
&lt;/pre&gt;&lt;/p&gt;

&lt;p&gt;on line 19.&lt;/p&gt;

&lt;p&gt;So, stick a breakpoint on the super there:
&lt;pre class=&quot;example&quot;&gt;
break /var/lib/gems/1.8/gems/actionpack-3.0.9/lib/action_controller/metal/rescue.rb:17
&lt;/pre&gt;&lt;/p&gt;

&lt;p&gt;This lets you see the exception:&lt;/p&gt;

&lt;pre class=&quot;example&quot;&gt;
(rdb:1) p exception
#&amp;lt;NoMethodError: You have a nil object when you didn't expect it!
You might have expected an instance of Array.
The error occurred while evaluating nil.each&amp;gt;
&lt;/pre&gt;

&lt;p&gt;The annoying part is that the action is invoked at
&lt;code&gt;/var/lib/gems/1.8/gems/actionpack-3.0.9/lib/action_controller/metal/instrumentation.rb:29&lt;/code&gt;&lt;/p&gt;

&lt;pre class=&quot;example&quot;&gt;
ActiveSupport::Notifications.instrument(&amp;quot;process_action.action_controller&amp;quot;, raw_payload) do |payload|
&lt;/pre&gt;

&lt;p&gt;so, it evaluates code, and there are in fact one block passed to another
block, and it seems really hard (a major ruby-debug limitation), that I can
not put a breakpoint easily into the beginning of a block passed in.&lt;/p&gt;

&lt;p&gt;I had to resort to editing that file, and sticking &amp;quot;debugger&amp;quot; in there!&lt;/p&gt;

&lt;p&gt;Finally, one gets to:&lt;/p&gt;

&lt;pre class=&quot;example&quot;&gt;
/var/lib/gems/1.8/gems/actionpack-3.0.9/lib/abstract_controller/base.rb:150
send_action(method_name, *args)
&lt;/pre&gt;

&lt;p&gt;In the debugger, the right thing to do is:&lt;/p&gt;

&lt;pre class=&quot;example&quot;&gt;
catch NoMethodError
&lt;/pre&gt;

&lt;p&gt;This finally shows me that the failure is at:&lt;/p&gt;

&lt;pre class=&quot;example&quot;&gt;
/corp/projects/credil/hydra/t3041/vendor/plugins/active_scaffold/lib/active_scaffold/attribute_params.rb:42
&lt;/pre&gt;

&lt;p&gt;Why?  Because attributes is nil.&lt;/p&gt;

&lt;p&gt;Why, because the generated controllers spec file says:&lt;/p&gt;

&lt;pre class=&quot;example&quot;&gt;
    describe &amp;quot;with valid params&amp;quot; do
      it &amp;quot;creates a new Connection&amp;quot; do
        expect {
          post :create, :connection =&amp;gt; valid_attributes
        }.to change(Connection, :count).by(1)
      end
&lt;/pre&gt;

&lt;p&gt;should have been generated as:
&lt;pre class=&quot;example&quot;&gt;
    describe &amp;quot;with valid params&amp;quot; do
      it &amp;quot;creates a new Connection&amp;quot; do
        expect {
          post :create, :record =&amp;gt; valid_attributes
        }.to change(Connection, :count).by(1)
      end
&lt;/pre&gt;&lt;/p&gt;</description>
 </item>
  <item>
 <title>Domain Squatter Avoidance tool</title>
 <pubDate>Mon, 08 Aug 2011 13:31:00 GMT</pubDate>
 <link>http://www.sandelman.ca/mcr/blog/2011/08/08#domain_squatter_avoidance_tool</link>
 <description>&lt;p&gt;Here is a nice use for a distributed hash table, backed by the new IETF
REPUTE work.&lt;/p&gt;

&lt;p&gt;I just typed &amp;quot;antipope.net&amp;quot; rather than antipope.org to get to Charlies
Stross' web site.  A squatter offered to sell me the domain.  Some of the
squatters do it solely for ad revenue, and I'd rather not arrange for
them to get a dime.&lt;/p&gt;

&lt;p&gt;I want a button for my browser (Chromium) which logs that name into a
reputation database indicating that these guys are squatters, and letting me
(once I know the correct name) enter the proper name.
The same plugin will consult that database if I type something wrong, and
suggest an alternative.&lt;/p&gt;</description>
 </item>
  <item>
 <title>Eclipse and Android SDK never ran</title>
 <pubDate>Tue, 19 Jul 2011 00:51:00 GMT</pubDate>
 <link>http://www.sandelman.ca/mcr/blog/2011/07/19#eclipse_and_android_sdk_never_ran</link>
 <description>&lt;p&gt;I've had a problem getting Eclipse, and specifically the Android SDK to run
on my Debian laptop for over a year now.  I've generally just VNC'ed to a
more powerful box and ran it there.&lt;/p&gt;

&lt;p&gt;The problem I had was that most network operations in eclipse would fail with
network unreachable.  Not a big deal for day to day things, but you need the
network to install the Android SDK kits and install Eclipse plugins.&lt;/p&gt;

&lt;p&gt;I had been trying to strace things to figure out what it was, and finally
found it:&lt;/p&gt;

&lt;pre class=&quot;example&quot;&gt;
connect(26, {sa_family=AF_INET6, sin6_port=htons(443), inet_pton(AF_INET6, &amp;quot;::ffff:74.125.95.91&amp;quot;, &amp;amp;sin6_addr), sin6_flowinfo=0, sin6_scope_id=0}, 28) = -1 ENETUNREACH (Network is unreachable)
&lt;/pre&gt;

&lt;p&gt;Huh, it's doing IPv6 connections.  &lt;em&gt;GOOD&lt;/em&gt;.
But, it hasn't set the right IOCTL on the socket to permit IPv4 mapped
connections to work, and on Debian, the bindv6only is now not set.&lt;/p&gt;

&lt;p&gt;See: &lt;a href=&quot;http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=560056&quot;&gt;http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=560056&lt;/a&gt;&lt;/p&gt;</description>
 </item>
  <item>
 <title>&quot;Over The Top&quot; Television</title>
 <pubDate>Sun, 03 Jul 2011 22:16:00 GMT</pubDate>
 <link>http://www.sandelman.ca/mcr/blog/2011/07/03#_over_the_top__television</link>
 <description>&lt;p&gt;re: &lt;a href=&quot;http://crtc.gc.ca/eng/archive/2011/2011-344.htm&quot;&gt;http://crtc.gc.ca/eng/archive/2011/2011-344.htm&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p class=&quot;quoted&quot;&gt;In Broadcasting Regulatory Policy 2009-329, the Commission set out the
results of its review of broadcasting in new media. This was followed by
Broadcasting Order 2009-660, which amended, clarified and affirmed the
continued appropriateness of the New Media Exemption Order applied to
new media broadcasting undertakings. Since then, there has been an
acceleration of technological, market and consumer behaviour trends that
may influence the Canadian broadcasting system's ability to achieve
the policy objectives of the Broadcasting Act. Increasingly, programming
is being provided by entities on multiple platforms and separate from
the physical infrastructure over which it is delivered. These
&amp;quot;over-the-top&amp;quot; entities are both foreign and domestic.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;1. My name is Michael Richardson.  I am chief scientist of Sandelman Software
Works. I am writing today about your consultation about &amp;quot;Over-The-Top&amp;quot;
television, such as &amp;quot;netflix&amp;quot; and others like this. I am a pioneer of the
Internet, my use of it dates back to 1987. I am active participant in the
Internet Engineering Task Force, and I've authored a number of RFCs in the
security field.&lt;/p&gt;

&lt;p&gt;2. I find the entire question about &amp;quot;over-the-top&amp;quot; to itself be indicative
of a bias to begin with.  My question was, over top of what?  I get as much
television &amp;quot;over&amp;quot; Canada Post as I do &amp;quot;over-the-air&amp;quot;.&lt;/p&gt;

&lt;p&gt;3. The Internet does not run on top of other things, more and more, other
things run on top of the Internet.   Neither incumbent cable or telephone
companies have been competent enough to supply my home office for internet.
My family that has tried them for Internet has found their service to be
lacking, and have gone to reliable Internet suppliers, ones that are not
vertically integrated and therefore do not have a bias against other things.&lt;/p&gt;

&lt;p&gt;4. Since 1995, I have not subscribed to &amp;quot;cable&amp;quot; TV.  I tried microwave
(LOOK), but when I moved it was not available, and then I went to satellite
(Star Choice, now Shaw).  Since it became Shaw, my level of service has
steadily declined, while my rates have gone up.  My family uses the satellite
TV less and less (we are now on the lowest tier subscription, primary for US
Network channels) and relies on DVD delivery from ZIP and netflix over my
bridged-DSL connection with Storm Internet.&lt;/p&gt;

&lt;p&gt;5. Netflix has reported &amp;quot;problems&amp;quot; with Canadian residential internet
connections.  I have none.  I do not use an incumbent telco with a competing
service as my supplier.  Please connect the dots.&lt;/p&gt;

&lt;p&gt;6. I do not use &amp;quot;HD&amp;quot; services at this time, as I have no TVs like that.
I consider current HD TV systems to be too inflexible and yet too complicated
for my use.  When the time comes, I will replace the &amp;quot;screens&amp;quot; in my home
with dumb computer-grade displays, connected to media boxes running open
standard systems.&lt;/p&gt;

&lt;p&gt;7. The available content on Netflix leaves a lot to be desired.  The amount
in Canada, I'm told is much less than in the US due to licensing problems.
This upsets me greatly:  I would like to see a mandatory licensing regime
that seperated who I choose to deliver the content I want, from what content
is available.&lt;/p&gt;

&lt;p&gt;8. Netflix offers a service that apparently permits some Apple and some
Microsoft users to watch television their computers.  This system uses a
proprietary copyright infringing system to display the content.   I say that
it infringes the copyright laws because it appears that this &amp;quot;Digital Rights
Management&amp;quot; system in fact denies me rights that I would have on other
systems.  This system is incompatible with non-Microsoft systems (tied
selling) such as Ubuntu Linux that runs at my house.&lt;/p&gt;

&lt;p&gt;9. We happen to have a Nintendo WII game console that has a netflix system
for it, and I'm told that the Netflix application for it may also contain
DRM. However, the output of my WII is a DRM-free analogue signal, and
therefore my rights are identical with this system as they would be with
broadcast television.&lt;/p&gt;

&lt;p&gt;10. I am preparing myself for ATSC.  I intend to put an antenna on my roof to
receive US Network Channels from Rochester NY,  and along with an ATSC tuner
on each of my three TVs, I should be able to get Ottawa broadcast channels
from Camp Fortune.  At that point I will stop subscribing to satellite
service: they have provided me with essentially no value.&lt;/p&gt;

&lt;p&gt;11. At this point, what I would like is the ability to pay for the content
that I want.  I would like to be able to vote with my wallet, rather than
have the CRTC tell me.  I expect some service (such as Netflix, or a
competitor) to offer to intermediate my transactions, reducing the cost of
the transaction, and dealing the production studios directly.&lt;/p&gt;

&lt;p&gt;12. I would like to:
&lt;blockquote&gt;
&lt;p class=&quot;quoted&quot;&gt;a) provide a tip of approximately 0.25 for a show that I like. This
would be voluntary by me.  I would do this because I want them to
produce more like it.  I want to do this even for shows that might
have been out of &amp;quot;print&amp;quot; for a long time, for instance Threes Company,
or old episodes of Sesame Street, which continue to have significant
value.     Right now, at most, I can provide a &amp;quot;star&amp;quot; rating.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;blockquote&gt;
&lt;p class=&quot;quoted&quot;&gt;b) provide a bond (a promise) that I would tip for more episodes of
a series that I like.   This removes the role of the executives of
i) the incument cable/satellite companies, ii) the specialty channels.
who it seems continue to be reluctant to take risks, and have
significantly disrupted shows with significant fan bases with very
good writing.  If this scares these companies, tough.
The CRTC has no mandate to protect companies with out-dated business
plans.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;blockquote&gt;
&lt;p class=&quot;quoted&quot;&gt;c) provide a tip to a &amp;quot;network&amp;quot; such as CBCKids who might provide me with
a playlist of shows to watch and timely interactive ways to engage
kids.   Note I would be tipping for the playlist (a list of
recommendations) not for the shows themselves.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;13. This is &lt;em&gt;particularly&lt;/em&gt; important to me for children's shows, as I will
only let me child watch the TV stations that do not feature advertising.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;End of Document&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;</description>
 </item>
  <item>
 <title>Problems (insecurities) in ActiveResource</title>
 <pubDate>Mon, 09 May 2011 19:14:00 GMT</pubDate>
 <link>http://www.sandelman.ca/mcr/blog/2011/05/09#problems__insecurities__in_activeresource</link>
 <description>&lt;p&gt;I have an application that talks to Redmine/Chiliproject using its API with
results in JSON.  I use ActiveResource to make these calls, and it suddendly
started failing after an upgrade from redmine to chiliproject:&lt;/p&gt;

&lt;pre class=&quot;example&quot;&gt;
test_retrieve_the_thomas_watson_project_by_id(ProjectTest):
ActiveRecord::UnknownAttributeError: unknown attribute: created_on
&lt;/pre&gt;

&lt;p&gt;The fact that I was getting an error from &lt;em&gt;ActiveRecord&lt;/em&gt; and not
&lt;em&gt;ActiveResource&lt;/em&gt; was puzzling.  My ActiveResource class was called ProjectResource.
The thing that I was retrieving was a &amp;quot;project&amp;quot;, and yes, I happened to have
a model called &amp;quot;Project&amp;quot;, which was a subclass of ActiveRecord.&lt;/p&gt;

&lt;p&gt;Looking at the JSON results using curl:&lt;/p&gt;

&lt;pre class=&quot;example&quot;&gt;
marajade-[~/C/dracula/hourbank3] mcr 10293 %curl 'http://localhost:3100/projects/show/16?format=json&amp;amp;key=abcdAPIKEY09123456789'
{&amp;quot;project&amp;quot;:{&amp;quot;description&amp;quot;:&amp;quot;Voice and Video softphone system for Android, with SIP support.&amp;quot;,&amp;quot;updated_on&amp;quot;:&amp;quot;2010/10/08 10:10:24-0400&amp;quot;,&amp;quot;identifier&amp;quot;:&amp;quot;thomas-watson&amp;quot;,&amp;quot;homepage&amp;quot;:&amp;quot;&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;Thomas-Watson&amp;quot;,&amp;quot;created_on&amp;quot;:&amp;quot;2009/08/23 12:21:38 -0400&amp;quot;,&amp;quot;id&amp;quot;:16}}
&lt;/pre&gt;

&lt;p&gt;and also in the debugger, at&lt;/p&gt;

&lt;pre class=&quot;example&quot;&gt;
(rdb:1) c
Breakpoint 1 at /var/lib/gems/1.8/gems/activeresource-3.0.4/lib/active_resource/base.rb:889
/var/lib/gems/1.8/gems/activeresource-3.0.4/lib/active_resource/base.rb:889
new(record).tap do |resource|
(rdb:1) p record
{&amp;quot;project&amp;quot;=&amp;gt;{&amp;quot;name&amp;quot;=&amp;gt;&amp;quot;Thomas-Watson&amp;quot;, &amp;quot;created_on&amp;quot;=&amp;gt;&amp;quot;2009/08/23 12:21:38 -0400&amp;quot;, &amp;quot;id&amp;quot;=&amp;gt;16, &amp;quot;updated_on&amp;quot;=&amp;gt;&amp;quot;2010/10/08 10:10:24 -0400&amp;quot;, &amp;quot;homepage&amp;quot;=&amp;gt;&amp;quot;&amp;quot;, &amp;quot;description&amp;quot;=&amp;gt;&amp;quot;Voice and Video softphone system for Android, with SIP support.&amp;quot;, &amp;quot;identifier&amp;quot;=&amp;gt;&amp;quot;thomas-watson&amp;quot;}}
&lt;/pre&gt;

&lt;p&gt;what happens next is that the word &amp;quot;project&amp;quot; is passed to
&lt;pre class=&quot;example&quot;&gt;
find_or_create_resource_for(key)
&lt;/pre&gt;&lt;/p&gt;

&lt;p&gt;and this finds and returns the &amp;quot;Project&amp;quot; class which is in my model.
My model does not have a field &lt;em&gt;created_on&lt;/em&gt;, thus the error.&lt;/p&gt;

&lt;p&gt;So there three problems with this behaviour:
&lt;h2&gt;additions to the API should not break my old code, I should just ignore them.&lt;/h2&gt;&lt;/p&gt;


&lt;h2&gt;there is no guarantee that the class that was found, &amp;quot;Project&amp;quot; has any of the behaviour that I need in the thing returned from ActiveResource.&lt;/h2&gt;


&lt;h2&gt;worst, since the word &amp;quot;project&amp;quot; came from the remote system, the remote system could pick any class it wanted and invoke code on it.  It's a reverse attack by a server on a client, but it's wrong to assume that the server is fully trusted by the client.&lt;/h2&gt;

&lt;p class=&quot;first&quot;&gt;I'm not sure what the easiest way to fix this, but it's certainly wrong, and it's been there awhile in ActiveResource.&lt;/p&gt;



</description>
 </item>
  <item>
 <title>A novel way to do PBX extensions</title>
 <pubDate>Sun, 24 Apr 2011 19:15:00 GMT</pubDate>
 <link>http://www.sandelman.ca/mcr/blog/2011/04/24#a_novel_way_to_do_pbx_extensions</link>
 <description>&lt;p&gt;At CREDIL we are expanding our Asterisk out to service the entire floor.
We didn't do our extensions particularly efficiently (numberwise), and I was
thinking about ways to do them.&lt;/p&gt;

&lt;p&gt;A really (math) geeky way occured to me: give employee number n the n+2'th
prime (1-first prime, 2-second prime, first employee gets extension 3).&lt;/p&gt;

&lt;p&gt;Then, if you need to have a conference call with employees number 4, 6 and 9,
then you need to dial their product.  Primes are
1,2,3,5,7,11,13,17,19,23,29,31,.. 4+2 = 6th prime is 11, 6+2=8th prime is 17,
and 9+2=11th prime is 29.  So dial 11*17*29 = 5423.&lt;/p&gt;

&lt;p&gt;Primes are still in the 4 digits for the first 1000.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://primes.utm.edu/lists/small/1000.txt&quot;&gt;http://primes.utm.edu/lists/small/1000.txt&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;All multiples of your extension are yours to do anything you want with, and
since the multiples times powers of 2 are never conference bridges, you have
a lot of bits you can use to encode useful things.  Want to call me and avoid
ringing me?  Okay, set bit number 2.  Want to call me and never go to voice
mail? Okay, set bit number 3... etc.&lt;/p&gt;</description>
 </item>
  <item>
 <title>Time for a new Monarch</title>
 <pubDate>Thu, 21 Apr 2011 14:39:00 GMT</pubDate>
 <link>http://www.sandelman.ca/mcr/blog/2011/04/21#time_for_a_new_monarch</link>
 <description>&lt;p&gt;To Her Majesty Her Majesty Elizabeth the Second,&lt;/p&gt;

&lt;p&gt;by the Grace of God, of Great Britain, Ireland and the British Dominions
beyond the Seas
Queen, Defender of the Faith,
Duchess of Edinburgh,
Countess of Merioneth,
Baroness Greenwich,
Duke of Lancaster,
Lord of Mann,
Duke of Normandy,
Sovereign of the Most Honourable Order of the Garter,
Sovereign of the Most Honourable Order of the Bath,
Sovereign of the Most Ancient and Most Noble Order of the Thistle,
Sovereign of the Most Illustrious Order of Saint Patrick,
Sovereign of the Most Distinguished Order of Saint Michael and Saint George,
Sovereign of the Most Excellent Order of the British Empire,
Sovereign of the Distinguished Service Order,
Sovereign of the Imperial Service Order,
Sovereign of the Most Exalted Order of the Star of India,
Sovereign of the Most Eminent Order of the Indian Empire,
Sovereign of the Order of British India,
Sovereign of the Indian Order of Merit,
Sovereign of the Order of Burma,
Sovereign of the Royal Order of Victoria and Albert,
Sovereign of the Royal Family Order of King Edward VII,
Sovereign of the Order of Merit,
Sovereign of the Order of the Companions of Honour,
Sovereign of the Royal Victorian Order,
Sovereign of the Most Venerable Order of the Hospital of St John of Jerusalem&lt;/p&gt;

&lt;p&gt;(see
&lt;a href=&quot;http://en.wikipedia.org/wiki/List_of_titles_and_honours_of_Queen_Elizabeth_II&quot;&gt;http://en.wikipedia.org/wiki/List_of_titles_and_honours_of_Queen_Elizabeth_II&lt;/a&gt;
)&lt;/p&gt;

&lt;p&gt;On this, Our Birthday, where I turn 40, and you are still more than twice my
age, and likely four times my wisdom, I wanted to share some thoughts I have
had over the last few years.&lt;/p&gt;

&lt;p&gt;I am your direct subject, having been born in London, as as well as your
loyal subject in the &amp;quot;British Dominions beyond the Seas&amp;quot;.  I'm actually a fan
of having a monarch, which is rather unpopular these days.  I even met Your
Highness once when you visited Fredericton, but I actually too little to know
enough to be impressed.&lt;/p&gt;

&lt;p&gt;First, congradulations on celebrating the marriage of your grandson. I know
that things will go well next week, and we look forward his visit to Ottawa
this summer.&lt;/p&gt;

&lt;p&gt;I am sure that you have given a lot of thought to succession.  I wondered if
you had considered that Prince William would very nice King.  A very nice
Young King, one who could rally the youth of today, and bring a unity that
politicians yearn for, but have seldom delivered.&lt;/p&gt;

&lt;p&gt;Does Prince Charles actually want to be King?  Perhaps after a brief
Honeymoon, you and Prince Charles might consider abdicating in favour of
Prince William.&lt;/p&gt;

&lt;p&gt;I suggest sometime in 2012, maybe Feb. 29 would auspicious, or maybe April
21, 2012.  I don't know: I am sure you will come up with something sensible.&lt;/p&gt;</description>
 </item>
  <item>
 <title>Dreamhost SSL certificates --- insecure</title>
 <pubDate>Thu, 17 Mar 2011 18:13:00 GMT</pubDate>
 <link>http://www.sandelman.ca/mcr/blog/2011/03/17#dreamhost_ssl_certificates_---_insecure</link>
 <description>&lt;p&gt;Dreamhost sells third-level GeoTrust SSL security certificates for $15/year.
(You have to be an existing customer).&lt;/p&gt;

&lt;p&gt;It seems however, they do not give you the chance to upload a CSR file.
Instead, you are expected to fill out the DN information online, and
then they generate a private key for you.  And they keep the private key
around in their database.&lt;/p&gt;

&lt;p&gt;It also winds up in your browser cache, and if you have kind of a &amp;quot;trusted&amp;quot;
SSL proxy between you and the Internet (like half of corporate users have),
then it's gonna be in the cache of that device too.&lt;/p&gt;

&lt;p&gt;This is a FAIL.  Not only is your private key subject to whatever insecurity
their might have, but it's total FBI Patriot Act fodder.&lt;/p&gt;

&lt;p&gt;(If there is some place to upload a CSR, we couldn't find it)&lt;/p&gt;</description>
 </item>
  <item>
 <title>Deploying Django applications with Capistrano</title>
 <pubDate>Wed, 02 Mar 2011 17:06:00 GMT</pubDate>
 <link>http://www.sandelman.ca/mcr/blog/2011/03/02#deploying_django_applications_with_capistrano</link>
 <description>&lt;p&gt;Yesterday, I cooked up a deploy.rb so that Capistrano can deploy a Django
application.  While there is a Python app called
&lt;a href=&quot;http://docs.fabfile.org/0.9.0/&quot;&gt;http://docs.fabfile.org/0.9.0/&lt;/a&gt; from what I could tell, it was very general to
running commands on multiple servers, and not really specific to checking out
a web framework and deploying it to one or more servers.&lt;/p&gt;

&lt;p&gt;First, my deploy.rb, and then my notes about how I used it. I have changed
only one or two things from my real code.  My application is called
&amp;quot;clientportal&amp;quot; and the host running it is called
&amp;quot;clientportal.isp.example.net&amp;quot;.   On the server, it runs as a user called
&amp;quot;clientportal&amp;quot;.&lt;/p&gt;

&lt;p&gt;This code does not yet invoke the Django database migrations, which it ought
to, and I'll do another blog post once I figure out that part.&lt;/p&gt;

&lt;pre class=&quot;example&quot;&gt;
set :application, &amp;quot;clientportal&amp;quot;
set :me, &amp;quot;#{ENV['LOGNAME']}&amp;quot;
set :repository,  &amp;quot;git+ssh://#{me}@code.credil.org/git/path/to/repo/clientportal&amp;quot;

set :scm, :git
set :user, :clientportal

set :ssh_options, { :forward_agent =&amp;gt; true }
set :use_sudo, false
set :git_enable_submodules, true
set :deploy_to, &amp;quot;/home/#{user}/#{application}&amp;quot;

role :web, &amp;quot;clientportal.isp.example.net&amp;quot;     # Your HTTP server, Apache/etc
role :app, &amp;quot;clientportal.isp.example.net&amp;quot;

# This is where Rails migrations will run
role :db,  &amp;quot;clientdb.isp.example.net&amp;quot;, :primary =&amp;gt; true

namespace :deploy do
  task :start do ; end
  task :stop do ; end

  # this overrides a rails specific thing.
  task :finalize_update do ; end
  task :migrate         do ; end

  task :restart, :roles =&amp;gt; :app, :except =&amp;gt; { :no_release =&amp;gt; true } do
    # something to restart django.
    run &amp;quot;sudo /usr/sbin/apache2ctl graceful&amp;quot;

  end
  task :update_database_yml, :roles =&amp;gt; [:app,:web] do
    db_config = &amp;quot;/home/#{user}/settings.py&amp;quot;
    run &amp;quot;cp #{db_config}   #{release_path}/settings.py&amp;quot;
    run &amp;quot;ln -f -s #{release_path} /home/clientportal/clientportal/clientportal&amp;quot;
    puts &amp;quot;Ran update database settings&amp;quot;
  end

end

after &amp;quot;deploy:update_code&amp;quot;, &amp;quot;deploy:update_database_yml&amp;quot;

&lt;/pre&gt;

&lt;p&gt;Some details.
First, I put my settings.py file into my /home/clientportal directory.
I do not check this file into my repo, because it always specific to the
installation (it's different on your laptop than on the devel server or the
production server).  Also see my:&lt;/p&gt;

&lt;p&gt;Like
&lt;a href=&quot;http://blog.perplexedlabs.com/2010/02/08/deployment-using-capistrano-and-webistrano-via-rails-and-phusion-passenger/&quot;&gt;http://blog.perplexedlabs.com/2010/02/08/deployment-using-capistrano-and-webistrano-via-rails-and-phusion-passenger/&lt;/a&gt;
I had to adjust my django.wsgi file as well.  I wound up with:
&lt;pre class=&quot;example&quot;&gt;
import site
site.addsitedir('/usr/local/pythonenv/CLIENTPORTAL/lib/python2.5/site-packages')

import os, sys

sys.path.append('/home/clientportal/clientportal')
sys.path.append('/home/clientportal/clientportal/current')
os.environ['DJANGO_SETTINGS_MODULE'] = 'clientportal.settings'

import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()
&lt;/pre&gt;&lt;/p&gt;

&lt;p&gt;The important changes were to the path that was added. It used to add
$HOME/clientportal and $HOME to the path, but now it is one directory deeper,
and you will notice above in the update_database_yml task that it creates a
symlink in $HOME/clientportal with the name &amp;quot;clientportal&amp;quot; that is
essentially the same as &amp;quot;current&amp;quot;.&lt;/p&gt;

&lt;p&gt;This is necessary because the settings are loaded as &amp;quot;clientportal.settings&amp;quot;,
and python basically turns the . into a / when looking for the file. I could
have just changed the name of the settings file, but we had other modules
that were loaded using the clientportal. namespace.&lt;/p&gt;

&lt;p&gt;Note that the server already had it's apache configured to do what was
needed.  I would normally package these config files up into a .deb file, but
I haven't done that yet for this project, it being my first django project.&lt;/p&gt;

&lt;p&gt;I am not sure if I actually have to restart apache. I added that for good
luck, and and I added:
&lt;pre class=&quot;example&quot;&gt;
clientportal ALL=NOPASSWD: /usr/sbin/apache2ctl graceful
&lt;/pre&gt;
to sudoers.&lt;/p&gt;

&lt;p&gt;My apache config looks like:
&lt;pre class=&quot;example&quot;&gt;
&amp;lt;VirtualHost *:443&amp;gt;
        ServerAdmin webmaster@localhost
        ServerName clientportal.isp.example.net
        ServerAlias portal1.isp.example.net
        ServerAlias portal.example.net

        DocumentRoot /home/clientportal/clientportal/current
        &amp;lt;Directory &amp;quot;/home/clientportal/clientportal/current&amp;quot;&amp;gt;
                Options Indexes FollowSymLinks
                Options -MultiViews
                AllowOverride None
                Order allow,deny
                allow from all
        &amp;lt;/Directory&amp;gt;

        ErrorLog /var/log/apache2/error.log

        Alias /media/ /home/clientportal/clientportal/current/media/
        WSGIScriptAlias / /home/clientportal/clientportal/current/wsgi/django.wsgi
        &amp;lt;Directory /home/clientportal/clientportal/current/apache/&amp;gt;
                Order allow,deny
                Allow from all
        &amp;lt;/Directory&amp;gt;
...

&lt;/pre&gt;&lt;/p&gt;

&lt;p&gt;Some other links I found, but I didn't use much:
&lt;a href=&quot;http://groups.google.com/group/django-developers/browse_thread/thread/f34e59275e04f9c5?pli=1&quot;&gt;http://groups.google.com/group/django-developers/browse_thread/thread/f34e59275e04f9c5?pli=1&lt;/a&gt;
&lt;a href=&quot;http://gnuvince.wordpress.com/2008/01/10/deploying-django/&quot;&gt;http://gnuvince.wordpress.com/2008/01/10/deploying-django/&lt;/a&gt;&lt;/p&gt;</description>
 </item>
  <item>
 <title>To disable gnome-settings daemon from messing with your background</title>
 <pubDate>Tue, 08 Feb 2011 16:03:00 GMT</pubDate>
 <link>http://www.sandelman.ca/mcr/blog/2011/02/08#to_disable_gnome-settings_daemon_from_messing_with_your_background</link>
 <description>&lt;p&gt;If you are like me, and do not use much of gnome, when you start a gnome
application, it may start gnome-settings-daemon, which will mess with
your background.&lt;/p&gt;

&lt;pre class=&quot;example&quot;&gt;
gconftool-2 --set /apps/gnome_settings_daemon/plugins/background/active --type bool False
&lt;/pre&gt;

&lt;p&gt;Thank you to: &lt;a href=&quot;http://ubuntuforums.org/archive/index.php/t-874816.html&quot;&gt;http://ubuntuforums.org/archive/index.php/t-874816.html&lt;/a&gt;&lt;/p&gt;</description>
 </item>
  <item>
 <title>How can Research in Motion survive?</title>
 <pubDate>Mon, 03 Jan 2011 22:36:00 GMT</pubDate>
 <link>http://www.sandelman.ca/mcr/blog/2011/01/03#how_can_research_in_motion_survive_</link>
 <description>&lt;p&gt;There are lots and lots of opinions in the media about whether or not RIM and
it's flagship product, the Blackberry can survive.  For instance, a quick
google gives me:
&lt;a href=&quot;http://gigaom.com/apple/poking-holes-in-rims-anti-apple-rhetoric/&quot;&gt;http://gigaom.com/apple/poking-holes-in-rims-anti-apple-rhetoric/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://www.cbc.ca/technology/story/2010/07/14/rim-blackberry-6-annual-meeting.html&quot;&gt;http://www.cbc.ca/technology/story/2010/07/14/rim-blackberry-6-annual-meeting.html&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://www.thestar.com/business/companies/rim/article/834957--rim-could-face-tough-questions-today&quot;&gt;http://www.thestar.com/business/companies/rim/article/834957--rim-could-face-tough-questions-today&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A friend and I discussed this over lunch the other day.
We care only because as far as the Government of Canada's IT policy is
concerned, they see RIM as a golden goose who can do nothing wrong.  RIM is
an endorsement for the government of canada's &amp;quot;IT policy&amp;quot; --- it's a sign of
success: those of in the industry see it as more of a four-leaf
clover.  Something that was happened in Canada by chance, not by design.&lt;/p&gt;

&lt;p&gt;Assuming that we wanted RIM to survive, what would we do as CEO?&lt;/p&gt;

&lt;p&gt;We have a lot of challenges, and we think that many of them are internal, not
external.  The major one is the huge amounts of Not-Invented-Here (NIH).
The second major issue is the degree to which RIM is the centre of the
Blackberry world, with data from most models of phones going through
expensive data centres for reprocessing.
When the Blackberry first appeared, it did not have Internet connectivity,
but rather worked through various proxy servers and HTML-reformatters.
We were surprised that more people didn't ask questions when CIBC sued some
former employes, and subpeoned emails from their BlackBerry.. Why was the
subpeaona served to RIM?
&lt;a href=&quot;http://www.robhyndman.com/2005/01/06/cibc-sues-six-former-employees/&quot;&gt;http://www.robhyndman.com/2005/01/06/cibc-sues-six-former-employees/&lt;/a&gt;
&lt;a href=&quot;http://www.heydary.com/publications/blackberry-pin-monitoring.html&quot;&gt;http://www.heydary.com/publications/blackberry-pin-monitoring.html&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Today, it does better, but few developers really want to write apps for the
Blackberry JavaMobileEdition.  Android is seriously taking a lot of market.&lt;/p&gt;

&lt;p&gt;What advantages does RIM have?  Sure some patents about some user interface
things (mostly physical stuff).&lt;/p&gt;

&lt;p&gt;What it does have is a brand name, and Blackberry devices are considered
serious status symbols.  For instance,a salesperson I was meeting with
explained to me that, &amp;quot;of course&amp;quot;, his company offered to get him the latest
BlackBerry, but he found the keyboard too small for his aging eyesight, and
preferred to keep his 2 year old unit.&lt;/p&gt;

&lt;p&gt;Along with this brand name is a pretty good email system with pretty good
integration into Microsoft Exchange.  This is something that Google and Apple
does not have as well done. (Yes, Google has most of it, but they don't have
the same level of trust from the right places, and many Microsoft IT fanboys
hate Google, just on principle)&lt;/p&gt;

&lt;p&gt;The problem that I see is that Blackberry has started to go after the
consumer market, and with this, they are diluting the &lt;em&gt;BlackBerry&lt;/em&gt; brand
name.  Used to be only &lt;em&gt;big&lt;/em&gt; companies could get email integration, and only
the important people had BlackBerrys. Now every second person on the bus has
one... and they aren't even the cool people.  The cool people have their
&lt;em&gt;own&lt;/em&gt; iPhone or Android.  If a cool person has a BlackBerry, it is because
their company &lt;em&gt;made&lt;/em&gt; them take one because it &lt;span style=&quot;text-decoration: underline;&quot;&gt;integrated&lt;/span&gt;, but said person
has their own phone for their real use.&lt;/p&gt;

&lt;p&gt;So, my advice to RIM is as follows:&lt;/p&gt;

&lt;p&gt;1) break up the company. Spin off BlackBerry hardware as private company.
Have them make handsets under the BlackBerry name.  Sell them for premium
dollars.  For about 18 months (one hardware design cycle), they can make
BlackBerry OS units, but by mid-2012 they have to shipping Android as the
base OS.&lt;/p&gt;

&lt;p&gt;2) port all of BlackBerry's custom software to Android in &lt;em&gt;native&lt;/em&gt; mode.
(i.e. not Java).  I do not think much of the core software on the Blackberry
is written in Java Mobile (I could be wrong, it could all be JavaME now, but
it wasn't a few years ago).   Porting to &lt;em&gt;native&lt;/em&gt; is probably easier, and may
even make it easier for them offer some unique features.&lt;/p&gt;

&lt;p&gt;Native mode code often requires a rooted phone to work well. In this case, it
is a feature, not a bug:  the target audience is not end users in some sense,
but rather, carriers.  If you can get BlackBerry Email on just ANY
smartphone, then the carrier does not get a chance to charge more for this.&lt;/p&gt;

&lt;p&gt;Many carriers have a BlackBerry plan which is different than just Internet,
because they know that BlackBerry's can't run torrent clients.&lt;/p&gt;

&lt;p&gt;3) create the RIM cloud, and go into competition with GMAIL, Rackspace's
Mailtrust, etc.  Offer strong integration into corporate email, and offer
various DRM-ish controls on what can be done with email that is accessed via
the native apps.  (it's all pretend security of course, but many people seem
to insist on drinking coolaid...)&lt;/p&gt;

&lt;p&gt;What is the result?
&lt;ol&gt;
&lt;li&gt;RIM is no longer competing on price at the low end.  Rather they are
using the existing low-end smartphone makes to drive corporate/carrier
business to them.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;RIM's hardware spin-off is still making high-end, high-margin handsets
for executives.  This helps to return much of their status symbol.  The
new handsets should be easily distinguished from the old low-cost ones
they used to make. (New colour?  Breath-mint dispenser?  ...)

&lt;p&gt;Since they are offering the same integrated apps on other vendor's
phones, it means that the peons who need to be &amp;quot;integrated&amp;quot; no longer
need &lt;em&gt;BlackBerry&lt;/em&gt; handsets, and so nobody will confuse them with
important people.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;RIM's communication cloud can expand into areas they have no yet
been into.  This is where the money is in the future.
How about if executives can now approve expense
reports/authorize-purposes from their units via digital signatures?&lt;/li&gt;
&lt;/ol&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Will RIM do this? Unlikely.
RIM will be Canada's Polaroid.&lt;/p&gt;</description>
 </item>
  <item>
 <title>WIND Holiday Miracle</title>
 <pubDate>Tue, 14 Dec 2010 19:49:00 GMT</pubDate>
 <link>http://www.sandelman.ca/mcr/blog/2010/12/14#wind_holiday_miracle</link>
 <description>&amp;lt;pre&amp;gt;

&lt;pre&gt;
Michael Richardson: what can you tell me about the Holiday Miracle Plan?
WIND Mobile: Connection established.
WIND Mobile: Initiating Call, please hang in there!.
WIND Mobile: Connecting...
WIND Mobile: Hey, Welcome to Live Help! A WIND Specialist will be with you soon.
Michael Richardson: I hear that there is a $40 plan, which is unlimited calls and unlimited data.
Tiffany: Hi there. Thanks for joining the conversation with WIND!
Tiffany: I see you would like some information on the Holiday Mircale plan
Michael Richardson: yes.
Michael Richardson: I couldn't find anything about it on the web site.
Michael Richardson: I have the 100minutes plus unlimited data.
Tiffany: It's not listed on our website at the present time
Tiffany: It includes: *        Unlimited Canada-wide calling
&lt;h2&gt;Unlimited US Long Distance&lt;/h2&gt;&lt;/p&gt;


&lt;h2&gt;Unlimited Canada/US Text messaging&lt;/h2&gt;


&lt;h2&gt;Unlimited Canada/US MMS (picture messaging)&lt;/h2&gt;


&lt;h2&gt;Unlimited Global Text Messaging&lt;/h2&gt;


&lt;h2&gt;Caller ID&lt;/h2&gt;


&lt;h2&gt;Unlimited WIND to WIND calling&lt;/h2&gt;


&lt;h2&gt;Call Waiting, Call Forwarding, 3-Way calling&lt;/h2&gt;


&lt;h2&gt;Voicemail&lt;/h2&gt;


&lt;h2&gt;Infinite BlackBerry or Infinite Mobile (depending on the device)&lt;/h2&gt;

&lt;p class=&quot;first&quot;&gt;Michael Richardson: I really need more minutes, but actually can live with less data.
Tiffany: for $40
Michael Richardson: sounds perfect. How do I switch to it?
Michael Richardson: is the the $40 a special rate, or a regular rate?
Michael Richardson: will I find myself paying more in 6 months?
Tiffany: It's a special rate
Michael Richardson: what is the regular rate?&lt;/p&gt;

&lt;p&gt;Tiffany: It's more than a $95 value
Michael Richardson: I understand it's a good deal.
Michael Richardson: How long does the deal last?
Tiffany: The last day is Dec 26
Michael Richardson: what will I pay when the promotion runs out?
Tiffany: It will go back to regular price
Michael Richardson: what is the regular price? $95?
Tiffany: more than $95
Michael Richardson: Please listen carefully.
Michael Richardson: Is Wind going to give me this deal for $40/month forever?
Michael Richardson: Or, like your %50 off on the 100 minute plan, only for 6 months?
Michael Richardson: At the end of six months, what will I pay for the same thing?
Tiffany: It's forever but you would have to make sure your account is active
Tiffany: on a monthly basis
Michael Richardson: I see. Thank you!
Michael Richardson: How do I sign up for it?&lt;/p&gt;

&lt;/pre&gt;

</description>
 </item>
  </channel>
</rss>
