Learning WPF with BabySmash and Back to Basics - Making Assumptions and When to Turn to Books
NOTE: If you haven't read the first post in this series, I would encourage you do to that first, or check out the BabySmash category. Also check out http://windowsclient.net/ for more developer info on WPF.
BACKGROUND: This is one of a series of posts on learning WPF. I wrote an application for my 2 year old using WPF, but as I'm a Win32-minded programmer, my working app is full of Win32-isms. It's not a good example of a WPF application even though it uses the technology. I'm calling on community (that's you, Dear Reader) to blog about your solutions to different (horrible) selections of my code. You can get the code http://www.codeplex.com/babysmash. Post your solutions on your blog, in the comments, or in the Feedback and we'll all learn WPF together. Pick a single line, a section, or subsystem or the whole app!
I hung out with Chris Sells at the Mall Food Court today. He had trouble finding a parking spot and I felt bad. But I didn't REALLY start feeling bad until I started showing him the code for BabySmash.
He had a number of ideas for ways to make BabySmash better, but what was interesting was that he was using his own book as reference. He'd say, "oh, we did that in Chapter 4" and "ya, that does suck, check out this call out where I explain why." After this happened about four or five times he said (I think in jest, but you can never tell with famous dudes. ;) )
"Did you invite me here to read my book to you?"
After I picked my ego off the ground, unfolded it, dusted it off, and smoothed it out, I said, "I don't think so."
Chris had a really good point. It turned out that even though I have a three WPF books at my house, I haven't read them all deeply and thoughtfully. I hadn't even made it though the first few chapters. Mostly I skipped around, looking for answers to my specific questions.
Through my questioning, Chris noticed that I had some fundamental misunderstandings about some the basics of WPF. Things I thought worked one way, worked another or in reverse. Some concepts that were WPF 101 I had overlooked completely because I hadn't least made it through ~5 chapters and cemented the fundamentals.
I am not saying that we need to read every book all the way through, but I did learn a useful lesson. Don't assume you know how it works. Just a few hours of covering the fundamentals would have saved me a lot of time.
In the last post I said I was starting to grok WPF. Looks like less than I thought. I had left pretty significant gaps in my understanding by skipping around and assuming "oh, this works like that." Those gaps in my knowledge led to some interesting directions in BabySmash. I'll post about some of those things I learned from Chris soon, but suffice it to say, I completely misunderstood how events moved around a WPF application.
Thanks Chris for setting me straight! Sorry about the parking!
OK, page one, "Hello, WPF."
About Scott
Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.
About Newsletter
Cheers!
@Mike I know that I am hocking my own wares, but I'd like your opinion on our book. Our focus was on how to structure WPF applications. Feel free to contact me through my blog.
Besides, ask yourself this: when would the WPF concepts have had more meaning to you? When you read them in a book before ever having written a line of XAML, or after you have experimented with the technology, taken it for a test drive, and actually applied it? Getting to be “book smart” in a technology without ever having lived in it, is a trap that a lot of people in the IT industry fall into. The kind of folks you talk about who whiteboard for money.
I’m a Chris Sells fan, but I hope he didn’t have any malice behind his teasing. That’s another problem we have in IT. Some of the smartest developers on a team will not speak up or assert their ideas, for fear that they may be wrong. Or worse, they worry that they will be called out by some pecksniff who will ridicule them. So they don’t feel safe taking that risk, and the project is poorer for it. (Here's hoping Chris Sells is not that kind of bullyragger, lurking behind a pleasant author's personna).
I want you to continue down the path you’re on now. I give you big props for sharing your experience as a learner, rather than a pundit. And I hope more people follow your lead. We’ve got enough material that reads like product documentation. Let’s get more stuff out there about what it's like to learn in the real world.
Do you have the book 'WPF in Action' from Manning Press? [1] I just purchased it because it's 35% off if you buy it from the Manning site (for a limited time?). I love reading dead-tree books, but the PDF versions are much more portable and you can pickup the PDF version for only 18 bucks (for a limited time?).
I can't really comment on the quality of the book yet, because I've just started it. I've usually been quite impressed with Manning Books in the past and I have ordered quite a few: Nhibernate in Action , Jquery in Action, ASP.NET MVC in Action, Silverlight 2 in Action, etc.
Whew... I really have a LOT of summer reading ahead of me!!! Can anyone recommend a device to read these PDFs on outside in a lawnchair? Does the Amazon Kindle read standard PDF documents or is it proprietary? I guess I could use my laptop, but that is so bulky (17") and battery life is terrible.
[1] http://www.manning.com/feldman2/
Short answer: Not natively.
Long answer: There are PDF to proprietary format converters offered by Amazon and other 3rd parties. Not sure on the exact limitations.
I guess I'll just save up for a lighter notebook computer.
I'd say that is true about half of the things that you blog about and are on your podcast. :)
Don't feel bad, I'd say that it is true about half of the things that I blog about and talk about with my peers.
Thanks for the awesome posts.
That's a pretty awesome quote.
You did say all along that you were just making it work based on your existing body of coding platform knowledge, so conceptual gaffs were pretty much inevitable. The fact that you've taken that as the jump-off point to figure out how it really should be done (as you've said you would from the outset) is the key difference between what you're doing and someone who just adopts the latest technology to their own way of doing things. (then usually pronounces that the new technology sucks)
Comments are closed.
it takes a lot of personal courage to react to Sells's comments the way you did. a lot of people, myself included, would probably be very tempted to become defensive and angry.