| Matt Trevors's profileThe blog of Matt TrevorsBlogLists | Help |
|
|
May 01 The 2006-2007 Pittsburgh Penguins: A retrospectiveWell Pens fans what'd we all want when we started this season? Personally, I wanted a winning season; we had oodles of untested talent and I felt it'd take at least a couple of years to mold them into a contender. Others, God forbid, wanted them to make the playoffs... Not in my wildest dreams did I expect them to finish as strong as they did; and for the first part of the season I thought my 500 record was just barely attainable. But, in mid January somebody lit a fire under that young, raw, talent and they started winning games at a furious pace. At one point I think they were unbeaten in 15 games... It's easy to climb the standings when you're compiling points at warp speed. I kept waiting for them to faulter, knowing that this was just a flash of brillance that we'd see with more regularity in the coming years... but it never happened, they just kept playing fantastic hockey.
Then came the trade deadline and my prayers were answered... Gary Roberts... YEEEHAW... Gary Roberts has been the man since he played with the Flames; he's a "you get what you see" hockey player. He holds nothing back from the first drop of the puck until the horn sounds at the end of the third. Definetly helped Recchi out in the veteran leadership department... The Penguins also made a fantastic trade to get Georges Laraque.. I swear this guy could make diamonds from sand with his bare hands; he's a great enforcer, I hope he sticks around next year.
As for rookies, what can you say... Jordan Staal, Eric Christiansen, Maxime Talbot, and Geno Malkin..... couldn't ask for anything more... My only concern is who gets hit with the sophmore jinx... If we can make it through 2007-2008 with only one of those guys in a slump we'll be in the conference championship for sure.
I hope everyone saw the Hockey News story about their 2006 - 2007 awards... If you haven't let me paraphrase it for you. The Pittsburgh Penguins have the:
wow, that's a mouthful of awards for a team that had just 58 points one season ago... Way to go Pens Of coarse my boys aren't perfect and they need a little help next year to get deeper into the playoffs. I think they need another big time defenseman... Gonchar and Eaton are the only two I really care for... I'd love to see them get a nice offensive defensman; preferably with a right-handed shot. Teppo Numminen comes to mind, he could sure "Get 'er done"... I'd like our 1st line to be Roberts, Crosby, Malkin... Therrien can throw everyone else together, after all, he is the coach
All-in-all I think the Pens had a great year; they were simply outplayed by a more physical, more prepared Ottawa Senators... We'll get 'em next year.
Therrien for President in '08!!!!
April 09 1 week after leasin' the GWell, I figured I'd bring some closure to this ordeal so it's time for a post. Back in late '06 I wrote a couple posts about my test drives in which I indicated I was going to be leasing a BMW. Well, unfortunately it didn't work out for BMW that way. It appears BMW pushes 2 year leases up until Feb and then switches to 30 or 36 months leases.... Since I was only looking for a 24 month lease it pretty much put the BMW out of the running. Then in late March I got a call from the Land Rover dealer stating they had a few LR2's coming in. So I put a deposit down on one that was configured exactly the way I wanted. March 31 rolled around and I vowed I'd be driving home a new car that day. We started out at the Land Rover dealer and I have to say, I was a little disappointed with the LR2; it drove nice and all, but the car wouldn't pair with my bluetooth enabled phone and there was no voice recognition with the nav package. Also, I was told they'd have a "Great" 2 year lease package.... Land Rover has a strange definition for "Great"... 0.0021875 money factor (5.25%), 15 cents/mile above 10k miles and a so-so residual. In the end the payment was about $800... a little too much for a "Great" deal... So we walked out.... We mozzied on down to the Infiniti dealer where the search ended. I ended up getting a $1900 discount plus an extra $1000 on my trade. I brought home a G35x w/ navigation, premium, and wood trim.. a $39,450 MSRP.... with $1000 out-of-pocket (taken out of the trade-in) I walked off the lot owing 23 payments of $714 and a check for $7275 (balance after trade payoff and the $1000 down) Now, a lot of people have looked at me, with great astonishment, when I tell them my car payment is $714.. People, I paid $700/month for my Jetta; granted I bought (36 months) instead of leased. If you want to drive a nice car it's gonna cost you. To buy the Infiniti it'd cost me $31,131 after I take my trade out and add tax... That's $652 a month with a 0% interest rate... (Not gonna happen). After 4 years I'd have a car with outdated technology, no warranty (as I drive 25k miles per year) and at best $6000 on a trade, probably less due to mileage. Not to mention another couple thousand in tires, brakes, and tune-ups. So it's really not that big of a deal when you think about it. If you're paying a lot less you probably have a 5 year loan on a car and put a lot of money down, have a 48 month lease, or you're driving a sub $30k car... And, to top it all off I'd have another $650 - $700 payment all over again with another car. I have come to the realization that I'll always have a car payment as long as I put 25k miles on a car every year; so why not drive a new one more often. Also, according to credit experts if you can't afford the lease payments for a 24 month lease or a car payment for a 36 month purchase then you're living beyond your means. I'm trying hard to not do that anymore.... Anyways, about the G... IT ROCKS!!!!! I absolutely love everything, except gas mileage, about this car. The tech is off the hizzy and the 6 cylinder 306hp engine let's me blow by just about every car on the road. I'd venture to say there isn't a single "stock" car under 45k that can beat me 0 - 60... I've used the navigation several times now with 100% accuracy. I get about 90% success rate on the voice command system and the "Music Box" is great. I went and bought a 2GB compact flash card and inserted it in the appropriate slot in the dash... A lot easier, and cleaner, than hooking up the iPod through AUX jacks. Also, I found a software package, WMAConvert, that legally strips off the DRM from music purchased from iTunes so I can put my music on the flash card and leave my iPod in my bag. If you're lookin for an entry level luxury car you CANNOT go wrong with a G35x. It's got plenty of technology, plenty of power, and plenty of safety features. If I had to do it over again I'd lease the G, but this time I'd get the tech package that includes adaptive cruise control. Definetly in '09 If anyone ends up going to Cochran Infiniti of Monroeville go see Jeff Comin, he's the man... couldn't ask for a more honest salesperson. February 21 That crazy BeckyI wish I would've had the stones to do something like this when I was a kid
February 20 It has to be said!This may come off as hate speach, but being someone who came to this country legally and made something of myself I have to protest to some of the illegal immigrant nonsense in the news lately.
First of all Bank Of America... YOU ARE RETARDED... why would you give an illegal immigrant a credit card... I have a few simple reasons why it's stupid.
1. How much money can an illegal alien make, I mean come on... they're getting paid under the table BELOW minimum wage.... can you say default.
2. How many illegal aliens are actually going to sign up for a federal tax id and pay the IRS... Few & far between I imagine.
Second of all... tuition breaks for illegal aliens... You're kidding right... I can't believe my tax dollars pay for Nancy Pelosi's salary and plane... She is the true definition of the useless skin ..... (contact me for details January 16 2007... year of the streaming movie?I love my Netflix... but ever since I bought my HD-DVD player I've been a little unhappy with a couple of things.
Then... at MacWorld, Steve Jobs announced "Apple TV"... a little box with a hard drive that connects to your TV and to your wireless network that lets you watch movies you purchased from iTunes... It's really slick.. I almost pre-ordered one until I found out you have to buy the movies from iTunes at a price of about 12.99 on average. Also, it's only limited studios... so I think I'll pass for the time being. Then, today, one of my friends sent me a link to a Netflix press release stating they will be offering streaming downloads of select movies to customers... YIPEE... But again, there are problems... Only 1,000 of their 70,000 movies will be available online, and they can only be streamed to Windows Media Player. But, I'm still excited... why you ask... because eventually this technology will take off and we'll be able to pay our monthly subscription fee and get to watch movies the day they come out. One potential side affect of this technology will be to make the HD-DVD/Blueray war pointless. Why, because I think the same people who will shell out the bling for a HiDef DVD player will be the same people who'd jump at the chance to download movies with a subscription service... A couple points in favor of the subscription download service.
So, watch for more devices like AppleTV @ $299 it's about half the cost of an HD-DVD player and a quarter the cost of a Blueray player... I sincerely hope Apple changes to, or adds, a subscription download service for movies... I have no preference who gets my $25/month for movies, just as long as I get to watch my movies in HiDef.... January 01 New camera blogHowdy ya'll... Anyways, just wanted to let everyone know my "new"
Enjoy,
Matt November 18 Test Drives... continuedThis past week I managed to convince the wife to partake in the test drive experience. We started the week at the Lincoln dealer to test out the MKZ. I did find out that the after market Mobile Ease bluetooth package will display the phone numbers on the Nav screen. However, we both decided this wasn't the car for us. The car just doesn't drive like it has 268 hp at its beckon call. Also, after further inspection the Nav screen looks washed out... very poor colors... so we moved on. Later in the week we went to the Cadillac dealership to try out the 2007 STS (I stepped up to the STS from the CTS because bluetooth is an option on the STS). The dealership didn't have one in stock so we ended up taking out an 06... The only thing missing was the Nav package which we were able to check out on a different model. The STS is a very nice ride, cooshy seats, lots of power..... very nice car... The only problem is that the car is about $45,000 appropriately equipped, and the dealer couldn't meet the price of the BMW (they were close, but not quite). Also, in order to keep the prices comparable we had to skip the $1800 AWD option and go with the standard RWD... Next, the big day..... Saturday... We started off at the Acura dealership expecting to start the day off in a TL. However, the dealer received their first 2007 Acura TSX's so we took one of those out. For 30k it's a VERY nice car... The 4 cylinder 205 hp engine is adequate, handling is average, and the navigation system is top notch. Without training the system, we were able to issue voice commands to tell us the time and change from XM -> FM and switch channels. The stereo was adequate, but nothing to brag about. The 07 TSX can be equipped with the AcuraLink iPod integration; unfortunately I haven't seen it in action so I can't comment. The lease price was about $50 less per month than the BMW... not much considering the car is a full $13,000 less. Next we moved up the street to the BMW dealer where we took the 328xi out for a spin. The wife enjoyed the ride, said it was pretty comfortable and handled well. This week I drove more aggressively, and the BMW didn't disappoint. It stuck to the road like glue and had very smooth acceleration. I really enjoy the sport mode, can't get enough of it. Also, this week the car came equipped with Nav and the infamous "iDrive" system. I find it's very well placed and easy to navigate... feels "mouse like". After this test drive I'm pretty confident it's going to be the winner. At this point the wife's becoming much more open to this "new car" idea. We actually talked about leasing her a car in Spring of 08 and keeping her Jetta as a 3rd car... That way we'd get a new car every year... I'm very excited about the possibility On to the Lexus dealer to test drive the ES 350.... Simply put it's the most comfortable car I've ever had the pleasure of driving.... The wife agreed... she even went so far as to say "I want this car" during the test drive... obviously out of earshot of the salesperson. Unfortunately, Lexus doesn't feel its lease/finance rates have to be competitive since they're the #1 luxury car in the US. This translated into an $850 monthly payment for a car $2000 cheaper than the BMW we were testing. I was a little miffed, and the wife was EXTREMELY disappointed. I think she had her heart set on this car... oh well... on to the next test. It was off to Murraysville and the Infiniti dealer where we tested the G35x. I think it has the most appealing interior and I love the placement of the center console screen. Also, it's the only car that has A/V RCA connections. "In theory", while the car is in park, you can actually hook up a DVD player and watch a movie on your 7" LCD screen. The wife wasn't terribly impressed by the handling of this car (I think she was spoiled by the last two) and to be honest it dropped a little in my eyes as well. It's almost as if the 306 hp engine is too much for the car. It just didn't feel as good as the BMW. Also, after we made the dealer quote us the car with a Nav system the price went up over $41,000; the lease payment followed. In the end the Infiniti payment came out to around $35 more a month than the BMW; definitely not enough to make a decision on. But, in the end, the BMW wins... Simply because, it embodies everything I want in a car
The BMW 328xi will cost about $690 a month with $3250 down (plus $700 security and $750 acquisition fee) November 12 Test Drive Weekend... and the winner is......As many of my family & friends know I've been looking at cars for the last several weeks. I thought I'd blog about my findings in case any of you are looking for something similar. I am looking for a car that I can lease over 2 years with 25,000 miles per year. Thus far I've test driven the following cars
The first car I looked at was the Ford Escape; it offered a decent ride but for some reason the hybrid was hard to upgrade... at least according to the dealer. The model I looked at cost approximately $30k and came with basic stereo and no ability to add Bluetooth. If I were looking for a fuel economic SUV this would do well... but it just wasn't what I was looking for. Also, Fords just don't have the residual to consider for a short term lease. Next the wife and I took a Lexus IS 250 AWD out for a spin (we didn't try the IS350 because it's only offered in RWD). If you're looking for a Sports Sedean in the 30k - 40k range you can forget this car... If you're not sold on Lexus I would highly recommend a similarly equipped Infiniti G35 as opposed to this. One word describes the IS250.... Gutless... I felt like Fred Flintstone and Barney Rubble could take off quicker than the IS250. Interior comfort was decent, but on par for cars in its price range. After the disappointment from the Lexus I took a Camry Hybrid out for a test drive. I must say, if I was going to get a car purely for practical reasons this would be the car. For a little more than 30k you can get a fully loaded hybrid including nav, Bluetooth, premium sound.... everything I want.. but like I said, if it was strictly a "practical" choice. Interior comfort is equiv to my Jetta, as is the power of the engine (or lack there of). It only gets a combined 35mpg highway/city whereas my Jetta gets 40mpg combined. I think I'd be better off spending 2k on a nav/bluetooth stereo upgrade for my Jetta. I have 68k miles on it but I'm sure it will go 200k without extensive maintenance. Also, the Camry isn't that much cheaper on a 2 year lease than the other cars in this review. Most who know me know that I rarely do anything for "practical" reasons.... So... on with the test drives..... Next on the list was the Lincoln MKZ (pronounced Mark Z). This is hands down the classiest looking car on the list. Interior amenities included heated/cooled (yes, I said cooled) as well as a 14 speaker sound system with 2 sub woofers. Nav is included, as is iPod integration via an aux jack. To my surprise Bluetooth is NOT an option on the car; you're stuck with the Mobile Ease after market accessory from Lincoln. The dealer is checking with Lincoln to see if it will integrate with the Navigation system, but I'm pretty confident it won't. This pretty much kills the MKZ as the following two cars include an integrated Bluetooth option. The MKZ came in at around 37k. At this point the MKZ is the clear favorite... but I'm very disappointed with the engine as it feels like it needs a good kick to get it moving. Not as bad as the IS250, but not what you'd expect. The next two cars are by far my favorite cars I've ever driven. The G35x Sedan and the 328xi Sedan. The G35 is equipped with a 306 hp engine and it REALLY feels like it. When you put this sucker in sports mode it'll rev all the way to the red line before shifting... SWEET. The model I tested did not have nav (which is an $1800 option), but all 07 G35 sedans come with the central console screen. In the end I'd settle for the screen without the nav as the screen is great for the bluetooth integration and audio options. The G35 came in just under 37k. Everyone loves a BMW, let's be honest... it's a great looking car, and as I found out yesterday (11/11/06), it drives better than it looks. With its 230 hp engine it performs almost as well as the 306 hp G35. The BMW is smaller and weighs less which I contributed to the performance. I must say, as much as I enjoyed the G35.... the BMW is just a little nicer... The BMW iDrive system is sweet; I've heard a lot of people say you need a tech background to truly use it... Thank Goodness I've got that covered. The 328xi I test drove came in around 43k and... this is my favorite part.... Apple and BMW worked together to create the best iPod integration I've seen thus far...... I still want to test drive the Lexus ES350, Cadillac CTS, Acura TSX and TL Type-S. But all cars are likely not going to be in the running. The ES350 is about 44k and doesn't have the residual of the BMW so I think it'll be priced out of competition. As for the CTS; I can't seem to find any information on Bluetooth integration. I believe Cadillac tries to sell their OnStar system as their phone integration. Hey Cadillac... that's not gonna fly since I can't use my wireless phone plan I already pay for. Hopefully for '08 Cadillac will get a clue. The Acura's may prove to be formidable competition; but from what I read the TL doesn't have the handling of a G35 or 328, but it never hurts to try. I expect the TSX to end up like the IS 250.... Also during my test drives I had a majority of the dealers appraise my 2004 WV Jetta TDI w/ 68k miles. Every dealer met Kelly Blue Book value of $12,500. The MKZ, G35x, 328xi all came in around $700/mnth on a 2 year lease with 25,000 miles per year and $2500 capitalization reduction (BMW was $3300 down). Infiniti didn't require a security deposit (well qualified buyer... credit score of 680+) or an acquisition fee. Lincoln makes your first payment, so I could've walked off the lot with the car for $105 according to the finance manager. The BMW on the other hand required about $1400 in security deposits and acquisition fees (half of which is refundable). At this point it's a hard choice between the G35x and the 328xi, you would win with whatever you chose. But, BMW offers a great maintenance package. For the first 50,000 miles they'll pay for oil changes, brakes, and most any other standard maintenance (excluding tires). When you think about it... that's easily another $500 in incentives. Another plus for BMW was the customer service... I felt the most comfortable at the BMW dealer... The salesman made sure I had a drink and a snack while I was waiting for them to do the appraisal and run the numbers. I also got to sit in their pimped out waiting room and watch the WVU game on their 61" plasma TV. The BMW experience is pretty neat. So, at this point it looks like I'll be driving a 328xi in the near future. On a side note... the G35 Coupe is by far the sportiest car in this price range. If it wasn't for the fact it's only offered in RWD it would have been a very strong contender. Questions and comments are welcome... November 07 PuzzledSeriously, I cannot understand WHY voting machines are not setup correctly. From now on I think every polling station should require an IT person and that person has to certify the machine BEFORE the election. This is absolutely ridiculous, it's almost as if they want to get lawyers involved in deciding the elections. Voting is not rocket science... If we can send a rocket into orbit why can't we build a reliable voting system. Insane... June 08 Why Microsoft Why???????So, for those of you who know me you know I've taken alot of MS tests. That's why this post is about something so puzzling it deserves a blog entry.
AutoEventWireUp in an ASPX page is supposedly krytponite for elite developers. Everytime I see it set to true I crawl up into a little ball and cry myself to sleep. Why do I act this way... because the literature I read from MS always said "TURN THE DAMN THING OFF AND HOOK THEM UP YOURSELF", especially the literature surrounding their programming tests for MCSD, which I was fine with because the less suprises the better. This is often why I frown on people copy/pasting "code behind pages" from one page to another; because you never know when you're going to miss a region which will cause unexpected behavior. So, today I tried to hook up the Init method to a page and found that the familiar InitializeComponent function from the early days of .Net was missing. I froze... I didn't know what to do. I even asked some of my coworkers who were equally as stumped. I was actually told to just let it go.... NEVER!!!!!
This is the very round about way to figure it out, but I'll explain it anyways. What I did was right click on the ASPX page and clicked "View Component Designer". It comes up with the big fancy screen for dragging controls on but that wasn't what I was looking for. In the bottom right corner, where my properties pane lives, I saw a list of all the events for the page. I proceeded to type in a function name for Init. Voila, it created the right signature for me and even created the beloved InitializeComponent function. I stood up, did a little dance, and then confidentally set AutoEventWireUp to false. Unfortunately, things didn't turn out exactly how I anticipated and I was smacked in the face by an exception. I noticed that all of a sudden my Page_Load wasn't being called. I thought "How can this be"... thought for another minute
To do it yourself your code should probably look something like this
public partial class _Default : System.Web.UI.Page{ public _Default() { InitializeComponent(); }
protected void Page_Load(object sender, EventArgs e) { }
private void InitializeComponent() { this.Init += new System.EventHandler(this.On_Init); this.Load +=new EventHandler(this.Page_Load); }
private void On_Init(object sender, EventArgs e) { } } (for those of you on the CEI offshore team take heed... if I find an AutoEventWireUp set to true I'll just delete the page until you get it right... April 11 Updatin' the ole resumeSo my brother asked me if he could borrow my resume to perform some magical formatting on his and make it presentable. I was embarassed to give him my latest version so I decided to redo mine. I opened up Word and decided to check out the Office Online templates; wow, what a selection. I ended up choosing the Developer resume. You can view it here at trevorsfamily.net. Comments are welcome March 27 New websiteHey all, check out our new website http://www.trevorsfamily.net. Andrew & I paid < $100 for a full year of hosting, with .Net 2.0 support and a SQL Server database, at godaddy.com I have no complaints, setup was a breeze and the speed is adequate. The 50 GB storage isn't too shabby either. February 15 XSD/OOP how to make 'em work togetherSo, on my current project we are attempting to build a Service Oriented Architecture based on specifications from the client. In the specs is a list of Data Transfer Objects that we immediately coded as "Freebees". Unfortuantely, we discovered, early on, that Web Services don't really play nice with inheritence, specifically because of serialization. For example, say you have a web method that has a return type of base class foo. You extend class foo in a class bar and barbar; you assume that you can type cast it to the specific type you need on the client. Unfortunately, this will not work. Why? Because when you generate the WSDL for the web service it only generates enough information to satisfy the return type, the base class foo. It appears now as if all is lost, you'll have to rig up some hack to get this done. My first thought was to start with an XSD using a Choice group, thus allowing us to create an object that would support the base class and then any other set of properties we want, it just wouldn't be straightforward when it came to mapping it to our C# classes. Actually, it could've been down right ugly. While I struggled for a few minutes getting the exact syntax for implementation of choice I stumbled accross an article that was describing the issue to a tee. Obviously I clicked on the link (even thought it was to a Java article, oh well, can't win 'em all
I created the base Complex Type
<xsd:complexType name="PaymentVehicle" abstract="true">
<xsd:sequence> <xsd:element name="PaymentVehicleID" type="xsd:string"/> </xsd:sequence> </xsd:complexType> followed by two child implementations using complex content extensions
<xsd:complexType name="CreditCardPaymentVehicle">
<xsd:complexContent> <xsd:extension base="PaymentVehicle"> <xsd:sequence> <xsd:element name="CreditCardNumber" type="xsd:string"/> <xsd:element name="ExpiryDate" type="xsd:date"/> </xsd:sequence> </xsd:extension> </xsd:complexContent> </xsd:complexType> <xsd:complexType name="CheckPaymentVehicle"> <xsd:complexContent> <xsd:extension base="PaymentVehicle"> <xsd:sequence> <xsd:element name="AccountNumber" type="xsd:string"/> <xsd:element name="RoutingNumber" type="xsd:string"/> <xsd:element name="CheckNumber" type="xsd:int"/> </xsd:sequence> </xsd:extension> </xsd:complexContent> </xsd:complexType> You'll also need to create a root element for the next step to work.... <xsd:element name="PVehicle">
<xsd:complexType> <xsd:sequence> <xsd:element name="PV" type="PaymentVehicle"/> </xsd:sequence> </xsd:complexType> </xsd:element> So, I ran the good ole xsd.exe tool against this schema and out pops a c# class file containing the classes just as I need 'em (as a side note when you include this file in your Visual Studio 2005 web site you need to dump it in the app_code directory or you'll pull your hair out because your types won't be available)
I then made a web method that returned the base type "PaymentVehicle", compiled and moved on. The next step was to create the consumer app, a typical WinForms application. From this I added a Web Reference to the newly compiled Web Service and began to code away. To my dismay the answer wasn't immediately obvious and it took me a couple of minutes. I finally figured out the secret; even though the return type of the function was PaymentVehicle Visual Studio was intuitive enough to know that this wasn't a typical implementation and actually made the return type of the GetPayment() method GetPaymentResult. From this GetPaymentResult type I was able to typecast the actual payload to one of the child classes. Obviously in a true implementation you'd have to have a better idea of what you're doing, but I'm not writing YOUR application for you
localhost.Service svc = new WindowsApplication1.localhost.Service(); localhost.GetMyPaymentResult pv = svc.GetMyPayment(); localhost.CheckPaymentVehicle myPv = (localhost.CheckPaymentVehicle) pv.PV;
So, my recommendation is this... When building an SOA feel free to whiteboard your objects, but I implore you to build the XSDs and let XSD.exe create your classes for you... You'll save yourself some work
Addendum.... After an internal struggle with giving Java any sort of props I decided it was only fair that I give Russell his due... Even though he codes in a crappy language he still had enough insight to craft a resolution to the dilemna, so here's the link. Enjoy
January 23 Steelers CelebrationFirst of all, congrats to the Steelers for making it this far, it's quite an accomplishment to win 3 road playoff games in a row. First #6 seed to make it to the Superbowl... fan freakin tastic......
Now, as soon as the game was over everyone was talkin about having a parade, or gathering, or whatever to show appreciation. I'll guarantee you one thing; that's the furthest thing from their minds, and I'm sure Cowher would say "Thanks, but no thanks". Why do you ask... Is it because they're ungreatful, that they expected to win... No, it's because they've accomplished nothing yet... Sure, they're in the championship, but, to be honest, how many people can name the losers from all 39 Superbowls? I'll bet you there are more people who can name all the winners!!! To me, it'd be stupid to have a celebration until after we beat up on the SeaHawks and get "one for the thumb". They are not children, they do not need to be patted on the back for every accomplishment. I say the more low key we keep this AFC championship the better, keep 'em hungry.
Go Steelers!!!!! January 15 Is Peyton destined to be like Dan?So how does a team that goes 13 weeks without losing all of a sudden go one and done in the playoffs? I wish I knew... I don't know anyone, other than faithful Steeler fans, that gave the Steelers a chance at winning this game, but they did!!!
I think Peyton is destined to be like Danny Marino, regarded as one of the greatest QBs in the game, yet no hardware to show for it. I'm sure if you asked Marino if he'd trade his stellar career in for a more mediocre existence, but it includes a Super Bowl ring, he'd trade in a heart beat. Let's take Brad Johnson as an example... certainly not a Hall of Fame QB, but he does have a ring... I'm sure Danny would love to trade careers, as would Peyton at this point.
GO STEELERS!!!!!!!!!
January 08 Implementing a Singleton in .Net, take twoSo, I recieved two intelligent comments on my last post about Singleton in .Net 2.0. I felt compelled to review the CompareExchange implementation by the Framework; as it turns out there is NO implementation in .Net, it's an external call to a native windows dll. In light of this discovery I've decided to take the advice of my colleagues and ensure that the implementation is as efficient as possible. As for the static classes, I've reviewed some documentation on them and can't find any mention of thread safety. Documentation can be found at MSDN2. Here is an MSDN Mag article that applies to our CompareExchange implementation. This article states that my claim of "little impact" is just a little optimistic, and performance will certainly be improved with the addition of the if statment in the GetInstance() method.
Thank you both for your input.
public class SingletonExample
{
private static SingletonExample ex = null;
public static SingletonExample GetInstance()
{
if (ex == null)
Interlocked.CompareExchange<SingletonExample>( ref ex, new SingletonExample(), null);
return ex;
}
private SingletonExample()
{
} } January 07 Implementing a Singleton in .NetSo, I was conducting a code review earlier this week of some code written by our offshore development team and for the most part I'm as pleased as punch with the progress the team is making. While perusing the data layer I came across the standard .Net implementation of a Singleton pattern
public class SingletonExample
{
private static SingletonExample ex = null;
private static object lockObj = new object();
public static SingletonExample GetInstance()
{
if (ex == null)
lock(lockObj)
{
if (ex == null)
ex = new SingletonExample();
}
return ex;
}
private SingletonExample()
{
}
} I've never really cared for this implementation and my biggest objection is the nested if statement... YUCK!!! There's got to be a better way. The reason for it is legit, you have to make sure multiple threads aren't going to be able to "initialize" the singleton, this is accomplished through the lock statement.
About 2 years ago I was having an issue with multi threading and while googling for an answer I stumbled across several posts regarding System.Threading.Interlocked.CompareExchange. This function accepts three parameters and it's kind of confusing, I'll rewrite the above Singleton pattern and then try to explain.
public class SingletonExample
{
private static object ex = null;
public static SingletonExample GetInstance()
{
Interlocked.CompareExchange( ref ex, new SingletonExample(), null)
return (SingletonExample) ex;
}
private SingletonExample()
{
} } The first parameter is the target, the third parameter is for comparison, and the 2nd parameter is the object to be stored in the target if parameters 1 & 3 are equivalent.
The CompareExchange GUARANTEES that the comparison and the assignment are atomic, ensuring that only one thread can complete the comparison, and assignment if necessary, at any given time. Although, I'm sure some of you have noted the use of the private static object, as opposed to private static SingletonExample, also the typecast for the return of the GetInstance() function. This is because CompareExchange has limited overloads, one of which is object. So this isn't optimal due to typecasting, but it looks a lot cleaner. I have not reviewed the .Net implementation of CompareExchange so I really can't comment on it's efficiency, although I have a funny feeling it's been tweaked for performance.
With the introduction of Generics in .Net 2.0 we can actually rewrite this to be specific to our SingletonExample type.
public class SingletonExample
{
private static SingletonExample ex = null;
public static SingletonExample GetInstance()
{
Interlocked.CompareExchange<SingletonExample>( ref ex, new SingletonExample(), null)
return ex;
}
private SingletonExample()
{
} } So, there goes the typcasting inefficiencies with the Interlocked implementation.
Now some of you may note that with the original implementation there is NO locking unless the object is null, with the CompareExchange implementation it appears as if there is locking on every call, however, I don't think you'll see very much of a performance impact, if any, with the CompareExchange implementation. I must say, that the CompareExchange implementation is much more elegant and builds upon facilities provided by the .Net Framework. I equate it to using Delegates/Events to implement the observer pattern... it's the .Net way.
For further information please check out part two of this blog entry.
December 13 My Holiday RantI was dropping off my visitors badge following a couple hour meeting with a client when the receptionist said "Happy Holidays". I've been listening to alot of talk radio lately where people are upset because nobody says "Merry Christmas" anymore, instead it is replaced by the less precise "Happy Holidays". I thought about it for a sec and actually thought to myself; why didn't she just say Merry Christmas, I mean, that's what she meant. Then I thought.. how arrogant and intolerant of me to think that Christmas is the only holiday that counts. She has no idea who I am and I just expect her to know that I'm Christian as opposed to Jewish or another religion. So I decided to give her a pass and returned the Happy Holidays sentiment. So, if you know someone's religious background to be Christian you shouldn't be afraid to say "Merry Christmas", if they're Jewish throw them a "Happy Chanukah", heck even "Happy Quanza" if you're absolutely certain
Also, I've actually heard of WalMart and KMart selling "Holiday Trees"... WHAT THE HELL IS A HOLIDAY TREE? Are we going to call a Menorah a "Holiday Candle" next? I mean come on people, if other religions used trees to celebrate a holiday, then you may have a leg to stand on, but calling a Christmas Tree a Holiday Tree is absurd, stupid, and ignorant. Don't insult my faith because yours is different or non-existant. Just because you think it's trendy to have a tree in your living room this time of year doesn't give you the right to demean the true reason of why that tree is there. It's a CHRISTMAS TREE, and if you aren't Christian but still want the tree in your living room, then by all means, feel free... Just call it what it is.
And what's up with these shows trying to combine the name of the several holidays into one? I'm not even going to try, but I've seen commercials and TV shows celebratring the holidays as one super long word. Wouldn't it be great if the actual religions could co-exist as easily as some marketing guru combined the names of the holidays? Just think of how many fewer wars or war atrocities there might have been if religions could co-exist. And while I'm at it, it's not really religions fault, it's the implementation and interpretation by the people that is at fault.
I hope I've given everyone something to chew on... Enjoy the Holidays, whichever they may be. December 12 Reporting with .Net 2.0I'm sure most of you .Net techies out there are familiar with SQL Server Reporting Services. Well, in .Net 2.0 there's an additional namespace, Microsoft.Reporting, that gives you another option. I actually find this to be the most configurable method for deploying reports in an n-tier architecture. LocalReports and the ReportViewer (for both web/windows) allow you to use the rdl (report definition language) produced by a SSRS report and consume and display it without the need for a reporting server. I'm sure there are limitations, but for the mostpart I'm sure this will work for you.
By using LocalReports you can grab the data externally into standard .Net datatables and then add them as a report datasource. The following is a short example (NOT best practice, just a proof of concept (POC))
SqlConnection conn = new SqlConnection("server=abc;database=def;uid=ghi;pwd=jkl;");
SqlDataAdapter adapt = new SqlDataAdapter("select * from dbo.Actions", conn); DataTable dt = new DataTable(); adapt.Fill(dt); reportGuy.Service svc = new WindowsApplication1.reportGuy.Service(); StringReader sr = new StringReader(svc.GetReport()); reportViewer1.LocalReport.LoadReportDefinition(sr); reportViewer1.LocalReport.DataSources.Add(new ReportDataSource("DataSource1",dt));
sr.Dispose(); The "reportGuy.Service" is a call to a standard .Net webservice that returns the rdl file as a string. The following is the funtion I used to return the rdl string (again, not best practice, but rather a POC).
[WebMethod]
public string GetReport() { System.Xml.XmlDocument xDoc = new System.Xml.XmlDocument(); xDoc.Load(Server.MapPath("Report1.rdl")); return xDoc.OuterXml; } So, whether you're using a web or windows app simply add a reportviewer object (Microsoft.Reporting.WinForms/WebForms.ReportViewer to your page/form and configure as above and you'll have yourself a customizable reporting solution. Also, don't forget this could easily be modified to generate PDFs, Excel Documents and the other file types supported by the reporting framework.
December 04 The Real DealI'm sure most of you Pens fans out there know that Marc-Andre Fleury was called up and BOTH Penguin goalies (Thibault & Caron) were placed on waivers. Well Craig Patrick has listened to the fans, if for nothing else, to prove to the fans that YOU DON'T KNOW WHAT YOU'RE TALKING ABOUT. Sure, Marc-Andre is The Real Deal, as is Syd "The Kid" Crosby. Unfortuantely for these two up-and-comers the rest of the team isn't pulling their weight. Stats I heard last night put our powerplay at about 3 out of the last 60 attempts.
So, all that being said.. Marc-Andre DOES have the ability to play in the NHL, unfortunately for him the team is not playing up to potential and it doesn't matter if you lose 2 - 1 or 5 - 1, you still lose. Marc-Andre does make the games extrememly exciting, and even during multiple scoring opportunities, being break-aways or two-on-ones, I was always confident that the puck would be kept out of the net, and we would stay in the game.
So, if the Penguins get to a certain point in the season where Marc-Andre is going to get paid and they're out of the playoffs look for someone else to be between the pipes. I anticipate that this should happen sometime in late January, early February.
December 03 Live performanceFor all those who are interested here's my step son Ryan and me playing at his high school orchestra concert Friday December 2, 2005. It'll take about an hour to download, enjoy.
Concert link November 29 Web Tests with Visual Studio Team SystemSo, I was trying to run web tests with the new VS Team System install we have here... Web Tests are remarkably similiar to Application Center Test with VS 2003. I recorded an IE session by browsing to a couple web pages, stopped recording and then compiled my test. To my dismay when running the tests against my build process (that's a whole other entry.. Team Foundation Server is a massive product) and it would always fail. Here's why, and how I fixed it.
Why: Because my employer uses a proxy server that requires authentication.
How I fixed it: I was unable to fix it using the standard test format... I had to right click on the test and tell it to create code.
After I did that I had to add the following to the default constructor for the web test code (sorry it's in VB... I was in a hurry and didn't pay attention)
Me.Proxy = "proxyserver:proxyport"
Me.Proxy.Credentials = System.Net.CredentialCache.DefaultCredentials
Ran the build again and voila... test successful!!!!
October 20 SQL Server 2005 WebinarI just finished up my 2nd CEI Webinar, SQL Server 2005 for the .Net Developer. I think it went pretty well, people were interested as we recieved some intelligent questions at the end, even questions about topics not covered which was nice to have.
Topics covered included:
Bring on the SQL Server 2005 Certification
October 17 Visual Studio 2005 Visual Enhancements... or are theyLate last week I began prepping for my webinar on SQL 2005. I built the VPC, installed SQL 2005, and Visual Studio Team Suite 2005. Upon installation of the apps I began to tinker a bit. First problem I ran into is I couldn't find "Blank Solution" which really got me flustered... I finally found it under "Other Projects"..... Hmmm, now isn't a Project a child of a Solution, so how can a Solution be an "Other Project". Well, I found it, let it go, move on. So, I did.
I should've stopped there, because it didn't get much better
I decided this couldn't be it, they wouldn't have done something this stupid. And if they tried I can't imagine the community would've been too receptive. So, like their Office applications, I assumed they just "moved" the functionality. I was right. You can start with a "Blank Solution", but as soon as you add the first project it assumes the role of "Solution". However, if you go to the File menu it'll allow you to add a new project, and return your Solution Explorer to the way we're used to seeing it... Solution->Project(s)->Project files.
THANK GOD!!!!!!
Finished MCSD, what's next?So, I ended up finished my .Net MCSD last week by taking the bull by the horns and writing three MS tests in 6 days. Brings me back to the good 'ole days at UNB where I'd try to cram an entire semester of information into my head in a two day stretch. Thankfully I had more success with the MS tests than I did with the university courses
So what's next. Well, MS is revamping it's certification hierarchy for the next generation of products (.Net 2.0, SQL 2K5, Sharepoint 2K6....) and will no longer carry just an MCSD. You'll now be able to attain several certifications specific to an app, or group of apps. I'm hoping to conquer the SQL, BizTalk, Windows Workflow Services myself.
|
|
|||
|
|