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

devLink Wrap-up and Thoughts About Software Complexity

By riceboyler on Aug 16 2009 | 0 Comments

First, what a great past 3 days!  devLink 2009 was a raging success in my opinion, and from what the Tweetiverse says, it was well enjoyed.  I had a great opportunity to volunteer and assist with the logistics of the conference, and a great opportunity to work with some great people which probably taught me more about life than any of the sessions could have possibly taught me about development.

Still I attended some great sessions, the notes of which are previous posts here, though there are others I attended that I didn’t take notes on, one of which sticks with me.  Rob Windsor’s session on LINQ and the functionality that makes it possible in .NET 3.0.  He gave some really great examples of Type Inference, Lambdas, etc., and it was a great consolidation of all the great new technologies that work with AND independent of LINQ.

But the one “session” I haven’t been able to get out of mind is the final session of the conference which was a panel discussion recorded for Dot Net Rocks which will soon be released.  The topic of the discussion was, “Has Software Development Gotten Too Complex?”

I took the opportunity to add a comment to the discussion, in which I expressed my opinion that the root of the problem with software development complexity lies in the developers themselves.  As a developer, I’m as guilty of this problem as most are, so I know all too well that developers LOVE to make simple things more complex.  Essentially, I said that ego is a large part of the problem with software development being too complex, in that we developers enjoy making things appear more difficult than they really are, so that we can appear to be more important.

I want to expand some thoughts in this area in this blog post.  I speak from my own experience as a developer, as well as my experience managing other developers, and working with other developers.  We all like to be superheroes.  We like to be seen as great problem-solvers who have the ability to fix anything that comes our way.  Just like anybody on earth, we have a need to be important.

Unfortunately, that need to be important, and the need to fix problems tends to give us a “hero complex”.  That hero complex then leads us to making simple problems more complex.  The interesting thing is that as the tools we use become better and more refined, thus making it easier to fix those simple problems, we then compensate by increasing the underlying complexity.  In order to take care of our egos, we then project that complexity on to the business units that need us.

We aren’t alone in this ego-based complication of simple problems.  Project managers, CIOs, business analysts, etc., are all guilty of overcomplicating the issue.  Government officials have turned red tape into either an art form or a science.

So, how do we fix it?  How do we make ourselves stop being a big part of the problem of complexity, and start making it easier for those businesses that rely on us to actually solve their problems?

I’d like to see your answers and comments, and in the next week, you’ll see mine.

Post info

Tags:
Categories: Coding Adventures

ASP.NET 4.0 Roadmap Session Notes

By riceboyler on Aug 15 2009 | 0 Comments

Presented by Jeff McWherter – Web Ascender

Formal CTPs and documentation @ www.asp.net

Cutting edge drops, roadmaps, etc @ www.codeplex.com/aspnet

VS10 supports multi-targeting, can support 3.5, 2.0

FX4.0 maintains a high compatibility bar with FX 3.5, they’re really trying to make it a much better experience than from 1.1 to 2.0

VS10 – no more WinForms, now WPF rendered interface improving UI performance

Out-of-band releases (MVC, Dynamic Data, etc) rolled up into FX 4.0

ASP.NET 4.0 Themes

  • Support “pattern-based” models (MVC/TDD)
  • Re-invest in the core by addressing top customer pain-points
  • MVC
  • Ajax
  • Data and Dynamic Data

Web-Forms

  • Client IDs –> manage control IDs that affect client-side development
  • CSS –> remove the need to use CSS adapters, defer to CSS styles, bypass existing style properties, and get rid of the table based HTML rendering in ASP.NET controls
  • URL routing for web-forms:
  • Viewstate changes
    • Disable on page, enable on specific controls
    • Disable on parent control, enable on child controls
    • Grid/ListViews work better without viewstate

Ajax

  • jQuery including Intellisense
  • Continue Ajax innovation: RIA
  • Appeal to JavaScript developers
  • Templates and data binding:
    • Client-side handling, REST or Web services
    • Covers page developer and component developer scenarios
  • DOM manipulation, selectors…

ASP.NET MVC

  • Appeals to those wanting separation of concerns, TDD, full control
    • Ruby on Rails
    • Django for Java
    • Symphony for PHP
  • Builds on from MVC 1.0
  • MVC (Model, View, Controller)
    • Enforces separation of concerns and provides full control of markup, TDD is enabled (and enforced)
    • URL routing, tooling support
    • Get the benefits of ASP.NET: profile, membership, roles, localization

ASP.NET Dynamic Data

  • Scaffolding from Ruby on Rails
  • Building on from FX3.5 SP1
  • Dynamic-data and MVC:
    • Scaffolding
    • Templates
    • Data Validation
  • Support for many to many relationships
  • Enhanced filtering
  • Enhanced meta-data
  • New field templates
    • Email, URL, Enum, etc.

Back to the ‘core’

  • Cache extensibility and performance enabling productions like Velocity to plugin as a cache provider
  • Increased scalability
  • Increased performance and scalability

Post info

Tags:

Introduction to Regular Expressions Session Notes

By riceboyler on Aug 14 2009 | 0 Comments

Presented by Matt Casto (http://google.com/profiles/mattcasto)

There are many different ways to write regular expressions to achieve the same result.  Examples at http://www.regexlive.com

http://del.icio.us/mattcasto/regex for informative websites.

  • http://regexpal.com –> JavaScript regular expression tester
  • The Regulator – Open Source tool, has Intellisense –> Roy Osherove

Stephen Cole Kleene invented RegEx using Mathematic Regular Sets

Ken Thompson used regular sets for searching in QED and ed

grep – Global Regular Expression Print

Henry Spencer wrote the regex library that Perl and TCL languages used

Why Should You Care?  Find duplicate words in a file

  • Output lines that contain duplicate words
  • Find doubled words that expand lines
  • Ignore capitalization
  • Ignore HTML tags

Using regular expressions reduces from 30+ lines to 5 lines of code

Mastering Regular Expression by Jeffrey Friedl very good for examples

Use System.Text.RegularExpressions for .NET help

Literal characters

  • Any character except a small list of reserved characters (is, a, etc.)
    • is –> Jack is a boy
    • a –> Jack is a boy
  • Literal characters ARE case sensitive – capitalization matters!
  • RegexOptions.Compiled runs much faster as it compiles the RegEx, rather than running it all at runtime.

Special characters

  • You can match special characters (like +) are escaped with backslash (\)
    • + for instance, should be searched for with \+
  • Some characters, such as { and } are only reserved depending on context
  • Non-Printable characters
    • \t –tab
    • \r – carriage return
    • etc.
  • Period character matches any single character (dangerous because of overuse
    • a.boy –> Jack is a boy
  • Character classes
    • Used to match only one of the characters inside square braces
      • [Gg]r[ae]y –> Grayson drives a grey car
    • Hyphen is a reserved character inside a character class, indicates a range
      • [0-9a-fA-F] – Matches all Hex codes
    • Caret inside a character class negates the match
      • q[^u] – Qatar Iraqi Iraq (Iraq not caught because it’s null after the q)
    • Normal special characters are valid inside of character classes
    • Shorthand character classes
      • [\s] –whitespace or spce, tab, CR, LF
      • [\w] – word or [A-Za-z0-9_]
      • [\d] – digit or [0-9]
      • [\D] – non-digit or [^\d]
      • [\W] – non-word or [^\w]
      • [\S] – non-space or [^\s]
  • Repetition
    • Asterisk repeats the preceding character class 0 or more times
      • <[A-Za-z][A-Za-z0-9]*> –> <HTML>
    • Plus repeats the preceding character class 1 or more times
      • <[A-Za-z0-9]+> Matches <HTML> and <1> but not <>
    • Question mark repeats the preceding character class 0 or 1 times, in effect making it optional.
  • Anchors
    • Caret anchor matches the position before the first character in a string
      • ^vac –> vacation evacuation (doesn’t match evacuation because it’s not at the beginning of the string)
    • Dollar sign matches position after the LAST character in a string
      • tion$ –> vacation evacuation
    • \A and \Z shorthand character classes only match the start and end of the string
  • Word Boundaries
    • \b shorthand character class matches
      • [\b4\b] – 4 orders of 44lbs of C4
    • \B negative of above
      • \Bat\B

Post info

Tags:
Categories:

Should I Virtualize SQL Server? Session Notes

By riceboyler on Aug 14 2009 | 0 Comments

Presenter – Kevin Kline (Quest Software)

What is Virtualization?

  • Technology that allows a server to be decoupled from the physical hardware of the system.
  • Lets you run one or more virtual machines independent of the physical hardware
  • If you have VMWare Enterprise level products, you can receive support from Microsoft for a SQL instance on a VMWare VM.

Benefits of Virtualization

  • Server Consolidation
  • Disaster Recovery
  • Legacy Apps
  • Testing and QA
  • Training

Drawbacks of Virtualization

  • Overhead
    • used to be 30-35% in original VMWare software
    • now at 15% with newest software and processors
  • Administration complexity
    • VMs obfuscate troubleshooting efforts
  • Performance monitoring and tuning
  • Lag in hardware support

Strategies

  • Planning for best Utilization
    • How is it used?
    • Type 1 (bare-metal) or Type 2 (hosted) Hypervisor
    • Workload and performance?
    • SLAs?
    • Users?
    • Availability and recovery?

Licensing Complexities

  • Licensing
    • Enterprise - $20K per physical cpu, unlimited instances in VMs
    • Standard - $5K per license, each instance is a license

Virtualization Performance

  • Where does overhead hit?
    • Memory
    • CPU
    • Dick IO
    • Driver Support
  • How can I virtualize production SQL Server?
    • It’s doable

Best Practices for Virtualization

  • Choose a Hardware-assisted virtualizing CPU
  • Confirm and enable HAT and DEP
  • Use the right drivers with synthetic devices
  • Set pass-thru disks on the guest VM to offline using DISKPART or Volume Manager
    • To prevent overhead in the Disk IO
  • Only run server role for hypervisor only from the root of the OS
  • Don’t use dynamic VHDs
  • Stick to the best performing options
    • Dedicated pass-through disks
    • Fixed-size VHDs (to improve Disk IO)
      • Can be expanded, but VM must be shut down
  • Don’t use regular PerfMon counters, especially for CPU
  • Instead, use:
    • Specific Logical Processor counters

Post info

Tags: