Archive for January, 2009

Very Good Explanation of the basis of the Mortgage Crisis

No Comments »

Do you find yourself a bit confused about how we got into this mess; loaning money to people that couldn’t pay the loan back, every sort of crazy behavior, etc.? The Predictably Irrational blog has a reference to this program on This American Life . I don’t know that it’s possible to make it easy to follow, but this show does a very god job of laying out the history in a way that you can see how we got here. I haven’t exactly been scouring the ‘net looking for the best explanation. But I did find this to be well worth the investment of time, and very enlightening.
Of Course, it still leaves open the question of what should have been done to prevent the situation. Maybe even more interestingly to me, who should be taking the investment beating for risky investments. I am inclined to say that the people that ultimately bought the risk just need to accept the loss (and still think there is legitimacy to that idea). It even makes some sense that, if you took out a loan you couldn’t afford to repay, you deserve foreclosure. Obviously, though, not everyone that’s “caught” did anything that was clearly stupid at the time. I think the show even does a pretty decent job of explaining the dilemma of trying to square things away now.


Think you’re pretty observant?

No Comments »

As I mentioned in my previous post.  I’m fascinated by those natural tendencies we have that lead us to miss things, and more particularly how “confident” we are that we don’t have these failings.  Most people think they’re very observant, and if they pay close enough attention, you can’t put anything over on them.

Pay close attention to this video.  Did you catch the trick?  🙂


Predictably Irrational

No Comments »

Predictably Irrational - Dan Ariely

Predictably Irrational - Dan Ariely

I just finished reading Predictably Irrational by Dan Ariely.  You can find an  outline here.

Over the past few years, it has been quite enlightening to read a number of books that speak to ways in which things we might naturally tend to think are true, simply are not.  It’s particularly interesting to see how we have these very strong tendencies to see things in a distorted fashion.  Seeing patterns that aren’t there, thinking we know what will make us happy, all manner of things we tend to believe that, upon investigation, are demonstrably untrue.  One of those things we believe is that we are rational beings, and that we will behave rationally.

Dan Ariely addresses this in the arena of economics.  Economists are very fond of mathematically trying to work out the optimal balance of the market, and of assuming that with transparency, people will behave optimally in their best interest.  Want to know how to price something?  The more you charge, the fewer people will buy your product, but the more you’ll make on each sale.  The less you charge, the less profit on each sale.  So some pretty straight forward mathematics can find the point that optimizes your total profit, and you have your perfect price.  Perfect right… well experiments show a much different picture.  Dan covers some of those in this book.  Turns out we’re just not so rational.   Funny though, it’s repeatable, and, as a result, predictable.  Making us predictably irrational.

The book contains chapter after chapter of details from experiments Dan and his colleagues have performed to see how we actuallly behave.  It’s fascinating stuff and reads very quickly.  It reminded me a lot of Freakonomics, as well as some of Michael Shermer’s book like Why People Believe Strange Things.


A good day to remember

No Comments »

My yougest son ran his first half-marathon today.  He’s 16 and ran cross-country this past year, so bumping it up from 3.1 miles to 13.1 miles was a real stretch.

He came down sick a couple of weeks ago and missed his longest training run, and I came down sick last Saturday and was laid up for about half the week.  It settled into my chest and I can’t quite get past the chest congestion that’s not letting me get a good breathe.  So, you can imagine, we were quite the pair.  We didn’t exactly set out with the highest expectations.  Honestly, I figured I’d just pace him through the first few miles and then have to drop out since I couldn’t breathe well.  We finally settled into a pace that didn’t exactly give us a time to brag about, but, given that I spent Wednesday in bed, and he hadn’t really had time to build back up from being sick, I’ll say we did pretty good.

Christopher had some struggles, but muscled his way through and finished.  That’s the farthest he’s ever run, and to say I was proud, just doesn’t cover it.

Ran a half-marathon with my son… does it get better than that ?  🙂


Off beat comic strip

No Comments »

I found a pointer to this site yesterday (darn, forgot what blog pointed me to it). I’ve spent way too much time going through reading the history.

If you appreciate this:

Binary Sudoku

Binary Sudoku

or comics that riff on math or quantum mechanics, or…, well it funnier than it sounds. OK, if that doesn’t seem possible to you, then it’s probably not for you.

I like it.


More Joel on Software

No Comments »

Well, shame on me. A co-worker, whose opinion I trust, recommended Joel on Software some time ago. I was aware of his blog, and read a post or two. But, I never got around to reading the book. I saw More Joel on Software and decided to add it to my reading stack.

I just finished it, and must say that if you’re involved in software development, you really ought to read Joel on Software (both books, and follow the blog). This is full of no-nonsense, throw out the common wisdom, good information. Highly Recommended.

Really strange side note…. This is the second book I’ve read since The Black Swan. And both books mentioned Nassim Taleb and The Black Swan idea. That wasn’t so much a surprise in Simplexity, but Caught me a bit off guard in More Joel on Software.


IMAP Purge revisited

No Comments »

I noticed, looking at the logs this morning, that the previous script bombs if you delete a mail folder without removing it from your yaml configuration. So, here’s a new and (slightly) improved version

Along with handling the exception, it now creates and appends to a log file per month (instead of creating one each day which proved a bit “messy”).

#!/usr/bin/ruby
require 'net/imap'
require 'date'
require 'yaml'

Config = Struct.new(:imapServer, :userid, :password, :purgePeriods)

root = File.dirname($0) +File::SEPARATOR
t = Date.today
$stderr = $stdout = File.new(root+"cleanup_#{t.year}_#{t.month}.log",'a')
config = YAML.load_file(root+'mailClean.yaml')

imap = Net::IMAP.new(config.imapServer)
imap.login(config.userid,config.password)

puts "================n================"
puts "executing : #{Time.now}"
puts "================n================"
config.purgePeriods.each do |mailbox,days|
  pDate = Date.today - days
  delCount = 0
  puts "====(#{mailbox}:purge before #{pDate})===="
  begin
    imap.select(mailbox)
    msns = imap.search(['NOT','NEW'],'US-ASCII')
    threads = {}
    sl = msns.slice!(0..200)
    while (sl.length>1)
      sl = [sl] if sl.class == 'Fixnum'
      data = imap.fetch(sl,['ENVELOPE'])
      data.each do |d|
        env = d.attr['ENVELOPE']
        next unless env.date
        subject =  env.subject || ''
        threadSubject = subject.sub(/^Re:s*/i,'')
        dt = Date.parse(env.date)
        if threads[threadSubject]
          t = threads[threadSubject]
          t[:latest] = dt if dt > t[:latest]
          t[:msns] << d.seqno
        else
          threads[threadSubject] = {:latest => dt,:msns =>[d.seqno]}
        end
      end
      sl = msns.slice!(0..200)
    end
    threads.each do |key,val|
      if val[:latest] < pDate
        puts "#{key} == #{val[:latest]} #{val[:msns].inspect}n"
        delCount += val[:msns].length
        imap.store(val[:msns],'+FLAGS',[:Deleted])
      end
    end
    puts "deleted #{delCount} messagesn"
    imap.expunge
  rescue
    puts "Error Encountered!:#{$!}"
  end
end

imap.logout

Edit translation
Machine translation (Google):
Loading...
Copy to editor
or Cancel