You know what this blog needs? More power_set().
11/12/05 20:20 Filed in: Programming
| Ruby
As luck would have it, an email got sent out to our
coders list today asking about power set
functionality in java. I flippantly replied with my
implementation, saying that I was sure that the java
equivilent would be just as elegant.
A witty exchange of emails followed (the sort of thing that makes you love working at an engineering oriented company), and Jim made the point that all the offered implementations were horribly memory inefficient. He offered an iterator-based solution in java.
Well, I for one am not going to stand here and let our favorite little programming language have its name dragged through the mud. So here was the iterative-based solution I came up with:
A witty exchange of emails followed (the sort of thing that makes you love working at an engineering oriented company), and Jim made the point that all the offered implementations were horribly memory inefficient. He offered an iterator-based solution in java.
Well, I for one am not going to stand here and let our favorite little programming language have its name dragged through the mud. So here was the iterative-based solution I came up with:
|
power_set()
11/12/05 20:00 Filed in: Programming
| Ruby
Dynamic Languages
I gave a Ruby talk here at Guidewire a few weeks ago,
and it has been fun to see all the discussion that it
has generated. I don't think there is much chance of
us using Ruby in any serious way in our core
applications, but it could make inroads in the
periphery (support code, example integration
applications, etc.)
Despite how much I love Ruby, I'm still skeptical of how well it will perform in a large system. I just don't have experience with large, dynamically typed systems, and a lot of older engineers I respect shudder at the idea. Maybe the prevalence of unit-testing will change this (Martin Fowler seems to think so.) I guess we will have to wait and see how the Rails projects turn out to provide evidence one way or the other.
Despite how much I love Ruby, I'm still skeptical of how well it will perform in a large system. I just don't have experience with large, dynamically typed systems, and a lot of older engineers I respect shudder at the idea. Maybe the prevalence of unit-testing will change this (Martin Fowler seems to think so.) I guess we will have to wait and see how the Rails projects turn out to provide evidence one way or the other.
Testing and Change
14/10/05 20:24 Filed in: Programming
| Guidewire
Guidewire is an XP-ish shop, and one of the delights
of working there is the incredible test
infrastructure that they have set up. It has been
immensely educational to work with people who take
testing so seriously. Now that I have some first-hand
experience with this sort of an environment, I have a
few tentative observations:
* Test-first development is hard when a GUI layer is involved
* End-to-end tests are not worth the effort until you have a 1.0 product. And perhaps they aren't even worth the effort until you have a 2.0 product, where certain application paths have been established and need to be maintained.
* Unit testing can get really nasty when there are elaborate dependencies between classes
o It is very hard to keep dependencies low. It requires effort at every step. If you aren't constantly watching it, you will introduce them.
* A flexible sample data and configuration generation platform is crucial for a good test environment
* If tests aren't easy to write, they won't get written or they will be written poorly
* Test-first development is hard when a GUI layer is involved
* End-to-end tests are not worth the effort until you have a 1.0 product. And perhaps they aren't even worth the effort until you have a 2.0 product, where certain application paths have been established and need to be maintained.
* Unit testing can get really nasty when there are elaborate dependencies between classes
o It is very hard to keep dependencies low. It requires effort at every step. If you aren't constantly watching it, you will introduce them.
* A flexible sample data and configuration generation platform is crucial for a good test environment
* If tests aren't easy to write, they won't get written or they will be written poorly
I would like to take a moment
05/06/05 20:27
From feverishly studying for finals to relate that
Cold Play sucks.
Badly.
I mean, I want to stab myself in the eye when I hear them. Actually, I want to stab them in the eye when I hear them.
Awful, whiney, passive-agressive (strike that, just passive) eurotrash sissy pop-rock, and everyone seems to think they are the second coming of the Beatles.
Ahem. That is all.
Badly.
I mean, I want to stab myself in the eye when I hear them. Actually, I want to stab them in the eye when I hear them.
Awful, whiney, passive-agressive (strike that, just passive) eurotrash sissy pop-rock, and everyone seems to think they are the second coming of the Beatles.
Ahem. That is all.
I would like to take a moment
01/06/05 20:28
From feverishly studying for finals to relate that
Tom Cruise is f**king nuts:
http://tinyurl.com/dl8gu
That is all.
http://tinyurl.com/dl8gu
That is all.
60%
15/04/05 20:30 Filed in: Housing
Insanity
Over sixty percent of San Francisco homes bought last
year were purchased with interest-only loans:
http://www.sfgate.com/cgi-bin/article.cgi?f=/c/a/2005/04/15/HOMES.TMP quote:
"Economists worry, however, that the second part of Gabriel's adage may apply to uber-expensive markets like the Bay Area. Specifically, they cite the large percentage of risky interest-only loans in the market -- 62 percent of total loans in San Francisco last year, according to market researcher LoanPerformance."
Lunacy. Stark, utter lunacy.
http://www.sfgate.com/cgi-bin/article.cgi?f=/c/a/2005/04/15/HOMES.TMP quote:
"Economists worry, however, that the second part of Gabriel's adage may apply to uber-expensive markets like the Bay Area. Specifically, they cite the large percentage of risky interest-only loans in the market -- 62 percent of total loans in San Francisco last year, according to market researcher LoanPerformance."
Lunacy. Stark, utter lunacy.
Millin Landcruiser
30/03/05 20:31 Filed in: Landcruisers
In keeping with my general obsession with
retro-SUV's, I dug this http://www.rodmillen.com/Lcruiser.htm
up today. Oh, man, if Toyota had the balls to produce
this.
It is essentially an old FJ45 body hacked up and stretched over a current Landcruiser/Tundra frame. Note the flat top and large amounts of flat glass for visibility. Note the absence of any plastic or fiberglass. The back is good, if uneventful. I might have gone with a split-back swing out and suicide seats in the back. The side is good, although the set of four creases beneath the larger indentation seem fussy and unnecessary to me. Overall, the impression is "Truck", not "space egg".
I'd buy one of these in a heartbeat. Unfortunately, the price is apparently $350,000, a bit steep for me. So my options are either to wait for the FJ Cruiser, which I'm still ambivalent about, or buy an old FJ40 or FJ55, which, restored, cost at least 35K. Not an easy decision.
It is essentially an old FJ45 body hacked up and stretched over a current Landcruiser/Tundra frame. Note the flat top and large amounts of flat glass for visibility. Note the absence of any plastic or fiberglass. The back is good, if uneventful. I might have gone with a split-back swing out and suicide seats in the back. The side is good, although the set of four creases beneath the larger indentation seem fussy and unnecessary to me. Overall, the impression is "Truck", not "space egg".
I'd buy one of these in a heartbeat. Unfortunately, the price is apparently $350,000, a bit steep for me. So my options are either to wait for the FJ Cruiser, which I'm still ambivalent about, or buy an old FJ40 or FJ55, which, restored, cost at least 35K. Not an easy decision.
More Housing Bubble Ranting
29/03/05 20:32 Filed in: Housing
Insanity
What's
infuriating about the current absurd housing
bubble is that all of us will be responsible for
bailing it out when everything goes pear-shaped. The
mortgage market has gotten "too big to fail" and all
the major players fully expect the Federal Government
(read: us, the taxpayers) to bail them out, as with
the S&L crisis.
It is lunacy that someone who avoids the run-up, saves diligently and does sane, if rudimentary, financial analysis will end up as much on the hook as the people over-extending themselves with interest only loans to squeeze into a 1m+ two bedroom, or, worse, flipping their way to unearned wealth.
But then, one must constantly remind oneself, life isn't fair.
It is lunacy that someone who avoids the run-up, saves diligently and does sane, if rudimentary, financial analysis will end up as much on the hook as the people over-extending themselves with interest only loans to squeeze into a 1m+ two bedroom, or, worse, flipping their way to unearned wealth.
But then, one must constantly remind oneself, life isn't fair.
Why *their* programming language is cooler than *my* programming language
04/03/05 20:35 Filed in: Programming
Some haskell code that makes me cry:
Holy. Crap. Too bad I had to get a masters in CS to understand what the hell is going on here.
: /
--Good ol' quicksort
quicksort [] =[]
quicksort(x:xs) = quicksort[ y | y <- xs, y < x]
++ [x]
++ quicksort[ y | y <- xs, y >= x]
--The list of the Fibonacci numbers
fib = 1 : 1 : [a+b| (a,b) <- zip fib (tail fib)]
Holy. Crap. Too bad I had to get a masters in CS to understand what the hell is going on here.
: /
The Housing Bubble, or Why I Will Never Be Able To Afford a Home
03/02/05 20:36 Filed in: Housing
Insanity
I have been beating the
housing-bubble drum for, ahem, upwards of four years
now. I'm a strong believer in "common sense"
economics: I didn't buy the internet hype in the late
90's (although I had a few "maybe I'm wrong"
moments), and similarly I don't believe the "its a
different housing market" arguments now. At some
level, housing prices must be tied to incomes.
Clearly that relationship has become unhinged. It's
my opinion that the reason that it has become
unhinged because of historically low interest rates
and the fact that people have moved into increasingly
leveraged mortgages. Also lurking in the background
is my favorite quasi-federal bugaboo: Fannie Mae.
Mortgage backed securities have leveraged the
perceived stability of housing mortgages into a
lucrative securities market which seems Federally
backed. This market has the unfortunate effect of
reducing or outright eliminating incentives to
lenders to find qualified borrowers: if you are just
going to sell the mortgage off as a security, who
cares?
There is a secondary issue as well: at a fundamental economic level, I believe that economic progress is made when people produce things that other people desire. (Of course I think this. I'm an engineer.) Money generated from housing appreciation doesn't really contribute to the overall economy. Rather it works as an inflationary wealth transfer from non-home owners to home owners. In the long run (and in the long run my children are very alive, Mr. Keynes), it is the production of goods that creates a wealthy society, not the trading of those goods.
At this point in the game, regardless of if I'm right (Ed: seems unlikely) or wrong, it has gotten to the point that my financial calculations show a clear financial advantage to renting, on the order of tens of thousands of dollars a year, before one takes into account the convenience of not having to care for a property. Lunacy. The only way to win this game is... not to play.
UPDATE: Well, someone agrees with me.
There is a secondary issue as well: at a fundamental economic level, I believe that economic progress is made when people produce things that other people desire. (Of course I think this. I'm an engineer.) Money generated from housing appreciation doesn't really contribute to the overall economy. Rather it works as an inflationary wealth transfer from non-home owners to home owners. In the long run (and in the long run my children are very alive, Mr. Keynes), it is the production of goods that creates a wealthy society, not the trading of those goods.
At this point in the game, regardless of if I'm right (Ed: seems unlikely) or wrong, it has gotten to the point that my financial calculations show a clear financial advantage to renting, on the order of tens of thousands of dollars a year, before one takes into account the convenience of not having to care for a property. Lunacy. The only way to win this game is... not to play.
UPDATE: Well, someone agrees with me.