08 August 2008

WPF and C# notes

I've been learning C# and the .NET framework and WPF in the background lately -- most recently reimplementing "jiffy", my JPEG 2000 dump utility.

Some random notes as I climb the learning curve:
  • Petzold's book really disappointed me. These two quotes from an Amazon reviewer sum it up nicely: "I prefer sample applications to be shorter in order to illustrate the point. I found myself wading through code listings that had very little to do with what I thought the lesson was about" and "I felt that the explanations spent more time on how the sample application worked as opposed to going over the WPF technology that was supposed to be covered by the sample". I'm not looking for a dumbed-down version, no, but some screen shots or diagrams, please! Anyway, Sells' book is the one I've been toting around with me.
  • Liberty's C# book is a good intro (I've rarely gone wrong with an O'Reilly title), but doesn't go deep enough for an ex-compiler wonk. I need Books Two and Three, probably a C# language reference and a Framework reference.
  • A small thank you to John Skeet and his utility classes -- I'm using the EndianBinaryReader. (suggestion: namespace his classes a bit more, e.g. from MiscUtil.* to Skeet.MiscUtil.*).
  • Thanks also go to John Stewien for his multi-select tree control. (That behaviour really should be part of the framework itself.)
  • ObservableCollection seems to live in WindowsBase.dll. At least I wasn't the only one stuck on that.
  • Cold-start app startup times are waayy painful. I've seen a few blog posts on this topic, I try some of the ideas myself at some point.
  • Building produces lines in the output pane of the form: "C:\WINDOWS\...\Csc.exe /noconfig /nowarn:1701,1702 /errorreport:prompt ..." Alas, using F4 to cycle through the compilation errors line by line always "hits" this line. Why is that? Can I omit that line somehow as a build/config option? (F4 is able to skip other kinds of lines, like "Compile complete -- 2 errors ...")
  • Refactoring is nice. More kinds, please!
  • "AddReference..." takes a long time to open the dialog. Why?

No comments: