<?xml version="1.0" encoding="utf-8"?>

<!DOCTYPE rdf:RDF [
<!ENTITY % HTMLlat1 PUBLIC
 "-//W3C//ENTITIES Latin 1 for XHTML//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml-lat1.ent">
]>

<rdf:RDF 
  xmlns="http://purl.org/rss/1.0/"
  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" 
  xmlns:dc="http://purl.org/dc/elements/1.1/"
  xmlns:admin="http://webns.net/mvcb/"
  xmlns:content="http://purl.org/rss/1.0/modules/content/"
  xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/"
  xmlns:sub="http://purl.org/rss/1.0/modules/subscription/"
> 

  <channel rdf:about="http://aperiodic.net/phil/">
    <title>Phil! Gold</title>
    <link>http://aperiodic.net/phil/</link>
    <description>Mostly books that phil!'s read recently; other stuff that's interesting to him
and probably few others.</description>
    <language>en</language>
    <dc:creator>Phil Gold (phil_g@pobox.com)</dc:creator>
    <dc:rights>Copyright Phil Gold</dc:rights>
    <admin:generatorAgent rdf:resource="http://www.raelity.org/apps/blosxom/?v=2.0" />
    <admin:errorReportsTo rdf:resource="mailto:phil_g@pobox.com"/>

    <items>
      <rdf:Seq>
        <rdf:li rdf:resource="http://aperiodic.net/phil/archives/General/car-engine-advice-sought.html" />
        <rdf:li rdf:resource="http://aperiodic.net/phil/archives/General/kiva.html" />
        <rdf:li rdf:resource="http://aperiodic.net/phil/archives/General/betsy-mccaughey-rebuttal.html" />
        <rdf:li rdf:resource="http://aperiodic.net/phil/archives/Geekery/backup-implementation.html" />
        <rdf:li rdf:resource="http://aperiodic.net/phil/archives/Geekery/backup-ideas.html" />
        <rdf:li rdf:resource="http://aperiodic.net/phil/archives/Recipes/truffle-topped-amaretto-brownies.html" />
        <rdf:li rdf:resource="http://aperiodic.net/phil/archives/Geekery/more-delphi-type-hate.html" />

      </rdf:Seq>
    </items>



  </channel>

  <item rdf:about="http://aperiodic.net/phil/archives/General/car-engine-advice-sought.html">
    <title>Car Engine Advice Sought</title>
    <link>http://aperiodic.net/phil/archives/General/car-engine-advice-sought.html</link>
    <description>I've been having intermittent problems with my car that have now stumped
two mechanics, so I'm turning to the Internet for advice...</description>
    <dc:subject>/General</dc:subject>
    <dc:creator>Phil Gold</dc:creator>
    <dc:date>2010-01-25T14:09-04:00</dc:date>
    
    <content:encoded><![CDATA[<p>I've been having intermittent problems with my car that have now stumped
two mechanics, so I'm turning to the Internet for advice.  I have a 1996
Jeep Grand Cherokee, with Selec-Track four-wheel-drive and a 6 cylinder
engine.</p>

<p>The problem I'm having is that the engine will sometimes just stall (the
motive power goes away and the engine RPMs drop to zero).  It only seems
to happen right after starting the car (so the engine hasn't warmed up
yet), and it's much more common in wet weather (rain, snow, heavy fog).
Often times, I can feel the engine losing power and can prevent a stall by
stepping on the gas pedal.  If the engine actually stalls, I have to wait
at least a minute to restart it; if I try restarting it immediately, I
hear the chug-chug-chug of the starter, but the engine won't start
running.</p>

<p>I've had a few times when the stalling seemed to hit as I was braking,
just as the automatic transmission was downshifting from second to first
gear.  I've had the car sall at times apparently unrelated to shifting,
though.</p>

<p>This morning, it was particularly bad.  I barely got out of the parking
lot at home (after several stop/wait/restart cycles) before the engine
stopped being useful--it would only run for 30-45 seconds before stalling,
and I couldn't prevent the stall.  I had the car towed to a mechanic, but
by the time they took a look at it, the engine started and ran normally.
They couldn't find anything wrong with the engine, and there were no codes
from the onboard diagnostics.</p>

<p>The coolant system has a slow leak (my regular mechanic tracked it to the
water pump, I think), but I've had that for over a year now and I doubt
it's related.  In the time since the problem first manifested, I've had a
system tune-up (including replacing the spark plug wiring, apparently a
common contributor to problems such as these), had the oil changed, had
the transmission fluid changed, and had a (presumably unrelated)
badly-leaking coolant hose replaced.</p>

<p>Any suggestions on what to look for to fix this will be gladly accepted.
I'll be cross-posting this to several social media sites; responses there
are fine, or just send an email to <a href="mailto:phil_g@pobox.com">phil_g@pobox.com</a></p>

<p><strong>Update 2010-01-02</strong>: I've gotten a number of suggestions for problem
areas that could be causing this problem.  The most-suggested item was the
fuel filter, which I haven't replaced since I got the car five years ago,
so I'm taking care of that to start with.  I'll see how well the car
behaves with a new filter.  Other suggestions have included the idle
valve, O2 sensor, or fuel pump.  If replacing the fuel filter doesn't
work, I'll check out some of the other possibilities.</p>
]]></content:encoded>
  </item>

  <item rdf:about="http://aperiodic.net/phil/archives/General/kiva.html">
    <title>Kiva</title>
    <link>http://aperiodic.net/phil/archives/General/kiva.html</link>
    <description>I've been contributing to Kiva for a number of months now, and am
sufficiently appreciative of them to want to tell others about them...</description>
    <dc:subject>/General</dc:subject>
    <dc:creator>Phil Gold</dc:creator>
    <dc:date>2009-12-02T18:00-04:00</dc:date>
    
    <content:encoded><![CDATA[<p>I've been contributing to <a href="http://www.kiva.org/">Kiva</a> for a number of months now, and am
sufficiently appreciative of them to want to tell others about them.  The
short version is that Kiva is a distributed, peer-to-peer microlending
non-profit with the goal of alleviating global poverty.</p>

<h4>Microlending</h4>

<p>Microfinance is the practice of providing financial services to people in
low-income parts of the world who are not generally considered
profitable-enough customers to warrant service from traditional banking
institutions.</p>

<p>Microlending (or microcredit) is a subset of microfinance that provides
loans to low-income people, typically entrepreneurs in low-income area of
the world, who do not have access to loans from traditional banking
sources.  Sometimes there simply are no banks in the area, but more
typically the entrepreneurs don't make enough money to qualify for loans,
don't have sufficient collateral, or don't have a sufficient credit
history.  Modern microlending started in the 1970s with the
Bangladesh-based Grameen Bank.</p>

<p>The advantages of microlending over traditional aid programs are in its
benefits to developing economies: it encourages growth of local
businesses, puts more money into local economies, encourages local
employment opportunities, and gives entrepreneurs a foothold to establish
their businesses and a credit record.  In some areas, it provides an
alternative to tribal moneylenders, who charge high interest rates and
respond to repayment failures with physical violence.  In short,
traditional aid addresses people's basic needs: food, shelter, clothing,
education, sustainable agriculture; while microlending works on the next
step of growing local economies.</p>

<h4>Kiva's contribution</h4>

<p>Kiva was created as the first distributed, peer-to-peer microlending
organization in the world.  It's peer-to-peer because all Kiva does is
list loan applicants on their website; it's up to the users of the website
to supply the money to fund the loans.  As the loans are repaid, those
repayments go to the people who supplied the money.  Kiva is distributed
because the funding for any given loan is made up of contributions from
many different Kiva users.  (And as the loan is repaid, each contributor
is repaid according to his or her portion of the overall loan.)</p>

<p>The actual process is a little more involved.  Kiva doesn't make loans
directly.  Instead, they partner with microfinance institutions (MFIs) in
other countries.  The MFIs accept loan applications, evaluate the
applicants, disburse loans, and collect payments.  During this process,
the MFIs tell Kiva about the loans in batches, Kiva lists the loans,
collects the contributions from Kiva users, and sends the money to the
MFIs.  When the MFIs collect money, they send the payments (again, in
batches) to Kiva, which distributes the payments to the loan contributors.
The MFIs often fund the loans before telling Kiva about them (to avoid the
delays in the funding process and get the money to the applicant quickly),
and then backfill the accounting once the loan is actually funded.  In
some cases, a loan will expire on Kiva without being fully funded; when
that happens, any contributors will have their contributions refunded, and
if the MFI already disbursed the loan, they will have to find another
source of funding for it.</p>

<h4>Loan repayment</h4>

<p>When payments are received on a loan, the money is made available to
contributors as "Kiva Credits".  If you have Kiva credits, you can apply
them to a different loan, donate them to Kiva itself, or transfer them
into a PayPal account.</p>

<h4>Defaults</h4>

<p>Because most loans are made in developing areas of the world, if someone
defaults on their loan, there is often no workable legal recourse for
requiring repayment and the people who contributed to the loan are not
repaid.  The MFIs do research on the applicants before granting loans, and
do a generally good job of selecting people who will repay their loans.
Kiva has an overall default rate of about 2%.  (For comparison, in 2004,
the federal Small Business Administration, which makes loans to small
businesses in the US, <a href="http://money.cnn.com/2009/02/25/smallbusiness/smallbiz_loan_defaults_soar.smb/">had a 2.4% default rate</a>, which has
hit 11.9% with the recession.)</p>

<p>This does mean that any loan made through Kiva carries the risk of losing
the money contributed.</p>

<h4>Interest</h4>

<p>Kiva does not collect any interest on its loans.  Consequently, Kiva users
will only get back exactly what they put into the loan in the first place,
unless the loan defaults.  This means that anyone contributing to Kiva
loans over a long term can expect to lose some money to defaults.  Because
Kiva is operated as a non-profit organization with the goal of alleviating
poverty, they don't feel it is appropriate to add interest payments to the
loans they fund.</p>

<p>The MFIs that Kiva partners with do charge interest, however.  The
interest that they charge pays for their staff and administration costs.
Typically, they charge a small percentage of the loan in interest, plus a
flat fee to cover the effort necessary for any loan, regardless of its
size.  This includes things like interviewing applicants and researching
their financial history and dependability.  Because the loan amounts are
small, that fee often adds a noticeable percentage to the loan, leading to
interest rates that seem surprisingly high.  The average interest rate on
Kiva is about 35%, but I've seen rates as high as 50%.</p>

<p>The MFI interest rates are another reason that Kiva doesn't charge
interest themselves; they don't want to add any more to the borrower's
repayment load.</p>

<p>For each of its partners, Kiva shows both the average interest rate for
that MFI and the median interest rate for other MFIs in the same region.
People worried about the high rates are encouraged to check up on the MFI
before committing to a loan.</p>

<h4>Kiva's Funding</h4>

<p>Since Kiva doesn't collect interest and they apply all of a contributor's
money to the loans themselves, they rely on donations to keep running.
After you contribute to a loan, they ask for a donation and suggest an
amount equal to 15% of your loan contribution.  You have the option of
choosing a different percentage (including 0%) or specifying a particular
dollar amount.  You can also give the repayments on your loans to Kiva as
a donation, either manually (by donating your Kiva credits) or
automatically (by specifying that all repayments should be automatically
donated).</p>

<p>Kiva is a 501(c)3 nonprofit, so all donations are tax-deductible, although
loans are not.  (As mentioned above, loans are not even guaranteed to
maintain value.)</p>

<h4>Criticism</h4>

<p>I feel it would be unfair to talk about Kiva without acknowledging that
some people have criticisms of the microlending process.</p>

<p>The most common criticism about microlending in general is the high
interest rates.  Kiva does as well as it can in this area, recognizing
that MFIs need to charge enough to fund their activities, but also being
as transparent as possible about what is being charged.  Kiva also
periodically reviews their partners' claims and practices.  (They have
<a href="http://www.kiva.org/about/aboutPartner?id=53">closed relations with at least one partner</a> because of fraud--not
interest related, in this case; the partner was claiming much higher
amounts on its loans than it was actually disbursing.)</p>

<p>Conversely, some people argue that Kiva should themselves be charging
interest.  I can't find the article now, but I read a piece a while back
that argued that when microfinance funding organizations like Kiva pay
interest, contributors change from a "charity" mindset to an "investment"
mindset and end up putting more money into system.  Personally, I think
that the charity mindset is a better fit here.  If the goal is to
alleviate poverty, then helping people establish businesses with as few
impediments (including additional interest) as possible is a better
approach than one that is beholden to the best return on investments.</p>

<p>There are also claims that microlending doesn't help all that much.  There
was an article in the Boston Globe a few months ago titled "<a href="http://www.boston.com/bostonglobe/ideas/articles/2009/09/20/small_change_does_microlending_actually_fight_poverty?mode=PF">Small
change</a>: Billions of dollars and a Nobel Prize
later, it looks like ‘microlending’ doesn’t actually do much to fight
poverty".  Despite the inflammatory subtitle, the article is reasonably
balanced.  It refers to two unpublished papers about studies that
concluded that microlending is not as effective as many people think.  For
one thing, I'd want to wait until the papers are published; peer review is
likely to shake out any methodological problems in the studies.  But the
article points out that the studies found that microlending did make a
difference for a lot of businesses and helped them either establish
themselves or grow.  It's not a panacea--if for no other reason than that
the eligibility requirements for "who can take out a loan and be counted
on to repay it if there's little government enforcement to rely on" mean
that only a small part of the population will be considered in the first
place--but it is a step in the direction of helping establish functioning
local economies in poor regions.  The article provides a number of
pro-microfinance perspectives, most of which boil down to, "The studies
show that microlending isn't magic, but it's a useful tool--as long as you
understand that it isn't magic."</p>

<p>Kiva in particular was the target of some criticism recently when they
began offering loans to entrepreneurs in the US.  Many people felt that
people in the US are either well-served by the standard banking system or
have access to many government programs and would not get much additional
benefit from a microloan.  I tend to regard this as a place where it's
best to give people the ability to make their own decisions.  Kiva felt
that there was benefit to offering loans in the US, and those who agree
with them can now participate in those loans.  Those who disagree have no
obligation to fund US loans, and there are plenty of available loans in
poorer countries.  (There was a time when Kiva funded every loan it
offered and sometimes ran out of new loans to fund.  These days, there's
more demand, and loans do periodically expire unfunded.)</p>

<h4>Conclusion</h4>

<p>I think that Kiva provides an important service to developing areas of the
world, and I put a portion of my charitable giving into the site each
month.  Personally, I don't plan to take money out of it; what I put in
goes either towards funding more loans or donations to keep Kiva running.
Other people have different financial approaches, of course.</p>

<p>Kiva also isn't the only place I donate.  In addition to local giving, I
also contribute to more traditional aid organizations, because
microlending is only effective if people are already healthy, educated,
and empowered.  For giving along more traditional lines, I recommend
<a href="http://www.heifer.org/">Heifer International</a>, which mostly focuses on
sustainable agriculture in developing regions.</p>

<h4>Competition</h4>

<p>Kiva was the first peer-to-peer microlending website, but many others have
followed in its footsteps, and some of its competitors take different
approaches to microlending.  If you don't like Kiva, there might be
another organization that's a better fit for you.</p>

<ul>
<li><a href="http://www.microfinancegateway.org/p/site/m/">The Microfinance Gateway</a> is a large database of
microfinance organizations, including aggregators like Kiva.  It
contains links to many more organizations than I'm going to link to
here.</li>
<li><a href="http://www.unitedprosperity.org/">United Prosperity</a> doesn't directly give
contributed money to borrowers; it uses that money as collateral for
traditional bank loans.  They feel that this approach is better at
integrating people into the traditional banking system.</li>
<li><a href="http://www.rotarianmicrocredit.org/">The Rotarian Action Group for Microcredit</a> works to assist
Rotary groups with setting up their own microlending operations.</li>
<li><a href="https://www.microplace.com/">MicroPlace</a> collects interest on its microloans, so
contributors earn a return on their contributions.</li>
<li><a href="http://www.prosper.com/">Prosper</a> is a more general peer-to-peer lending broker.
Contributors can use it either as a general investment fund or a broker
for choosing individual loans to fund.  Anyone with a decent credit
score can request a loan, which is bid on by lenders.</li>
</ul>

<h4>My Kiva History</h4>

<p>If you want, you can look at <a href="http://www.kiva.org/lender/asciiphil">my lender page</a> on Kiva.  So
far, I've contributed to 11 loans:</p>

<ul>
<li><a href="http://www.kiva.org/app.php?page=businesses&amp;action=about&amp;id=98243">Ibrahim</a> (last name withheld for privacy) in Lebanon:
Owns a sewing factory.  Currently 58% repaid on a $3,000 loan.</li>
<li><a href="http://www.kiva.org/app.php?page=businesses&amp;action=about&amp;id=107421">Neang Soknoeun</a> in Cambodia: Weaves and sells groceries.
Currently 33% repaid on a $700 loan.</li>
<li><a href="http://www.kiva.org/app.php?page=businesses&amp;action=about&amp;id=113500">Khosiyat Kuldasheva</a> in Tajikistan: Sells foodstuffs at
a local market.  Currently 37% repaid on a $3,000 loan.</li>
<li><a href="http://www.kiva.org/app.php?page=businesses&amp;action=about&amp;id=126161">Harriet Namugabo's group</a> in Uganda: A 5-person group
who are collectively responsible for the loan.  The leader sells
medicines.  Currently 66% repaid on a $875 loan.</li>
<li><a href="http://www.kiva.org/app.php?page=businesses&amp;action=about&amp;id=126209">Lilane</a> (last name withheld for privacy) in Lebanon: Owns
a clothing store.  Currently 24% repaid on a $1,000 loan.</li>
<li><a href="http://www.kiva.org/app.php?page=businesses&amp;action=about&amp;id=129366">Emélido Oporta Alvarado</a> in Costa Rica: Raises cattle.
Currently 0% repaid on a $1,175 loan.  (His payment schedule is one
payment every six months.  The first one is due next April.)</li>
<li><a href="http://www.kiva.org/app.php?page=businesses&amp;action=about&amp;id=130977">Efrain</a> (last name withheld for privacy) in Peru: Grows
and sells potatoes and raises cattle.  Currently 0% repaid on a $1,200
loan.  (He doesn't have a monthly payment schedule; the entirety of the
loan is due next March.)</li>
<li><a href="http://www.kiva.org/app.php?page=businesses&amp;action=about&amp;id=138172">Felix Alberto Tórrez Machado</a> in Nicaragua: Runs a
cybercafe.  Currently 13% repaid on a $975 loan.</li>
<li><a href="http://www.kiva.org/app.php?page=businesses&amp;action=about&amp;id=146656">Anonymous in Iraq</a>: Runs an auto repair shop.  Currently 0%
repaid on a $3,000 loan.  (First payment is due in January.  Kiva also
notes that government regulations on foreign loans are murky and they
might not be able to receive the money from the borrower's payments.  I
figured it was good to support a business in Iraq, though, so I
accepted the risk.)</li>
<li><a href="http://www.kiva.org/app.php?page=businesses&amp;action=about&amp;id=144279">Nuevo Amanecer Group</a> in Bolivia: a 13-person group who
would be collectively responsible for the loan, with various jobs.
Loan expired before being fully funded and my contribution was
refunded.</li>
<li><a href="http://www.kiva.org/app.php?page=businesses&amp;action=about&amp;id=149698">Gaibullodjon Sobitov</a> in Tajikistan: Processes and
sells dried apricots.  Currently 70% raised on a $1,500 loan, with 2
days before the loan expires.</li>
</ul>
]]></content:encoded>
  </item>

  <item rdf:about="http://aperiodic.net/phil/archives/General/betsy-mccaughey-rebuttal.html">
    <title>Betsy McCaughey on the Obama Stimulus Plan: A Rebuttal</title>
    <link>http://aperiodic.net/phil/archives/General/betsy-mccaughey-rebuttal.html</link>
    <description>Betsy McCaughy has written an opinion piece for bloomberg...</description>
    <dc:subject>/General</dc:subject>
    <dc:creator>Phil Gold</dc:creator>
    <dc:date>2009-02-12T12:47-04:00</dc:date>
    
    <content:encoded><![CDATA[<p>Betsy McCaughy has written an opinion piece for bloomberg.com titled <a href="http://www.bloomberg.com/apps/news?pid=20601039&amp;sid=aLzfDxfbwhzs">Ruin
Your Health With the Obama Stimulus Plan</a>.  In it, she
characterizes the stimulus package (as passed by the House) as containing
sinister language that will allow the government to control and reduce the
quality of health care available to the American public.  I took a look at
the sections of the bill that she has issues with, and I found that her
conclusions are gross distortions at best.  More or less everything she
points to in the bill is focused on providing a healthcare information
technology infrastructure to allow doctors and hospitals easy access to
patients' complete medical information--nothing more.</p>

<p>(Since I wrote my analysis, the people at <a href="http://www.factcheck.org/">FactCheck.org</a> have
done <a href="http://www.factcheck.org/politics/doctors_orders.html" title="FactCheck.org: Doctor's Orders?">their own analysis</a>, which is more in depth than
mine.  The conclusions are similar--McCaughey is misunderstanding a lot of
the bill--although they allow that some parts of the bill don't
necessarily forbid her worst-case scenario.  (They also note that much of
what she worries about has been in place already, under a program created
by George W Bush: the bill just turns an executive order into established
law.))</p>

<p>She also makes a lot of comparisons to Tom Daschle's book
<a href="http://isbn.nu/0312383010" class="booktitle">Critical: What We Can Do About the Health-Care
Crisis</a>, drawing sinister inferences from the comparisons.  I
haven't read the book, so I can't judge how right or wrong she is about
its contents, but the contents of the actual bill are not what she says
they are.</p>

<p>To begin with, she claims that the government will be overseeing what your
doctor does and dictating treatments:</p>

<blockquote>
  <p>One new bureaucracy, the National Coordinator of Health Information
  Technology, will monitor treatments to make sure your doctor is doing
  what the federal government deems appropriate and cost effective. The
  goal is to reduce costs and “guide” your doctor’s decisions (442, 446).</p>
</blockquote>

<p>The actual text of the bill is as follows:</p>

<pre><code>                           page 441
19      “(b) PURPOSE.--The National Coordinator shall per-
20 form the duties under subsection (c) in a manner con-
21 sistent with the development of a nationwide health infor-
22 mation technology infrastructure that allows for the elec-
23 tronic use and exchange of information and that--

                           page 442
 1            “(1) ensures that each patient's health informa-
 2      tion is secure and protected, in accordance with ap-
 3      plicable law;
 4            “(2) improves health care quality, reduces med-
 5      ical errors, reduces health disparities, and advances
 6      the delivery of patient-centered medical care;
 7            “(3) reduces health care costs resulting from
 8      inefficiency, medical errors, inappropriate care, du-
 9      plicative care, and incomplete information;
10            “(4) provides appropriate information to help
11      guide medical decisions at the time and place of
12      care;
13            “(5) ensures the inclusion of meaningful public
14      input in such development of such infrastructure;
15            “(6) improves the coordination of care and in-
16      formation among hospitals, laboratories, physician
17      offices, and other entities through an effective infra-
18      structure for the secure and authorized exchange of
19      health care information;
20            “(7) improves public health activities and facili-
21      tates the early identification and rapid response to
22      public health threats and emergencies, including bio-
23      terror events and infectious disease outbreaks;
24            “(8) facilitates health and clinical research and
25      health care quality;

                           page 443
 1            “(9) promotes prevention of chronic diseases;
 2            “(10) promotes a more effective marketplace,
 3      greater competition, greater systems analysis, in-
 4      creased consumer choice, and improved outcomes in
 5      health care services; and
 6            “(11) improves efforts to reduce health dispari-
 7      ties.
</code></pre>

<p>The whole thing is talking about making patients' medical information
available by electronic means to hospitals, doctors, and insurance
companies while maintaing the patients' privacy.  Clause (4), in
particular, refers to doctors being able to have all of the information
they need when making decisions.  It does not imply anything about the
government dictating doctors' decisions to them.</p>

<p>She goes on to talk about hospitals and doctors not being "meaningful
users" of the system, and she seems to imply that this will result in
doctors abandoning treatments that aren't government-sanctioned:</p>

<blockquote>
  <p>Hospitals and doctors that are not “meaningful users” of the new system
  will face penalties.  “Meaningful user” isn’t defined in the
  bill. ... What penalties will deter your doctor from going beyond the
  electronically delivered protocols when your condition is atypical or
  you need an experimental treatment?</p>
</blockquote>

<p>Here's what the bill has to say about "meaningful users":</p>

<pre><code>                           page 511
14     “(o) INCENTIVES    FOR  ADOPTION   AND  MEANINGFUL
15 USE OF CERTIFIED EHR TECHNOLOGY.--
16           “(1) INCENTIVE  PAYMENTS.--
17                 “(A) IN GENERAL.--Subject    to the suc-
18           ceeding subparagraphs of this paragraph, with
19           respect to covered professional services fur-
20           nished by an eligible professional during a pay-
21           ment year (as defined in subparagraph (E)), if
22           the eligible professional is a meaningful EHR
23           user (as determined under paragraph (2)) for
24           the reporting period with respect to such year,
25           in addition to the amount otherwise paid under

                           page 512
 1           this part, there also shall be paid to the eligible
 2           professional (or to an employer or facility in the
 3           cases described in clause (A) of section
 4           1842(b)(6)), from the Federal Supplementary
 5           Medical Insurance Trust Fund established
 6           under section 1841 an amount equal to 75 per-
 7           cent of the Secretary's estimate (based on
 8           claims submitted not later than 2 months after
 9           the end of the payment year) of the allowed
10           charges under this part for all such covered
11           professional services furnished by the eligible
12           professional during such year.

                           page 540
 6     “(3) MEANINGFUL      EHR USER.--
 7           “(A) IN    GENERAL.--For purposes of para-
 8     graph (1), an eligible hospital shall be treated
 9     as a meaningful EHR user for a reporting pe-
10     riod for a payment year (or, for purposes of
11     subsection (b)(3)(B)(ix), for a reporting period
12     under such subsection for a fiscal year) if each
13     of the following requirements are met:
14                 “(i) MEANINGFUL  USE OF CERTIFIED
15           EHR TECHNOLOGY.--The       eligible hospital
16           demonstrates to the satisfaction of the Sec-
17           retary, in accordance with subparagraph
18           (C)(i), that during such period the hospital
19           is using certified EHR technology in a
20           meaningful manner.
21                 “(ii) INFORMATION  EXCHANGE.--The
22           eligible hospital demonstrates to the satis-
23           faction of the Secretary, in accordance
24           with subparagraph (C)(i), that during such
25           period such certified EHR technology is

                           page 541
 1           connected in a manner that provides, in
 2           accordance with law and standards appli-
 3           cable to the exchange of information, for
 4           the electronic exchange of health informa-
 5           tion to improve the quality of health care,
 6           such as promoting care coordination.
 7                 “(iii) REPORTING     ON   MEASURES
 8           USING      EHR.--Subject  to subparagraph
 9           (B)(ii) and using such certified EHR tech-
10           nology, the eligible hospital submits infor-
11           mation for such period, in a form and
12           manner specified by the Secretary, on such
13           clinical quality measures and such other
14           measures as selected by the Secretary
15           under subparagraph (B)(i).
</code></pre>

<p>"Meaningful EHR users" will be given financial incentives to use the
electronic system.  If a doctor or hospital is not a "meaningful EHR
user", that means only that they're not making use of the electronic
medical information infrastructure.  It has nothing to do with what
treatments they offer.  Furthermore, non-"meaningful users" don't face
penalties; they just don't have the government helping them pay for the
upfront cost of implementing the electronic system.</p>

<p>Next, she claims that the bill creates a department to prevent people from
using new medical treatments because they're more expensive:</p>

<blockquote>
  <p>In his book, Daschle proposed an appointed body with vast powers to make
  the “tough” decisions elected politicians won’t make.  The stimulus bill
  does that, and calls it the Federal Coordinating Council for Comparative
  Effectiveness Research (190-192).  The goal, Daschle’s book explained, is
  to slow the development and use of new medications and technologies
  because they are driving up costs.</p>
</blockquote>

<p>Again, the bill:</p>

<pre><code>                           page 190
 7 SEC. 9201. FEDERAL COORDINATING COUNCIL FOR COM-
 8                 PARATIVE EFFECTIVENESS RESEARCH.
 9        (a) ESTABLISHMENT.--There is hereby established a
10 Federal Coordinating Council for Comparative Effective-
11 ness Research (in this section referred to as the “Coun-
12 cil”).
13        (b) PURPOSE; DUTIES.--The Council shall--
14             (1) assist the offices and agencies of the Fed-
15        eral Government, including the Departments of
16        Health and Human Services, Veterans Affairs, and
17        Defense, and other Federal departments or agencies,
18        to coordinate the conduct or support of comparative
19        effectiveness and related health services research;
20        and
21             (2) advise the President and Congress on--
22                  (A) strategies with respect to the infra-
23             structure needs of comparative effectiveness re-
24             search within the Federal Government;

                           page 191
 1                  (B) appropriate organizational expendi-
 2             tures for comparative effectiveness research by
 3             relevant Federal departments and agencies; and
 4                  (C) opportunities to assure optimum co-
 5             ordination of comparative effectiveness and re-
 6             lated health services research conducted or sup-
 7             ported by relevant Federal departments and
 8             agencies, with the goal of reducing duplicative
 9             efforts and encouraging coordinated and com-
10             plementary use of resources.
</code></pre>

<p>The supposedly sinister Federal Coordinating Council for Comparative
Effectiveness Research seems to be more like the Department of Homeland
Security for existing federal health care systems.  Programs like
Medicaid, veteran's benefits, and federal employee health insurance
already make estimations on the effectiveness of various treatments, just
like every private health insurance company.  The new council would
share information across the federal programs that already exist.</p>

<p>Following that, she claims that the bill would change the standards for
approved Medicare treatments, implying that fewer treatments will be
approved:</p>

<blockquote>
  <p>Medicare now pays for treatments deemed safe and effective. The stimulus
  bill would change that and apply a cost- effectiveness standard set by
  the Federal Council (464).</p>
</blockquote>

<p>Page 464 contains references to implementing things specified under
section 3004, which describes the process for adopting and implementing
the previously-mentioned technology infrastructure.  I can find no mention
of Medicare.  It seems very much like this claim is completely fabricated.</p>

<p>Every complaint that the author raises, everything that she claims will
affect what care doctors are willing to give, seems to only concern the
healthcare information technology infrastructure that Obama has been
talking about implementing for months.  I see no places where the
government will be dictating <em>anything</em> to doctors, aside from providing
financial incentives (not punishments) to work with the new
infrastructure.  None of the author's claims about the government cutting
off healthcare seem at all founded in fact.  At best, she's consistently
misreading the text of the bill.  I think it more likely that she has
other reasons not to want the bill to pass and is distorting the reality
of the situation to steer people in the direction she wants them to go.</p>

<p>This post is available under a
<a href="http://labs.creativecommons.org/licenses/zero/1.0/">CC0
Waiver</a>.  Feel free to copy it anywhere.</p>
]]></content:encoded>
  </item>

  <item rdf:about="http://aperiodic.net/phil/archives/Geekery/backup-implementation.html">
    <title>Backup Implementation</title>
    <link>http://aperiodic.net/phil/archives/Geekery/backup-implementation.html</link>
    <description>I previously considered different backup schemes...</description>
    <dc:subject>/Geekery</dc:subject>
    <dc:creator>Phil Gold</dc:creator>
    <dc:date>2009-01-02T13:03-04:00</dc:date>
    
    <content:encoded><![CDATA[<p>I <a href="/phil/archives/Geekery/backup-ideas.html">previously</a> considered different backup schemes.  Writing
that entry crystallized my basic ideas about what I was going to do about
the backups.  I then proceeded to implement them.  This entry is a
detailed description of what I did.</p>

<h3>Backup Overview</h3>

<p>I ended up buying two <a href="http://www.newegg.com/Product/Product.aspx?Item=N82E16822135106" title="Western Digital Caviar Blue WD800JD 80GB 7200 RPM 8MB Cache SATA 3.0Gb/s Hard Drive - OEM">80 GB hard drives</a> and a <a href="http://www.newegg.com/Product/Product.aspx?Item=N82E16817153066" title="Thermaltake BlacX N0028USU External Hard Drive SATA Enclosure Docking Station 2.5&quot; &amp; 3.5&quot; USB 2.0 - Retail ">ThermalTake BlacX
external enclosure</a>.  The overall plan is to do backups to one of
the drives on a daily, automated basis, and the other on a periodic, maybe
monthly basis.  Most of the time, the periodic backup drive will live at
my office and will serve as my offsite backup.</p>

<p>I want to have a backup history in the same way that a tape rotation
scheme would give me.  That way, if I don't notice there's something wrong
with a file for a time, there's still a good chance I can retrieve it.  I
also want things stored space-efficiently, so backing up unchanged files
doesn't take up additional space.  This is accomplished pretty easily with
<code>rsync</code>; I do one full backup, and then subsequent backups use <code>rsync</code>'s
<code>--link-dest</code> option pointing to the most recent complete backup; any
files that haven't changed are simply hardlinked together, so the two
directory entries point to the same physical location on the disk.</p>

<p>For the backup history, I decided to go with a variant of the <a href="http://www.alvechurchdata.co.uk/softhanoi.htm">Towers of
Hanoi backup rotation</a>.  Instead of using a preset number of pegs,
as I would have to do if I were using physical tapes, I can just calculate
the numbers on the fly, effectively behaving as if I had an infinite
number of tapes.  This rotation gives me roughly exponential backoff for
my history; I can look at backups from yesterday, two days ago, four days
ago, eight days ago, and so on.</p>

<p>Finally, I decided to encrypt the drives.  This lets me cart them around
with confidence that if they get lost or stolen, anyone who ends up with
them won't have my personal files.  I used <a href="http://code.google.com/p/cryptsetup">LUKS</a> to encrypt the disks,
and used both a file on my computer and a password as keys.  The file
makes it easier to mount the drives without manual intervention (important
if my desktop reboots), while the password lets me get at the data if the
key file isn't available (important if the main disk dies and I need my
backups).</p>

<h3>Backup Procedure</h3>

<h4>Set up fstab.</h4>

<p>The first thing I did was to set up /etc/fstab for the disks.  Since I
only have one enclosure, I have to swap disks, so only one will ever be
connected at the same time.  Thus, I mount whichever's in at the moment on
/backups.  Likewise, I will associate each one with the dm-crypt name of
"backups", so the device will be /dev/mapper/backups.  Thus, I added the
following line to /etc/fstab:</p>

<pre><code>/dev/mapper/backups  /backups  auto  defaults  0  0
</code></pre>

<h4>Set up <code>rsync</code> filters.</h4>

<p>I'm using <code>rsync</code> to do the backups, but in some cases I don't want
everything in the source directories to be backed up.  Thus, I tell
<code>rsync</code> to look at a filter file for each directory so it knows what to
skip and what to keep.  <code>rsync</code> will go through the filters for each file
or directory it considers, and will take the first action that matches.
If nothing matched, the file is copied.  If a directory is ignored, none
of the files in that directory are considered at all, so I had to include
a few explicit directory chains.</p>

<p>In /var, I only want to back up a few things, so the final pattern ignores
anything that isn't explicitly included.</p>

<pre><code>+ /backups
+ /backups/**
+ /lib
+ /lib/bzr
+ /lib/bzr/**
+ /lib/svn
+ /lib/svn/**
- *
</code></pre>

<p>For my home directory, I include everything, with a few exceptions.  For
instance, most of my music directory can be reripped from CD if needed, so
I don't need to take up space backing up those files.  On the other hand,
I have some files that I either purchased online or downloaded and
wouldn't be able to easily replace if they were lost, so I do back them
up.  Here's an excerpt from my home filter file:</p>

<pre><code>+ /movies/Star_Wars_Holiday_Special
+ /movies/Star_Wars_Holiday_Special/**
- /movies

+ /music
+ /music/Bonerama
+ /music/Bonerama/Bringing_It_Home
+ /music/Bonerama/Bringing_It_Home/**
+ /music/Jonathan_Coulton
+ /music/Jonathan_Coulton/Thing_a_Week_Three
+ /music/Jonathan_Coulton/Thing_a_Week_Three/03-Code_Monkey*
+ /music/Nine_Inch_Nails
+ /music/Nine_Inch_Nails/Ghosts_I-IV
+ /music/Nine_Inch_Nails/Ghosts_I-IV/**
+ /music/Nine_Inch_Nails/The_Slip
+ /music/Nine_Inch_Nails/The_Slip/**
+ /music/Obelix
+ /music/Obelix/**
+ /music/Solo_String_Project
+ /music/Solo_String_Project/**
- /music/**

- /tmp
</code></pre>

<h4>Initialize disks.</h4>

<p>I wrote a script to initialize the disks for me: <a href="/phil/backups/init-backup-disk">init-backup-disk</a>.  It
takes two parameters: the name of the device for the backup disk, and the
file to use as a key for the partition.  If the key file doesn't exist, it
will be created.</p>

<p>After a few sanity checks, the script starts doing things.  It starts by
checking that the disk is good with <code>badblocks</code>.  If it encounters any
errors, it stops there and the drive needs to be sent in for warranty
replacement.  Following that, it goes into the most time-consuming part of
the initialization: writing random data to the disk.  (<code>badblocks</code> already
wrote random data, but its PRNG is somewhat simplistic; /dev/urandom is a
much better source of pseudo-random numbers.)  Without this step, it would
be obvious which bits of the disk had encrypted data on them.  I use
<a href="http://www.ivarch.com/programs/pv.shtml"><code>pv</code></a> to give a progress meter and time estimate.  On my computer,
<code>badblocks</code> took a little over two hours and /dev/urandom took about eight
hours for each 80GB disk.</p>

<pre><code># Check and randomize disk.
badblocks -b 512 -s -w -t random -v &#036;disk || exit 2
&lt;/dev/urandom pv -s &#036;(fdisk -l &#036;disk |
    perl -nle 'm{^Disk '&#036;{disk}': [0-9.]+ [KMGT]B, (\d+) bytes&#036;} and print &#036;1') |
  dd bs=512 conv=sync,noerror of=&#036;disk
</code></pre>

<p>The next step is to format the encrypted partition.  I use <code>sfdisk</code> to
create a single partition that spans the entire drive, followed by
<code>cryptsetup</code> to do the format.  I explicitly specify the cipher in order
to use <a href="http://en.wikipedia.org/wiki/ESSIV#ESSIV">ESSIV</a>, which makes certain attacks more difficult.  The
<code>--batch-mode</code> option keeps it from asking for confirmation before
writing.  The second call to <code>sfdisk</code> just tells the kernel to reread the
disk's partitions so it will pick up the UUID that <code>cryptsetup</code> created.</p>

<pre><code># Add and format the LUKS partition.
echo , | sfdisk --Linux &#036;disk
cryptsetup luksFormat --cipher aes-cbc-essiv:sha256 --batch-mode &#036;{disk}1 &#036;keyfile
sfdisk -R &#036;disk; sleep 5
</code></pre>

<p>Next, I open, format, and mount the partition.  JFS is the filesystem
that's been nicest to me, of all the journaling filesystems I've tried.
(In the future, it might be nice to use ZFS for the backup disks--I'd get
better detection of disk errors, at least--but I don't think it would play
entirely well with running over an encrypted volume, and they haven't
integrated encryption into ZFS yet, as far as I can tell.)</p>

<pre><code># Open LUKS partition, format and mount the encrypted volume.
cryptsetup --key-file &#036;keyfile luksOpen &#036;{disk}1 backups
mkfs -t jfs -q /dev/mapper/backups
mount /backups
</code></pre>

<p>Now I run the initial backup.  Each backup version is just a separate
numbered directory in the partition, so the first one is '1'.  I'm backing
up /etc, some of /var, my and my wife's home directories, and any
databases I have.  My wife's stuff isn't directly backed up here because
she's on a different computer; I have to initiate her backup from there.
The script, in its first requirement for user interaction, will wait until
I tell it that's done.</p>

<pre><code># Do the initial backup.
mkdir -vp /backups/1/{etc,var,phil,postgresql,mysql,rivana}
chmod a-r /backups/1
chown rivana /backups/1/rivana
chown postgres /backups/1/postgresql
rsync -avP --filter 'merge /etc/backups/etc-filter' /etc/ /backups/1/etc/
rsync -avP --filter 'merge /etc/backups/var-filter' /var/ /backups/1/var/
rsync -avP --filter 'merge /etc/backups/phil-filter' /home/phil/ /backups/1/phil/
su -c 'pg_dumpall -v &gt;/backups/1/postgresql/dump' postgres
mysqldump -v --all-databases &gt;/backups/1/mysql/dump
echo -n "Hit enter when rivana is backed up.  "
read foo
</code></pre>

<p>Now that the backup is done, the script unmounts and deactivates the partition.</p>

<pre><code># Deactivate the encrypted volume.
umount /backups
cryptsetup luksClose backups
</code></pre>

<p>And I get prompted for the password that will unlock the partition if the
key file isn't available.</p>

<pre><code># Add user password.
cryptsetup --key-file &#036;keyfile --verify-passphrase luksAddKey &#036;{disk}1
</code></pre>

<p>Finally, the script displays the UUID for the partition, which is needed
for later use.</p>

<pre><code># Display the partition's UUID.
echo -n 'UUID: '
cryptsetup luksUUID &#036;{disk}1
</code></pre>

<h4>Set up crypttab.</h4>

<p>Debian, at least, has an /etc/crypttab file that lists encrypted
partitions to be enabled at boot time.  I put the onsite backup disk in
there so it'll be automatically mounted if the computer reboots.  This
plus a backup cronjob make the backup process completely automated.</p>

<pre><code>backups  /dev/disk/by-uuid/&lt;onsite UUID&gt;  &lt;key file&gt;  luks
</code></pre>

<h4>Do local backups.</h4>

<p>I have a simple script to do the daily backups: <a href="/phil/backups/perform-backup">perform-backup</a>.  It's
basically the same as the initial backup, but with the <code>--link-dest</code>
option as I mentioned previously.</p>

<pre><code>last_num=&#036;(ls -t /backups | head -1)
((num=&#036;last_num+1))

mkdir -p /backups/&#036;num/{etc,var,phil,postgresql,mysql,rivana}
chown rivana /backups/&#036;num/rivana
chmod a-r /backups/&#036;num
rsync -a --filter 'merge /etc/backups/etc-filter' --link-dest=/backups/&#036;last_num/etc /etc/ /backups/&#036;num/etc/
rsync -a --filter 'merge /etc/backups/var-filter' --link-dest=/backups/&#036;last_num/var /var/ /backups/&#036;num/var/
rsync -a --filter 'merge /etc/backups/phil-filter' --link-dest=/backups/&#036;last_num/phil /home/phil/ /backups/&#036;num/phil/
chown postgres /backups/&#036;num/postgresql
su -c "pg_dumpall &gt;/backups/&#036;num/postgresql/dump" postgres
mysqldump --all-databases &gt;/backups/&#036;num/mysql/dump
</code></pre>

<h4>Do Becca's backup</h4>

<p>My wife has her own computer but, fortunately, simpler backup
requirements.  I have ssh public key authentication set up so she can ssh
to my computer without a password, which makes the backups work properly
in an automated fashion.</p>

<p>The initial backup is a simple <code>rsync</code> one-liner.</p>

<pre><code>rsync -avP ~/ mithrandir:/backups/1/rivana/
</code></pre>

<p>Subsequent backups are a simple script:</p>

<pre><code>#!/bin/sh

num=&#036;(ssh mithrandir ls -t /backups | head -1)
last_num=&#036;(ssh mithrandir ls -t /backups | head -2 | tail -1)

rsync -a --link-dest=/backups/&#036;{last_num}/rivana &#036;{HOME}/ mithrandir:/backups/&#036;{num}/rivana/
</code></pre>

<h4>Backup rotation.</h4>

<p>The Towers of Hanoi rotation is effected by a script that goes through and
deletes any directories that don't need to be there: <a href="/phil/backups/purge-backups">purge-backups</a>.  I
won't quote it here because I don't think it's all that interesting.  It
just finds the largest power of two less than or equal to the current
number and then works its way down from that to enumerate all of the
directories, deleting everything else.</p>

<h4>Offsite backups.</h4>

<p>Every so often I'll bring the offsite disk home and back up to it.  The
script for that is <a href="/phil/backups/insert-offsite-backup">insert-offsite-backup</a>.  It unmounts the onsite
disk, waits for me to insert the offsite disk, runs a backup, unmounts the
offsite disk, waits for me to reinsert the onsite disk, then remounts that
disk.  It needs to be told what my offsite UUID is, but it picks up all
the other settings from /etc/crypttab.</p>

<p>The backup takes about half an hour, so I have ample time to manually run
the backup script on Becca's computer.</p>
]]></content:encoded>
  </item>

  <item rdf:about="http://aperiodic.net/phil/archives/Geekery/backup-ideas.html">
    <title>Backups</title>
    <link>http://aperiodic.net/phil/archives/Geekery/backup-ideas.html</link>
    <description>I had a dream last night that the apartment beneath ours caught on fire,
we had to rush out of the building, and my computer and all of its data
was destroyed...</description>
    <dc:subject>/Geekery</dc:subject>
    <dc:creator>Phil Gold</dc:creator>
    <dc:date>2008-12-22T11:06-04:00</dc:date>
    
    <content:encoded><![CDATA[<p>I had a dream last night that the apartment beneath ours caught on fire,
we had to rush out of the building, and my computer and all of its data
was destroyed.</p>

<p>I've been pondering a formal backup system for a while now.  (My current
system involves making sure important files are in a version control
system and exist on at least my laptop and desktop.  This is pretty
ad-hoc, inconsistently updated, and not entirely comprehensive.)  I'm
taking my dream as impetus to actually set something up.  This post is to
help me organize my thoughts and see if anyone has any comments or
suggestions.</p>

<h4>My Requirements</h4>

<p>I want to have a full rotating versioned backup system, where I have
complete daily backups for a recent time span (say a week or so) and more
sporadic backups back to as much as a year in the past.  Ideally, the
backups should be stored in a space-efficient manner so unchanged files
don't take up more space than a single copy would require.  The backups
should have off-site redundancy.  They should be relatively easy to use;
they should be fully automated on a day-to-day basis, with notification
when things go wrong.  Ease of setup would be nice but not necessary.</p>

<h4>My Data</h4>

<p>I currently have about 720 GB of data in my home directory, plus a few
hundred MB elsewhere on the computer that I'd want to back up.  I also
have about 11GB in a bzr repository, but all of that should remain
duplicated in my home directory.  Most of the data in my home directory is
in media files that I can either replace (rerip CDs, etc.) or live
without; only 25 GB of it is stuff that I <em>must</em> back up.  (A further 130
GB is stuff that would be nice to back up, but I can just burn it to DVD
and consider those my backups; the data is essentially static.)</p>

<h4>JWZ Backups</h4>

<p>The easiest approach is the <a href="http://jwz.livejournal.com/801607.html">JWZ backup solution</a>.  For all of
my data, that would be two <a href="http://www.newegg.com/Product/Product.aspx?Item#N82E16822136321" title="Western Digital WDE1UBK10000N 1TB Black External Hard Drive - Retail">1 TB external hard drives</a>, for
about $220.  If I restrict myself to the "must backup" data, I could make
do with two <a href="http://www.newegg.com/Product/Product.aspx?Item#N82E16822242001" title="cirago CST1060 60GB 5400 RPM External Hard Drive - Retail">60 GB external hard drives</a> for about $80.  In
either case, I'd keep one drive at the office and swap them periodically.</p>

<p>The advantage of this approach is that I control everything.  I can put
encrypted volumes on the drives, so if they get lost or stolen, my data
isn't usable to other people.  I can use rsync with hardlinks between
datestamped directories to get versioned backups with efficient disk
usage.  The drawbacks are a modest initial monetary outlay and the need to
coordinate shuttling drives back and forth.</p>

<h4>Amazon S3</h4>

<p>Another approach is to use <a href="http://aws.amazon.com/s3/">Amazon S3</a> to store my data.  It's offsite
by definition (and stored among multiple data centers; if I write data to
it, I can reasonably trust that I'll get that data back).  It's not too
expensive: at $0.17/GB-month, my minimal backup will cost about
$3.85/month.  Throw in transfer costs and churn, and I doubt I'd exceed
$6/month.  (The initial upload would be $2.56.  A full restore would cost
me $4.36.)  With S3, I would only back up the minimal data; the 130 GB of
optional backups would cost an additional $20/month, which would exceed
the cost of the full do-it-myself hard drive backups in one year.</p>

<p>The complication to S3 is that it's just a web-based data storage service;
you need additional software to make a reasonable backup solution.</p>

<h5>Jungle Disk</h5>

<p>From everything I've read, <a href="http://jungledisk.com/">Jungle Disk</a> is currently the best software
for storing filesystem data on S3.  It runs on Windows, Mac OSX, and
Linux, and exports your S3 buckets as a WebDAV disk, which you can then
mount and treat like an ordinary (unlimited capacity) disk drive.  All
data is encrypted before it's sent to S3.</p>

<p>I like this approach.  Since it looks like a disk, I can use the same
rsync setup I would with my own disks, and since the data is encrypted, I
don't need to worry too much about it being transported over the Internet
and stored on someone else's servers.  The main drawback is that it's
proprietary software.  In addition to my principled preference of open
source software to proprietary, there's also the issue that, especially
because the data's encrypted, this software would be my only access to my
backups.  If something went wrong and I couldn't get support from the
company (e.g. they went out of business), I'd be out of luck.</p>

<p>The software costs $20.  Assuming $5/month on S3, it would take one year
for this approach to cost more than the minimal get-my-own-disks approach.</p>

<h5>Other S3 software</h5>

<p>I haven't seen anything else that will let me back up to S3 and keep
versioned backups in a space-efficient manner.  Most of the S3 backup
software I've seen doesn't do versions, and the few that do don't appear
to do it space-efficiently.  As always, I have the option of writing my
own, but that would take a fair amount of time and effort, and I'd be
likely to give up partway through, continuing to leave myself without
good backups.</p>

<h4>Conclusion</h4>

<p>Barring any better suggestions from others, I'm leaning towards the two
smallish hard drives.  They'd pay for themselves after a year of use, and
I get complete control of my data (for better or worse).  I like the idea
of using S3, but it's more expensive in the long run, and I'm not
completely happy with any of the software I've found to use with it.</p>
]]></content:encoded>
  </item>

  <item rdf:about="http://aperiodic.net/phil/archives/Recipes/truffle-topped-amaretto-brownies.html">
    <title>Truffle-Topped Amaretto Brownies</title>
    <link>http://aperiodic.net/phil/archives/Recipes/truffle-topped-amaretto-brownies.html</link>
    <description>I made this for Thanksgiving this year, and have already been asked for
the recipe, even though I haven't had any yet...</description>
    <dc:subject>/Recipes</dc:subject>
    <dc:creator>Phil Gold</dc:creator>
    <dc:date>2008-11-26T22:04-04:00</dc:date>
    
    <content:encoded><![CDATA[<p>I made this for Thanksgiving this year, and have already been asked for
the recipe, even though I haven't had any yet.  So here goes.</p>

<ul>
<li>Brownie Layer
<ul>
<li>1 cup sugar</li>
<li>1 cup butter</li>
<li>4 Tablespoons water</li>
<li>2 cups semi-sweet chocolate morsels (~300g)</li>
<li>1/2 cup amaretto</li>
<li>2 teaspoons vanilla extract</li>
<li>4 eggs</li>
<li>1 1/2 cups all-purpose flour (~190g)</li>
<li>1/2 teaspoon baking soda</li>
<li>1/2 teaspoon salt</li>
<li>1 cup chopped or sliced almonds (optionally toasted)</li>
<li>1/2 cup chopped maraschino cherries</li>
</ul></li>
<li>Truffle Layer
<ul>
<li>8 oz cream cheese, softened</li>
<li>1/4 cup powdered sugar (30g)</li>
<li>1 cup semi-sweet chocolate morsels (~150g)</li>
<li>2-3 Tablespoons amaretto</li>
</ul></li>
<li>Topping
<ul>
<li>1 cup semi-sweet chocolate morsels (~150g)</li>
<li>1/2 cup whipping cream</li>
<li>1 cup sliced almonds, lightly toasted</li>
<li>maraschino cherries for garnish</li>
</ul></li>
</ul>

<h4>Brownie Layer</h4>

<p>Preheat oven to 325°F.  Prepare a 9×13 baking dish.  (I line it with a
sling of parchment paper and then spray it with Baker's Joy.)</p>

<p>In a saucepan, bring the sugar, butter, and water to a boil.  Remove from
heat.  Add chocolate, amaretto, and vanilla extract, stirring until
chocolate is melted.  Add eggs, one at a time, stirring until blended.</p>

<p>Whisk together flour, baking soda, and salt.  Add to chocolate mixture,
stirring well.  Stir in almonds and cherries.</p>

<p>Pour mixture into baking dish and bake for 42-48 minutes.</p>

<p>Leave them in the dish to cool.</p>

<h4>Truffle Layer</h4>

<p>While the brownies are cooling, beat the cream cheese and powdered sugar
in a stand mixer on medium speed until the mixture is smooth.  Melt
chocolate and add with the amaretto to the cream cheese, mixing until
well-blended.</p>

<p>Spread over brownies and refrigerate until firm, at least 1 hour.</p>

<h4>Topping</h4>

<p>In a saucepan, melt the chocolate in the whipping cream.  Spread evenly
over the brownies.  Sprinkle with almonds and cherries.  Refrigerate until
set, at least 1 hour.</p>

<p>Cut into bars and serve.</p>
]]></content:encoded>
  </item>

  <item rdf:about="http://aperiodic.net/phil/archives/Geekery/more-delphi-type-hate.html">
    <title>More Delphi Type Hate</title>
    <link>http://aperiodic.net/phil/archives/Geekery/more-delphi-type-hate.html</link>
    <description>I have simple needs...</description>
    <dc:subject>/Geekery</dc:subject>
    <dc:creator>Phil Gold</dc:creator>
    <dc:date>2008-11-19T11:36-04:00</dc:date>
    
    <content:encoded><![CDATA[<p>I have simple needs.  I have a base class with some generic behavior and
subclasses with specific information for that generic behavior.
More concretely, the subclasses need to provide the generic behavior with
an ordered list of things that designate key fields on database tables.
The best representation of those "things" in Delphi seems to be members of
an enumeration:</p>

<pre><code>type
  TKeyField = (kfFoo, kfBar, kfBaz, kfQuux);
</code></pre>

<p>Since I need the list of fields to be ordered, I need them in an array:</p>

<pre><code>type
  TKeyFieldArray = array of TKeyField;
</code></pre>

<p>The declaration of the base class is pretty simple:</p>

<pre><code>type
  TBaseClass = class
   protected
    function GetKeyFieldList : TKeyFieldArray; virtual; abstract;
   public
    procedure DoSomethingWithKeyFields;
  end;
</code></pre>

<p>As is the declaration of the subclass:</p>

<pre><code>type
  TSubClass = class(TBaseClass)
   protected
    function GetKeyFieldList : TKeyFieldArray; override;
  end;
</code></pre>

<p>So where's the problem?  Where's the hate?  The hate is in the
implementation.  If Delphi had array literals, this would be easy.
Something like:</p>

<pre><code>function TSubClass.GetKeyFieldList : TKeyFieldArray;
begin
  Result := [kfBar, kfFoo, kfQuux];
end;
</code></pre>

<p>But it doesn't.  It has some special magic for array literals if they're
the parameter to a function, but not anywhere else.  It does, however,
have a syntax for array <em>constants</em>.  Perhaps this will work:</p>

<pre><code>function TSubClass.GetKeyFieldList : TKeyFieldArray;
  const
    keyFieldList : TKeyFieldArray = (kfBar, kfFoo, kfQuux);
begin
  Result := keyFieldList;
end;
</code></pre>

<p>But no.  That <code>TKeyFieldArray</code> is a <em>dynamic array</em>; Delphi doesn't
allocate any space for it, so it can't be a constant value.  You have to
tell Delphi how big each constant array is, even though you're <em>already
telling it</em> how many elements are in the array.  So perhaps this is the
solution:</p>

<pre><code>function TSubClass.GetKeyFieldList : TKeyFieldArray;
  const
    keyFieldList : array[0..2] of TKeyField = (kfBar, kfFoo, kfQuux);
begin
  Result := keyFieldList;
end;
</code></pre>

<p>But <strong>no</strong>.  Because of Delphi's approach to static typing, those are
actually <em>different types</em>, and are therefore not assignment-compatible.
(See <a href="http://philg.hates-software.com/2005/08/12/42d0f129.html" title="Delphi's Type-Bondage">previous</a> <a href="http://philg.hates-software.com/2006/08/25/aa53b474.html" title="Delphi.  Excessive type-bondage.">hates</a> on this subject.)  No, here is the
code that Delphi makes me type for what should be a one-line function
implementation:</p>

<pre><code>function TSubClass.GetKeyFieldList : TKeyFieldArray;
begin
  SetLength(Result, 3);
  Result[0] := kfBar;
  Result[1] := kfFoo;
  Result[2] := kfQuux;
end;
</code></pre>

<p>And just earlier this morning I was pleased because I read that Delphi
2007 (to which I'll soon be upgrading from Delphi 5) has <code>for...in</code> loops,
so I can finally have <code>foreach</code>.  (Can't get the generics and anonymous
functions in Delphi 2009, because we need .NET and that's not yet
available for Delphi 2009.)  Oh, Delphi.  The one hand giveth, and the
entire rest of the stupid, anemic, pox-ridden language taketh away.</p>
]]></content:encoded>
  </item>


</rdf:RDF>
