Wednesday, February 18, 2009
Dan Griffin is working on some samples for client development and blogging his progress as he writes them. His SPOS sample combines workflow with access to local hardware (in this case, a fingerprint reader) to create an application where you could approve, say, purchase orders with a fingerprint swipe. It's a good example of the kind of application that is better as a local client application than something web-based and browser hosted.
He's created a Codeplex site where interim releases are appearing, and a blog category where you can follow his progress, read his musings on what fingerprint reader to buy, and so on. This is a sample designed for you to use in your own work, so follow along and see if it can help you.
Tuesday, February 17, 2009
I have a favourite piece of advice, and I give it even though it frustrates many recipients. If you want to write, write! If you want to get into public speaking, speak in public! If you want to start a user group, start a user group! If you want to be an MVP, do what MVPs do (advise others and solve problems and volunteer for stuff) and you'll start to get the benefit even before you get the award. I'm not quite saying Just Do It but the fact is the barriers to entry are very very small these days and possibly non existent. Technical writing especially - start a blog or get active on newsgroups and presto, you're writing! Listen to feedback (people telling you you're wrong is bad, people thanking you for your answer or quoting you elsewhere is good) and you will get better. Public speaking isn't much harder to crack because the world is full of user group leaders and similar folks who need someone to speak to them month after month. It's also full of Code Camps and other places to get started (they tend to come with coaching and encouragement too.)
Still some people don't like this advice. They feel held back from what they want to do, and they don't like to be told "nothing is holding you back, you can start whenever you want." Alternatively, they don't want to speak or write or lead for free, they want to be paid for it, and they don't like the idea of starting for free and working hard for years to get that overnight success. So here's a rephrasing that maybe you'll prefer: "80% of success is just showing up." It's attributed to Woody Allen, not a guy I would normally take advice from, but it sure is accurate. Go to the meeting, open the document you're supposed to be writing, be there when someone asks for volunteers, go to the whiteboard and draw as much as you know, put your shoes on and go outside, ... not all at once of course, but these are the "just showing up" tasks that get you on the road to success. Try it.
Monday, February 16, 2009
Paul and Kimberly are so romantic! Paul started it with a Valentines Day post about how to be a better speaker, giving lots of credit to his lovely wife. So naturally she followed up with a post of her own. If you've never seen Kimberly speak, you really should, even if you don't know anything about her topics. We're often speaking at the same time but the few times I've managed to get free time and sneak into the back of her room, I've been tremendously entertained and learned more about SQL Server as well. I know, too, how much time sweating demos, rewriting things, practicing, and just plain working hard goes into being so entertaining and accurate. You start to get a sense of that by reading these posts - from the tiniest detail of what to wear to the vital "practise your demos" and "show up for your tech check" you can understand that what matters most is caring. If you want to give a great talk you will do all that it takes to give that great talk.
None of their tips are SQL-specific. Read them and you're on the way to getting better. Get out there and do some talks with this in mind, and you're really starting to get it.
Sunday, February 15, 2009
Well perhaps not all the way to Considered Harmful but Allen Holub is willing to call them Evil. I came across this article because I'm teaching OO Analysis and Design again this year and my students have generally already heard that the way you do encapsulation is you make all your attributes private and then add a public get and set method for every attribute. What's more, they generally feel if you change the type of the attribute then you need to change the return type of the get and the parameter type of the set. This of course gets you pretty much nowhere, and this is what Allen is railing against.
Now I am OK with Get methods as long as you swear you will never change the return type. The example I give the students is a bank account class with a balance. In the original design you keep the balance as a floating point number, 12.34000000 for 12 dollars and 34 cents. You add a GetBalance() method that returns a float, and Deposit() and Withdraw() methods that take (among other things) floats to represent the amount being deposited or withdrawn. Now when implementation time rolls along you discover that floating point arithmetic is expensive computationally, and needs lots of rounding to stay accurate: add 1.00 to 1.00, then add another 1.00 and the time may come when your number ends .01 or .99 ... neither of which banks care for tremendously. So you decide to store the balance as an integer number of pennies. Everything is OK in my book as long as you DO NOT CHANGE the signature of GetBalance(), nor of Deposit and Withdraw. These methods don't need to know what you just did. When Deposit tells you the amount is 50.00 dollars, your code can multiply by 100 to get 5,000 pennies, and add that to the balance. GetBalance() can divide by 100 (and round) to change pennies to dollars. That's a good use of a Getter method.
I am less OK with Set methods. I sure don't want a SetBalance() method. Deposit(), Withdraw(), and their cousins will change the balance. But there's no business rule in which it becomes necessary to announce that account 123456 now has $183.27 in it, and set the balance to that number. Having the method just encourages some code outside the class to do things that belong in the class - calculating service charges, or giving interest perhaps. Locking up access to the value means that if your business rules change, you don't need to look outside the bank account class for code that implements those business rules.
So do I think Get and Set methods are Evil? No, but I do think they should not be your first reflex, one of each per attribute. Make them earn their place.
Saturday, February 14, 2009
Here's another Channel 9 Video you need to watch: Rico Mariani: Visual Studio Today, Tomorrow and Beyond - Your Questions Answered. I love that in addition to planning for version 10 of Visual Studio, he's planning for 11, 12, and to a certain extent 13. To have the courage to start on a feature that won't really be done for ten years is very impressive. I'm looking forward to "Dev10" for a lot of reasons ... even more after watching this video.
Friday, February 13, 2009
You know the blog, now watch the Channel 9 video featuring Damien Watkins, Rick Molloy, and Don McCrady. I like this one because they talk about how they ended up changing their minds over the course of development, moving from a language-based approach to a libraries-based one. They get into why that's better and what C++ 0x features they needed to make it possible. A nice way to spend a little under an hour.
Thursday, February 12, 2009
Yochay has been very busy talking to Channel 9 and preparing Windows 7 material for developers. Here's a blog post from early January that lists some taskbar related videos you will want to watch. Screenshots of the taskbar really don't convince you of how much easier it is to use.
Still I can't keep from trying. Let me show you how I close things now. Imagine I have (among other things) a Notepad instance open on my machine. The "old way" to close it, if it doesn't have focus, is to right-click the icon on the taskbar and then choose close. You can still do that in Windows 7:
That's a right click, let go, move the mouse, left click. We know how to do that, and it's a ton less mouse moving than left click, wait while window paints, go on all the way up to the top right, click the red X. But I like this even better:
If I just move the mouse (no clicking) over the icon of one of the Notepad instances, they all show their thumbnails. One of them (the one I moused over) has a little red x showing in the thumbnail. Without clicking, if I move the mouse onto the thumbnail and pause a moment, I get the "peek" where that window appears (in case I can't tell from these tiny little thumbnails) and everything else goes transparent. If I click the little red x in the thumbnail, the instance closes. It's less clicks, it's noticeably faster and smoother.
These are the sorts of things that are making me so glad I put Windows 7 on the prime laptop. I would not go back!
Wednesday, February 11, 2009
Jennifer Marsman points out her favourite new Windows 7 feature - different default printers when you're on different networks. To bring up the dialog she shows in her blog post, bring up the Devices and Printers dialog (I do that by clicking Start and typing printer), then select a printer. That will give you a printer-related toolbar:
And yes "no network" counts as a network, so I can have the XPS writer as my default when I'm not on the network (if you've ever accidentally clicked a Print icon on a toolbar and then had to wait over a minute while the search for the printer timed out, you'll know why my default isn't really a printer at all) but I can have a useful default printer when I am on the network. Fantastic, and thanks Jennifer for telling us about it!
Tuesday, February 10, 2009
There's been a reasonable amount of blog talk about the removal of the "quick launch" area from the Windows 7 taskbar. What isn't coming across in the blogs I read is how there is an across-the-board attempt to make the taskbar more useful. Sure, making it easy to flip focus to a background window to see how it's doing is a good idea. But saving you from having to flip focus is a better idea, right? Take a look at this:
It's a piece of my taskbar, and the icon with the green on it is an Internet Explorer download dialog. That's a green overlay progress bar going across it. Here's another a few minutes later:
This is really, genuinely useful. And if you're thinking that getting your own applications to take advantage of this will require you to learn a bunch of API calls and the like - think again! If you have a progress bar control on screen, the overlaying in the taskbar will be done for you automatically on Windows 7. How's that for fun?
© Copyright 2021 Kate Gregory
Theme design by Bryan Bell
newtelligence dasBlog 2.3.9074.18820
| Page rendered at Friday, October 15, 2021 5:37:32 PM (Eastern Daylight Time, UTC-04:00)
On this page....
Pluralsight Free Trial