Sunday, November 19, 2006

One argument script pimps use frequently is that it doesn’t matter what tools a contractor uses to build a house as long as the finished product is the same.

The problem with this argument is that the premise and the analogy are flawed.  Comparing the language to the tools is not quite accurate.  The language is more aptly compared to the building materials used instead of the tools.  The tools would instead include things like the IDE.  With the analogy corrected we now see that the choice of building material is very important.  Using 2x4's instead 2x6's will have a big impact on insulation properties (thicker wall cavities) and cost. 

Is this important?  Absolutely!  

Unfortunately, too many scripting language fans (script pimps) make the same flawed analogy in order to justify the use of their pet language instead of a higher performance language like C++ (or C#, Java, etc).  Scripting languages like Ruby are slower then compiled languages.  Also their nature precludes them from having good IDE support.  This is because much of the meaning (context) can’t be derived until runtime so things like IntelliSense become difficult if not impossible to implement. 

Following the scripter’s analysis we are supposed to assume that scripting languages allow faster construction which I would say is another falsehood.  Yes, some contractors might be able to cut wood just as fast with a handsaw but most want to use as much automation as possible.  Hence, table saws, compound miter saws with laser guides, etc.  These automation tools are closer to Visual Studio than VIM. 

In my experience with Ruby (among other languages) I found that the resulting programs were usually slower, which a scripting language will be by its nature.  I also found that the emperor wears no clothes!  Shockingly, developing in a scripting language is slower because of the lack of automation tools.  Example, try to find all references to variable in a Ruby on Rails project.  Now try the same thing in a C# project using Visual Studio.  In Visual Studio it’s a right click and “Find All References”.  In VIM you could search for the references but you don’t have any support for context.  You don’t know that is the only reference to that variable.  You are using a handsaw instead of the best tools available.

I'm sorry but reality demands that 1 = 1 and slower is slower and speed is important.

Sunday, November 19, 2006 9:53:49 AM (Central Standard Time, UTC-06:00)  #    Comments [0]
 Wednesday, November 15, 2006
As you may have noticed, I'm on a performance kick as of late.  Here's one more tip for you.  Compressing / Minimizing / Shrinking your JavaScript files can decrease download times.  Putting your scripts together in one file will also help performance.  Here's a good article on reducing page load times from a Google engineer.  This article is the source for most of this wisdom.

So armed with this new knowledge I went in search of some pre-shrunk versions of the Prototype and Scriptaculous JavaScript Libraries.  This is what I found.  I still need to test the library but it seems promising.  I will keep you posted.

Wednesday, November 15, 2006 11:44:42 PM (Central Standard Time, UTC-06:00)  #    Comments [0]
Ok URL Rewriting is good.  I won't go into the reasons why but if your searching for it then you already know you want it. 

If you followed the standard progression you probably started with this MSDN article on URL Rewriting.  This implementation works fairly well in ASP.NET 1.x.  However, I've run into problems using this implementation in ASP.NET 2.0 with output caching.  For some reason it breaks output caching.

So what is the solution?

Well I'm glad you asked.  I've found a solution that works quite well with ASP.NET 2.0 and output caching.  The UrlRewritingNet.UrlRewrite assembly provides all the features of the original URL Rewriter mentioned above but also fixes the problems with output caching plus adds some interesting features like redirecting and programmatic access to the rewrite rules at runtime (say that ten times fast!). 

I'm currently using this on http://www.whatsyour20.com and I must say it works quite well.  I also like the fact that it is an active project and it even has a bug tracker system.  There is also a forum for this project.  That's always a good sign.

Enjoy!

 |  | 
Wednesday, November 15, 2006 10:20:11 PM (Central Standard Time, UTC-06:00)  #    Comments [0]
What do you do when you want HTTP Compression to speed up your site but you are using ASP.NET (1.x or 2.0) in a hosted environment?

You get HttpCompress from www.blowery.org/code/httpcompressionmodule.html. This is a module that sits inline and handles compression of your .aspx pages and any other mime type that may be handled by ASP.NET.  This is a pretty good work around if you don't have permission to IIS to enable HTTP Compression there.  Of course that would be a better solution but many hosters won't enable it because of the possible CPU consumption issues.  Oh well, get around them by implementing your own solution!

I know dasBlog uses it in the 1.9.x version.  WhatsYour20.com is also using it at this time.

It's been around for awhile, it's configurable and it's easy to use. 

Give it a try and speed up your site today!

One caveat is testing it using ASP.NET Development Server.  Check out the link for more info.

 |  | 
Wednesday, November 15, 2006 10:10:06 PM (Central Standard Time, UTC-06:00)  #    Comments [0]
I've not researched this to find out if all the numbers presented are correct, so for the sake of argument I will assume they are.

This video suggests we are being overrun by immigrants and that our population will sky rocket because of their birth rates.

Now I’m somewhat of the opinion that more people are better because you have more innovation etc, but I also believe we are experiencing some problems from this mass human migration.

I wonder if the pressure on the bottom end of the housing market is driving up prices and that the huge number of new laborers in the job market is keeping wages stagnant.  So we will experience higher costs from housing and other sources as we compete for scarcer resources (oil, natural gas, land) while having less money in real terms.

As a Libertarian where do I stand on this?  As I stated previously I think more people can spur innovation and can be a boon to the economy.  This of course assumes that new immigrants don't require many services from the government which unfortunetaly is not the case in our socialist country.  We provide many services to these people and their dependants.  So in a free society law abiding people should be able to come and go as they see fit.  However when these people expect/require services and violate the law to get here, by definition I have a problem with that. 

I have no problem with admitting an unlimited number of PhD's into this country for instance.  I have a slight problem though admitting an unlimited number of gardeners and meat cutters that will require my assistance because the Left in this country has decided to use the police power of the state to ensure my money can be forcefully taken from me and restributed to the "poor" (poorer then whom?) and "those less fortunate" (less fortunante the whom?). 

So because many of these people will be entitled to the wealth of the current citizens I don't believe the pure Libertarian argument would apply in this situation.

Here is the link, hang in there the beginning is slow but the visuals are worth it ( kind of like an acid trip ;) ):

Visual Demonstration of Immigration to the US


Wednesday, November 15, 2006 4:59:30 PM (Central Standard Time, UTC-06:00)  #    Comments [0]
 Tuesday, November 14, 2006
So if you're having odd issues with a JavaScript function like WebForm_InitCallback(); which is a built in ASP.NET JavaScript function and you are using the HTTP Compression Handler from blowery and you are testing a site on the ASP.NET development server, I may have a fix for you. 

In your web.config you should add an exclude statement to exclude the WebResource.axd path:

        <httpCompress preferredAlgorithm="gzip" compressionLevel="high">
            <excludedMimeTypes>
                <add type="image/jpeg" />
                <add type="image/gif" />
                <add type="image/png" />
            </excludedMimeTypes>
            <excludedPaths>
                <add path="WebResource.axd"/>
            </excludedPaths>
        </httpCompress>


Tuesday, November 14, 2006 4:08:45 PM (Central Standard Time, UTC-06:00)  #    Comments [0]
I just updated from dasBlog 1.8.x to 1.9.x and everything appears to be smooth.  I notice much better performance.  Several reasons could be a changed of hosting plan or that dasBlog now uses HTTP Compression.  Either way I'm happy with the speed up and I'm playing with the new features to see what if any I can use.

Tuesday, November 14, 2006 9:35:06 AM (Central Standard Time, UTC-06:00)  #    Comments [0]
 Friday, November 10, 2006
I wrote this Quick Start Guide to Subversion a while ago and it's still pretty good.  However I've recently come across the Free Subversion (SVN) Book.  It's a pretty good online book available in HTML or PDF and it's totally free

Subversion is still one of the best Source Control systems I've used. 

Friday, November 10, 2006 4:52:15 PM (Central Standard Time, UTC-06:00)  #    Comments [0]
A change from asp.net 1.x to 2.0 that has been over looked at least by me is the new data binding expression syntax.  You no longer need something like DataBinder.Eval(Container.DataItem,"MyDataItem")).  Instead you can use something like this: Eval("MyDataItem")).

I know it's not as sexy as caching or super happy fun time crazy drag and drop AJAX controls but the little things make all the difference.

Save your fingers use the new data binding syntax.

Friday, November 10, 2006 4:18:31 PM (Central Standard Time, UTC-06:00)  #    Comments [0]
 Thursday, November 02, 2006
Here's one thing that I constantly want to do.  I have a lookup table of some sort that needs to be moved to another database, but the data may need to be massaged somewhat before moving it around.  Plus I may want to store it in plain text format for versioning etc.

To this point I've been too lazy to implement it but I found a SQL guru (he must be if he went throught the trouble to write this) that has implemented just what I need.

I've used it this morning already and I'm quite happy.

Generate SQL statements from existing data in a table

Thursday, November 02, 2006 10:29:04 AM (Central Standard Time, UTC-06:00)  #    Comments [0]
 Thursday, October 26, 2006

I am no longer a registered Republican.  I am now a Libertarian.  Yes, I finally have had enough of the Republican Jeebus please-us spend-a-thon.

I can't say I left the Republican party, I can however say the Republican party has left me behind.  I'm not concerned about monitoring grown adult's bedrooms for deviant behavior and I have long since realized that Mohammad-fearing fundamentalists are not the greatest threat to this country.

Government is the biggest threat to our republic.  George Bush likes big government.  Therefore I can no longer support him or his party.  The war in Iraq has little to do with my change in parties.  In fact my conversion is mostly due to the growth of government and the resulting deficits that Big Dubbya is going to leave my generation (Gee thanks a lot).  At least we can now get to Ketchikan.  Ah yes Ketchikan, I knew a kid from Ketchikan that almost got kicked out of school for heroine abuse but I digress.

I dream of a day when we have a two party system of Libertarians and perhaps Republicans.  By then the childish idea of Socialism as championed by the Democrats will just be another sad chapter in the history of this country much like slavery and the criminalization of recreational drugs.

Viva La Revolution!

Thursday, October 26, 2006 7:10:45 PM (Central Standard Time, UTC-06:00)  #    Comments [0]
 Tuesday, October 24, 2006

This week's reading assignment can be found here:

We're all big babies

This guy stole my idea for my second book but I'll let that slide for now.  Our society is devolving into an ipod filled, Paris Hilton admiring child care center.  Many of my friends and contemporaries frighten me with their child like behavior and attitudes.  Actually, most of my friends and colleagues are OK, the people who truly concern me are the casual acquaintances and and people that I interact with in public at the gym or in a store, e.g. situation that I can't help but interact with these fools.

Examples:
Adult mothers wearing "MILF" t-shirts (Britney Spears style).

Adult woman dressed as teen aged hookers.  These are the woman that wear tight jeans and tops when they are in the 40's and 50's.  What is wrong with dressing in something more suitable to your age?  I find a woman much more alluring when she dresses appropriately.  I'm  not a prude I just don't want to see your mom's saggy boobs hanging out of her baby t belly shirt.  (shiver).

There is just something about a woman in the appropriate clothing (a business suit, etc) that some men find very attractive.

Men in their 50's wearing hip-hop style baggy jeans is another non-starter.  What up with that homey g pimp daddy Ted?  Ted shouldn't wear that kind of stuff.  Actually nobody should wear that kind of stuff.  I love the old movies where everyone is wearing a suit or a dress.  The people in those movies are adults.  They say adult things and make adult decisions.

An adult buying a toy on credit.

I mean taking a loan to purchase a boat, jet ski, motorcycle, etc.  These are toys.  If you must take a loan out to buy this then you are a child plain and simple.  You are ridiculous.

A hobby you can not afford.

This is related to the above example.  Do you spend every weekend involved in an activity that is utterly non productive?  Do you spend a large amount of money on this hobby?  Do you make sacrifices for this hobby?  My grandparents had hobbies.  Gardening comes to mind.  They grew their own food.  I just don't understand the elevation of golf or hunting or fishing or football watching from a waste of time to a priority.  These activities are for retirement.  You should not be wasting all your money and time as a young man on frivolous activities.

The worst part of this whole deal is that this fool will want to talk to you about this hobby as if you give two shits about their childish pursuit of the great horned snipe.

Politics is Stupid.

Arggghhhh!  I think politicians love it when people get discouraged.  If you are too stupid or lazy or both to care about politics then not voting is your best option.  Please drive your jet ski into a boat dock and spare all of us your ignorance. 

Lack of a personal philosophy.

Do you live by a set of values?  Do you have standards?  I can't imagine discussing philosophy with today's Tylers and Skylers (my code for the boy-men of our era).  What are your goals?  What do you want to do with your life?  If you simply want to golf every weekend and watch football and drink so much alcohol you piss and shit yourself then by all means philosophy is not for you.

My puppy/kitty/fish/hamster/turtle is part of the family.

Thinking a pet is part of the family is childish.  This is how children think.  I love my big fluffy doggy.  Ooohhh, how cute.  It is cute when you are 5 but not when you are 35.  Grow up.  Don't let your dog shit on my lawn.  Take care of the damned thing.  Take it for a walk, give it a bath.  I'm all for responsible pet ownership but when a childish adult refuses to take care of his or her pet it is utterly infuriating and just plain pathetic.  Oh, and if your dog bites me I will do my best to have the animal put down, even if I must do it myself.  Your stupidity does not supersede my rights.

Tuesday, October 24, 2006 4:25:32 PM (Central Standard Time, UTC-06:00)  #    Comments [0]