Jul 12 2006

How to End Poverty

Bono, of U2 fame has asked Yahoo Questions, “What can we do to make poverty history?” The first thing that struck me, was that the entire question is framed wrong. Instead of asking how to end poverty, ask, “How do we make the whole world richer (and not leave anyone behind)?”

The first question immediately brings to mind soup kitchens, donations and starving kids in Africa, whereas the second one makes me imagine Europe, Japan, and South Korea destroyed by wars and rebuilding their entire economies in a couple of decades. In order to end poverty, the governments of most of the affected countries would have to change. Corruption, instability, and wars are not good growth mediums to build riches.

On the other hand, Africa is saddled with diseases that are destroying the entire population. Solving AIDS and Malaria is probably the first step on that journey. They can’t start boot-strapping their countries until they start living longer than a median of 30-something. Once disease is solved, there are some deep rooted cultural issues that are holding back many countries in poverty. What makes South Korea rebound from occupation, war, military dictatorships, and being surrounded by hostile nations to becoming one of the Asian Tigers and one of the most wired nations in the world? For fun, compare and constrast North Korea with South Korea. Obviously the people in both countries have roughly the same potential for success, yet North Korea is a world pariah and many of the people are imprisoned in gulags or starving.

The U.S.A. through the Marshall Plan, provided the following for war torn Europe after World War II:

The United States offered up to $20 billion for relief, but only if the European nations could get together and draw up a rational plan on how they would use the aid. For the first time, they would have to act as a single economic unit; they would have to cooperate with each other. Marshall also offered aid to the Soviet Union and its allies in eastern Europe, but Stalin denounced the program as a trick and refused to participate. The Russian rejection probably made passage of the measure through Congress possible.

The Marshall Plan, it should be noted, benefited the American economy as well. The money would be used to buy goods from the United States, and they had to be shipped across the Atlantic on American merchant vessels. But it worked. By 1953 the United States had pumped in $13 billion, and Europe was standing on its feet again. Moreover, the Plan included West Germany, which was thus reintegrated into the European community. (The aid was all economic; it did not include military aid until after the Korean War.)

I believe that the Marshall Plan was one of the greatest things that America did in the 20th century. However, a similar plan for Africa would fail miserably due to corruption in the governments of Africa. Even before Africa, how do we provide Mexico with a similar path to economic success? The whole immigration debate seems to miss the fact that if Mexico was as rich as Canada, we wouldn’t have any immigration problems. Anyone who has been to a border city like El Paso, Texas and stared over the wall to Mexico has a good appreciation of why people immigrate to the United States. Almost any rational person would do the same, at whatever the cost.

I wonder if anyone has outsourced Spanish tech support to Mexico. Perhaps one thing that Mexico could do is start switching their schools to English and try to compete with India for some of that business. They are on the same time zone and for whatever reason, Americans seem to find a Spanish accent more pleasant than an Indian one. However, yet again I think that corruption in the government is holding down the entire country. Perhaps to solve poverty, we need to solve corruption first. You could donate all the money you like, but if all of it is intercepted by warlords or despots, you’ve done no good, and in fact you’ve made things worse, because you are keeping these dictators in power.

So bottom line, solve culture and corruption and we have a chance to solve poverty. Do neither and just donate billions of dollars and make the situation worse.

PS, the people who are saying prayer obviously haven’t heard the saying, “When your boat springs a leak, pray to God, but row to shore.”


Jul 11 2006

Microsoft’s Intentional Ignorance of Other Operating Systems

I’m really happy that Microsoft employees are blogging more. Though I miss Robert Scoble. Microsoft really lost a lot of public relations points when Scoble left. Today, I came across a post by Raymond Chen, one of the great Microsoft guys that keeps new versions of Windows compatible with older applications. Truly, compatibility is a heroic task, one that most programmers don’t want to deal with. However in recent discussions on Windows blindly overwriting the master boot record (and in the process screwing everyone with alternate operating systems), he says:

In the discussions following why Windows setup lays down a new boot sector, some commenters suggested that Windows setup could detect the presence of a non-Windows partition as a sign that the machine onto which the operating system is being installed belongs to a geek. In that way, the typical consumer would be spared from having to deal with a confusing geeky dialog box that they don’t know how to answer.

The problem with this plan is that not everybody with a non-Windows partition type is necessarily a geek. Many OEM machines ship with a hard drive split into two partitions, one formatted for Windows and the second a small non-Windows partition to be used during system diagnostics and recovery. The presence of this small non-Windows partition is typically not well-known, and it comes into play only when you boot from the manufacturer’s “system recovery CD”.

I would challenge Raymend Chen to install Linux, because this problem isn’t difficult to solve and has been solved by every major Linux distribution years ago. This has been one of my biggest all time gripes with Microsoft. They put on blinders and ignore everything not invented at Microsoft (except when they steal Apple’s GUI, but that’s another entry). I’ve reproduced the common system partition types that Linux fdisk knows about. If Microsoft took this list and detected the top ten most common ones, they could solve this problem. If they decided to spend another couple hours implementing all of them, they would make installing Vista a breeze for those of us who know there is more than one Microsoft way. However, they won’t because why would Microsoft care if they overwrite your grub/lilo boot record? That just means you will only be using Windows, right? I think they forget that I am a customer too, and I don’t appreciate it when a product destroys my setup.

0 Empty 1e Hidden W95 FAT1 75 PC/IX be Solaris boot
1 FAT12 24 NEC DOS 80 Old Minix bf Solaris
2 XENIX root 39 Plan 9 81 Minix / old Lin c1 DRDOS/sec (FAT-
3 XENIX usr 3c PartitionMagic 82 Linux swap c4 DRDOS/sec (FAT-
4 FAT16 <32M 40 Venix 80286 83 Linux c6 DRDOS/sec (FAT-
5 Extended 41 PPC PReP Boot 84 OS/2 hidden C: c7 Syrinx
6 FAT16 42 SFS 85 Linux extended da Non-FS data
7 HPFS/NTFS 4d QNX4.x 86 NTFS volume set db CP/M / CTOS / .
8 AIX 4e QNX4.x 2nd part 87 NTFS volume set de Dell Utility
9 AIX bootable 4f QNX4.x 3rd part 8e Linux LVM df BootIt
a OS/2 Boot Manag 50 OnTrack DM 93 Amoeba e1 DOS access
b W95 FAT32 51 OnTrack DM6 Aux 94 Amoeba BBT e3 DOS R/O
c W95 FAT32 (LBA) 52 CP/M 9f BSD/OS e4 SpeedStor
e W95 FAT16 (LBA) 53 OnTrack DM6 Aux a0 IBM Thinkpad hi eb BeOS fs
f W95 Ext’d (LBA) 54 OnTrackDM6 a5 FreeBSD ee EFI GPT
10 OPUS 55 EZ-Drive a6 OpenBSD ef EFI (FAT-12/16/
11 Hidden FAT12 56 Golden Bow a7 NeXTSTEP f0 Linux/PA-RISC b
12 Compaq diagnost 5c Priam Edisk a8 Darwin UFS f1 SpeedStor
14 Hidden FAT16 <3 61 SpeedStor a9 NetBSD f4 SpeedStor
16 Hidden FAT16 63 GNU HURD or Sys ab Darwin boot f2 DOS secondary
17 Hidden HPFS/NTF 64 Novell Netware b7 BSDI fs fd Linux raid auto
18 AST SmartSleep 65 Novell Netware b8 BSDI swap fe LANstep
1b Hidden W95 FAT3 70 DiskSecure Mult bb Boot Wizard hid ff BBT
1c Hidden W95 FAT3

Jul 10 2006

Microsummary, Woot!

“Microsummaries are regularly-updated succinct compilations of the most important information on web pages. They are compact enough to fit in the space available to a bookmark label, provide more useful information about pages than static page titles, and are regularly updated as new information becomes available.”

http://wiki.mozilla.org/Microsummaries

Woot.com has added support for Microsummaries. I can’t wait until someone like Ebay adds support for these! Great feature in Bon Echo.


Jul 10 2006

Mayflies so thick they appeared on radar as a rainstorm

May fly storm on RADAR

A record hatch of mayflies in LaCrosse, Wisconsin was so thick that it showed up on local weather radar as a rainstorm.

Link


Jul 7 2006

Bacon of the Month Club

No Bacon Surfing

The Bacon of the Month Club is the greatest of all gifts. I’m not making that up. I get calls from customers all the time that tell me this. In my humble opinion no other club in the universe gives you as much pleasure and sheer delight as The Bacon of the Month Club. The Bacon of the Month Club is the go-to gift for that person in your life who loves bacon, who has everything or who has very little. Join for yourself. Give yourself the gift of bacon.

I have no idea what’s going on with that sign. I found it on Google. I guess it has something to do with no bacon surfing allowed. You make your own conlusions. Please don’t sign me up for the Bacon of the Month Club.


Jul 7 2006

Protip: Put your Apple to Sleep

Want the fastest way to put your Mac right into a deep, sleepy-bear hibernation-like sleep (no whirling fan, no dialogs, no sound — nuthin’ — just fast, glorious sleep). Just press Command-Option and then hold the Eject button for about 2 seconds and Zzzzzzzzzzzzzz. It doesn’t get much faster than that.

http://www.apple.com/pro/tips/quicksleep.html


Jul 7 2006

Python vs Perl vs Ruby vs PHP vs Java


Jul 3 2006

Using PowerShell through SSH

Introduction

Windows PowerShell is a new command-line shell and task-based scripting technology that provides comprehensive control and automation of system administration tasks. Windows PowerShell allows Windows administrators to be more productive by providing numerous system administration utilities, consistent syntax, and improved navigation of common management data such as the registry or Windows Management Instrumentation (WMI). Windows PowerShell also includes a scripting language which enables comprehensive automation of Windows system administration tasks. The Windows PowerShell language is intuitive and supports existing scripting investments. Exchange Server 2007 and System Center Operations Manager 2007 will be built on Windows PowerShell.

Windows Server 2003 Technologies – PowerShell

I come from UNIX, where the text shell is the preferred way to do system administration. I’ve been following Powershell née Monad for some time. Windows has needed a powerful shell since before MS-DOS (not sure what the default shell in Xenix was). The PowerShell team seems to be laying out some of the architecture that will be needed to bring Microsoft forward on this front. I’ve argued before that one of the reasons Google is beating Microsoft is the easy scriptability and command line interface on Google’s Platform, Linux. If Microsoft wants to play seriously with admins like me and compete with Apple and Google, they will have to continue building on PowerShell.

One of the key components of System Administration is remote access. It would be absurd to have to physically walk up to every machine you were responsible for and use the keyboard and mouse to configure or install anything. There are some pretty good tools for working with Windows remotely, but most of them require a video card and mouse. I can type upwards to 100 words a minute, anytime I have to move my hands off the home row to the mouse, I am losing productivity. Anytime I have to stream video, I am wasting bandwidth. I can administer a UNIX box from a palmtop device like a Sidekick over a slow cell phone connection.

One of the first things that an admin wants to do with PowerShell is run remotely. To do this securely, you must encrypt your data. SSH has been the proven way to do this. So the question becomes, how do I connect SSH and PowerShell together? With a little bit of kludge, it is possible. Why this wasn’t included by default in version 1.0, I have no idea. My advice and plea to the Microsoft developers is to just use SSH. Please don’t invent a proprietary Microsoft only tool to do this. Please please please please!

Note: The following assumes that you have logged in as a local admin and this account has a password.

Download and Install Cygwin

Fire up Firefox (or your favorite browser) and choose a Cygwin Mirror.

  • Select a mirror
  • Download setup.exe
  • Run setup.exe
  • Most of the defaults can be left as is

However, make sure to select SSH under the Network category. It will select the other required dependencies for you.

Configure Cygwin

Right click My Computer, select Properties -> Advanced -> Environment Variables.

Next, click the New button and add:

name: CYGWIN value: ntsec

Select the Path variable and click Edit then append ;c:\cygwin\bin (assuming you installed Cygwin here) at the end of the existing string.

Download and Install Microsoft Tools

Note: The following requires Microsoft Passport aka Live ID

Unzip the downloads and run their respective setup. I used all the defaults.

Run Cygwin

  • Either click the green Cygwin icon or run c:\cygwin\cygwin.bat
  • Run ssh install script: $ ssh-host-config
  • Answer “yes” to every question except for the last one, which should be ntsec

Should privilege separation be used? (yes/no) yes
Should this script create a local user ’sshd’ on this machine? (yes/no) yes
Do you want to install sshd as service?
(Say “no” if it’s already installed as service) (yes/no) yes

Which value should the environment variable CYGWIN have when
sshd starts? It’s recommended to set at least “ntsec” to be
able to change user context without password.
Default is “ntsec”. CYGWIN=ntsec

Start SSHD

$ net start sshd
The CYGWIN sshd service is starting.
The CYGWIN sshd service was started successfully.

Run Powershell

Start -> Programs-> Windows Powershell. Choose to always accept Microsoft signed code. Close PowerShell

Test SSH and Powershell

Run Putty or your favorite ssh client and connect to localhost. Accept the hash and login. If everything works, you should be at a bash prompt in Cygwin.

Next run PowerShell. Due to the limitations of PowerShell v1.0 we have to tell it that we are redirecting the input. Note that you won’t get any output from PowerShell indicating that it started up, including a command prompt!

$ /cygdrive/c/Program Files/Windows PowerShell/v1.0/powershell.exe -Command -

Try a PowerShell one-liner:

  • [System.Net.Dns]::GetHostbyAddress(“207.46.198.30″)
  • [System.Net.Dns]::GetHostAddresses(“www.msn.com”)
  • dir | where {$_.PsIsContainer}

Links

Credits

Big shout out and thanks to Lee Holmes for answering my e-mail and pointing me in the right direction, and PigTail Cygwin SSHD Instructions for clearing up some of the finer points in the SSH install.


Jul 3 2006

Microsoft Frustration

After writing an article about Microsoft’s PowerShell, I kept getting search referrals from people trying to get PowerShell working with SSH. Since I had some free time, I thought an article describing how to do this would be useful. I just spent the past hour trying to get PowerShell working with Cygwin’s sshd. It seems to be impossible. Cmd.exe works fine. I’m trying to track down the technical reason this won’t work, until then I’m going to keep my cussing to myself. I’m stunned this doesn’t work.

Update: I contacted one of the PowerShell developers and got a work around to make this work.  I’ll clean up the article and post it.  The work around is a little ugly, but it will get you PowerShell through sshd.


Jul 1 2006

F-117 and V-22 Osprey

F-117 and V-22 Osprey
Originally uploaded by mimichie.
After seeing the Thunderbirds out practicing over Albuquerque yesterday, and finding out at the last minute Kirtland was once again having an air show, I had to go. This is the first air show they’ve had here since 9/11. Security was tight, but not unreasonable and there were some great aircraft in attendence. As awesome as the Thunderbirds, the F-117, the V-22 Osprey and others were, I think my favorite moment was seeing the P-51, an F-4 Phantom and an F-15 flying formation over the crowd.The military definately needs a boost in public morale lately and airshows are a great way to do this. I’m glad they opened up the base and show some of what they do.