Thursday, September 30, 2010

Worst laptop ever?

The DV6 3084CA features what must the latest in crotch-scorching, carpel-tunnel inducing technologies to come out of HP's research labs.

On paper, it looks good, perhaps too good. Quad-core AMD with 8GB of ram and a nice graphics card, wrapped in a sturdy light-weight frame. Unfortunately, this machine is a object lesson in which technologies do not go together in a laptop, to whit:

  • Bluray drive and low-res screen
  • Beefy graphics card and poor ventilation
  • Portability and bad battery life
  • Small size and crotch-scorching technology

But wait, there's more! The latest in carpel-tunnel inducing research, combining what seem to be slightly-too-small and hard to press keys in a terrible layout (bonus points, the CA model has a bilingual keyboard, ugh!) with an over sensitive touchpad causing you to adopt the most painful typing position imaginable. Or perhaps your particular preference is for the terrible colour fidelity or perhaps the record setting pre-packaged bloatware (25 minutes to install it all!) or even the always on, always loud, never really accomplishing much fan. Either way, this machine has it all.

Monday, September 13, 2010

OS X Guest on VMWare Player

I’ve been using OS X in a VM under Windows using VirtualBox for some time now. While researching potential workarounds for some of its limitations (e.g. 1440x900 max resolution) I came across the VMsvga2 graphics driver for OS X under VMWare.

I tried this setup with VMWare Player 3.0, without VMsvga2, and was not impressed. However, VMWare Player 3.1.1 is much much better. With VMsvga2 it is a much better setup than VirtualBox. Better yet, rather than installing from scratch, which is a pain with VMware, I converted my VirtualBox image to a VMware one and then used the ISO and VMDK from here.

Not only is VMWare faster (at the moment) for OS X guests, with a couple of tweaks to the vmx file, it is also more stable. Here are the changes I made:

smc.present = "FALSE"
monitor.virtual_exec = "hardware"
monitor.virtual_mmu = "software"
guestOS = "darwin10"

Tuesday, August 17, 2010

Feeling sorry for the ‘working wealthy’?

The Atlantic found this gem from an opinion piece by CNN contributor John Avalon. I’ll reproduce the relevant section here:
It is the gap between the "super rich" -- who really do have more money than they know what to do with -- and what might be called the "working wealthy," who are taxed as though they're rich enough to able to give away half their money.
These are individuals whose household income might bring them into the top tax bracket of $250,000 a year but who, with two parents working, might still find themselves struggling to stay in the stability of the upper-middle class in the expensive urban areas where they often work.
Much of the anger about the scheduled sunset of the Bush tax cuts for the increase in top-bracket taxes comes from this productive group of Americans.
First off, is he correct in saying that there is a class of working wealthy who spend most of their >250K a year? Well, it is expensive to put kids through private school while living in a nice neighborhood. The choice of neighborhood may well be determined by proximity to work and co-workers. So let’s allow Mr. Avalon the argument that such people exist and that they need their income. However, I find it hard to believe that they live hand-to-mouth and buy only the bare essentials. These people have extra cash, just not as much as you might think.

Which leads me to wonder, exactly how big are the Bush tax cuts and what would the effect be on these working wealthy. I know the US tax code is a complex beast and I’m Canadian so I’m probably missing some bits and pieces, but from what I’ve seen the parts of the Bush tax cuts that apply specifically to the wealthy are income tax cuts. In 2000, the year before the Bush tax cuts came into effect, the top two tax brackets for a married couple filing jointly were:
Tax Rate (2000)
Lower Bracket
Upper Bracket
36%
$161,450
$288,350
39.6%
$288,350
And in 2010, they are:
Tax Rate (2010)
Lower Bracket
Upper Bracket
33%
$209,250
$373,650
35%
$373,650
So, if we assume that repealing the tax cuts means restoring the old rates and not the old brackets, then someone making 250K will have to pay a whopping $1222.50 in extra income tax, that’s $101.88/month. These families are making $15810/month, after tax, on 250K of income, so I don’t think $100 is going to make a big difference. I’m sure other taxes take a toll, but it should be obvious that the increase in tax on the ‘working wealthy’ by repealing the Bush tax cuts should not be a significant issue.

I wonder if Mr. Avalon’s paragraph sounds like the same reasonable argument if you add in the results of the above analysis:
These are individuals whose household income might bring them into the top tax bracket of $250,000 a year but who, with two parents working, might still find themselves struggling to stay in the stability of the upper-middle class in the expensive urban areas where they often work. For these families, that extra $1222.50 goes a long way to making ends meet.
I didn’t think so either.

Sunday, June 27, 2010

Wonderfully simple Banana Bread

Made this Banana Bread last night. Very quick, easy, moist and most importantly, delicious.

No butter on hand, so I substituted oil. For a twist add some nuts, I used walnuts. Finally, suggested serving, a drizzle of Frangelico.

Friday, November 20, 2009

GUI development and Java FX

I hate GUI development. I'm sure lots of developers feel exactly the same way. Even if you are gifted with a sense of aesthetics that allows you to appreciate how Finder or Windows Explorer are superior to a command-line, you might still hate GUI development.

One of the reasons for this could be the difficulty of getting from a paper UI mockup to something that actually works. I've often found programs with UI design that I appreciate, but the work required to duplicate the approach is often insurmountable.

Consider the tools developers generally have at their disposal. Most, if not all of them, are very good at building applications that conform to an aesthetic that (as far as I can remember) comes from Windows 95. I'm talking about the single, resizeable window, menus, dialog boxes maybe a tool bar or 2 or 3 and a big blank space in the middle where your work goes. The best tool I've used for this kind of UI design is Qt Designer. But this doesn't help you if you want animation, or zooming or free-form layout. As soon as you go out of the standard UI box you need to build almost everything yourself. And that sucks.

Java FX seems to be one of a few tools gaining popularity these days that help us break out of the old paradigm. Consider the following code snippet. It defines an object that can be used as an arbitrarily large surface and defines a viewport onto it so that the user can drag their view around instead of dragging the objects on the view around.
public class Viewport extends CustomNode {
    public var viewWidth :Float;
    public var viewHeight :Float;
    public var content :Node[];

    var currentX :Float = 0;
    var currentY :Float = 0;
    var dragStartX :Float = 0;
    var dragStartY :Float = 0;

    def viewport = Rectangle {
        x: bind -currentX
        y: bind -currentY
        width: bind viewWidth;
        height: bind viewHeight;
        fill: Color.TRANSPARENT;
    };

    override function create() :Node {
        insert viewport before content[0];

        return Group {
            content: bind content;
            translateX: bind currentX;
            translateY: bind currentY;
        }
    }

    override var onMousePressed =
        function(event :MouseEvent) :Void {

            dragStartX = event.sceneX + currentX;
            dragStartY = event.sceneY + currentY;
        };

    override var onMouseDragged =
        function(event :MouseEvent) :Void {

            currentX = dragStartX - event.sceneX;
            currentY = dragStartY - event.sceneY;
        };
}

I doubt that can be done as easily, quickly and readably in Qt or Apple's Interface Builder. That viewport class took about 1 hour to code. Now lets say you want to drag the widgets around on the viewport, no problem, just put them in a DraggableGroup like this one.
public class DraggableGroup extends CustomNode {
    public var content :Node[];

    override def blocksMouse = true;
    var currentX :Float = 0;
    var currentY :Float = 0;
    var dragStartX :Float = 0;
    var dragStartY :Float = 0;

    override function create() :Node {
        return Group {
            content: bind content;
            translateX: bind currentX;
            translateY: bind currentY;
        }
    }

    override var onMousePressed =
        function(event :MouseEvent) :Void {

            dragStartX = event.sceneX - currentX;
            dragStartY = event.sceneY - currentY;
    };

    override var onMouseDragged =
        function(event :MouseEvent) :Void {

            currentX = event.sceneX - dragStartX;
            currentY = event.sceneY - dragStartY;
    };
}

Although this isn't particularly exciting, it does show that with some basic built-ins you can create a GUI that would be quite hard to put together in one of the stalwart toolkits developers normally use, although you're in trouble if you want multi-line text editing!

Sunday, November 15, 2009

Java FX and the Yield Slope

Recently I've been looking at Java FX, a promising new technology from Sun that is supposed to help developers create rich web applications, desktop applications and mobile applications.

While Java FX 1.2 can't live up to that promise just yet, it is nonetheless fun to use. The biggest missing component is a design tool. The FX community is abuzz with the possibility of this gap being bridged in the next version, hopefully to be released sometime soon. Some early screen-shots can be seen here.

On the plus side, Java FX (on the desktop) has access to the full class library of Java SE. Unfortunately, this isn't true for the browser or mobile versions (for obvious reasons.) For those configurations, we have to wait for the default Java FX class library to grow.

The following is a simple (and ugly - GUI design isn't my forte) Java FX application that graphs the yield slope over the last 30 years.


 Click the image to run the program

Saturday, October 31, 2009

Meaning of the yield curve

A lot of discussion about economics today mentions the importance of the steep yield curve. Some even make predictions about what will happen next, giving the yield curve as evidence. But what is the meaning of a steep yield curve?

The Yield Curve Today

First, a refresher, what is the yield curve? As with most things, Wikipedia has a great article on the topic, so I'll just borrow from them:
The yield curve is the relation between the interest rate and the time to maturity of the debt. The yield of a debt instrument is the overall rate of return available on the investment. For instance, a bank account that pays an interest rate of 4% per year has a 4% yield. Investing for a period of time t gives a yield Y(t). This function Y is called the yield curve, and it is often, but not always, an increasing function of t.
The slope of the yield curve tells us how quickly the yield increases as the term increases. A quick way of checking this slope is to compare the yield of the 10 year treasury note to that of the 2 year note. The following graph shows how this value has changed over the last 20 years.



The current value, 2.49%, is much higher than the average, 1%. In fact it is about as high as it has ever been over the last 20 years. This qualifies as a steep yield curve.

What does it mean?

Negative sloping yield curves are reasonably accurate predictors of recession and steep yield curves are predictors of strong economic growth. As you can see in the graph above, the yield curve was almost flat throughout the mid-90s indicating a risk of economic weakness. Arguably this risk manifested itself as the tech sector crash in early 2000. During parts of 2005-2006, preceding the current recession, the yield curve was negative.

A steep yield curve is generally considered to be a predictor of strong economic growth. The yield curve was steep coming out of the recessions in the early '90s and 2000s. Since the yield curve is just as steep now as it was then, does this mean we are out of the woods and can look forward to strong growth?

As the economy heats up, inflation will generally increase. Most central banks will try to keep inflation within a (low) controlled range. They will adjust monetary policy to this effect. The most commonly employed method of keeping high inflation in check is increasing the lending rate. A steep yield curve represents and adjustment for the risk of higher interest rates in the future, which implies economic growth.

But there are other potential causes for inflation. Some argue that the steep curve is adjusting for the risk of inflation due to the massive stimulus the government has injected into the economy through the policy of quantitative easing the US Federal Reserve applied in 2008-2009. If this turns out to be correct, we could have inflation without recovery.

References

http://en.wikipedia.org/wiki/Yield_curve
http://beginnersinvest.about.com/lw/Business-Finance/Personal-finance/The-Yield-Curve.htm
http://gregmankiw.blogspot.com/2009/05/yield-curve-is-steep.html
http://www.ustreas.gov/offices/domestic-finance/debt-management/interest-rate/yield.shtml