Posts

When Unit Tests aren’t Enough

Unit Testing of your work is generally accepted as the mark of a professional developer. However – have you thought about what happens when you make a boo-boo on the tests you create ? You guessed it – everything goes to hell in a handbasket. If the tests are flawed, they aren’t really telling you anything.  Sometimes it can be better (and faster)  to create an old-fashioned, Windows Forms test harness to exercise your “stuff”. Right now, I’m working on a complex project with many dozens of classes – more of them every single day. Often we are asked to make changes to many of these classes. When I do these, all I need to do is fire up my Winforms Test Harness and press one of the buttons. I can have breakpoints in the code at strategic places, and I can view the end result in a DataGridView that’s on the form. Sure, you can do that with a unit test, but then what you’re doing is “testing a test”. Unit Tests are definitely the way to go, but sometimes just being a Duct ...

Why the FED has turned the banking system into the Living Dead

Treasury Secretary Tim Geithner and Federal Reserve Chairman Ben Bernanke have denoted that the recession is over. Now that the DJIA has broken the 10,000 mark, we can expect to  have full confidence that economic growth is here to stay. But the credit markets are in a lot worse condition than some indexes  suggest. Buried within the October 3, 2008 bailout bill, which set up the Troubled Asset Relief Program (TARP), was a provision permitting the Fed to pay interest on bank reserves. Within a week, the Fed implemented this new power and  essentially converted bank reserves into more government debt. As the fed funds rate hovers around zero and existing loans in technical default continue to sit in bank portfolios, why should banks make new loans when they can make money for free with the government? They can now borrow from the Fed and  earn a huge spread by borrowing virtually unlimited amounts of money for nothing and simply lend that same money back ...

Doomed to Repeat History?

Image
William O’Neil, in his excellent book “How to Make Money in Stocks”, has a chapter on the media, news, and market psychology. In this section he has taken the charts of the Dow Industrials from 1921 through 1942, and overlayed on this a chart of the NASDAQ Composite from February 1992 through March 2009, and indexed the data so that the charts both start at 100: What is remarkable about this chart is that the two time periods are almost exact duplicates. O’Neil used the NASDAQ for comparison with the 1929 era as it trades more volume now than the NYSE and represents more entrepreneurial companies. The reason history repeats in this amazing manner is that the markets are made up of millions of people acting almost 100% on human emotions. You can see two important history lessons from just looking at the above chart: 1. This isn’t 1929 right now in October, 2009 – its  Oct 1939. 2. The market (according to history) is not going to be very exciting for a long time – denotin...

On Less is More

Thelonius Monk once said “Wrong is Right”. I say, “Less is More”. All too often we as software developers do data collection of one sort or another, often storing results in a database table or tables, and we suffer from self-induced overkill. We collect too much data, data that we probably will not need. Or, instead of storing the same data and simply updating it’s count on a unique column value via an Insert or Update SQL statement, we end up storing hundreds of unique rows that, because of the data collection overkill we’ve engineered, take up lots of space but don’t really contribute to the “cause”. In addition (and I have certainly been guilty of this) we store our data in database tables that are not normalized, thereby exacerbating the situation. We end up with wide tables with a lot of columns that are inefficient. It is often much easier (and simpler) to start out with a minimalist approach. Less is More. If we determine at a later point that we actually do need “More”, ...

Acer Aspire One Netbook Restore Windows 7

Recently my Acer Aspire One Netbook with Windows 7 on it crapped out. I have no idea why, but if you’ve got a netbook, then you know that to reconstitute everything you need to do it from a bootable USB Stick, because there isn’t any “DVD” drive on these little puppies. I tried a number of solutions that I found online, but the only one that worked for me was the following:   1) insert your USB stick (4GB or higher). 2) FORMAT – NTFS 3) Copy the contents of the Windows 7 DVD onto the USB stick. 4) Set your netbook BIOS to Boot from “USB HDD” as the first option. 5) Boot off the USB, let Windows 7 setup come up, and do a new installation (the “Repair my computer” option only comes up if you run Windows setup from an existing instance of Windows 7, which I couldn’t get). 6) Install Windows 7.   NOTE: during the install, WIndows 7 needs to reboot. You need to change your BIOS settings on the netbook to now let it boot from the netbook’s hard drive, NOT the USB...

Acer Aspire One Windows 7 Restore

Recently my Acer Aspire One Netbook with Windows 7 on it crapped out. I have no idea why, but if you’ve got a netbook, then you know that to reconstitute everything you need to do it from a bootable USB Stick, because there isn’t any “DVD” drive on these little puppies. I tried a number of solutions that I found online, but the only one that worked for me was the following:   1) insert your USB stick (4GB or higher). 2) FORMAT – NTFS 3) Copy the contents of the Windows 7 DVD onto the USB stick. 4) Set your netbook BIOS to Boot from “USB HDD” as the first option. 5) Boot off the USB, let Windows 7 setup come up, and do a new installation (the “Repair my computer option only comes up if you run Windows setup from an existing instance of Windows 7, which I couldn’t get). 6) Install Windows 7.   This may seem overly simplistic, but it worked for me. Of course, since you have a new windows 7, you’ll need to install all your favorite software.

Online Plagiarism and what you can do about it

Lazy, unethical people who republish RSS feeds and similar content and surround it with advertising for profit abound. In general this is an annoyance, but you probably can’t do much about it.  However where I believe this “crosses the line” is when somebody deliberately copies all of  your original content, removes all identifying links and author attribution, and then republishes this wholesale on their site or blog for expected profit. This happened to me recently. This person, Calla Degennaro , residing in Larchmont N.Y.: Calla M Degennaro 7 Rebeau Dr Larchmont, NY 10538-1337 (914) 834-0236 --  republished not one -- but two of my articles written and originally published on  eggheadcafe.com, without permission: http://tusforyou.com/fluent-nhibernate-automapping/ and http://tusforyou.com/silverlight-3-note-taker-app-with-local-storage/ You can see that this person has carefully removed all identifying traces of where the articles originated...

Where’s Reaganomics?

Washington has attacked the current economic downturn with Keynesian economics - the theory that you fight an economic downturn by pumping money into the economy to "encourage demand" and "create jobs." The result? The longest recession since World War II — 21 months —  with no clear end in sight. The government  borrowed close to a trillion dollars out of the private economy —  yet it has done squat to increase incentives for investment and entrepreneurship. In February 2008, Bush cut a deal with congressional Democrats to pass a $152 billion Keynesian stimulus bill based on countering the recession with increased deficits. The central feature was a tax rebate of up to $600 per person.  It had no significant effect on economic incentives. In fact, looking back a year, it was a joke. Learning nothing from this, Barack Obama came back in February 2009 to support a $787 billion, purely Keynesian stimulus bill. Congress, like lemmings, followed a...

DON’T FORGET

Image
  And don’t forget the meaning of the word LIBERTY. ServicePeople, Thank you for your service to our country!

Windows Keyboard / Explorer Shortcuts

  Windows system key combinations F1: Help CTRL+ESC: Open Start menu ALT+TAB: Switch between open programs ALT+F4: Quit program SHIFT+DELETE: Delete item permanently Windows Logo+L: Lock the computer (without using CTRL+ALT+DELETE)   Windows program key combinations CTRL+C: Copy CTRL+X: Cut CTRL+V: Paste CTRL+Z: Undo CTRL+B: Bold CTRL+U: Underline CTRL+I: Italic   Mouse click/keyboard modifier combinations for shell objects SHIFT+right click: Displays a shortcut menu containing alternative commands SHIFT+double click: Runs the alternate default command (the second item on the menu) ALT+double click: Displays properties SHIFT+DELETE: Deletes an item immediately without placing it in the Recycle Bin   General keyboard-only commands F1: Starts Windows Help F10: Activates menu bar options SHIFT+F10 Opens a shortcut menu for the selected item (this is the same as right-cl...