Tuesday, April 21, 2015

The Power of Culture and Public Education

I watched a documentary about Able Archer, the 1983 NATO exercise that was misunderstood by the Soviets, who almost launched a full scale nuclear strike.

One of the most interesting parts was an interview with an older Soviet women. She could not understand why all the world wanted to destroy her beloved Russia which was only trying to bring a better way of life to the oppressed.
Here was a women living in the "Evil Empire", an empire that invaded countries without provocation, routinely used torture, had a vast surveillance state, had secret courts with secret trials, overthrew democratically elected governments, and was run by an elite for the elite.

Yet since she had grown up with the state education, watched the national news and was surrounded by her culture, she thought Russia was the "Good Empire".

Friday, March 13, 2015

A Human Colony on Mars? Not So Fast.


In 1698 the Scots, in a frenzy of nationalism,  invested an enormous amount of money, 20% of the entire nation's money, on a  quest to colonize Panama.  The project failed spectacularly two years later due to disease - a condition that could easily have been foreseen, but Scots neglected due diligence and wasted many fortunes.

I fear our country is neglecting due diligence on our space colonization efforts.

For the long term human survival on Mars, the big question is not whether we can build shelters against the deadly radiation, or grow our own food in hostile soil or can we get water, but can a human fetus grow to adulthood in 38% gravity.  I doubt it.

Astronauts staying aloft in the International Space Station for extended periods have many physical issues like heart, bone, and eye problems. Many, many questions need to be answered, like "Since Martian-born humans would probably be taller with thinner bones, would the volume of marrow inside those bones make the appropriate amount of blood?".

We need to fund something like the Mars Gravity Biosatellite before spending any more money on a manned trip to mars.  Conceptually we need to put mice in 55 gallon drum  in the International Space Station spinning just fast enough  so the centrifugal force simulates Mars gravity.  Let's see if the mice can survive and reproduce two generations.  It would be better to know now if earth mammals can reproduce in 38% gravity than after we have spent an astronomical amount of money.

 I personally would rather NASA be spending our precious space dollars on sending robotic craft to all the moons in our solar system and building telescopes, instead of a project which, like the Scotish colonization of Panama, may be doomed from the start.


Json.NET Error: Could not create an instance of type IAmAnInterface

While using NewtonSoft's excellent Json.NET library, I was trying to deserialize a dictionary containing interface objects and got this error message:

"Could not create an instance of type IAmAnInterface. Type is an interface or abstract class and cannot be instantiated. "

Fortunately Json.NET has a very easy way around this by telling it to save the type metadata in the output.  To serialize the dictionary:



        static readonly Object Locker = new object();
        public void Save()
        {
            lock (Locker)
            {
                File.WriteAllText(reportFilePath,
                    JsonConvert.SerializeObject(_dictionary, Formatting.Indented, new JsonSerializerSettings
                    {
                        TypeNameHandling = TypeNameHandling.Objects,
                        TypeNameAssemblyFormat = System.Runtime.Serialization.Formatters.FormatterAssemblyStyle.Simple
                    }));
            }
        }


To bring the objects back:

         public void Load()
        {
            _dictionary = JsonConvert.DeserializeObject>(File.ReadAllText(reportFilePath),
                new JsonSerializerSettings
                {
                    TypeNameHandling = TypeNameHandling.Objects
                });
        }



This does make the json file larger, but for us, it's well worth the price.






Saturday, February 07, 2015

How Governments Secretly Borrow from Employees

While talking with my Dad about his time in the Air Force, he mentioned that during the Vietnam War, wages for pilots were a fraction of what commercial pilots earned. He said the understanding was that the pay was low now, but you can retire early with a great pay in 25 years.

Friends who work for the city of Austin echo this sentiment as well - the pay for city employees is lower than the private sector, but the retirement is great - good monthly checks and subsidized health care.

What the government is actually doing is covertly borrowing money from its employees.

Promising hefty retirement benefits for low pay now is bad for because it masks the true cost of the government, so people don't know how terrible the public finances are.

Friday, January 23, 2015

Estimating Sprint Story Effort with PlanningPoker.com

For our next sprint, our Argentinian developer suggested we use Mountain Goat's www.PlanningPoker.com to do our story estimation. To my surprise, using it was very easy. I had an account in 30 seconds (thanks Ken for not making me retype my password when creating an account - that always annoys me - if I mess it up I'll do the "forgot password" link). I emailed our team members the link that PlanningPoker gave me and we were off and running.

I was a little skeptical that it would be worth our while, but estimating was easier using the tool.
I'd recommend it.  We didn't create a story entry for each story, just used the first one and then overlaid a list of stories entered into emacs on the webex screen, everyone discussed the story and we re-voted on the "original" one.  The stories will then go into Jira with the estimated effort.
Best of all it's free.


Thursday, January 01, 2015

MacOS Finder Window Not Refreshing

I'm running MacOS 10.10.1 Yosemite and the Finder window is not refresing to show new files I programmatically put in the directory.
Switching to the parent directory and coming back didn't work. Closing the Finder window and re-opening did not work.
Finally I had to open a terminal and entered "killall Finder". This finally worked.

Wednesday, December 31, 2014

Windows 7: Getting a Black background with White Text

A normal Windows 7 screen with a white background and black letters is way too bright for my tender eyes. After a while it will give me a headache.

I've tried setting the Theme (right click on desktop background and select "Personalize") to a HighContrast black. This works to a degree. Microsoft Word acts correctly, but many products do not look at the theme colors to display text.

And I've used Firefox's excellent "Blank Your Monitor" plugin to change websites to a different color theme. The major problem with this is that some commands on a page are drawn in such a way that you don't see them at all.

I've starting using Microsoft's Invert Color program. It's similar to the Mac's invert color (Control-Option-Command-8), but a little clunkier.

To invert the color you have to run the Magnify program by pressing Windows and "+" key, then unmagnify by pressing Windows plus the "-" command (you must release the Windows key in between). Then the real command is Ctl-Alt-i to invert the colors. Then everything is beautiful.

One issue is my favorite background image is reversed colored which looks awful. The solution? Fire up Paint.Net, grab you favorite image and invert its color. Then save it and use it as your background.

You get bonus points if you can identify the picture shown below.