New Code Monkey Cover

by Nick Wednesday, July 09, 2008 4:29 PM

Jonathan Coulton pointed out this great cover of his song Code Monkey (no relation to my blog) which was done by The Grammar Club.  Take a listen:

How Much JavaScript is Too Much?

by Nick Wednesday, July 09, 2008 9:30 AM

One of the things I try to do on my blogs (especially my other blog) is to get as much of the processing to be done server side, with as few outside dependencies as possible.  There are a few reasons for this.  One is that I can better control any problems that may occur because the source is more easily known.  Second, it allows for more server side caching.  Third is that it is a pendulum reaction to when I used to host on Blogger and everything I wanted extra had to be provided through a third party via JavaScript.  My old Blogger blogs got to be really slow as I tried to add more and more features.

I like to think that I keep a nice balance of server side and client side processing for all my sites.  One of the political blogs that I keep tabs on is Wigderson Library & Pub.  James is a big fan of advertising, and JavaScript.  Luckily I only read his site through his RSS feed... because if I actually had to go to his site to check his content, it would drive me nuts.  For fun, I decided to "battle" Jim using Webslug, which measures comparative load time performance between two sites.  Here are the results:

NickVsWiggy

 

You're reading that right... 192 seconds, or over 3 minutes for the page to finish loading.  Now then... it's not as bad as it seems, since the positioning of the JavaScript allows the page to render the majority of its content before that.  But still... at what point do you declare that you have too much JavaScript?  And for folks like Jim, who still use third party applications like Blogger for all his content, what are the alternatives to speed load time?

How Did I Get Started In Software Development?

by Nick Thursday, July 03, 2008 2:54 PM

Derik didn't tag me, but I found his responses so similar to mine, that I thought I'd jump into the meme...

How old were you when you started programming?  Like Derik, I was a relative late bloomer into programming.  I had a IBM PC XT at home, and I had a knack for writing nice and tidy batch scripts, but I didn't really get into real programming until I took an programming class in high school.  The normal class conflicted with the AP Calculus class that I was taking, so I took it with a friend independent study.  We would get our assignments for the week on Monday morning, finish them all by the end of that day, and then tutor people in Calculus in the library.

What was your first language?  Technically I guess it was True BASIC... though I also did a lot with QBasic.  I also did a little bit with Pascal back then... oh those were the days. Aside from the basic learning programs in class, the biggest program I wrote back then was an analog clock with real time display and a second hand.

What was the first real program you wrote?  I guess the first real program that I ever wrote was a web application (at least that's what we call it know) in Perl for a company to do online dispute resolution.  It actually was a pretty major endeavor, and aside from some patent issues, was pretty innovative.  To date, that is the one and only project I've ever written in Perl.  *shudder*

If you knew then what you know now, would you have started programming?  Duh... of course.  I also would have started sooner, not that I ever felt that behind... it's just I would have enjoyed it just as much even earlier I think.  I've never had a bad experience programming (aside from some normal bad jobs that any profession can have), that has made me regret being a programmer.

If there is one thing you learned along the way that you can tell new developers, what would it be?  Document!  Save emails!  I don't know how many times a decision was made by someone which led to a major architectural decision, only to be undone later by the same person, claiming he had no knowledge of the earlier decision.  If someone tells you something important verbally, send them a confirmation email and keep a record of it.

What was the most fun you've ever had... programming?  I'd say the last few jobs I've had with a small group of guys from my consulting company have been the best.  It's a great group, who knows what they're doing, just does the work, and we drink afterwards.  Really... how much better can it get?

Who am I calling out?

I'm not going to call out anyone in particular, but if you do decide to add to the fun, just leave a comment so I know!

Must Have Productivity Software?

by Nick Thursday, June 12, 2008 11:20 AM

Last night I headed down to Chicago for the monthly Alt.NET meeting, which was at the ThoughtWorks office.  Just briefly, that looks like a great place to work... they have a gorgeous office.

The meeting was mostly a smack down between ReSharper and CodeRush.  I seemed to stand out early on because they first asked which people in the audience used which one.  I think I was the only one in the audience that used neither... I am a Visual Studio purest.  For one, I was never willing to fork out > $100 for a productivity package like that.  For another... I like writing that much code by hand because I genuinely believe that it makes me think about my code and my architecture more.

Afterwards, I won a license to my choice of ReSharper, CodeRush or SqlPrompt.  Based on the smack down (which was done Horse style thanks to my suggestion), I had to say that CodeRush looked much cooler, and from a usability standpoint, seemed to be the better choice.  Hopefully I'll have my license in hand soon so I can test it out, and report on whether I think its worth the money, or whether it helps or hinders my code writing.

Out of the tools they gave away, the one they only showed briefly was SqlPrompt.  From the brief demo, all I can say is wow.  Intellisense in SQL Management Studio, or even Notepad?  Are you kidding me?  I'd love to get my hands on a copy of that... but once again... not sure I can justify the cost to myself.

LINQ and Stored Procedures Not Always Magic

by Nick Monday, June 09, 2008 3:45 PM

I had an interesting experience while trying to import a stored procedure into a LINQ to SQL Classes Designer surface today.  Normally this is a pretty straightforward process.  First you open Server Explorer, then go to one of your connections, find the stored procedure, and then drag and drop it onto the designer surface.  Boom, it's suddenly available from your DataContext as a method. 

That's exactly what I did today, except when I created a var for the stored procedure result set, and then added a foreach to loop through the rows in the result set... nothing showed in my Intellisense.  Huh?  A little hover magic and I saw that my generated method was returning an int.

After some investigation, I found that the designer has a hard time handling stored procedures that use temporary tables in them, as it throws off the procedure meta data.  As it turns out, there are two possible solutions.  First, you can use a table variable instead:

DECLARE @tempTable TABLE ( ... )

Your second option is to continue to use a temporary table, but hand modify your dbml file using an XML editor.  Simply right click on the file in Solution Explorer and choose Open With and then choose your favorite XML editor.  Mine is Notepad2.  Search through the file for your stored procedure, which for a procedure named "storedProcedureName" might look like this:

<Function Name="dbo.storedProcedureName" Method="storedProcedureName">
  <Parameter Name="Parameter1" Parameter="Parameter1" Type="System.Int32" DbType="Int" />
  <Return Type="System.Int32" />
</Function>

Then remove the <Return ... /> element and replace it with an <ElementType> node which may look like this:

<Function Name="dbo.storedProcedureName" Method="storedProcedureName">
  <Parameter Name="Parameter1" Parameter="Parameter1" Type="System.Int32" DbType="Int" />
  <ElementType Name="storedProcedureNameResult">
    <Column Name="Result1" Type="System.Int32" DbType="int NOT NULL" CanBeNull="false" />
    <Column Name="Result2" Type="System.String" DbType="varchar(10) NOT NULL" CanBeNull="false" />
    <!-- ... -->
  </ElementType>
</Function>
This second method is the one that I used since my temporary table will hold thousands of rows, which is too inefficient for a table variable.

How to Get a Geeky Guy

by Nick Monday, June 09, 2008 8:31 AM

For all those ladies interested in catching a geeky guy... or keeping one once you've snagged him, here is a funny guide for you.  Via @larryclarkin.

Looking For Some Cool Free Software?

by Nick Friday, June 06, 2008 11:27 AM

The Quoteable Coworker

by Nick Wednesday, June 04, 2008 1:10 PM

The names, as always, have been withheld to protect the innocent...

Coworker 1:  I haven't exactly seen numbers showing .NET running circles around VB6 performance wise.
Coworker 2:  You haven't?  I'll go find some right now.
Coworker 1:  But not from Microsoft.
Coworker 2:  Why?  They created both, so they should be unbiased.

When Good XML Goes Bad

by Nick Monday, June 02, 2008 11:42 AM

Coding Horror recently went after XML as being a rather poor option for many things.  I generally don't agree with that sentiment, but I do agree with the idea that there is good XML structure and bad.  Here is an example of bad XML structure that is required to use a control library from Janus.  This sample XML snippet is required to define the columns in their grid control:

<Columns Collection="true">
  <Column0 ID="">
    <Caption>Home Term</Caption>
    <EditType>NoEdit</EditType>
    <Position>0</Position>
    <Width>73</Width>
  </Column0>
  <Column1 ID="Column1">
    <Caption>Driver</Caption>
    <EditType>NoEdit</EditType>
    <Key>Column1</Key>
    <Position>1</Position>
  </Column1>
  <!-- ... -->
</Columns>
The controls so far look rather nice, and fairly functional and complete.  At issue here is the use of tag names like "Column0" and "Column1".  A well designed XML structure would just have "Column" tags, and then use some sort of extra identifier... which ironically... they already do!  Yet they require that the tag name matches the identifier.  Definitely not a good use of XML's inherent structure and definition abilities.

Building a New Desktop Part I

by Nick Thursday, May 29, 2008 6:46 PM

This is the first in a multi-part series on building a new desktop computer.  To be honest, I've been horribly lax in my computer setup at home.  I've had desktops in the past, but have let them go unused in favor of various laptops that turned into my do-all machines.  As I looked at the things I've wanted to do going forward, and projects that I wish to undertake, I've realized that I need to offload some things onto a more dedicated server type machine, and under take new practices personally like my own source code control for personal projects.

I used to build new machines every few years, but haven't done it for a while, and haven't really even kept up to date on the latest hardware available.  But after reading a few articles on Coding Horror and Maximum PC, I've built up a nice parts list.  But before I share the list, I thought I'd share some of my goals for the machine.

Server:  This machine will not run a serve operating system as it's primary OS, but it will have many server like responsibilities.  I plan on using Vista Ultimate 64-Bit.  I'd like to run SQL Server, SVN, IIS, and potentially Mantis on this machine, as well as use it for basic file server and print server uses.

Testing:  I'd like to have multiple Virtual Machines running with different operating systems that I don't normally use in order to experiment and learn.  I'd like to have Windows Server 2008, Ubuntu, and possibly OS X installed as virtual machines.

Fun:  Yes, I'd like to have fun with this machine as well.  I'd like to be able to have decent media capabilities, and possibly be a stronger workhorse for more complicated photography operations and video editing.

Of course there is the old saying that a jack of all trades is a master of none... but I'm going to try to make this machine a good all around workhorse.  With that said, here is what I've purchased:

Case: Cooler Master Cosmos 1000

Power Supply: Corsair CMPSU-520HX

Motherboard: MSI P35 Platinum Combo

Video Card: MSI NX8800GT 512M OC GeForce 8800 GT

CPU: Intel Core 2 Quad Q9300 Yorkfield 2.5GHz

CPU Cooler: Scythe SCNJ-1100P

Memory: 2 X Corsair Dominator 2GB (2 x 1GB) 240-Pin DDR2 SDRAM DDR2 1066 (Total of 4 GB)

Optical Drives:

LITE-ON 20X DVD±R DVD Burner with LightScribe
LITE-ON Black 12X DVD-ROM 32X CD-ROM SATA Blu-ray DVD-ROM

Disk Drives:

2 x Seagate ST3500630AS 500GB 7200 RPM
WD1500ADFD 150GB 10000 RPM

Monitor: Samsung 2043BWX High Gloss Piano Black 20" Widescreen LCD 

Everything is currently on order, and will hopefully arrive next week.  I'm also considering what's on my old desktops that I might want to salvage.  For instance, I have an Adaptec 1394UW with some decently large SCSI drives, and a SCSI Zip Drive.  Is it worth hooking up?  I also have an IDE media card reader which will get hooked up as well.

My next post will be the build!

About Me

Nick Schweitzer Nick Schweitzer
Wauwatosa, WI

Contact Me
I'm a Software Consultant in the Milwaukee area. Among various geeky pursuits, I'm also an amateur triathlete, and enjoy rock climbing. I also like to think I'm a political pundit. ... Full Bio

Community Involvement

Twitter

Archives

Flickr Photos

www.flickr.com
This is a Flickr badge showing public photos and videos from Nick_Schweitzer. Make your own badge here.

Standard Disclaimers

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2017 Nick Schweitzer