Posts

Do you believe in Astrology?

Have you ever seen a newspaper headline, "Psychic Wins Lottery"? Or, "Astrologer Wins Lottery"? In one poll, 31% of Americans expressed a belief in astrology and, according to another study, 39% considered it scientific. The core beliefs of astrology were prevalent in parts of the ancient world and are epitomized in the Hermetic maxim, "as above, so below". Tycho Brahe used a similar phrase to summarize his studies in astrology: suspiciendo despicio , "by looking up I see downward". Although the principle that events in the heavens are mirrored by those on Earth was once generally held in most traditions of astrology around the world, in the West there has historically been a debate among astrologers over the nature of the mechanism behind astrology. In other words, the so-called experts cannot even agree how to practice it! Predictive astrology, in the Western tradition, employs two main methods: astrological transits and astrological progres...

A Twenty Five Cent Developer Meal

Image
With 2011 rolling in and the economy still hovering around 10% unemployment, it’s more important than ever to economize. Dr.Dotnetsky, our kind denizen of eggheadcafe.com ,  passed on this great economy meal tip and I’m reproducing it here: Ingredients: 1 Package Maruchan Ramen Noodle Soup 1 small bunch scallions, chopped 10 Baby Spinach leaves, chopped Dash Toasted Sesame Oil 3 dashes Sushi Rice Seasoning Maruchan Ramen comes in a number of flavors. Each comes with a seasoning packet. They are available for sale at grocery stores nationwide for as low as 6 for $1.00. (Dood – that’s seventeen cents a piece!) Heat up a saucepan with 2 cups water. Throw in the noodles. After the noodles start boiling, throw in the spinach leaves and the scallions. Add the sesame oil and the Sushi Rice seasoning (it’s just flavored vinegar) Add the seasoning packet contents. Turn off the heat after 3 minutes, stir, and pour into a bowl. Enjoy! Dr. Dotnetsy recommends that with the money ...

Weimar Moment Coming

Tomorrow the FED will, in all its inglorious righteousness, decide whether to print either $500 Billion or $ 1 Trillion in new fiat money to purchase securities. There's already been agricultural and commodity inflation (Think "food") for the better part of 2010. This will now send prices through the roof. These idiots have absolutely NO EARTHLY IDEA what they're doing or what the consequences are. Sooner or later, our FED devalued greenback will filter down to the consumer. Ron Paul, where are you when I need you? You're the only guy with the guts to be willing to abolish the Federal Reserve. There is no such thing as a "free lunch". If you print money the way the Obama Administration has done (in addition to spending it foolishly), somebody is going to have to pay the Piper. We can't get these idiots out of office fast enough. UPDATE: As of Nov 3 2010 the FED has announced a new program where they'll print enough fiat money to purchas...

New Silverlight Article

I posted a new article on Silverlight at eggheadcafe.com . This covers the use of Rene Schulte’s WriteableBitmapEx offering to create Hopalong Fractals.

Don’t Forget.

Image
On September 11, 2001, fanatic Islamist extremists declared war on America. They are still out there . They are determined to kill Americans. The rationale is not important when you are dealing with maniacs. There is only one choice: Eliminate them, so that they can never do it again. ServicePeople: Your service to the United States is deeply appreciated. We owe you a deep debt of gratitude for your selfless dedication to protecting everything we believe in – freedom, liberty, and life. We won’t forget the sacrifices you and your families have made in defense of the American way. DON’T FORGET.

GUIDs

NOTE: There is a more complete article on eggheadcafe.com here .

Get File Length over http before you download it

This is one of those forum questions that you “think” you know the answer to, and then you’re proven wrong. User wants to download a file from a remote site but they do not want to proceed with the download if the file is larger than 10MB. Make sense, right? I said there was no way to do this without downloading the file. I was wrong. Here’s how he solved his own problem: static void Main(string[] args) { string completeUrl = "http://www.eggheadcafe.com/FileUpload/1145921998_ObjectDumper.zip"; WebClient obj = new WebClient(); Stream s = obj.OpenRead(completeUrl); Console.WriteLine( obj.ResponseHeaders["Content-Length"].ToString()); s.Close(); obj = null; Console.ReadLine(); } The above correctly reports the file size of 85,827 bytes without ever downloading the file! Somebody had a problem. Instead of giving up (or worse, taking my so-called “expert advice”) he thought  “outside the box” and found a solution. I call that outstanding! NOTE: At least one comm...

Don’t criticize – Be a Mentor

I tweeted this concept recently and got a very positive response. As developers, business owners, partners, and gurus of various breeds, we are constantly exposed to situations where things other people do just don’t seem to fit our personal paradigm. Sometimes, a natural reaction may be to put somebody down or make a sarcastic comment. Don’t do it. Environments like this create a situation where we can excel as developers, or we can turn them into a situation where we turn out to be a complete and total ass because of our behavior towards others. No matter what the situation is, you can catch more flies with honey than with vinegar. There is NEVER a situation where putting somebody down will further the effort – not in development, not in personal interactions, not in a group. Never . What you need to do is step back, hold your breath, and think. Then, hopefully, you can find the resources in your inner being to respond in a positive manner. The results, if you work on...

MongoDb NoRM MonoDevelop on Ubuntu Linux

  This weekend I spent some time setting up Ubuntu Desktop on my Oracle VirtualBox. I installed MonoDevelop, and MongoDb. I added an ASP.NET Web Application that uses the NoRM C# Driver, and after a little futzing (like changing the port on the MonoDevelop XPS web server) it built and ran great! Interestingly, it was a  Visual Studio 2010 solution, but MonoDevelop was able to open it anyway. All I had to do is remove some of the references that “didn’t belong”, and remove the targetFramework attribute from the web.config. Now that’s quite an accomplishment, since I am most definitely not a Linux guy. Kudos to the MonoDevelop guys. They’ve done a great job. And it just shows how portable MongoDb really is. Being able to build and run .NET applications and  even ASP.NET apps on Linux is a big plus.

LINQ THINK

The more I use LINQ, the more I run into legacy code that can easily be improved. The nice thing about LINQ is that it can make your code more elegant and easier to understand, as well as, in most cases, more efficient. Let’s take a simple  example. Here I’ve extracted some legacy code in the form of a method that tells you if a given string “Key” is present in a string array. First, the “OLD” way: //"OLD" way: static bool IsKeyInArray(string[] items, string key) { if (items == null) return false; if (items.Length < 1) return false; if (String.IsNullOrEmpty(key)) return false; foreach (string item in items) { if (item.Trim() == key) { return true; } } return false; } The obvious  thing to see here is that we have to iterate over the entire array. Now the new “LINQY” way: static bool IsKeyInArray2(string[] items, string key) { bool isInArray = false; if (items == null || items.Length <1 || String.IsNullOrEmpty( key)) return false; if (items.ToList().Contains(key...