"I have a mind like a steel... uh... thingy." Patrick Logan's weblog.

Search This Blog

Thursday, August 23, 2007

US News and World Report

A good essay by Mort Zuckerman...

No one knows the true value of all that residential real estate at the base of the pyramid in which mortgages back up the collateral debt obligations that in turn back up the short-term loans that many banks and hedge funds have made to finance these CDOs. A recent review of would-be homeowners is hardly encouraging. Almost all exaggerated their incomes to win approval, and almost 60 percent inflated their incomes by more than 50 percent. Too many home loans did not require any down payment, principal repayment, or documentation...

With home prices falling rather than rising, refinancing is impossible for borrowers who fall behind. Defaults have accelerated. As one pioneer in the bundling of mortgages into marketable securities put it, "We're not really sure what the guy's income is, and...we're not sure what the house is worth."...

Many pension funds, insurance companies, hedge funds, and banks hold swaps and subprime derivatives but have not yet reported their losses, or at least not all of their losses, making it difficult to understand how big their exposure is. They are having difficulties determining the value of assets, making them impossible to sell, i.e., illiquid. The danger is that a liquidity crisis will drive financial institutions into insolvency, which could have a major impact on the economy.

The central banks have seen the threat. The European Central Bank has put up $212 billion "to assure orderly conditions in the euro money market." It's an amount so staggering that it perversely led the markets to fear that the ECB knows something that would indicate the situation is worse than it seems. The Federal Reserve similarly stated that it would provide "reserves as necessary." The concern is that the market has such anxiety about all debts, up and down the food chain, that no one will wish to buy them. Put it the other way: Fewer and fewer lenders are ready to lend. Many were going to sell high-yield bonds to finance their growth; they have had to withdraw them. In July, the issuance of these bonds dropped about 90 percent from June to a mere $2.4 billion. Even high-quality investment-grade bond offerings from companies with excellent credit fell from $109 billion in June to only $30 billion in July.

Wednesday, August 22, 2007

JSON Security

Interesting posts and comments on json and security in browsers: robubu and resig. Boils down to: "browser security pretty much sucks no matter what" and "if your json parser relies on eval(), you are a fool, no matter how fast it is".

As Patrick Mueller commented...

Approach 2 and 3 should, simply, NEVER, EVER, EVER be used. There are plenty of libraries available today to parse JSON data structures, and none of them will EVER, EVER be able to read the whacked out Approach 2 and 3 styles. EVER.

Data, baby, data!

JSON is data. There is no way any bit of it should ever be treated as code. Some day browsers will become real platforms for applications and we will laugh at all this.

That seems a long way off.

What a difference a day makes

On August 16...

William Poole, president of the St. Louis Federal Reserve Bank, told Bloomberg News in an interview that the subprime mortgage rout doesn't threaten U.S. economic growth, and only a "calamity" would justify an interest-rate cut now.
And the next day...
The Fed just issued a strange press release and a special announcement lowering the discount window borrowing rate by 50bp, to 5.75%. The more widely followed Federal Funds rate is unchanged at 5.25%...

This would be a reversal of policy from just 10 days ago.

The special announcement is the bigger news. Not only did they cut the rate, but they've increased the borrowing time to 30 days and have increased what they will accept as collateral. All importantly, they are accepting home mortgages and related assets.

Nothing to see over here. Just go on about your day. Move along.

This is fascinating stuff. Poor Ben Bernanke following in Greenspan's shoes. This from Greenspan back a few years...

Alan Greenspan was a study in contradiction. On Monday, he extolled the virtues of the levered-up homeowner to a credit union conference. The next day, in a speech to the Senate Banking Committee, he was singing a different tune altogether. Fannie Mae and Freddie Mac, the giant providers of mortgage capital, he warned, "are expanding at a pace beyond that consistent with systemic safety," and that "preventative actions are required sooner, rather than later."

For a Federal Reserve chairman who has demonstrated that he couldn't identify reckless behavior if it ran him over, it was rather surprising to hear him chide Fannie and Freddie for their recklessness.

Greenspan's latest comments reminded me of a speech he gave on March 6, 2000, which I have dubbed "An Ode to Technology." In the speech, he waxed on about the wonders of technology and how it had brought us a new era and all that other stuff. Folks may not remember that date, but it was four days before the Nasdaq Composite hit its all-time high of 5,048.62. Despite the recovery over the past year ago, the composite is still down nearly 60% from the March 2000 peak.

One-a-days

Via Steve Dekorte, mortgage lenders in August so far are failing at an average of one per day...

Again the question is raised, who will be refinancing the trillion dollars of mortgage resets over the next year?
Also...
...approximately $500 billion of adjustable rate mortgages are scheduled to reset skyward in 2007 by an average of over 200 basis points. 2008 holds even more surprises with nearly $700 billion ARMS subject to reset, nearly 3/4 of which are subprimes.
Ah, it'll blow over. ;-/

Pushy And Stuff

Dan Creswell has a nicely done discussion on that whole push/pull thing.

Rather than focus solely on either approach in isolation, I think the best solution is to use a combination. This has a couple of advantages:

  1. Clients can potentially use whichever method is more appropriate for them.
  2. It provides significant opportunity for fine tuning.
  3. It provides a nice simple recovery model.
  4. Responsibility is balanced throughout the system keeping complexity down.
For some kinds of information, just providing "pull" could be sufficient. For others, "push" may be preferred, but as Dan (and Bill, previously) explained, having that available to be pulled as well pays off.

Tuesday, August 21, 2007

Polling and/or Pushing

Dan Creswell writes in his bookmark notes (so what do I link to?)...

Polling is indeed nice and simple but it also has it's problems - how often to poll, resource consumption etc all of which the average enterprise finds offensive - probably why they'd rather do push even though it adds complexity.
Which is why I'm glad all those smart people worked on http and atom (links to the usual suspects omitted). For most cases, maybe it comes down to starting like this (related posts: Bill, Mike)...
  • Follow those specs (http, atom format, atompub) as far as they take you, i.e. when the customer can afford to obey the rules of polling, aggregating, etc.
  • When the customer has a need to know more immediately, or has a need to know many intermittent things without always knowing whom to poll, then use atom entries over xmpp.
Straying from that only under exeptional conditions.

The "Ease" Argument Again?

Dan Diephouse argues...

Making an RPC application is much easier. This is one of the killer features of SOAP/WSDL. I can take my business service and build a web service out of it with very little effort (I assert that there are non-evil ways to do this, but thats another story). I can then be interoperating with a .NET application in just a minute or two. Or I can take a WSDL, generate a set of objects, and just write some glue code between my internal objects and the web service objects.
Sigh. Again with the "ease" argument. There're enough counterarguments to the false sense of security provided by "easy tooling". Heck, I don't even see the dotnet people making that case any longer. (Admittedly, since I work with zero dotnet programmers these days, I don't have to watch those lists.)

Designing with HTTP and related standards is something everyone should be studying right now, even if they're not taking it into production. This will get easier, even with Java, and the results will pay dividends way beyond what the current IDE "tooling" provides for "easy RPC".

If not, I still may have that Word document an SAP consultant sent me, telling me how to hand-edit a WSDL to get SAP's SOAP to interoperate with other SOAPs in Java and dotnet. That may make things *easier* for you.

...and I'm done.

Monday, August 20, 2007

Our Viking Blogger

For some reason he thought he could quietly blog away in some other corner of the internets, but fuzzy found him. Our co-worker Erik has a blog. He's been working with some folks on using Flex and Rails.

Friday, August 17, 2007

Secret Sauce

Sam Ruby writes...

The “secret sauce” is pattern matching. Things like “if these conditions are met, this code fires, with the following variables set”. With Erlang, this metaphor is everywhere. Function calls are an exercise in pattern matching. Database queries are an exercise in pattern matching. Message passing is... oh, you get the idea.
I would suggest pattern matching is 1/3 of the secret sauce. The other two parts being...
  • Implicit mailbox per process with pattern-based rather than solely chronological reception.
  • Fail fast without failure coding. Function and case patterns and guards define the *success* cases. Failures to match by default result in failing the process.
I'll expand on these at some point. They are significant features not found in most popular languages, and all three combine to reinforce each other.

Shoot for Five

Sam Ruby on the future of "messaging"...

Ten years from now, we will be using SMS text messages to change the channel on the televison...

Remember all of those incompatible protocols I mentioned above? You know what happened to them?

Well, somebody had a bright idea to define an inter-networking protocol (they called it “internet” for short) that could be used as a gateway between these local area networks. Eventually, people stopped using the often proprietary LAN protocols in favor of directly connecting into the internet protocol itself.

Ain’t it funny how that worked out?

Enterprisey Edits On Wikipedia

Went to wikipedia to view the page on "Enterprisey". Got redirected to the page on "Enterprise software". Huh?

Looked at the change log for "Enterprisey". Damn. A couple of back and forths, and the current result appears to me to be rather, well, "Enterprisey". Here's what's on *that* page. At the top...

Enterprise Software is software that solves an enterprise problem (rather than a departmental problem) and usually enterprise software is written using Enterprise Software Architecture. Due to the cost of building what is often proprietary software only large organizations attempt to build software that models the entire business enterprise and is the core system of governing the enterprise and the core of business communications within the enterprise.
I'm not sure why the term "solves" is not in quotes there.

And at the bottom...

Some enterprise software vendors using the latter definition develop highly complex products that are often overkill for smaller organizations, and the application of these can be a very frustrating task. Thus, sometimes "enterprise" might be used sarcastically to mean overly complex software. The adjective "enterprisey"[citation needed] is sometimes used to make such sarcasm explicit.
Relegating the wonderful term "Enterprisey" to the bottom of a rather staid page like "Enterprise software" is just not right. But claiming that "enterprisey" merely implies "overkill" is blasphemy.

Forever, the term "Enterprisey" will mean this... (animation). As in, "It's enterprisey!"

I took a pass at editing the explanation of "enterprisey" on the "Enterprise software" page. Please take it and run with it.

I wonder who's been editing these pages. Back to the logs and do some searching.

Thursday, August 16, 2007

Dunno

Brit Butler left a good comment in a recent post...

I've watched this video and also read the slides from Sweeney's POPL presentation. Sweeney basically comes out on the side of Transaction Memory without saying much about the message passing model (though he later goes in to detail on LtU). I think TM is ugly, regardless of what Simon Peyton-Jones or Sweeney says. They're smart people but it seems like an ugly hack of a system. It is the maintenance of a style that is begging for deprecation. I'd kind of hate to see us save it. All the same, their intelligence makes me wonder if message-passing really can't scale to Sweeney's needs. What are your thoughts on where some shared state is necessary? Is that handled well in Erlang? Do Sweeney and Peyton-Jones arguments really hold weight? Is it just a "right tool for the job" kind of thing?
The best anyone can say about STM is the jury is still out. All I can say for sure is it is not my cup of tea for the systems I've been involved with over the last 25+ years, which are actually fairly wide ranging.

SPJ, et al. are *extremely* smart and capable people, far more than I am, so I have to give them some leaway, and perhaps I will be swayed toward STM for some reason currently beyond my line of sight. I admire nearly everything else about Haskell and GHC other than STM.

An irony for me, as for the "right tool for the job" argument is this:

I can see someone making the argument in some domain I don't usually work in that shared memory threads are better than shared nothing message passing for performance reasons. Some hard-real time scenario (I think I was real tired when I wrote that. Must have been thinking back to the days when I'd get into "Is automatic garbage collection practical?" debates. Nobody has those anymore, do they? Because I've got some real good arguments for GC.), some huge number crunching scenario, etc. where every byte and every cycle has to count in the extreme. But the irony then is that STM seems far more suited to a language like Haskell, which is also unlikely to be suited for these performance scenarios.

My only fear is that for the masses including myself, we need *simple* mechanisms, and the fewer of those, the better. Shared nothing messages seem to scale up, out, and down. STM seems more complicated, and an incomplete solution, and only a solution for shared memory. No thanks, at least until bigger brains than my own can show me why I should change my mind. They seem sidetracked on this one.

Good To Be The King(s)

Steve Dekorte's been tracking the credit fiasco with a number of good articles. And notes on the multi-billions of bailouts so far...

AFAICS, the net result is a transfer of wealth from the people who's dollars are devalued by the creation of money from such purchases to the lenders in the banking industry whose greed induced them to make poor decisions. The Fed was created and is run by bankers, so it shouldn't come as a surprise that it's principle purpose it to serve their interests at the expense of all others.

Andre Pang Video On Concurrent Programming And Games, Etc.

A nice video of Andre Pang on games, multi-cores, and, wait for it... erlang...

The more your computing environment resembles a game, the more cores/nodes/concurrency/networks you will need just to feed your little (shared) corner of the world.

Wednesday, August 15, 2007

The Well

From today's NYT Business Day. The papers by and large are worried about toys from China, and, oh, there is that war in the Middle East. But the most interesting story (assuming Bush is not going to call an end the war) is the credit crunch...

Turmoil in the subprime mortgage market spread again yesterday — this time to a type of short-term security held by money market mutual funds. These funds have become the investment of choice for many people seeking a safe haven...

The amount of commercial paper in the United States has grown to $2.2 trillion, according to Lehman Brothers, with about $1.2 trillion backed by residential mortgages, credit card receivables, car loans and other bonds. The major buyers include pension funds, insurance companies, hedge funds and short-term money market funds...

Until recently, the crisis in the credit markets has been limited to problems related to subprime mortgages, those given to borrowers with questionable credit histories. But as these troubles seep into other parts of the securities markets, fears of losses are rising in unexpected places...

“If the stigma of mortgage-related extendable-asset-backed commercial paper spreads to asset-backed commercial paper as a whole, you could see bailout events,” said Peter G. Crane, president of Crane Data, the publisher of a newsletter about money market mutual funds. But he added: “The stuff that the money funds are invested in are the highest quality, so it’s the last thing to have trouble.”

However, the investment strategies that once were considered conservative no longer are.

This could get a bit messier. "Bailout events".

Elsewhere in the same paper...

In a weary voice, Mr. Fanlo noted that executives from Kohlberg Kravis Roberts, including Henry Kravis and George Roberts, had been working closely with him to get through the “unprecedented” conditions the company faced.

He said he had been through numerous financial crises “and this is the most disturbing liquidity crisis, with real impact throughout the economy if it does not rectify.”...

Countrywide and most other mortgage lenders rely heavily on borrowing from banks, brokerage firms and bond investors to make loans that they quickly turn around and sell to investors through mortgage securities. In his report, Mr. Bruce said he had previously underestimated the risks to Countrywide.

“If enough financial pressure is placed on CFC or if the market loses confidence in its ability to function properly then the model can break, leading to an effective insolvency,” Mr. Bruce said in his note, referring to the company by its stock ticker symbol. “If liquidations do occur in a weak market, then it is possible for CFC to go bankrupt.”...

One analyst suggested that the market would not recover until more funds and banks detailed their exposures to mortgage securities and other debt acquired during the recent credit boom.

“The more funds that come to confession the better it is,” said Douglas M. Peta, chief market strategist at J. W. Seligman & Company. “Once all this stuff is out, all the analysts and the people with the sharp pencils can figure out how bad it is and they can put prices to it.”

Oh, right: people rushing to announce their rating is bad. We see that all the time.

Winterp

After EZDraw, another cool (weird?) GUI programming tool in the early 1990s was Winterp, an xlisp-based toolkit. Lots of weird stuff back then...

WINTERP uses a small, fast, object-oriented mini-Lisp interpreter based on XLISP-PLUS (David Betz, Tom Almy, Luke Tierney, et al), and has an object oriented interface to the OSF/Motif widget class hierarchy, and a combination of high-level object and functional interfaces to the Xtoolkit, Xlib, and underlying Unix system libraries. This environment significantly simplifies the construction of GUI-based applications, and makes these applications easier to modify and extend throughout the software life-cycle. It allows for the development of extensible applications in a safe execution environment -- errors in a new module won't destroy the whole system.

Don't Fidget With Widgets, Draw!

The best thing I came across, between MCV in the 1980s and the web in the 1990s was Joel Bartlett's Scheme library (for his fantastic Scheme->C system, oh, that was something) called EZDraw...

This report describes a graphics server, ezd, that sits between an application program and the X server and allows both existing and new programs easy access to structured graphics. Programs may draw, edit, and sense user events in terms of application-defined graphical objects. When run on workstations with 10 MIPS or faster processors, interactive response is excellent, indicating that ezd’s simple structured graphics drawing model can be widely applied. The enthusiastic response of ezd’s initial users and the variety of uses to which they have put it to suggest that there is a tremendous pent-up urge to draw with programs and that ezd has lowered the barriers to doing so.
Here's an image of an application using EZDraw to draw map graphics and display weather information from the location clicked on the map. A "mashup" in its day, I suppose...

5.3. Weather Forecasts

National Weather Service forecasts for the United States are sometimes available for network access. The ezd application shown in Figure 6 was constructed to fetch such forecasts for the contiguous 48 states. The mouse-sensitive diamonds on the map identify cities that issue forecasts. When the mouse is positioned over a diamond, text describing the region covered by the forecast is displayed. When the mouse is clicked on a diamond, the forecast is obtained via the network and displayed in the text area at the bottom of the window. The text is scrolled using the scroll bar on the left of the text. The mouse can be used to select areas of text for copying into other X applications. The radio buttons DISC, ZONE, WARN, and EXTEND select the type of forecast, the HELP push button replaces the forecast text with help text, and the QUIT push button terminates the application.

Every graphical element of this application, a 300 line Scheme program running entirely in the ezd server, is constructed using ezd. The text area, slider, check buttons, and push buttons are drawn with a library of interactors that use the basic ezd drawing capabilities. A simple ezdbased drawing tool was used to collect the 133 line segments and 50 city locations defining the the map by tracing a newspaper weather map (copied onto a transparency and taped over the display) and then positioning the cities on it.

The application graphics are automatically positioned based upon the size of the window. This is done by grouping the graphics into three drawings: one containing the map, one containing the buttons, and one containing the text area and slider. When the window is initially created or resized, the drawings are overlayed onto the window by centering the map at the top of the window, attaching the buttons to the right side of the window, and using the rest of the window below the buttons for the text area. Even though ezd does no automatic window layout, explicit layout requires only 5 ezd commands, generated by a 22 line Scheme procedure.

"National Weather Service forecasts for the United States are sometimes available for network access." How about that!

Weird Patterns

James Robertson relays someone's notion that MVC may have held back Smalltalk adoption early on. That's taking a modern perspective on a problem that did not exist back in the day.

I don't remember anyone complaining about MVC programming in Smalltalk in my circles in the mid-to-late 1980s. That was just how to program Smalltalk, and it was better than most of the other graphics libraries we had at hand on workstations. And MVC was no more weird than Flavors on Lisp Machines.

I do remember a paper by Ward Cuningham we got a hold of, marked "draft, do not circulate" (but we did, a lot). I've never found a published version of it. I've got the hard copy somewhere -- I should scan it in. Maybe Ward's got the original.

That paper explained the MVC objects with a simple, little wire list drawing application. Hmm... it's in one of two file cabinets, I'm sure.

Aaaaaanyway... the point is back then there were few if any preconceptions about anything, and not a lot of choice: mostly you built everything yourself. Only Smalltalk and Lisp had much to offer, prebuilt.

And programming in Smalltalk or Lisp was just heaven compared to when we had to drop down and do anything else. There were not many things to compare MVC *to*, in order to have any perspective that it may be "weird" or "too complicated". It just wasn't, and is still preferable to 87 percent of everything else.

Weird Jobs

Dominique Boucher on programming jobs in Montreal, but I would suppose the same is true in a handful of North American cities...

Great programmers are not looking for jobs. They already have one. And they don't want to switch from one Java job to another, unless they are dissatisfied with other aspects of their job. But a fraction of them would easily consider another job if it involved Scheme, Lisp or Erlang programming (or other non-mainstream languages like OCaml, Prolog, Haskell, etc.).

So I claim that it is easier to recruit Scheme, Lisp, or Erlang programmers, even in Montreal, than Java/C# programmers.

Programming Collective Intelligence

This new book on Programming Collective Intelligence looks really interesting. I missed the author's session at OSCON few weeks back. Here's the presentation in pdf.

Anyway...

Toby Segaran's new book, Programming Collective Intelligence, teaches algorithms and techniques for extracting meaning from data, including user data. This is the programmer's toolbox for Web 2.0. It's no longer enough to know how to build a database-backed web site. If you want to succeed, you need to know how to mine the data that users are adding, both explicitly and as a side-effect of their activity on your site.

There's been a lot written about Web 2.0 since we first coined the term in 2004, but in many ways, Toby's book is the first practical guide to programming Web 2.0 applications.

Get your map/reduce going. ;-/

Blog Archive

About Me

Portland, Oregon, United States
I'm usually writing from my favorite location on the planet, the pacific northwest of the u.s. I write for myself only and unless otherwise specified my posts here should not be taken as representing an official position of my employer. Contact me at my gee mail account, username patrickdlogan.