Friday, September 29, 2006
Part 2 of the series looks at the motivation to increase your income.
Friday, September 29, 2006 9:01:05 AM (Central Standard Time, UTC-06:00)  #    Comments [0]
 Thursday, September 21, 2006
Budgeting only gets you so far, after that you need to increase your income. Here is how I did it.
Thursday, September 21, 2006 6:13:39 PM (Central Standard Time, UTC-06:00)  #    Comments [0]
To quote Mel Gibson from Braveheart: "Frrreeeeeddddoommmmmmmm!!!!"
Thursday, September 21, 2006 5:56:26 PM (Central Standard Time, UTC-06:00)  #    Comments [0]
 Tuesday, September 19, 2006
Scoble has been irritating me for a while now. This latest steaming pile of poo-poo has pushed me too far.
Tuesday, September 19, 2006 8:12:37 PM (Central Standard Time, UTC-06:00)  #    Comments [0]
 Monday, September 18, 2006
Playing games an investment? Maybe. Yes your kid might not be wasting thier life in front of the computer, they may be preparing for a great career.
Monday, September 18, 2006 4:30:47 PM (Central Standard Time, UTC-06:00)  #    Comments [0]
What happens when you water down the educational system and everybody gets into college?
Monday, September 18, 2006 9:50:37 AM (Central Standard Time, UTC-06:00)  #    Comments [0]
 Sunday, September 17, 2006

Dear C#,

It's taken many months to get the courage up to write this letter.  I have been unfaithful.  I have cheated on you several times.  I won't go into all the details now because I know you will be too fragile to read all of the sordid details but I must confess my first indiscretion.  Her name was Ruby on Rails.  She promised me so many things like an automagical data access layer and super fast site creation.  Only now I realize that she was a cheap whore, pimped by a slick smooth-talking metrosexual Dane with a knack for finding the weaknesses of enterprise developers and exploiting them.

I feel so dirty but I have to say this.  The cheating was only part of it.  I was also using pretty heavily.  I was using VIM several times a day.  That's when I suspected I had a problem.  I think I knew I hit rock bottom when I stooped to hitting the Exuberant Ctags for a fix.  It was Ruby that got me hooked on that crap.  I was so sold on her elegance and simplicity I ignored the hoops I was jumping through to get a decent editor.  The whole time this was happing Visual Studio 2003 just waited patiently for my return with a knowing look.  VS2003 knew she was better but she let me find out for myself.  Like a parent who knows the only way to teach a child a lesson is to let them learn it on his own, you knowingly looked on as I struggled in vain with a succession of seedier solutions for text editing.  There was the aforementioned VIM, SciTE, jEdit, and the abomination to end abominations radrails.  When you are reduced to an orgy of J2EE acronyms to stay agile you know you have a problem.  The Pimp himself has so shamelessly denigrated Java, yet many of his clientèle must turn to Java to make sleeping with Ruby a tolerable experience. 

I now know what it must be like to be a fan of Anna Nicole Smith and then to meet her in person and then to realize what a waste of chemical compounds she has turned into.  She's apparently beautiful but once you here her talk you realize there's nothing going on in there.  So I liken the experience I had meeting Ruby on Rails.  Seemingly beautiful on the outside but utterly deranged once you get passed the magical ActiveRecord song and dance show. 

I'm physically drained.  That's all I can stand to write for now.  I have more to confess like using Daedalus to keep Ruby up on running once she would go on her nightly benders and the inevitable crash afterwords (I guess she was really Like Ms. Smith!) but I will leave that for later. 

Sunday, September 17, 2006 4:02:16 PM (Central Standard Time, UTC-06:00)  #    Comments [0]
 Saturday, September 16, 2006

To Be Completed...

Saturday, September 16, 2006 11:05:15 PM (Central Standard Time, UTC-06:00)  #    Comments [0]

After reading this post about a bad job I think back to my worst job.  Was it cleaning barns? No.  Was it assembling doors in a factory?  No.  Was it tarring roads?  No.  Was it mopping floors?  No.  I've done all those things and more but these jobs were not the worst jobs I've had.  There was something honest about them because of the labor involved and getting paid for what I did.  The worst job had to be with a huge bank with a large consumer finance division with a very profitable credit card division.  Think about those finance plans form places like Best Buy or Slumberland.  Then think about people getting into debt because they buy a lot of worthless junk then they get hurt or sick or get way too far over their heads in debt.  Then they get behind and then they go into collections.  That's where I came in.  I had to collect from these people. 

It sucked.

I heard the most awful stories in my life.  I felt dirty.  I hated it.  These people were like cornered animals.  Most you didn't feel sorry for because they were the victims of their own stupidity.  The ones with cancer or the ones whose husband/wife just died you felt pretty damn bad about and here you were calling them about a stupid credit card. 

However I credit this job with instilling in me the hatred of debt.  My goal is to be beholden to no other person and I am well on my way.  So thank you Big Bank for a life lesson I will never forget.

Saturday, September 16, 2006 8:28:38 PM (Central Standard Time, UTC-06:00)  #    Comments [0]

I probably should mention that IronPython is probably the ultimate example of alternative languages for the .NET framework.  It was developed first independently then in cooperation with Microsoft.  Microsoft made IronPython team member Jim Hugunin part of the CLR team.  Not a bad recruitment strategy, how many people can claim to have worked on porting a language to the .NET framework successfully.  IronPython seems to have all of the major .NET 2.0 features which Boo is still missing but Nemerle is way ahead on because Nemerle also has the C# 3.0 features. 

So IronPython looks pretty good if you're a Python fan.  I myself don't care for Python.  There is no particular reason to dislike Python, I'm sure it's a perfectly fine language.  I've played around with it a little bit but didn't find anything that convinced me that I needed to make Python part of my arsenal.  It's a nice enough scripting language along the lines of Ruby.  Which brings me to another point that I didn't mean to get to:  Languages seem to pick off the most converts from languages that are very similar.  For example, C# is about 95# Java and so someone who knows Java would feel at home in C#.  I think the same can be said very generally about Perl and Ruby but not to the same degree.  I think Python and Ruby are going to compete in the same niche but I don't really see the difference between them besides the syntactic niceties and some miscellaneous differences. 

I wonder if there is a biological law or principle about this?  I thought I remember learning about this at some point.  The principle is something like the individuals most like you will compete for the same resources.  Nursing kittens with compete with their litter mates for the limited resource of their mother's milk.  I think this is true for languages.  I come across some language projects that make me wonder why someone would want to do that.  What is reason someone would need another scripting language let alone another general purpose language (C, C++, Java --> C#,J#,J++,Visual Basic)?  One valid reason I can see is that it targets another platform like Unix or Windows or a mobile device or perhaps it offers some powerful language feature that can only be accomplished in a new language.  Or perhaps the old language is controlled by a competitor or some similar entity and simply extending it is not possible nor feasible. 

Many people complain (wrongly IMHO) about JavaScript.  I think it is a very elegant language once you understand how it works and what you want to do with it.  JavaScript (ECMAScript) was built for a new platform, the browser.  It also makes a fairly decent and powerful replacement for VBScript for Windows scripting using Windows Script Host (WSH).  So I see the point of that language.  But WTF is up with JScript.NET?  What is the point of this bastardization and castration of a perfectly good language?

Some languages like Java and Ruby had the intent of making Lispy features available to the Average Joe.  This may be blasphemy but I don't think Lisp is all that difficult to comprehend.  What is difficult to comprehend is all the hoops you have to jump through in Java, C#, etc to get quasi-Lispy stuff (see Reflection). 

So with IronPython we have another example of bringing an existing language to the framework instead of using that effort to get a better language for the .NET framework.  The more I think about it the more I think that Nemerle is a LFSP whereas something like C# is more of a safety language. 

The .NET framework and the CLR are powerful tools and a language like Nemerle shows us what is possible.  IronPython shows us what was possible ten years ago. 

Disclaimer:  I make my living writing mostly C# code at this point.  I have also made money with Java and Visual Basic in the past.  I have not made any money or with non-average languages...yet.

Saturday, September 16, 2006 2:52:03 PM (Central Standard Time, UTC-06:00)  #    Comments [0]
 Friday, September 15, 2006

I think when Microsoft introduced .NET and the declared that you where free to write in any language most people focused on bringing old crusty languages like COBOL to the modern .NET framework.  I'm not sure how successful this has been.  I'm not being critical, I simply do not know because I use C#, arguably the most mainstream of the .NET language families.  For the past few years I have flirted with languages like Ruby and Lisp and found some of the features of these languages to be intriguing.  C# is fairly powerful and is still being extended by Hejlsberg and company and is even starting to stretch into some Lispy areas with features like LINQ.  What I miss most in almost every language is the Lisp style macro.  These things are powerful, if you don't know what I'm talking about you need to check out Peter Seibel's Practical Common Lisp book.  Once you implement the MP3 database in Chapter 3 you should have a good idea what macros can do for you and your coding, especially if you write a lot of repetitive code (hint: database access, DAL, etc). 

The problem is that even thought I enjoy Ruby and Lisp the implementations for these languages are hit and miss.  The open-source implementations all feel like second class citizens on Windows XP.  Using Emacs as a text editor for Lisp when you are used to Visual Studio 2005 is a little disappointing.  Using GVIM to edit Ruby on Rails files leaves me with a similar sense of dissatisfaction.  These are great languages without great tools and with hit and miss implementation issues.  I have to say however that I am fairly comfortable with some of the commercial Lisp Implementations with LispWorks being the best all around when you consider licensing. 

Back to my point, I did not set out to author a diatribe on Lisp and Ruby, and I will leave that to the Flamer and the Flaming Flamed.  My intent is to write about two rather new languages that give me a lot of hope for the direction and potential of CLR languages: Boo and Nermerle.  Both of these languages support cool syntactic macros and add their own little twist to CLR programming.  Boo is about agility and keeping the code lean and clean and uses macros to support this concept.  Nemerle is a hybrid functional language very similar to C# but with the cool functional stuff like Pattern Matching and also C# 3.0 features.  What is interesting is the C# 3.0 features are implemented in the C# compiler and does not require support from the CLR.   CAUTION GENERALIZATION AHEAD!  Lisp macros are simply code that runs at compile time instead of run time.  So we are doing things in C# that sounds like an area where macros could make a huge impact.  In fact this is how Boo and Nemerle implement many of their advanced features, they are simply using macros.  So Greenspun's 10th Rule plays out again this time inside the CLR.  In fact if we design a language with Lispy-ness in mind we know that we need very few constructs to develop a very powerful language and I think Nemerle especially takes advantage of this fact.

These languages are not designed by Microsoft.  They are independent languages targeting the CLR.  So yes even though we are coming back around to Lisp, I for one am not disappointed but rather quite pleased.  If I can get the power of Lisp on a framework like .NET then I will be a happy camper.  I'm waiting for the tools around these languages to mature a bit and at this point I'm leading more towards Nemerle because it seems to be farther along and very well documented.  Once a plug-in for Visual Studio 2005 becomes mature I will definitely spend more time playing with this Nautilus machine for the mind. 

So all I want is a great language and great tools and I will be happy.  Is that really so bad?

Friday, September 15, 2006 8:44:52 PM (Central Standard Time, UTC-06:00)  #    Comments [0]

You may have noticed that I have added Google Ads to the site.  This is more of an experiment than anything else as I wanted to see how AdSense works and the best way to learn about something is to try it.  Obviously this is not a high traffic site but it has been up for a while and there is some very (if I so say so myself) high quality content so I might get some search traffic now and then.  My goal is to make enough to pay the hosting bill of the site and hone my SEO abilities so that I can make my other sites better.

If you have a blog I would encourage you to try AdSense or the sponsored search and see if it can take the sting out of your hosting bills.  You never know, you may find a new source of revenew that you can introduce your clients to and thus enhance thier profits and yours. 

Friday, September 15, 2006 7:59:27 PM (Central Standard Time, UTC-06:00)  #    Comments [0]

In the upcoming articles I will showcase my new PC and how I went from a bulgin' beige box o' noise to a sleek powerful dual core system that is not only fast but also nearly silent.

For now I will tell you that I bought the main system from EndPCNoise.  I believe I came across them as I was checking out SPCR

Friday, September 15, 2006 7:41:39 PM (Central Standard Time, UTC-06:00)  #    Comments [0]
 Wednesday, September 13, 2006

I have some large text files that I want to compress.  The key is that I want to keep them as separate files.  Let's use a little PowerShell scripting to keep this down to one line:

foreach ($file in ls *.txt ) {  & 'C:\Program Files\7-Zip\7z.exe' a ($file.name + '.zip') $file.name }

I'm using a simple foreach construct built into PowerShell.  I'm saying get all files in this directory that have a .txt extension and then iterate through those files executing whatever is between the curly brackets.  In this case it is the command to use 7Zip to compress the file into a new file named the same as the original file with the .zip extension tacked on the end.

 

Wednesday, September 13, 2006 12:08:23 PM (Central Standard Time, UTC-06:00)  #    Comments [0]

If you've ever wanted to BCP from inside a stored procedure here's how:

DECLARE @FileName varchar(50)
   ,@bcpCommand varchar(2000)
   ,@YearMonth char(7)

set @YearMonth = '2006-04'
SET @FileName = '\\server\share\folder\'+ @YearMonth +'.txt'

SET @bcpCommand = 'bcp "SELECT * FROM Northwind..tblSomeTable where SomeField like ''' + @YearMonth + '%''" queryout "'
SET @bcpCommand = @bcpCommand + @FileName + '" -U sa -P password -c'

print @bcpCommand
Exec master..xp_cmdshell @bcpCommand


Notice that in this example the BCP is using an sql query to filter the exported records.  Also notice that I am using the same filter as the name of the exported file.

Wednesday, September 13, 2006 11:43:15 AM (Central Standard Time, UTC-06:00)  #    Comments [0]