Technology

Paul Krugman’s Nobel Prize

I was trying to explain “The New Trade Theory” and doing a poor job of it. Fortunately, Krugman does a good job simplifying it here.

The new trade theory starts with the observation that while this explains a lot of world trade, it also misses a lot. France and Germany sell lots of stuff to each other, even though they have similar climates and resources; so do the United States and Canada. What’s that about?
The answer is that there are many goods that aren’t like wheat or bananas, but are instead like wide-bodied jet aircraft. There are only a few places in which wide-bodied jets are produced, because of the enormous economies of scale – you only want a couple of factories worldwide. Those factories have to be somewhere, and those countries that get the factories export jets, while everyone else imports them.

There’s more details in the article.

Technology

GCC Summary

Here’s a nice summary of how the CC compiler/toolchain works. Here’s some info about the next release:

Work has already begun on the 4.4 release series, and its moving toward a general release. In version 4.4, you’ll find numerous bug fixes and more general optimizer improvements. Version 3.0 of the OpenMP specification has also been integrated for codeC/code, codeC++/code, and Fortran.

The compiler will also now allow you to define an optimization level at the
function level (instead of at the file level, which was the previous
default). This functionality is provided by the codeoptimize/code attribute,
which also allows you to specify the individual options for the optimizer.

Finally, processor support was added for the Picochip, which is a 16-bit
multi-core processor. What’s interesting about the Picochip is that each core
can be programmed independently, with communication provided in a mesh.

Technology

Obama 08: The Official iPhone and iPod Touch Application

Sweet. The Obama campaign has an iPhone app for keeping up with the campaign, organizing volunteering, phone banks, etc. They just get the current times so much better then McCain and the Republican party.
I think he’s going to win by a huge margin. Did I mention this is the first campaign I’ve ever donated to? I’ve even convinced a few other people to donate.
From Obama 08: The Official iPhone and iPod Touch Application:

You’ll have instant access to Barack’s positions on important issues, as well as local and national campaign news as it happens. Photos and videos from the campaign trail are all here, too.”

Technology

Version Control

Some notes on various version control tools:

  • Buildbot: http://buildbot.net/trac offers a way to build and test multiple repositories. Support mercurial
  • Mercurial supports a forrest of repositories. You can have a repository that contains other repositories. That makes it easier to compose complex system. It’s not clear whether Forrest, Nested Repositories, or just being able to ignore a .hg directory is the route to go.
  • Nice tutorial on using mercurial
  • Linux and Windows diff tool
  • Mac OS X diff tool
Technology

What I’m reading

I started reading “Working Effectively with Legacy Code”.  Here’s a great quote:

In poorly structured code the move from figuring things out to making changes feels like jumping off a cliff to avoid a tiger. You hesitate and hesitate. “Am I ready to do it? Well, I guess I have to.
Avoiding change has other bad consequences. When people don’t make changes often they get rusty at it. Breaking down a big class into pieces can be pretty involved work unless you do it a couple of times a week. When you do, it becomes routine. You get better at figuring out what can break and what can’t, and it is much easier to do. The last consequence of avoiding change is fear. Unfortunately, many teams live with incredible fear of change and it gets worse every day. Often they aren’t aware of how much fear they have until they learn better techniques and the fear starts to fade away.

Technology

CLR and Unhandled exceptions

Nice article on unhandled exception handling 🙂
CLR Inside Out: Unhandled Exception Processing In The CLR

In the case of Figure 3, if the CLR can’t find a managed exception handler in Main, the exception will reach the native frame within the CLR where the thread started. In this frame, the CLR has established an exception filter that will apply the policy to swallow (which is semantically equivalent to blindly catching) exceptions, if applicable. If the policy indicates not to swallow the exception (which is the default in the Microsoft® .NET Framework 2.0 and later), the filter triggers the CLR’s unhandled exception processing.

Technology

Useful jQuery

Collecting some useful jQuery I might be able to use:

  • Gradient background
  • Interactive stars
  • idTabs hides the content for each tab in a “div”
  • Cluetip provides tooltips with an ajax interface to fetch them dynamically or as made up from content on the page. Tips are html.
    • Columnizer dynamicaly adjusts multi columns to fit the current browser width. Not sure how I can take advantage of it but for more text base sites it sounds great. Maybe that resume plug in I’ve been contemplating
    • Checkbox for some pretty checkboxes like:
      Firefox002.png
  • Lavalamp has feedback as you move from one element to the next. Might be good for tabs, etc
    • Flexigrid offers sortable, pageable, ajax tables:

Firefox003.png

  • Readable tables offers row, header, column highlighting. No demo to try it out, though
  • Timeago offers dynamically updated timestamps in a human readable format. Eg. “You opened this page 3 minutes ago.”
Technology

Some javascript

flot generates some pretty nice looking plots all done on the client side:

Flot is a pure Javascript plotting library for jQuery. It produces graphical plots of arbitrary datasets on-the-fly client-side.
The focus is on simple usage (all settings are optional), attractive looks and interactive features like zooming. ”

Firefox001.png