Code Analysis Tools (@JimHolmes)

By riceboyler on Feb 27 2010 | 0 Comments

How to make your code suck less

Complexity reduction

  • Cyclomatic Complexity – indicator that too much is going on in a class or a method (code smell)
    • How many different branches or paths your code has in it
  • Dependencies
  • Lines of Code
  • Stability
    • Unstable == few dependencies
      • Small fighter jet, very nimble, quick to react
    • Stable = many dependencies
      • Jumbo jet, slow to change directions
  • NDepend
    • Commercial tool that reads a VS project
    • Shows dependencies and other metrics to help find code smells
    • Great for refactoring and looking at legacy systems
  • VSTS Static Analysis
    • Calculate Code Metrics
  • .NET Reflector CodeMetrics add-in (http://www.red-gate.com – still a free version)
    • Will graph out dependencies (plugin)
    • Will show cyclomatic complexities to help find code smells
  • DevExpress CodeRush

Post info

Tags:
Categories:

SOLID Design Principles (@JonKruger)

By riceboyler on Feb 27 2010 | 0 Comments

Objects are like Legos.  Pieces are designed to work together and build together.  Take small pieces that can be implemented together.

Make code reusable so that you don’t repeat yourself.

Goal is for better quality: fewer bugs, more flexibility

Goal for getting things done faster: save money developing, save money fixing bugs

SOLID principles come from Uncle Bob Martin’s book on Agile Software Development Principles Patterns and Frameworks

These are GUIDELINES, not hard and fast rules, use your brain, do what makes sense

SOLID principles should make life easier!  Easy != not learning a new way of doing things

Have only as much complexity as you need – have a good reason for complexity

Single Responsibility Principle – A class should have one, and only one, reason to change. – Just because you can, doesn’t mean you should.

  • SRP Fixes – Split big classes that violate SRP rules
  • To prevent violation of SRP – enforce Layers
  • SRP Violation - “god” classes – Use XML Document comments for the, code smell from and, but or if
  • Also put a verb in the Domain service name
  • SRP matters because it allows for code reuse, makes maintenance easier by increasing flexibility.
  • VS2010 Tip - ctrl+, will allow you to type in Capital Letters of method names for search.

Open Closed Principle – open chest surgery is not needed when putting on a coat

  • Utilize interfaces to reuse code

Liskov Substitution Principle – if it walks like a duck and quacks like a duck but needs batteries, it’s probably not the right object

  • People using derived classes should not be surprised
  • If you violate LSP, fail LOUDLY.  Throw an exception for cases that you can’t support (Cube doesn’t have an area, but is still a shape)

Interface Segregation Principle (You want me to plug this in WHERE?)

  • Bad example – ASP.NET Membership Provider – a very FAT interface
  • Fat interfaces typically have highly coupled code
  • If you implement an interface and have to throw an exception because you don’t support a method, that base class or interface is probably too large
  • Smaller is better

Dependency Inversion Principle – Would you solder a lamp directly to the electrical wiring in a wall?

  • Kill tight coupling (two classes linked together and dependent on each other).
  • Use interfaces between UI, Business Logic and Data Access layers
  • Goal: Testability
    • Unit Testing more than Integration Testing
    • Using Mocks rather than actual external dependencies
    • Constructor Injection
    • DIP Violation – using statics or singletons using static
  • What is a DI Container?
    • Creates ready to use objects and knows how to create and initialize objects and their dependencies
    • Popular .NET Choices
  • StructureMap Overview
    • Uses automatic conventions of ISomething interface to Something implementation
  • DI Container Rules
    • Don’t new up anything that’s a dependency
    • Do new up entity objects
    • Do new up value types (e.g. string, DateTime, etc.)
    • Do new up .NET Framework types (e.g. SqlConnection)
    • Entity objects should not have dependencies
    • Static variables should be isolated behind the DI container
    • Use ObjectFactory.GetInstance to create an object when you can take them in as constructor paramters
    • Don’t use the DI container when writing Unit Tests

SOLID Articles – http://bit.ly/solid1

Slides – http://bit.ly/solid3

Post info

Tags:
Categories:

Principles of Object-Oriented Programming (@fallenrogue)

By riceboyler on Feb 27 2010 | 0 Comments

Object-Oriented Programming really varies from language to language, but the core concepts are the same

Smalltalk was the first language to be called “Object Oriented” (Trivia: Simula was first language to implement the concepts)

OOP is about objects collaborating, not functions or tasks.  Objects send and receive messages

C# is a class-based language, classes are the blueprints for the objects

The object, then, is an instance of a class, and it exists at runtime.

Encapsulation – writing code that is self contained.  Consumers don’t need to know HOW, just that communication is possible.  Expressed well through interfaces and implementation of those interfaces

Interface + Implementation leads to decoupling.  If a class is a blueprint, then an interface is the description of that class.

Inheritance - (.NET is single inheritance) is-a versus has-a –> Is this something that HAS something else, or is this something that IS something else?

Keep hierarchies shallow and take advantage of abstract classes for reuse

If you have multiple sub-classes and something higher up the “chain” changes, it changes everything below it.  Rather than sub-classing, use interfaces and always use the is-a test.

Polymorphism – I am one thing with many forms (Single state with many behaviors)
- Parametric Polymorphism – Generics

Single Responsibility Principle – Class has ONE thing to do and that’s it!  Make sure classes only do ONE thing.  Self-documenting

High cohesion/low coupling – Cohesion is a system that communicates well but doesn’t rely on other things

Post info

Tags:
Categories:

Software Engineering 101 (#swe101 on Twitter)

By riceboyler on Feb 27 2010 | 0 Comments

Microsoft decided they were going to go back to the basics in a one day course.  Having been developing as a self-taught developer, I recognize that there are some issues with some things that I need to learn when it comes to the basics.

So, I’m going to post some notes from these sessions which focus on the principles of object-oriented programming, design principles and applying those principles in unit testing.

Post info

Tags:
Categories:

jQuery: prev().0.id is null or not an object –> Issue with XHTML and tags

By riceboyler on Jan 29 2010 | 0 Comments

Time to divulge in a little code issue here.  I’m currently working on cleaning up the defect backlog of one of our largest products, and we’ve made more extensive use of jQuery in this application than we ever have before (and for one, I think it’s GREAT!), but it’s also caused us to hit some weird problems that we’ve had to work through.

We’ve been using the great Table Drag and Drop jQuery plugin to deal with reordering quickly and easily in the application.  There are a number of pages that implement it, and admittedly, I’m not the one who initially set them up.  We had a bit of an issue with the C# codebehind on all of them not properly processing a move from the 1 position up to the 0 position that I had to fix, and was able to do that (after some weeping, wailing and gnashing of code), but this one page refused to even get to the codebehind.

Everything worked fine except for when I moved a row from the 1 to 0 position, and I would get a javascript error that said:

prev().0.id is null or not an object

If I’m honest, not the most revealing of errors (though once I figured it out, it told me exactly everything I needed to know:)).  So, I dug through the C# code on each, which was identical (except for variable names), but I was pretty sure that wasn’t the problem anyway, as this was a javascript error being thrown, not a page error.

The jQuery call was exactly the same:

   1: function onDropItem(table, row) {
   2:             var curPanelId = getPanelId();
   3:             PageMethods.Reorder(curPanelId, $(row)[0].id, $(row).prev()[0].id, onSucceeded, onFailed);
   4:             $(row).highlightFade({ color: 'rgb(255, 241, 168)', end: '#fff', speed: 1000, final: "" });
   5:         }

So, it couldn’t be the client side code.  The problem, it turns out, was in the markup.  In both cases, the rows being moved are contained in ListViews, but I discovered a difference between the two.  In the ones that worked, there were no XHTML proper <thead> and <tbody> tags to delineate the rows of the table.  In the one that was broken, there were.

Time for that DUH moment when I realized that what was happening was that because of the <tbody> tag, there was no previous table row in the DOM for the jQuery code to access, so it was returning a null row, hence the error.

Now, admittedly, I fixed it by going the easy route and removing the <thead> and <tbody> tags (and it works perfectly now), but I know there’s a proper way to handle this with the tags left in, I’ll just have to play with it.

I Binged (yeah, I said it) for this error and found nothing online, so maybe if somebody else runs into this problem, this post will be helpful.  If so, please leave me a comment!

Post info

Tags:
Categories: Coding Adventures , Work , jQuery , ASP.NET , C#

Why Scammers suck or why I’m an optimist and my wife is a skeptic

By riceboyler on Dec 06 2009 | 0 Comments

Last week, I was reviewing classified ads on Craigslist, an activity I undertake on a relatively frequent basis, as I like looking at what cars are available so I can drool in private…  One poster had put a message in his ad specifically targeted at the Craigslist scammers, which seem to be rather prevalent in the autos for sale arena.  Essentially he said that he didn’t even want to post on CL anymore because the scammers irritated him so.  Having posted a few vehicles on CL in the past few months for sale, and having been the recipient of a few scam offers (one of which went so far as to send me a bogus cashier’s check), I can understand his fury.

I think though, what irritated me the most is that scammers are taking away an important piece of life, or at least, our outlook on it.  That piece they’re taking away is hope.  And here’s where the second half of my title comes into effect.  I tend to think the best of people.  I tend to be overly trusting.  I think that probably has something to do with the fact that I hope that people are generally good.  I hope that when I deal with somebody, they are being honest with me, as I am being honest with them.  And LUCKILY, I’ve found that seems to be the case with the people I’ve dealt with on Craigslist in general.  We’ve sold 2 cars, an XBOX 360 and a Wii gaming system lately, and in all cases, the people we’ve sold to have been extremely fair.  I hope that I have been seen as fair in their eyes as well, because I try to be.

Unfortunately, there are those people out there who are trying to make a quick buck, and are willing to destroy their reputation (and the reputation of other unknown people) by taking advantage of other people.  My wife tends to believe most people are of this ilk.  Granted, she’s lived a harder life than I have and has run into more of these hope-stealers, so that may color her outlook. 

Nonetheless, something we seem to be missing in this country, especially over the last year, is hope.  There are those who wanted very desperately for Barack Obama to be elected President, because they thought he represented hope for better things.  Honestly, even though I didn’t vote for him, I still hoped that he would be a good President and lead the country well.  The jury is still definitely out on that, but I think the rejuvenation of hope was a positive thing.

I think hope is fundamental to happiness in general.  As I go throughout life, I find that those people who have hope for a better future, whether in small things or large, tend to be happier.  They have a reason to be happy, for they have hope that things will be even better in the future.  There’s a step then to be taken from hope to faith.  Hope is the cornerstone of faith.  The scriptures tell us that faith is to “hope for things which are not seen, which are true.”  That hope helps us understand that life is much bigger than just today, and that we can shape our tomorrow.

If you look at children, one of the key things that make them so happy and full of life is that they are FULL of hope.  I hope that I never crush my children’s hope by telling them something is impossible.  They need to have that hope to make it through these tough times.  They need to have hope that the people that they encounter are typically good people and hope that they will be positive.

So scammers, quit stealing peoples’ hopes.  Quit making it so frustrating to do business with each other.  Quick being the kind of people my wife thinks populate the earth.

Post info

Tags:
Categories:

A day of reflection…

By riceboyler on Dec 06 2009 | 0 Comments

Fourteen years ago today, I entered the Missionary Training Center in Provo, UT to become a representative of the Lord Jesus Christ. I would serve 23.5 months in the Massachusetts Boston Mission, and I would have my life changed forever.  It truly was a life-changing experience.  I remember preparing to enter the MTC and saying goodbye to my then girlfriend.  I thought that was the toughest thing I’d have to go through.  Little did I know.

Those 2 years in service to God, my life’s tithing to that point, changed who I am in many ways.  It helped me understand the gospel, and really understand that the gospel more than just a set of rules and guidelines.  The gospel literally translates to Good News, and that’s what I realized.  It was the good news that Christ came to earth of His own choice and will.  It was the good news that He was born in the humblest of circumstances, in a manger, in a barn, surrounded by lowly animals.  It was the good news that He truly lived a perfect life, and through that life, He showed how we should live.  He showed that we should love one another.  It is the eternal good news that He atoned for my sins, even the very sins of every man to walk upon the earth, so that he could be our Mediator, our Advocate with the Father, and our eternal friend.  It is the further eternal good news that He offered up his own life, so that He might taste death, that He might have power over the grave, and that He might offer that free gift of resurrection to all men.

It is the good news that He did rise on the third day, and overcame death.  He setup His church on the earth that those who would follow Him might have the authority to act in His holy name.  It is the good news that His church was restored to the earth after the great apostasy, and that He once again speaks to his prophets here on earth.

It is all good news, great news even.  It is plain, it is precious, and it is joyous.  In this spirit of Christmas, I am reminded again that His birth cannot be separated from His eternal mission and His eternal purpose.  When we celebrate the birth of Jesus Christ, we should celebrate His life and how He lived it.  We should celebrate the love that He showed us, and share that love with those around us.  It is the time for us to reflect that eternal light that He is to others.

I learned that lesson over two years in service of both Him, and the beautiful wonderful people of Massachusetts.  They changed my life, I hope I was able to change some of theirs by sharing the most precious gift I have; my testimony of the Savior, his life, his mission and his good news.  I hope the good news will lift your spirits and your lives this Christmas season, and that the joy of Christ will radiate throughout your homes.

Post info

Tags:
Categories:

Because more is what we do (wrong)…

By riceboyler on Nov 03 2009 | 0 Comments

I’ve been seeing an ad campaign (in print, at least) running in Car & Driver, Motor Trend and AutoWeek lately for GMC Trucks, specifically the new Terrain.  I’ve tried to find it online, but for the life of me, I can’t find it right now (and honestly, I’m too lazy to scan it…).  Anyway, it says (in essence): We gave it more, because more is what we do.

That ad campaign really hit me, but fore the wrong reasons.  Given that GMC Truck is still (via the parent company of General Motors) owned in large part by the United States government, maybe they should rethink that approach.  After all, everyone can pretty much agree that doing “more” is what caused them to go bankrupt in the first place.

My suggestion to General Motors would be not that they focus on doing more, but focus on doing BETTER.  GM’s car quality has been steadily falling over the past 20 years, to the point that many of their current vehicles are a sad punchline.  I have personally owned only one GM car myself (see the previous post), specifically, a 1993 Pontiac Bonneville, that after only 10 years suffered from an interior leak, brittle plastics that broke, and a 3.6L V6 engine that was ANYTHING but inspiring.  After I disposed of it, my friend that I cast it off on had recurring issues with the intake manifold gasket, largely due to the fact that the intake manifold was a composite piece, before they really figured out how to do composites in engines correctly.

Their current line-up, with the notable exception of the halo cars like the Corvette ZR-1 and the Cadillac CTS-V, is not inspiring to me either.  Maybe I’m not their target demographic, but as a 34 year old male, I would think I should be.  They tried to target me with the Camaro, but it’s a sad, also-ran, far-too-late attempt to cash in on the success of the retro Mustang and Challenger.  Saturn, the line that actually appealed to me, due to a wealth of European Opels rebadged, is dead.  Pontiac, who at least had a little excitement, is dead.  (Oldsmobile, well, good riddance…)  Buick has absolutely, positively nothing in their range that speaks even a little bit to me.  Chevrolet has piqued my interest with the Cobalt SS, but my understanding about that car is that while it’s a blast to drive, it’s not particularly well made.  The Impala honestly looks look a good car, and a good value, but at this point, I’m kinda skittish about the quality.

Perhaps I’ve been watching too much Top Gear; okay, I’ve always been watching too much Top Gear, but this ad campaign is, to me, a microcosm of why GM and Chrysler are both in so much financial trouble, and what is wrong with the typical American psyche.  Our country’s motto could well be “because more is what we do,” especially when it comes to our vehicles.  Bigger is better, right? 

There are some pundits in the automotive media forecasting that we will soon follow the Japanese and Europeans in desiring smaller cars.  That certainly happened when gas prices hit the roof last summer, but as soon as gas dropped back below $3/gallon, SUVs got gobbled up again.  I think it will take gas getting back up to near atmospheric levels for a sustained time to see that reality happen.  I’m not a hybrid fan, at least as far as it is used in the Prius or Insight, but at least they are smaller cars. 

So, my open letter to GM is this.  The Volt is a great PR attraction, but the skeptic in me says you’ll find a way to screw it up.  Ford has already gotten the clue and has started putting smaller turbocharged motors in their cars, and is getting ready to introduce the Fiesta to America.  Chrysler, thanks to Fiat, will have the 500 here in two years.  Those are two examples of well-made fun little cars that could be the leading edge of a change.  The Aveo/Lacetti just is NOT going to cut it compared with those vehicles.  The small cars you showed last year and teased everybody with are what you need to start building for America.  Put a 1.3-1.5L Turbo motor in it, make around 140hp, keep it light and make it fun, and you’ll attract more young people.  And in case you hadn’t noticed, your Buick demographic is dying, literally.  I hope you can figure it out and turn it around, because for one thing, I’m footing the bill for your screw-ups.  The first step is to figure out that MORE shouldn’t be your calling card.  BETTER should be.

Post info

Tags:
Categories: Cars , Turbo

Why do I drive old POS cars?

By riceboyler on Aug 25 2009 | 0 Comments

I’ll be the first to admit, kind of a strange subject.  As I drove into work today (listening to the Car Talk Pod Zunecast, I thought back to something one of our friends said when she first saw my “new” car, a 1988 Saab 900 SPG (SPG = Special Performance Group, it means it has a tweaked suspension, 3 spoke Ronal wheels, and a custom body kit).  Mind you, I’ve wanted an SPG since my youth, because I thought the body kit and the wheels were just the business (to quote TopGear).

But then I thought about my car history.  My first car, a 1984 Ford Escort, with a stick, was one of the last times I really ever owned a car without something special.  Without, what my friend Becky called, character.  Character?  In a car?

Yeah, as I’ve looked back over my car history, character is what they all (since that Escort) have in common.  Here’s the rundown:

  • 1984 Ford Escort – I guess even it had a little character, as it was a manual transmission.  Even as crappy as it was, it was more fun than driving a slushbox.
  • 1984 Honda Civic – I got lucky because the previous owner of this car wanted a car with character as well.  Before I bought it (after a lady totaled my Escort for me), the previous owner had swapped it to a CRX transmission, so it was a 5-speed, rather than a 4.  He had also seen fit to swap the exhaust and interior out of a CRX into it, so it sounded better, and had a much sportier interior.  This car is where I got my customization bug.  Custom 13” (hey, I was poor, and it was the 90s) polished Prime 5-spoke wheels, took the nuts off of the torsion bars for a week, because it seriously slammed the car.  Of course, then it seriously slammed my kidneys over every little bump.  Raised the front back up and cut the springs in the rear (I was young and dumb), so it was lowered by 3” all the way around.  Alpine head unit, MB Quart components, Phoenix Gold amp, and (after blowing 6 MTX Blue Thunders in a month) a JL Audio 12W1 sub.  Custom “clear” corners, blue neon kit, etc.  I loved that car.  I sold it to go on my mission, and it would seem it was sold at the right time, as the heater core died shortly after I sold it, as did the transmission.
  • 1989 Honda Civic – My mom found this car for me while I was on my mission.  It was an automatic, gold with a brown interior.  Not the combination I would have chosen, but I can’t complain.  I came to MTSU in this car, and it was my education in engine modifications, in many ways.  I started hanging out at HotRods in Murfreesboro, where a great guy named Mark Dugan let me learn from him how it should be done.  I put the 13” Prime wheels back on this car, put a Nakayama muffler with a 5” tip (hey, I was young and stupid, still) on it, built a custom intake, put Suspension Techniques 2.5” springs on it, upgraded the suspension bushings and made the car a blast to drive, especially through the twisties.  Unfortunately, I let my brother-in-law drive it after I had to have the head replaced on it (I didn’t know mechanical stuff well enough then to do it), and the PnP head was too much for the weak bottom end, and I ended up with a car that had a grenaded piston in the oilpan, and no money to fix it.  And, I had just gotten married.
  • (We’ll ignore the Taurus, because that was officially Zoni’s, not mine, and it had no character)
  • 1997 Dodge Neon – OK, admittedly, this car started with no character.  Baseline, automatic in white with the cheap, flimsy seats.  Oh, but what an education this car was… By the time I traded it for the Omni below, it had been swapped to a 5 speed Manual out of an R/T, with a Stage 2 Luk clutch, I had redone the exhaust system, swapped cams to a Crane #12 grind, swapped to the Mopar PCM, put an Iceman intake on it, taken the Iceman off to use a custom PVC intake manifold and intake setup, put a small Hawker battery in for lighter weight, pull the interior out, ported and polished the head (after I tossed a timing belt and had to have the head resurfaced anyway), had the head milled down .050”, and it was really my only drag racing car that I ever used often.  I took it down the 1/8 and 1/4 mile strips more times than I can remember, and it never failed on the track.  It eventually ran mid 9s in the 1/8th, which was a huge improvement over the 11.76 it originally ran.  It ran high 14s in the 1/4, which for a SOHC Neon, without a turbo or nitrous, is pretty darn good.  It was easily one of my favorite cars, but when it tossed a second timing belt doing 65 and the valves were so bent I had to pound them out with a hammer, I started looking for a new engine.  Thought I had a lead on a 2.4 out of a Stratus for a good price, and then the price changed when I went to pick it up.  So, I offered it up in trade and got the Omni instead.
  • 1989 Volvo 745ti (740 Turbo Wagon) – Officially, this was Zoni’s car, but I fell in love with it.  It was a manual, which she balked at when we first got it, but then she fell in love with it as well.  Eventually, I was the demise of it.  My friend Scott, who had originally turned me on to the turbobrick with his 1984 Turbo Wagon that I eventually ended up with, helped me turn the boost up from the paltry 7psi it was running stock, to 15psi.  Since that time, I’ve been a total boost junkie.  15psi in that car, especially in the wet, was downright dangerous, as it would easily get sideways.  I don’t think I ever realized how much of a drift machine I had at that time.  If I had realized it, I probably would never have gotten rid of it.  It ended up with a gutted catalytic converter (due to a bit of a fire), running 15psi and that’s all it really needed.  Until I forgot to check the transmission fluid.  On Christmas Day 2003, the transmission packed in 3rd and 4th gears, and it sat in our driveway, largely because, at the time, I didn’t know that M47s from 240s could work in 740s.  Oh, how stupid I was…
  • 1984 Volvo 745ti – Scott’s old car.  He had moved to Missouri, and left the car in TN.  I was in dire need of some kind of transportation, and he couldn’t get it licensed because it had no cat and a Supertrapp muffler.  Man, you could hear the turbo spool in that car.  It sounded like a Peterbilt spooling a Holset.  I only drove it for about 3 months, but took it to the track at US43 in Ethridge, TN, and running 20psi on 115 octane race fuel (hey, it had no cat), it ran a 9.3 in the 1/8th at 80mph.  That shows how much I sucked on the launch.  I sold both this car and the 1989 Volvo as a package.  We were really in need of the moolah, or I never would have done it.  Still wish I hadn’t.
  • 1995 Pontiac Bonneville SE – Zoni’s car, I don’t claim it, as I hated driving it (though it was comfy), but it had no real character
  • 1985 Dodge Omni GLH – My foray into the Turbo Dodge world.  I traded the Neon for this car, and I have to admit, it was a bit of a basket case.  Luckily, my buddy Kevin (owner of Shelby GLHS #592) is a Turbo Dodge genius (IMO), and he was able to help me work some things out.  When I got it, it was only running about 4-5 psi of boost.  It had been converted to a TII spec with a StarQuest intercooler, so 15psi shouldn’t have been a problem.  Well, we found out later on that the nuts holding the turbo to the manifold were missing, so it was a miracle that it didn’t just fall off.  I got the last set of 13mm nuts from Turbo Auto in Nashville (actually for a Thunderbird Turbo Coupe, but I didn’t mind) and we fixed it up.  The car was a total and complete BEAST at 12psi.  Torque steer that nearly landed me in the ditch a number of times.  It had no heat, the turn signal ended up breaking on me, the paint was shot, the interior was FAR too small for me, and L-bodies just really aren’t made for daily drivers.  I didn’t care, I still loved driving the thing.  I took it out the day after Christmas 2004 (something about Christmas time and my turbo cars and transmissions), and noticed that it seemed even faster than normal.  Well, I peeked over at my boost gauge and saw why: 20psi!  The engine held it fine, and it was like a rocket.  The transmission however…  Well, the spider gear decided it wanted to see daylight, so it blow a hole right through the middle of the weak 525 transmission, and that was the end of my fun.  I never did fix it, and nobody every wanted to buy it, so I had to scrap it due to the man coming down on my in-laws in Smyrna.  Stupid city ordinances.  But the TD bug had bitten me.  So my next car was…
  • 1987 Shelby CSX (#76) – I got lucky on this car.  I had been looking at a 1987 Shelby Lancer (#71) in North Carolina, but it just seemed too big, and it had a number of small issues I didn’t want to deal with.  The CSX came up on the SDML if I remember correctly, and I fell in love immediately.  I got ahold of the owner, who lived in Chicago, and we discussed the car at length.  It was stock, except for the addition of a boost gauge and air/fuel gauge; the seats were pretty shredded, and the paint was faded, but the rare wheels were in great shape, all of the Shelby stuff was there, and it ran great.  I flew up to Chicago, had him pick me up at O’hare, and we went to his apartment, where I test drove the car, immediately loved it, and traded the money for the car.  I drove it home with no problems, no issues, and it was great.  I only modified it slightly, because it was a numbered car.  I put a DSM blow-off valve on it, a new head unit in it and nice Memphis speakers up front.  I loved the car, and took it to the track once, where the best it could do (due to traction issues) was a 9.67 in the 1/8th.  It was a great car, and one of the worst decisions I ever made was to trade it away.  I NEVER should have gotten rid of this car, and if I could get it back today, I would…
  • 1987 Shelby CSX (#657) – We actually bought this for my brother-in-law (the same one who blew up my Civic, what was I thinking).  I forgot an important thing about Turbo Dodges when I got this car for him.  TDs are great cars, but you do have to have some sense of mechanical aptitude to own them. We got this car in St. Louis, along with an extra block, pistons, rods, a bathtub head, the original Centurion IIs and a set of 15” vintage Momo 5-star wheels.  On the way home from St. Louis, the alternator gave up the ghost.  My brother-in-law and I then drove back up the next day, replaced the alternator in 40 degrees and a thunderstorm, and drove it home.  Eventually, it blew up.  It started overheating on him and he put oil in it instead of water, which blew the head gasket.  The car was a bit of a basket case, so I ended up trading it for a 1984 Daytona Turbo Z (with saddle brown interior). 
  • 1984 Dodge Daytona Turbo Z – The car was a basket case from the beginning, and my lack of a garage became an issue.  It needed the fuel pump replaced, which I did in the middle of winter outside on the ground, but it still had a number of issues, including a bad front wheel bearing, which is why I eventually sold it.  It was unique, and quite a looker, but it just wasn’t for me.  I only owned it for about 4 months and sold it to a girl from Michigan who was going to fully restore it.
  • 1988 Dodge Lancer Shelby – The worst car I have ever owned, the biggest mistake I have ever made.  I, stupidly, traded CSX #76 for this car.  I wanted a bigger car that wasn’t numbered, so I wouldn’t feel guilty about modifying it and cranking up the boost.  Originally, I was going to trade the CSX for an ‘85 Shelby Charger that had a Super 60 turbo, and all the engine goodies, but he could never get the thing to prime correctly, and ended up blowing up his oil pump before we could trade.  Unfortunately, I had made my mind up to trade, so I decided to trade for the Lancer.  I drove to North Carolina to trade it, and on the way, the axle boot on the passenger side ripped and was flapping on the highway.  The turbo bearings were whining in the CSX, and the clutch was about done, but I had all of the parts to replace, just not the time.  When I first saw the Lancer, my heart sunk.  It was not in great shape, it was only running about 6psi, it had one of the worst suspensions I’ve ever felt, and something just didn’t feel right about it.  But, because I was worried about the cost of having to replace the axle in the CSX, and the turbo, and the clutch, I went ahead and traded for the Lancer.  I have to say, except for the one time that I was an idiot and ran it out of gas, the car ran well, for the most part.  The interior was pretty crappy, both front fenders were banged up, as was the header panel, and the paint was awful.  It did have a 3" turbo-back exhaust, and it did have a good 555 tranny that shifted well.  It didn’t like to run a lot of boost (12 psi caused it to cough and spit), and it drank oil like a tanker.  I eventually lost the keys to it, because I had to stop driving it, due to it having the wrong tags on it.  It was parted out, and then taken by a scrap dealer.  It had character, just a bad one…
  • 1990 Volvo 765ti – Perhaps good “carma” was on my side on this purchase.  A professor was moving from Memphis to Washington state, and needed to get rid of this car quickly.  The A/C didn’t work, the driver’s seat was tearing and the paint was pretty rough, but it ran very well, and I bought it for well under book value.  The first mission was to get rid of the butt ugly, old man wheels on it.  I found a decent set of 16” Hydras for it, swapped those on, and improved the looks of the car 150%.  I put a cone filter on it, put my JoeP Manual Boost Controller on it, put a boost and air/fuel meter in it and turned it up to 15psi.  It was an automatic, which was a downside, but it was very comfortable and ran very well.  The tranny would slip, especially when it was cold, and to be honest, it’s probably on it’s way out, so I never took it to the track.  But at 15psi, it would get down the road.  I had a few minor things I had to fix here and there with it, but overall it was a great car until September of ‘08.  The fuel pump relay died, but unfortunately, I didn’t figure that out until I had replaced:
    • Mass Air Flow sensor
    • Fuel Pressure regulator
    • Removed the inline fuel pump
    • Replaced the in tank fuel pump with a Walbro (that seized because I forgot to ensure the sock filter was on it)
    • Replaced the in tank fuel pump again
  • So, I replaced all of that over a 10 month period, and that made me decide it was time to move on.  The car was running well again, but the stupid Fuel Pump relay would occasionally overheat, leaving the car not running until it cooled down.  So I traded it for the Saab.
  • 1981 Volvo 242 Turbo – I originally saw this car in the front yard of the original owner, and fell in love with it, but he wanted $1500 for it.  Well after a few months, and a turbo that was in the throes of death, he dropped the price on it.  It is very straight, has the M46 (overdrive doesn’t work), it ran, though with the turbo eventually seizing, it is extremely slow, but it’s a good solid old car.  I was going to trade it for the Saab, but after the potential buyer couldn’t get the 12B replacement turbo on the car, we decided instead to trade the wagon for the Saab.  I still own this car, and will at some point get the 12B turbo on it, and use it for a weekend car again.  It’s too fun of a car to drive for me to get rid of right now.
  • 2002 Volvo V70 XC – Another Volvo turbo wagon.  I wish this was “MY” car, but it’s Zoni’s.  It’s a great car, very comfy, very quick, very good looking.  It’s our response to not wanting another mini-van.  We LOVE it.
  • 1988 Saab 900 SPG – Ah, finally to the car I currently drive.  I traded the wagon for this car, and it has a few issues.  The wastegate is shot on the turbo, so unless I pull the vacuum line to it, all I see is about 4psi of boost.  The front motor mount is shot, so I get vibrations, and a somewhat less than solid feel from the shifter.  The dash is cracked (as most 900s are), the paint is peeling on the hood, but the body panels are in good shape, the wheels are in good shape, and even on only 4 psi of boost, it’s a BLAST to drive.  It corners better than any car I’ve ever owned.  I have yet to make the tires squeal, and I’ve tried.  It has great brakes, and is setup as a TRUE European sports coupe.  I’ve always heard about the Saab magic, and now I get it.  It’s a quirky little car.  It gets looks from children every time I pass them.  It looks like nothing else on the road today, and it’s FULL of character.

So that’s the story.  I looked at buying “sensible” cars, like a Camry, or Accord or what have you, but they just don’t fit me.  They don’t have the kind of character I’m looking for.  I’ll probably always be that guy who drives the quirky older turbo-charged car, because I care more about character than just getting from point A to point B.  I can do without the creature comforts of newer cars (like AC, etc.) because I want to drive something that honestly puts a smile on my face every time I drive it.  If life truly is an adventure (and I believe it is), then shouldn’t you enjoy the trip? 

Post info

Tags:
Categories: Volvos , Saab , Cars

Building a WCF Service? Make sure you think about how it’s hosted…

By riceboyler on Aug 19 2009 | 0 Comments

Got a bit of a wake up call this morning when I went to deploy a new WCF Service to our internal web server.  We’re going to use it for an external Resume Database to talk to, but initially it will be internal only.  Well, what I found out, rather rudely, is that if you assign multiple host headers to an IIS site for WCF, you’ll get this rather unfriendly little error:

This collection already contains an address with scheme http.  There can be at most one address per scheme in this collection.

Essentially, it’s finding more than one item to bind to, so it freaks out because WCF doesn’t support multiple IIS bindings for the same protocol.  There is a work around, which is to create a ServiceHostFactory, about which more information can be found here: http://msdn.microsoft.com/en-us/library/aa702697.aspx

Maybe that’ll help me remember to do this when I switch this to an external WCF service…

Post info

Tags:
Categories: Coding Adventures , Work , WCF