WS-BLOG
|
Overworked?
while looking for someone else's blog i stumbled across this guys post and it was just too funny not to pass on to ya'll. he's
done the math on why we all seem so overworked.
and ya gotta love the "powered by: typing this crap in myself" line :-))
|
Cool P/Invoke Site
Adam Nathan has put up a really neat
site to help you use flat APIs in your .net code. now you can simply copy and paste a p/invoke method declaration!
if you like this sort of thing, check out
connectionstrings.com
|
Exiting Times
ya know, after the launch of .NET v1 i expected there to be about a 2-3 year lull in activity as seems to be the case with most major launches from microsoft. imho, the launch of the .net framework and visual studio.net was every bit as significant as the lauch or windows 95, windows NT, or any other major product ship. but instead of a lull in activity things seem to be ramping up at a shocking pace. personally, i see the activity of 4 things to be the most exciting.
1.
longhorn
for those of you who do not know, longhorn is the codename for the next version of windows. while the final release of longhorn is still years off, there is already a tremendous amount of activity buzzing around it. there seems to be as more articles, blog posts, etc. on longhorn as all the other projects added together. longhorn is particularly exciting since this is the earliest that customers have ever been brought into the development cycle of such a major product. customers have an uprecedented opportunity to contribute to the feature set of this product.
2.
sql yukon
yukon is the codename for the next version of SQL Server. and i believe this is the first product to deeply integrate the .net framework. Yukon has been over shadowed lately by its big brother longhorn, but there is still lots of sweet stuff going into the product.
3.
whidbey
Whidbey is the next version of visual studio.net and the .net framework. some of the coolest stuff going into this version include: generics (template based programming similar to C++), object spaces (object-relational framework), intellisense everywhere, master-detail asp.net pages, built in asp.net personalization .. and on and on and on!
4. blogging & community development
my god everyone's blogging! microsoft is really, really, really pushing blogging these days. everyone from
Don Box to Eric Rudder to
MSFT Recruiters to entire product teams. talk about drinking from the firehose! and it doesn't stop with blogging. there this thing now called
Wiki that sites like
channel9 are using. speaking of channel9 .. here's yet another spin on the community thing. channel9 provides a place for developers/customers and msft product teams to interact in a very informal manner.
there is tons more cool stuff going on
outside of
microsoft too.
what a trip! i can't wait to see what will be going on next year :-)
|
WMI Code Generator
I thought i would be clever and build a code generator for WMI classes. It is actually working pretty well for me. (I'll post it in another blog post later). However, as is usually the case, microsoft has thought of this long before i did. they actually provide
3 ways to generate wrapper classes for WMI classes. Go figure
|
Multi-threaded UI
Whoo hoo! After a couple of nights fighting with multi-threading in my winforms app, i finally got my async delegate to work.
Here's what i was doing wrong:
I started out with something like this:
public class MyForm : System.Windows.Forms.Form
{
public delegate void LoadPrinters();
public delegate void EndProgress();
private void MenuItem_Click()
{
LoadPrinters lp = new LoadPrinters(FindPrinters);
lp.BeginInvoke();
}
private void FindPrinters()
{
// doing some really slow WMI query here to find all my printers
// once done with the WMI query, call back to the main UI thread and tell it we have the info
EndProgress ep = new EndProgress(EndProgress1);
ep.BeginInvoke(null, null);
}
private void EndProgress1()
{
if (this.InvokeRequired)
// build a Windows.Forms.TreeView with our list of printers
}
}
what i was trying to do here is launch a separate thread via a multicast delegate that would run a long query and then report back to the main UI thread when it was finished so that i would not tie up the application's main UI thread. if i were to perform this query on the UI thread, i would have tied the thread up, preventing it from repainting if you switch back to the application from another program ... and i hate that. so instead i call the FindPrinters method ansynchronosly. when the FindPrinters method completed, it was supposed to marshal the call to EndProgress() back on the UI thread .. EndProgess updates some UI components which should only be done on the UI thread.
that was the goal. the problem i kept running into however, was that the call to EndProgress continually occured on the "worker" thread (e.g. the thread created by the async call to FindPrinters. It turns out that calling BeginInvoke on the delegate itself inside the FindPrinters method causes the method to be called on the current thread .. and NOT marshalled back on the UI thread like i wanted. the solution to this is to call BeginInvoke (or just plain invoke) on the current thread -> "this" <- passing in the reference to the delegate. That way the call to EndProgress will get marshalled back to the UI thread.
the correct code looks like this:
public class MyForm : System.Windows.Forms.Form
{
public delegate void LoadPrinters();
public delegate void EndProgress();
private void MenuItem_Click()
{
LoadPrinters lp = new LoadPrinters(FindPrinters);
lp.BeginInvoke();
}
private void FindPrinters()
{
// doing some really slow WMI query here to find all my printers
// once done with the WMI query, call back to the main UI thread and tell it we have the info
EndProgress ep = new EndProgress(EndProgress1);
this.BeginInvoke(null, null); // <--- instead of calling ep.BeginInvoke we need to call this.BeginInvoke to ensure that we are marshalling to and from the right thead.
}
private void EndProgress1()
{
if (this.InvokeRequired)
// build a Windows.Forms.TreeView with our list of printers
}
}
Ahhh the relief! LOL. I must have poured over
Chris Sell's Windows Forms Programming in C# - chapter 14 for a good 2 hours when the answer was staring me in the face all along. anyway, thanks Chris!
|
More on ES
well, it appears that enterprise services hasn't completely fallen off the map just yet.
.NET Enterprise Services Performance
|
Collegiate Education of our Software Developers
Educators, this blog's for you!
As I am catching up on the blogs of some of my friends, I came across a
distrubing post. In it
eric relates an experience that he had getting stonewalled by a member of
Grand Valley State University's IS faculty staff. His desire was to get Windows XP installed in the test lab. As eric puts it, the answer was "Its never going to happen". Now, admittedly there could have been a number of reasons for the answer such as budget issue, time, or other reasources. but having attended that university myself and suffered under its regime, i suspect there are more petty reasons for the deinal of the installation. Frankly, when i read that post, i was infuriated. Here we have a situation where a student wants to learn something. He goes to his professor and is told no. Educators, particularly college educators need to understand that their students are really their customers. Unfortunately, far too much bureaucracy buffers the instructor from his customers and the market. However, great sums of money ARE being EXCHANGED for SERVICES. Those of you with student loans understand what i am saying. A professors job is to instruct the student and help provide an environment where that student can learn. who cares if the student is learning technology from microsoft, sun, ibm or whoever .. as long as the technology and underlying skills being gained are relavant in the market for software developers ...
and that brings me to my next point. when i suffered through GVSU's IS regime, i was forced to write a shell for the NextStep OS, as well as learn assembly code for the same platform. i've heard of other students at other schools doing similar such busy work (such as writting a compiler). somebody please explain to me why i spent a couple thousand dollars on this "education". what a complete waste of time and money. Educators, READ MY LIPS: NOBODY WRITES COMPILERS, KERNELS, OR ANY OTHER PART OF THE OPERATING SYSTEM OR DEVELOPER TOOLS, EXCEPT THE VENDORS. Knowledge of these techniques is becoming less and less relavant. Most of the developers in the world could not tell you what a semphore is let alone properly utilize one. I can't speak for eric, but the concepts i learned under the regime were mostly worthless and do not apply to my job or the jobs of any of my collegues in other disciplines.
If you were able to observe a *real* developer in the wild you would find out that his job invovles far more boring tasks than writting operating sytems. if a real life developer wants to become good, he needs to know how to (in no particular order):
1. document requirements. anyone can gather requirements. its easy. documenting them in a way that the customer and developer can both understand now and in the future is a far more difficult task.
2. know when to design an application and when to just crank out some code. yes! its true .. many times developers just write some code to perform a simple task. the quicker it gets done the better so everyone can get on with thier lives. there are other times when design needs to be taken into consideration. application design often needs to sidestep common performance and scalabilty hurdles, and provide for a codebase that can be maintained going forward.
3. develop a test plan. whoa this is HUGE!!! I am not convinced that anyone out there really knows how to test anything. however you should atleast TRY to explain usability testing, regression testing, performance testing, etc etc. it can't hurt
4. architecture. if people have trouble with #3, i know they don't have a clue about this one. ask 100 software developers what architecture is and you'll get 100 different answers. architeture is NOT software design. you don't "architect" and application .. you architect the software development processes and infrustructure. architecture is about planning, planning, planning. the technology assests (email servers, domains, applications, etc.) are a company's IT Portfolio. teach the student how to maximize the value of that portfolio through sound architecture choices.
5. FOR THE LOVE OF GOD, TEACH RELEVANT TECHNOLOGY!!! I'll say this simply: .NET and Java/J2EE are the two kings of the universe for software development. all other technologies at this moment in time are irrelavant to a budding software developer. ALL the jobs are using one of these two technologies. Forget about anything else. If you are teaching programming courses, it had better be on one of these two platforms. No other platform can possibly present the student with a realistic view of the world. period. knowledge of the proper language is an absolute bear minimum to enter this profession. give the student a break in this tough job market and teach your classes on current/relavant technology.
if you don't know any relavant technology, learn it. then teach it. that's your job. that's what you are paid to do.
|
Learning to HATE the IDE - Expando
I probably should not have posted that last blog, cause now i'm HOT .. just kidding .. well sort of ;-)
Microsoft, take these things out of my IDE:
1. the tabs in the design window (the ones that show files names for files in your project). it is really annoying to try and find my place back when i have lots of files open and lots of tiny little tabs with one or two letters. i always go back to the solution view anyway.
2. "dynamic tool bars". depending on whether you are in design view or code view, the IDE will show/hide context specific tool bars. just disabled the toolbars that are not applicable. you let me put them on the screen in a place that i wanted them to be, so don't F with them!
3. VB code editor. the IDE is constantly trying to write my VB code for me (most so then the other languages). the IDE seems to think that i write my code from the top down and will "finish" my code for me (usually by adding parenthesis where they are not wanted) when i skip around in a file. maybe i'm just a freak, but i write my code bottom to top, top to bottom, and sometimes sideways. I'm an enigma so just leave my code alone
4. dynamic help. i'm not quite THAT stupid (yes i know my spelling sucks). besides, i've never had a machine fast enought to run it.
5. i spend lots of my time rearranging things in the IDE - such as moving splitters, etc. yes, i am THAT stupid (and fussy). lock it all down so i can still see everything and i don't have to fuss with the layout of the IDE itself.
6. Menu stuff: Build->Build All .. where is it?
7. customizing the toolbox is WAY TOO SLOW.
8. devenv.exe is currently taking up 36,572K of memory and i just have a single form winforms project loaded. COMMON GUYS!
9. why can't my exe find my config file when i run in debug mode? you guys put other stuff like the COM interop shims in the build folders, why not the fricken config file. jeesh!
10. remove VSS integration. its always felt weird to me to check stuff in and out of VSS via the IDE. maybe this is just an old dog thing again.
11. speaking of feeling weird ... server explorer in the IDE??
i'll stop here.
perhaps #10 and #11 are worth giving another shot. but 1-9 are spot on IMHO.
|
Learning to HATE the IDE
I must admit, that my anxiety over installing and running the whidbey preview is growing. From what I understand, the new IDE has included smart tags just as you see in the latest versions of Office. Maybe its because of the rediculous office assistant that everyone hates, or the annoying copy and paste window that constantly comes up when i am in office, but i have grown to despise Word and Excel. I don't think that any technology should be harvested from those products .. let alone put into my precious IDE. I suspect the first thing i'll look for in the preview is the setting that turns these tags off. and if i see any copy and paste help - AT ALL - i'm probably going to go nuclear!. i'm constantly copying and pasting in my code. i've been doing it for many years and its been way too long for this old dog to learn new tricks.
It seems that Microsoft has become absolutely obsessed with making me a more productive developer .. errr i should say coder since their "help" via the IDE is more code construction help than anything else. if all i ever had to do was write code then that would be enough. however i have to gather requirements, design the software, THEN construct the code (most of which i'll automatically generate anyway), test, fix bugs, test, fix bugs, deploy, test, fix bugs, test, fix bugs, test, fix bugs, test fix bugs - i think you get my point. any help with some of the rest of that stuff would be greatly appreciated.
|
on Open Source
lately, i've been digging into this
open source thing and
its flag ship success and the one thing i don't understand is where the business model is. sure, i understand that there many different types of motivation for developers to particpate in open source projects (such as pure academic interest, skill improvement, and probably most of all simple passion for the work) .. most of which are not directly related to turning a profit for the individual. however, even for the most altruistic open source developer, the pay check must come in. and the pay check comes from where? support based activities right? it has to ... there isn't any other profit model (that i can see) for open source work. not that there is anything wrong with support - infact companies like red hat have done very well for themselves in a support role. the problem with support as i see it, is that it is the least sexy type of work a developer can be involved in. developers, as a lot, generally like the part where they design and implement an algorithm. the post implementation (read support) work is anti-climatic at best. i've never heard of a developer that actually enjoyed talking to end users on the phone (its really not the user's fault, technology as a whole is
just not ready for normal human beings, but that's a different argument)
so the business model it seems, appears to be support - whether it be the on going support of a already implemented system, or support in the form of consulting services. Is this model really the best thing for the developer? Open source projects themselves excel because the developers are passionate about what they are doing. Most of them i suspect are probably doing some of the best work of their lives. why then, wouldn't you want to compete in the market in these terms rather than in a support model? whether you are a lone gun, or a up and coming software company your love for this business is in the innovation of the software rather than the support. I for one would prefer that my market value be determined more on my ability to innovate than how quickly i can close out trouble tickets.
That's my two bits. I readily encourage counter views as I am still trying to figure this all out.
|
Whidbey preview & other IDE goodies
for those of you with an MSDN subscription, a
Whidbey preview release is now available for download. however, please wait until i have completed my download before you start yours my down load has been running for more than a day now and i'm getting impatient!:-D just kidding.
while searching for the link to the whidbey release, i stumbled across the
PowerToys for Visual Studio .NET 2003 looks like vb programmers can employ XML Comments just like in C#! Cool!