<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
  <title>Havoc Pennington</title>
  <link>http://log.ometer.com/</link>
  <description>Havoc Pennington log</description>
  <language>en-us</language>
  <webMaster>hp@pobox.com</webMaster>
  <managingEditor>hp@pobox.com</managingEditor>
    <!-- my log only records date not time, so the time is made up -->
  <pubDate>Sun, 22 Mar 2009 19:00 -0400</pubDate>
  <lastBuildDate>Fri, 26 Jun 2009 22:18 -0400</lastBuildDate>
  <item>
    <title> Spring is here</title>
    <link>http://log.ometer.com/2009-03.html#22</link>
    <pubDate>Sun, 22 Mar 2009 20:45 -0500</pubDate>
    <description>

&lt;p&gt;
Haven&apos;t had time to blog in months ...
&lt;/p&gt;

&lt;ul&gt;

&lt;li&gt;

Have been working on &lt;a href=&quot;http://litl.com/&quot;&gt;litl&lt;/a&gt; during nearly
all available hours... it took some time (doesn&apos;t it always?) but we
have a great team assembled and it&apos;s a ton of fun to focus on writing
the code rather than hiring, and see the rapid progress a complete
team is able to make. (If you want to pile on, we aren&apos;t urgently
hiring, but we probably will be at some point especially for the right
person, so we&apos;d love to see your resume.)

&lt;/li&gt;

&lt;li&gt;

There is nothing better than getting high-quality work done with a
high-quality group of people.

&lt;/li&gt;

&lt;li&gt;

&lt;a href=&quot;http://clutter-project.org/&quot;&gt;Clutter&lt;/a&gt; is rapidly
approaching 1.0 ... spent some time this weekend patching 
&lt;a href=&quot;http://bugzilla.openedhand.com/show_bug.cgi?id=1138&quot;&gt;the
remaining issue that was driving me crazy&lt;/a&gt;, hoping to 
get it in under the wire. &lt;a
href=&quot;http://blogs.gnome.org/ebassi/&quot;&gt;Emmanuele&lt;/a&gt; may be owed beers.

&lt;/li&gt;

&lt;li&gt;

It&apos;s gratifying that the new default home screen of Facebook looks a lot
like &lt;a href=&quot;http://www.google.com/patents?id=U1-gAAAAEBAJ&quot;&gt;Mugshot.org&lt;/a&gt;,
a site some of us came up with at Red Hat.
We coded Mugshot&apos;s personal-lifestream-thingy before Facebook&apos;s news feed came
out and before FriendFeed came out. Not saying either site copied
us, but it&apos;s still nice to know at least our idea was good (even
though there were lots of reasons we weren&apos;t the ones to get anywhere
with it).

&lt;/li&gt;

&lt;li&gt;It used to be that the cool kids claimed to have listened to
R.E.M. before &lt;a
href=&quot;http://en.wikipedia.org/wiki/Document_(album)&quot;&gt;Document&lt;/a&gt;
(these are cool kids 20 years ago, I guess). I was listening to 
mutual fund manager &lt;a
href=&quot;http://log.ometer.com/2007-08.html#26.2&quot;&gt;John Hussman&lt;/a&gt; before
he showed up on &lt;a
href=&quot;http://www.fivethirtyeight.com/2009/03/best-argument-youll-read-for-bank.html&quot;&gt;fivethirtyeight.com&lt;/a&gt;
and in the &lt;a
href=&quot;http://online.wsj.com/article/SB123549389117060653.html&quot;&gt;Wall
Street Journal&lt;/a&gt;. Am I a cool kid? Ha.
&lt;/li&gt;

&lt;li&gt; &lt;a
href=&quot;http://www.nytimes.com/2009/03/22/weekinreview/22stolberg.html?ref=weekinreview&quot;&gt;New
York Times tries to explain&lt;/a&gt; why people get distracted by small(er)
things like millions in AIG bonuses, while missing large things, like
billions to &lt;a
href=&quot;http://www.hussmanfunds.com/wmc/wmc090309.htm&quot;&gt;bail out AIG&apos;s
bondholders&lt;/a&gt;. Possible Occam&apos;s razor answer: most people don&apos;t know
what a bond is, but they know what a bonus is.

&lt;/li&gt;

&lt;li&gt;

Some spammer selling Hewlett-Packard products took over my Twitter
account &quot;hp&quot;, and now Twitter seems to have deleted it - and allowed
someone else to grab the account. I emailed Twitter a while back
asking them to fix it but all I got was an autoresponse saying &quot;we&apos;ve
taken two weeks and still haven&apos;t gotten back to you, let us know if
you still need help.&quot; I rarely twittered anything anyway, but
... lame.

&lt;/li&gt;

&lt;li&gt;

Funniest thing today was a &lt;a
href=&quot;http://twitter.com/tbogg/status/1306015698&quot;&gt;random snark on Ayn
Rand&lt;/a&gt; that &lt;a href=&quot;http://twitter.com/migueldeicaza&quot;&gt;Miguel&lt;/a&gt;
reposted.

&lt;/li&gt;

&lt;li&gt;

Why is it reasonable to pretend that socialist or libertarian
principles can guide a decision between 35% and 39.6% tax rates?
Sure, 5% vs. 80% is an ideological debate. But 35% vs. 39.6% is a
pragmatic debate. The vast majority of American voters agree on the
main government spending items - social security, medicare, defense -
that eat up most of our tax revenues. Controversial spending items
are too small to affect the tax rate much. And the vast majority of
Americans are opposed to 50-60% tax rates. We&apos;re going to stay right
about where we are because big tax hikes and big spending cuts are
both third rails. &lt;a
href=&quot;http://www.fivethirtyeight.com/2009/03/missing-1000000-tax-bracket.html&quot;&gt;Here&apos;s
some historical perspective&lt;/a&gt;; tax rates are much more
stable over the last few decades than they have been over the last century.

&lt;/li&gt;

&lt;li&gt;

Amy discovered &lt;a href=&quot;http://cakewrecks.blogspot.com/&quot;&gt;Cake
Wrecks&lt;/a&gt; (scroll past Sunday, they have non-wrecks on
Sunday). Awesome.

&lt;/ul&gt;

    </description>
  </item>
  <item>
    <title> litl at summit this weekend</title>
    <link>http://log.ometer.com/2008-10.html#9</link>
    <pubDate>Thu, 09 Oct 2008 09:58 -0400</pubDate>
    <description>

&lt;p&gt;

For &lt;a href=&quot;http://live.gnome.org/Boston2008/Participants&quot;&gt;GNOME
summit attendees&lt;/a&gt; we&apos;re buying some coffee, dessert, and snacks on
Saturday afternoon from &lt;a
href=&quot;http://www.ausoleilcatering.com/family/&quot;&gt;a local French
restaurant&lt;/a&gt;. litl&apos;s founder John Chuang plans to drop by as well to
meet people and learn.


&lt;/p&gt;

&lt;p&gt;

This isn&apos;t a talk or a big announcement (litl will still be in stealth
mode post-summit) - the idea is to say thanks to the developers behind
GNOME and introduce ourselves.

&lt;/p&gt;

&lt;p&gt;

The litl devel team will be around all weekend, doing some hacking. As
you &lt;a href=&quot;http://log.ometer.com/2008-08.html#25&quot;&gt;may have
guessed&lt;/a&gt; we have quite a bit of code written in JavaScript, with a
C/C++ core.  We&apos;ve invested a few weeks splitting the
JavaScript/gobject-introspection bindings out of our codebase and
rebasing to newer gobject-introspection. By Saturday we hope to have
it compiling and posted, so we can hack on combining our work with &lt;a
href=&quot;http://blogs.gnome.org/alexl/2008/09/09/embeddable-languages-an-implementation/&quot;&gt;Alex&apos;s
gscript API&lt;/a&gt; among other things. We might also sign up for a
technical talk about the bindings if people are interested in learning
more.

&lt;/p&gt;

    </description>
  </item>
  <item>
    <title> Why the credit crisis matters</title>
    <link>http://log.ometer.com/2008-09.html#30</link>
    <pubDate>Tue, 30 Sep 2008 23:58 -0400</pubDate>
    <description>

&lt;p&gt;

In an effort to outdo other software developers in nerdiness, I read a
blog called &lt;a href=&quot;http://accruedint.blogspot.com/&quot;&gt;Accrued
Interest&lt;/a&gt;, subtitle &quot;Come for the analysis and research on the
U.S. Bond market. Stay for the geeky Star Wars references.&quot;

&lt;/p&gt;

&lt;p&gt;

Accrued Interest has a &lt;a
href=&quot;http://accruedint.blogspot.com/2008/09/why-main-street-should-support-this.html&quot;&gt;nice
explanation of how the credit crisis affects everyone&lt;/a&gt;.

&lt;/p&gt;

&lt;p&gt;

Here&apos;s 
&lt;a
href=&quot;http://www.nytimes.com/2008/10/01/business/economy/01leonhardt.html?hp&quot;&gt;another
good one from the New York Times&lt;/a&gt;.

&lt;/p&gt;

    </description>
  </item>
  <item>
    <title> A less ideological health plan</title>
    <link>http://log.ometer.com/2008-09.html#29</link>
    <pubDate>Mon, 29 Sep 2008 19:45 -0400</pubDate>
    <description>

&lt;p&gt;

I&apos;ve been wondering for a while why nobody contrasts Obama&apos;s health
care proposal with some of the past Democratic proposals. It&apos;s a
market-based, incremental proposal, that makes use of existing
programs and existing insurance companies.

&lt;/p&gt;

&lt;p&gt;

Today Obama&apos;s campaign has &lt;a
href=&quot;http://link.brightcove.com/services/link/bcpid1772825856/bclid1780606223/bctid1819819398&quot;&gt;a new ad making this point&lt;/a&gt;, so I guess I&apos;m on their
wavelength. After my &lt;a
href=&quot;http://log.ometer.com/2008-09.html#13&quot;&gt;What happened to John
McCain?&lt;/a&gt; post, the next day &lt;a
href=&quot;http://www.youtube.com/watch?v=CK3Y1KPzW9k&quot;&gt;Obama ripped that
off&lt;/a&gt;, too, for a negative ad.

&lt;/p&gt;

&lt;p&gt;

Finally fixing health care would make a huge difference for quite a
few people I know. It may be the single most consequential thing the
government could do.

&lt;/p&gt;

&lt;p&gt;

If you watched the debates, see &lt;a
href=&quot;http://www.factcheck.org/elections-2008/factchecking_debate_no_1.html&quot;&gt;factcheck.org&lt;/a&gt;&apos;s
coverage. They ding both candidates on multiple claims.

&lt;/p&gt;

    </description>
  </item>
  <item>
    <title> Yikes</title>
    <link>http://log.ometer.com/2008-09.html#29.2</link>
    <pubDate>Mon, 29 Sep 2008 18:15 -0400</pubDate>
    <description>

&lt;p&gt;
&lt;a
href=&quot;http://www.nytimes.com/2008/09/30/business/30markets.html?hp&quot;&gt;Worst
stock plunge in 20 years.&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;

Here&apos;s a &lt;a href=&quot;http://log.ometer.com/2007-08.html#26.2&quot;&gt;relevant
post from last year&lt;/a&gt;, when the stock plunge was much less dramatic.

&lt;/p&gt;

&lt;p&gt;
Lessons for the next bull market (yes there will be one eventually):
&lt;/p&gt;
&lt;p&gt;
&lt;ul&gt;

&lt;li&gt;

Low interest rates and high liquidity do not mean stock prices will
stay up. Those things are indicators of insufficient risk premiums,
not indicators of permanent demand for assets.

&lt;/li&gt;

&lt;li&gt;

If companies have 2x their long-run average profit margins, something
unsustainable is going on. Abnormal profits don&apos;t last forever in
(more or less) free market systems, due to competition and the
business cycle. Anytime you read an article that mentions a P/E
ratio, without discussing normalized margins, run away in fear. (The
inverse goes as we most likely head into recession. P/E
ratios will become misleadingly high, while in the bull market they
were misleadingly low.)

&lt;/li&gt;

&lt;/ul&gt;

    </description>
  </item>
  <item>
    <title> Tax policy</title>
    <link>http://log.ometer.com/2008-09.html#14</link>
    <pubDate>Sun, 14 Sep 2008 12:15 -0400</pubDate>
    <description>

&lt;p&gt;
Nice, factual, 1-chart explanation of the competing tax proposals. (Thanks &lt;a href=&quot;http://tieguy.org/blog/2008/09/14/that-havoc-hes-such-a-nice-young-man-john-mccain-not-so-much/&quot;&gt;Luis&lt;/a&gt;.)
&lt;/p&gt;

&lt;p&gt;
&lt;a href=&quot;http://chartjunk.karmanaut.com/taxplans/&quot;&gt;&lt;img src=&quot;http://log.ometer.com/images/taxplans.gif&quot;/&gt;&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;
&lt;a href=&quot;http://barackobama.com/issues/&quot;&gt;Barack Obama&apos;s policy proposals.&lt;/a&gt;
&lt;/p&gt;

    </description>
  </item>
  <item>
    <title> What happened to John McCain?</title>
    <link>http://log.ometer.com/2008-09.html#13</link>
    <pubDate>Sat, 13 Sep 2008 12:00 -0400</pubDate>
    <description>

&lt;p&gt;

McCain was always the respectable Republican, who opposed
tax cuts without spending cuts, did not deny environmental
threats, had a reasonable approach to immigration, and was against the
scorched-earth Rove-style politics. Somehow he has reversed himself on
&lt;em&gt;all&lt;/em&gt; of these things while running for president. It&apos;s not
even clear he still opposes torture (see &lt;a
href=&quot;http://www.boston.com/news/nation/articles/2008/02/16/mccain_drops_the_torture_ball/&quot;&gt;this&lt;/a&gt;
&lt;a
href=&quot;http://www.nytimes.com/2008/02/17/us/politics/17torture.html&quot;&gt;vote&lt;/a&gt;,
for example).

&lt;/p&gt;

&lt;p&gt;
I don&apos;t consider flip-flopping in itself to be bad; the famous
&lt;a href=&quot;http://en.wikiquote.org/wiki/John_Maynard_Keynes&quot;&gt;Keynes
quote&lt;/a&gt; is, &quot;When the facts change, I change my mind. What do you
do, sir?&quot;
&lt;/p&gt;

&lt;p&gt;

But the facts haven&apos;t changed, McCain has. Read &lt;a
href=&quot;http://www.time.com/time/politics/article/0,8599,1836909,00.html&quot;&gt;this
interview with Time magazine&lt;/a&gt; - cringe-inducing. I just feel bad
for him.

&lt;/p&gt;

&lt;p&gt;

McCain 2008 is so unlike McCain 2000, it&apos;s very hard to understand
what&apos;s going on. I&apos;m not willing to write this one off as &quot;politics&quot;
because it feels unusual and strange.

&lt;/p&gt;

&lt;p&gt;

On top of McCain&apos;s personality-ectomy, since just before the
convention, his campaign has kicked into a series of
frivolous distractions. The New York Times has &lt;a
href=&quot;http://www.nytimes.com/2008/09/13/us/politics/13mccain.html?hp&quot;&gt;an
article&lt;/a&gt; and &lt;a
href=&quot;http://www.nytimes.com/2008/09/12/opinion/12krugman.html?em&quot;&gt;an
op-ed&lt;/a&gt; about it, but if you&apos;re a New York Times hater, &lt;a
href=&quot;http://factcheck.org/&quot;&gt;factcheck.org&lt;/a&gt; is excellent and calls
both candidates on their inaccuracies. factcheck.org doesn&apos;t try to
make a subjective judgment about which candidate distorts the most,
but read the last couple months of fact checks on each of them and see
what you think.

&lt;/p&gt;

&lt;p&gt;

On at least two substantive policy matters, taxes and health care, the
candidates are failing to have a real discussion - McCain has been
repeating misleading talking points instead of engaging with and
debating the actual proposals.

&lt;/p&gt;

&lt;p&gt;

And Sarah Palin - in her first interview, she says this with a
straight face:

&lt;blockquote&gt;
&lt;p&gt;&lt;b&gt;What insight into Russian actions, particularly in the last couple of weeks, does the proximity of the state give you?&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;They’re our next-door neighbors. And you can actually see Russia
from land here in Alaska. From an island in Alaska.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/p&gt;

&lt;p&gt;

Come on. She&apos;s applying for a serious job.

&lt;/p&gt;

&lt;p&gt;

While &lt;a href=&quot;http://www.youtube.com/watch?v=C6urw_PWHYk&quot;&gt;a hollywood
actor mocking creationism&lt;/a&gt; is not going to win over any swing
voters, I have to agree with the &quot;Disney movie&quot; part of the sentiment.

&lt;/p&gt;

&lt;p&gt;

To combat this, before announcing Palin&apos;s nomination, the McCain
campaign seems to have invented a narrative that &quot;they&quot; are attacking
her family, attacking her because she&apos;s a woman, blah blah.  Even
though &lt;a href=&quot;http://www.youtube.com/watch?v=_LZsj6eD4Es&quot;&gt;Obama did
the opposite&lt;/a&gt; and condemned attacking her family, McCain stuck to
the talking points. And though it took his campaign a couple weeks,
they found this &quot;lipstick on a pig&quot; comment they could use as
&quot;evidence&quot; for the talking points they&apos;d already been pushing. &lt;a
href=&quot;http://www.youtube.com/watch?v=xMtcW2Hq5iE&quot;&gt;Obama responded
very well&lt;/a&gt; - emphasizing how ridiculous it is to play
games given the weight of the substantive issues at stake.

&lt;/p&gt;

&lt;p&gt;
If your attention span is too short to watch Obama&apos;s serious responses, &lt;a
href=&quot;http://ccinsider.comedycentral.com/cc_insider/2008/09/jon-stewart-ann.html&quot;&gt;Jon
Stewart takes apart the pundits on Palin&lt;/a&gt; in a more humorous way.
&lt;/p&gt;

&lt;p&gt;

It makes me sad. When McCain won the nomination, though I was not
going to vote for him, I was happy that we would have two people
running with competence and integrity well above the politician
average, and well above most of the others in the primaries. It felt
somewhat &quot;can&apos;t lose&quot; - the upgrade from Bush would be significant
either way. McCain 2008 is still better than Bush (it&apos;s not a high
bar). But &quot;new McCain&quot; has been very disappointing compared to McCain
2000.

&lt;/p&gt;

&lt;p&gt;

&lt;a href=&quot;http://www.0xdeadbeef.com/weblog/?p=734#comment-156703&quot;&gt;Mike
Evans reposted&lt;/a&gt; a nice &lt;a
href=&quot;http://blog.pmarca.com/2008/03/an-hour-and-a-h.html&quot;&gt;case for
Obama from Marc Andreessen&lt;/a&gt;. Unfortunately, where the majority of
young people and &quot;knowledge workers&quot; see competence, a lot of swing
voters seem to see something negative.

&lt;/p&gt;

&lt;p&gt;

There are serious problems facing the United States, especially the US
economy, and the economic problems ripple through national security
and other issues. Our economic problems have some straightforward
answers: simplify the tax code, make it a bit more progressive so we
have a solid base of consumers to buy stuff, reduce lost productivity
and inflation caused by a broken approach to health care, and - the
big one - address the redistribution of wealth and power from the US
to other countries created by our oil dependency.

&lt;/p&gt;

&lt;p&gt;

One of the presidential candidates wants to talk about &lt;a href=&quot;http://barackobama.com/issues/&quot;&gt;credible
solutions&lt;/a&gt; to these problems, and one of them wants to talk about
&lt;a href=&quot;http://en.wikipedia.org/wiki/Bread_and_circuses&quot;&gt;distractions&lt;/a&gt;.

&lt;/p&gt;

    </description>
  </item>
  <item>
    <title> Synchronous IO Never OK</title>
    <link>http://log.ometer.com/2008-09.html#7</link>
    <pubDate>Sun, 07 Sep 2008 14:45 -0400</pubDate>
    <description>

&lt;p&gt;

&quot;If synchronous IO becomes a problem, it can be made asynchronous
later.&quot; Tempting to imagine that some operations on local files are
&quot;fast enough&quot; to implement with synchronous IO. &quot;Premature
optimization is the root of all evil,&quot; right?

&lt;/p&gt;

&lt;p&gt;

Wishful thinking. Async vs. sync IO is not a performance issue (in
fact synchronous IO can be faster). It is a structural or qualitative
issue, a design issue. Sync IO is guilty until proven innocent.

&lt;/p&gt;

&lt;p&gt;

My new rule is: &lt;em&gt;any code that will be blocking during a
user-interactive main loop must run in a known-short time&lt;/em&gt;. The
task must be &lt;em&gt;known&lt;/em&gt; short, not
indefinite-but-often-short.
&lt;/p&gt;

&lt;p&gt;
Local file access could be short, but is
not known short. Another common culprit: synchronous D-Bus calls.

&lt;/p&gt;

&lt;p&gt;

I&apos;ve seen &lt;em&gt;so many&lt;/em&gt; rewrites from synchronous to asynchronous
IO over the years - it is almost 100% likely that anything blocking
the main loop eventually comes to be seen as a bug. There&apos;s near-zero
chance it&apos;s really OK to use those nice, easy-to-program blocking
D-Bus calls, or that nice, simple &lt;a href=&quot;http://library.gnome.org/devel/glib/unstable/glib-File-Utilities.html&quot;&gt;g_file_get_contents()&lt;/a&gt;. Even
                                                  the
harmless looking g_file_test() can bite.&lt;/p&gt;

&lt;p&gt;

These APIs exist only to tempt you. They are the dark path.

&lt;/p&gt;

&lt;p&gt;

(Note: by &quot;asynchronous&quot; I mean &quot;the main loop is not blocking, for
example because IO is in its own thread&quot; - I don&apos;t mean special AIO
system calls.)

&lt;/p&gt;

&lt;p&gt;

Here&apos;s the core issue: the UI&apos;s main loop needs to wake up
at 30-60 frames per second to do animations and repaints, and it
should respond to user input with similar speed. It needs to do this
&lt;em&gt;consistently&lt;/em&gt; (think real-time-like), not &quot;on average&quot; - if
there are big outliers, like an occasional quarter-second delay in
frame rate, the app will feel sluggish.

&lt;/p&gt;

&lt;p&gt;

&quot;Local&quot; IO can be slower than you think; &lt;a
href=&quot;http://shaver.off.net/diary/2008/05/25/fsyncers-and-curveballs/&quot;&gt;the
firefox fsync problem&lt;/a&gt; shows one extreme case (the whole kernel
gets bogged down, not just the IO operation), but think about network
file shares, or large file sizes, or systems under load. Even mild
manifestations of these issues are visible in decreased user
responsiveness and animation smoothness.

&lt;/p&gt;

&lt;p&gt;

It&apos;s very common for supposedly fast IO operations to end up batched
together, creating a long delay at once; for example, calling stat()
on everything in a directory, or queuing a bunch of idle handlers that
all happen to kick in at once.

&lt;/p&gt;

&lt;p&gt;

Another Firefox example: try uploading a bunch of photos to Flickr in
one go. Ouch. The files are local, but ... there are a lot of them and
they are big. Pretty sure Firefox uses synchronous IO here.

&lt;/p&gt;

&lt;p&gt;

Enough &quot;this local IO should be fast enough&quot; laziness scattered around
an app creates distributed bloat that&apos;s hard to pin down and doesn&apos;t
show up very well in profiles because it depends on external
circumstances.

&lt;/p&gt;

&lt;p&gt;

Not only is it hard to find later, synchronous code is hard to fix - it means
rewriting.

&lt;/p&gt;

&lt;p&gt;

Bottom line: &lt;em&gt;don&apos;t write this code in the first place.&lt;/em&gt;
Using async APIs is not premature optimization, it&apos;s correct
design.

&lt;/p&gt;

    </description>
  </item>
  <item>
    <title> Embeddable languages</title>
    <link>http://log.ometer.com/2008-08.html#25</link>
    <pubDate>Mon, 25 Aug 2008 18:45 -0400</pubDate>
    <description>

&lt;p&gt;

&lt;a href=&quot;http://www.0xdeadbeef.com/weblog/?p=624&quot;&gt;Chris mentions
JavaScript embedding&lt;/a&gt; using &lt;a
href=&quot;http://developer.mozilla.org/en/JavaScript_C_Engine_Embedder%27s_Guide&quot;&gt;SpiderMonkey&lt;/a&gt;.

&lt;/p&gt;

&lt;p&gt;

When GNOME first started out, there was much talk of using Guile as an
embedded language. The concept was similar to the architecture of 
Emacs, Firefox, or &lt;a href=&quot;http://www.lua.org/uses.html&quot;&gt;all the
games using Lua&lt;/a&gt; (such as World of Warcraft).

&lt;/p&gt;

&lt;p&gt;

I would define an &quot;embedded&quot; language as one that &lt;em&gt;doesn&apos;t come
with a platform&lt;/em&gt;. It&apos;s small and easy to glue together with an app
written in C or C++. It uses the same platform as the app. If the
platform has an introspection capability like XPCOM or
GObject-Introspection, then the platform can be exported to the
embedded language in an automated way.

&lt;/p&gt;

&lt;p&gt;

At some point, and I was one of the people to blame for this, we
changed the focus of the Linux language discussion to grand unified
schemes involving component technologies and virtual machines. The
result is that too much desktop stuff is still written in C.

&lt;/p&gt;

&lt;p&gt;

A &quot;C/C++ core plus embeddable language&quot; architecture for an
application has many pragmatic advantages.

&lt;/p&gt;

&lt;ul&gt;

&lt;li&gt;
Higher layers of code such as UI code are &lt;em&gt;so much easier&lt;/em&gt; in a
dynamic &quot;scripting&quot; language.
&lt;/li&gt;

&lt;li&gt;
Proven to be practical and scalable for huge apps such as Firefox and
World of Warcraft, even with dead-simple languages such as JavaScript
and Lua.
&lt;/li&gt;

&lt;li&gt;No platform silos. In a GNOME app, the embeddable language uses
GIO, GTK+, GStreamer, Clutter, or whatever you are using - it does not
have its own http stack and everything else.
&lt;/li&gt;

&lt;li&gt;
You can choose to write each part of the app in the easiest language; 
some stuff is easier in C/C++.
&lt;/li&gt;

&lt;li&gt;

Sandboxable / well-modularized. The interpreter is generally an object
that can be destroyed; no heavy language runtime or VM takes over the
entire app.

&lt;/li&gt;

&lt;li&gt;
Embeddable languages don&apos;t seem to create a huge jump in memory
footprint, for whatever reason, so they are still sensible for
&quot;swarm of many processes&quot; environments like GNOME and KDE that
multiply any per-process overhead by a significant factor.
&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;

(There are advantages to the heavier full-platform languages also, but
I&apos;m guessing everyone knows them already so I won&apos;t make a list.)

&lt;/p&gt;

&lt;p&gt;

JavaScript is a great choice for an embedded language. I did not
realize at first that SpiderMonkey has no dependencies; it is not tied
up with the rest of the Mozilla platform (XPCOM, etc.), it&apos;s completely
standalone. And most programmers understand at least some JavaScript
already.

&lt;/p&gt;

&lt;p&gt;

There are some problems right now, for example there&apos;s no standard
packaging and .pc file for jsapi.h/libmozjs.so, so it&apos;s hard to make
an app build on multiple distributions unless you suck in an internal
copy of the library.

&lt;/p&gt;

&lt;p&gt;

It&apos;s necessary to add a couple things to JavaScript before it&apos;s
truly usable; most notably, some kind of module system. I&apos;m not sure
SpiderMonkey itself should have that though - it starts to
define a platform and make the language &quot;not embedded&quot;. Maybe modules
are introduced by higher layers (in fact xulrunner adds 
&lt;a href=&quot;http://developer.mozilla.org/en/Using_JavaScript_code_modules&quot;&gt;a
                module system&lt;/a&gt; if you use the whole xulrunner platform).

&lt;/p&gt;

&lt;p&gt;
I don&apos;t mean this as a SpiderMonkey advocacy post, though we&apos;re using
it successfully at work. Other options are the WebKit JavaScript
engine, Guile, Lua, Tcl, etc.
&lt;/p&gt;

&lt;p&gt;

My main point: the &quot;C/C++ core plus embedded scripting&quot; architecture
is a very smart way to write an app, and doesn&apos;t have some of the real
downsides of heavier platforms.

&lt;/p&gt;

    </description>
  </item>
  <item>
    <title> Return on Equity</title>
    <link>http://log.ometer.com/2008-08.html#3</link>
    <pubDate>Sun, 03 Aug 2008 14:45 -0400</pubDate>
    <description>

&lt;p&gt;

Most people know about the &lt;a
     href=&quot;http://en.wikipedia.org/wiki/P/E_ratio&quot;&gt;price/earnings
     ratio&lt;/a&gt;. If you want to learn one more thing about financial
 numbers, &lt;a
 href=&quot;http://en.wikipedia.org/wiki/Return_on_equity&quot;&gt;return on
  equity&lt;/a&gt; could be a good choice.

&lt;/p&gt;

&lt;p&gt;

Return on equity is annual profit divided by net worth. If you have
$100 in net worth, and make $10 in annual profit, then you are making
10% ROE. If you think you can make a 15% return elsewhere, you could
sell your assets to net $100 in cash, and invest in the 15% return
elsewhere.

&lt;/p&gt;

&lt;h3&gt;Reinvestment&lt;/h3&gt;

&lt;p&gt;

Depending on the nature of the business, maybe you can add more net
worth and make more profit. If you&apos;re making $10 on your $100 tied up,
maybe you can add another $100 and now make $20. Still 10% ROE, but
more money made.

&lt;/p&gt;

&lt;p&gt;

This is supposed to determine what companies do with their profits. If
they can reinvest into the business (or at least, some business) at a
decent ROE, then they should do so. But if they can&apos;t, they should be
paying the profits out as dividends their stockholders can invest
elsewhere.

&lt;/p&gt;

&lt;p&gt;
Say you propose a project for your company to undertake. The key
questions might be the return on equity, and how much equity can be
invested. (Making 500% returns on twenty bucks might not be very
interesting for a large company.)
&lt;/p&gt;

&lt;h3&gt;Where do earnings come from?&lt;/h3&gt;

&lt;p&gt;
Return on equity can be broken down to understand &lt;em&gt;why&lt;/em&gt; a
business activity is making money. An equation called the &lt;a
href=&quot;http://en.wikipedia.org/wiki/Du_Pont_analysis&quot;&gt;DuPont system&lt;/a&gt;
tries to do this.
&lt;/p&gt;

&lt;p&gt;
The DuPont system is:
&lt;pre&gt;
  ROE = 
    (Margin, how much of each sale is profit) x
    (Asset Turnover, how quickly inventory is sold) x
    (Financial Leverage, how much did we borrow)
&lt;/pre&gt;
&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Higher margin means more profit per dollar of stuff sold&lt;/li&gt;
&lt;li&gt;Higher asset turnover means selling stuff more quickly&lt;/li&gt;
&lt;li&gt;Higher financial leverage gives you more stuff to sell or more productive
assets for the same net worth - you&apos;re buying machinery or inventory
with a loan&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;
Different kinds of business make money in different ways, even in the
same industry. For example, some few-months-old numbers for Dell and
Apple (numbers don&apos;t quite add up due to rounding error; numbers are
from Morningstar):
&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Dell: 5% margin x 2.0 turnover x 4.4 leverage = 43.8% ROE&lt;/li&gt;
&lt;li&gt;Apple: 15.4% margin x 0.9 turnover x 1.8 leverage = 24.2% ROE&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;

Not surprising. Dell makes money by selling a lot of stuff quickly
for a low profit, using more borrowed money. Apple makes money by
selling more slowly, but for higher profits. Both are workable models,
neither one is wrong. Both companies are single-minded about their
approach; Dell has focused on increasing turnover rather than
increasing margin, and the opposite for Apple.

&lt;/p&gt;

&lt;p&gt;
Leverage is the most dangerous way to make money, because if the
margin flips negative the ROE goes negative. Banks make
their money on leverage, and they are supposed to be conservative about
ensuring the margin stays positive, for example by only making sound
loans to people who can pay them back.
&lt;/p&gt;

&lt;p&gt;
The worst kind of business is high leverage with a low, but unstable,
margin. Example (other than subprime lending): airlines. 
&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;American Airlines a few months ago: 2.2% margin x 0.8 turnover x 10.8 leverage = 19% ROE&lt;/li&gt;
&lt;li&gt;American Airlines now: -7.1% margin x 0.8 turnover * 17.42
leverage = -98% ROE&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;

Airlines are always about to go bankrupt. The margin depends on ticket
prices (which they can&apos;t raise very much without losing sales),
and fuel costs (which they don&apos;t control and which bounce around
wildly). They can&apos;t control the margin, and on top of that the margin
is low so requires high leverage to make the ROE worthwhile.

&lt;/p&gt;

&lt;p&gt;

Perhaps this explains why airlines are awful to customers. They can&apos;t
afford to spend any money.

&lt;/p&gt;

&lt;h3&gt;Applications&lt;/h3&gt;

&lt;p&gt;

Here&apos;s what a business activity should not be about: growing revenue
for its own sake. Often it&apos;s possible to grow revenue by reinvesting
in a business (say, hiring more salespeople, building more
manufacturing capacity, running ads) ... but the ROE may be too
low. If customers don&apos;t really want the increased sales enough to pay
for them, then margins are low or even negative. At that point it
would be better to invest in an index fund, or a savings account,
rather than in the business. &lt;em&gt;It doesn&apos;t make sense to spend a
bunch of money selling stuff people don&apos;t want.&lt;/em&gt;

&lt;/p&gt;

&lt;p&gt;

ROE determines what sort of price/earnings ratio is acceptable,
because (in theory) the earnings will be reinvested at the ROE.
If an investment pays 10% per year reinvested at 10%, that is worth a
lot more than 10% per year reinvested at 2%. So the stock price should
be higher relative to earnings.

&lt;/p&gt;

&lt;p&gt;
I find it helpful to flip price/earnings over (earnings yield). It
gives me much more pause to invest in something yielding 2% than
something with a P/E of 50. Higher P/E almost sounds good - it&apos;s
higher, right? Maybe this explains the tech bubble.
&lt;/p&gt;

&lt;p&gt;

Both ROE and P/E require all kinds of adjustments and normalizations
to remove accounting artifacts before they mean all that much. That&apos;s
one reason it&apos;s futile trying to buy stocks if you aren&apos;t a qualified
analyst (or relying on one).

&lt;/p&gt;

&lt;p&gt;

As concepts, though, these ratios should help you decide what makes
sense for the businesses you&apos;re involved with as an employee or owner.
Is your company more focused on turnover or on margin, for example?
Is your new project proposal profitable enough - would you &lt;em&gt;personally&lt;/em&gt;
invest in it instead of a mutual fund, if it were your money?

&lt;/p&gt;

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