Monday, May 23, 2005

 After passing it at B&N several times I picked this book up yesterday.  I really enjoyed my Physics in college but of course being in a hurry to graduate left no time for pursuing any interesting things.  I do regret that my physics class was not Calculus based.  When I did take Calculus the physics applications were by far the most interesting parts.  When we were shown that the first derrivative of the acceleration function is the distance function I was blown away as it was the first time I'd ever seen a mathematical idea (derrivatives) explain not a phenomenon in reality (If the train is going 100 km/h and the city is 50 km away...) but an actual aspect of reality.

Back to the book, I just started reading the first few chapters: a refresher on basic physics.  More impressions as I read through it but you can probably expect to see a DamonPayne.Physics C# library posted here. 

When picking this book up I also realized how utterly ludicrous it is that the English measurement system is still in use.  Over the course of the year, I'm going to try to convert to thinking of things in terms of Kilometers to my house and my car's 0-100km acceleration time.

Monday, May 23, 2005 8:06:15 AM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [1]  |  Trackback
 Friday, May 20, 2005

I have always kept it technology related here, since I have a personal site for anyone who might care to read about my opinions on life in general.  There's something going on right now is worthy of a cross-post, and a lot more than that too: Social Security reform. Our President visited our state this week to talk about Social Security reform.  He's been taking a lot of heat for this, and of course it is political suicide (or heroism?) , which is why its an issue to look at when you are not up for re-election.

My personal philisophy is largely objectivist which puts me at odds with at least half the population right off the bat.  There is one principal that I would think anyone can identify with (even if only in their most hidden thoughts) and that is self interest.  Social Security hurts almost everyone, from the lowest wage earner to the wealthiest industrialist.  I say almost everyone because there is some value in taking care of those who are unable to work.

I've always known Social Security would not be enought to live on after retirement, but when I started getting statements from the govermnment as to what I could expect, it was still shocking.  My monthly check from Uncle Sam will likely not be enough to pay the cable bill in terms of 2040 dollars.  Yet we pay roughly 7.5% (with medicare, etc) payroll tax on the first $90,000 we make.  Our employer matches this, so lets use 15% as a nice round number for argument's sake.  Let's say I make $20,000 per year, and I work for 40 years.  Using this calculator from the SSA I can expect a yearly payout of ~ $9,400.  Ouch!  By compairson:

  • My and my employer's payroll taxes over that working career could be invested at Zero percent interest, in my mattress, to get a payout of $6,000 per year.
  • In a no-risk 5% money market, my money alone (not counting my employer's payroll tax) would come out to be about $9,500 per year.
  • A conservative money market at an average 7% rate of return for just my payroll tax would give me $16,400 per year.
  • Now let's get crazy: if my mutual fund return averaged 7.5% and I was able to invest both my payroll tax and my employer's payroll tax, my nest egg could pay me $37,700 per year.

I am assuming 20 years of retirement payout here.  I also ran the numbers (in Excel and the Social Security Administration web site) for a $90,000 salary.  The fact of the matter is, unless you are one of the few who are disabled and cannot work, Social Security is a ripoff.  I am not advocating leaving those people high and dry either, so settle down. 

Now, in addition to you getting a terrible rate of return on the 15% of your salary that goes to SS, consider that there are also quite a few popular ways to save additional money for retirement.  401k, company pensions, Roth IRA, etc. 

What is my point?  My point is that in terms of the total cost of employing you and your salary, you and others on your behalf are probably spending a grand total of 23% or more of that salary on your retirement; to retire with a similar standard of living you probably only need 7.5% of that money. 

A lot of other things could be done with a lot of money that is going into a large, inefficient system that is periodically raided by Congress.  My vote is give it back to people to spend.  Social Security reform is good.

Friday, May 20, 2005 9:20:05 AM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [0]  |  Trackback
 Wednesday, May 18, 2005

I have never done DirextX programming before, as I mentioned my graphics experience is in 2D software drawing APIs (ie, line/pixel/arc drawing) and OpenGL.  Tonight I got some paying work done and needed to dabble in something so I got the latest and greatest Managed DirectX download from MSDN, dated April 2005.  I have mostly been messing around with the sample programs tonight, and just started combining some of the samples to do something more than hello, world.  "Hello World" in graphics land is drawing a shaded triangle, by the way.

A few observations from an hour of messing around:

The Good

Things have come a long way since I last did anything with graphics.  Creating a drawing device can be done in as little as 2-4 lines of code.  Its fairly easy to get to the point where you can start messing around and see something on the screen.  Microsoft has also included some Intellisense documentation, which was missing when I played with DirectShow a while back.

                PresentParameters presentParams = new PresentParameters();
                presentParams.Windowed=true;
                presentParams.SwapEffect = SwapEffect.Discard;
                _device = new Device(0, DeviceType.Hardware, this, CreateFlags.SoftwareVertexProcessing, presentParams);

... then draw away.

The Bad

Performance from Managed code does not look like its going to be pretty.  I'm thinking it should be able to draw the simple scene shown above more than 42 times per second.  Also, many of the examples included in this release of the SDK do not compile or work.  The most annoying thing I encountered is the code included for drawing text to the Direct3D device did not compile.  It looks like MSFT has been tweaking the managed API and has not updated all the samples.  For what its worth, I got the "GraphicsFont" to work with minor code changes, and I'm including the file here for download on the off chance anyone else is having issues. 

GraphicsFont.cs.rename (22.61 KB)

More observations as I get time to make them.

Wednesday, May 18, 2005 9:32:50 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [5]  |  Trackback
Old Content Archives
Wednesday, May 18, 2005 1:14:35 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [5]  |  Trackback
 Tuesday, May 17, 2005
New DasBlog site up, with a personal note: why did I become a programmer?
Tuesday, May 17, 2005 2:49:08 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [3]  |  Trackback
 Friday, May 13, 2005
TechEd Schedule
Thursday, May 12, 2005 11:00:00 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [2]  |  Trackback
 Tuesday, May 10, 2005
Cage Builders
Monday, May 09, 2005 11:00:00 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [0]  |  Trackback
 Saturday, April 30, 2005
CF Performance Part 2
Friday, April 29, 2005 11:00:00 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [0]  |  Trackback