Public musings, often on software development RSS 2.0
# Friday, October 10, 2008

One of those things that just make me shake my head...

I have a computer I keep in the company domain.  Someone or something (I don't know who or what and to be honest don't care enough to find out, just enough to document the insanity) appears to have created a policy either at the domain or on my machine that automatically resets the default printer to OneNote.

For starters this is bad because it means that even though I go to the effort to make Printer 'x' my default because it's close to my office, the next time I restart, I instead have my default printer reset to OneNote... which is pretty annoying.

But a better question is why given that I already have an electronic copy of whatever it is I want to print I would want to print it to One Note.... so I could have an electronic copy... 

More importantly it pretty much kills all those nice print short cuts MS put on everything where I can with a single click print whatever I want to my default printer... but, nope doing that just causes my system to pause while OneNote starts - wasting my time - so I can shut OneNote - wasting my time - and go through the full multi-step process of selecting a printer - wasting, well you get the point.

I hate to think that it's just the act of installing OneNote that does this...

http://connect.microsoft.com/onenote/feedback/ViewFeedback.aspx?FeedbackID=363469

Friday, October 10, 2008 3:02:16 PM (Pacific Daylight Time, UTC-07:00)  #    Comments [0] -
Musings
# Monday, October 06, 2008

Monday, October 06, 2008 11:43:28 PM (Pacific Daylight Time, UTC-07:00)  #    Comments [0] -

So after quite the busy Spring I needed some downtime so I haven't posted in a while.  I was all set to restrart posting back in September with a post that will be coming online here shortly but although I had done the work, things got hectic and so posting was postponed. 

Well it's time to get rolling again.  I have the book I finished at the start of Summer coming out in the next couple weeks, I've got the cover article for this months SQL Server magazine, I'm speaking at the ASP.NET User group here in San Diego on the 21st, and then again at Code Camp in LA prior to PDC.  I don't have a ticket to PDC, but if you want to offer me one I'd be happy to take be there.

So over the next day or so I'll get a nice technical post on Silverlight 2 Beta 2 in place and a short post on how I'm losing weight (and you can too :- ) and generally start things going here on the blog again.

Monday, October 06, 2008 11:23:53 PM (Pacific Daylight Time, UTC-07:00)  #    Comments [0] -
About the Nerd
# Wednesday, June 18, 2008

Another of those diseases which doesn't get nearly enough coverage given the number of people it effects each year is Melanoma.  This article talks about how by useing a patient's own blood cells and essentially cloning them and reinserting them they can attack an otherwise potentially fatal cancer.  http://www.breitbart.com/article.php?id=080618212711.38ht6zq0&show_article=1 Some of the stuff that is going on in medicine today is just amazing.

Wednesday, June 18, 2008 4:56:24 PM (Pacific Daylight Time, UTC-07:00)  #    Comments [0] -
Musings
# Saturday, May 10, 2008

I wanted to make a quick shout out to my favorite 'new' kids television show.  As with every parent of a toddler you go through a phase where you get inundated with kids shows.  Some like Teletubbies or Barnery are pure torture (My son doesn't watch these shows).  Others like the new Mickey Mouse club are instantly appealing and for an adult at least watchable (the first 3 or 4 times for a given estimate, after that your brain still turns to mush).  Of course in posting this I'm admitting that my son (age 2) watches TV - which is of course the root of all evil according to some.

However, this post is focused on my favorite of today's current array of morning kids programming.  In the preceding paragraph I mentioned shows that are rather old, and I don't want compare say Barney to 1970's era Captain Kangaroo.  Different eras have different shows.  The first thing I learned about modern pre-school kids TV in the morning is that there are two definite leaders - Disney and PBS Kids.  I know several of you probably think I've missed both Cartoon Network and Nickelodeon.  I didn't you see Disney and PBS both follow a minimal advertising model for the morning stretch.  Admitedly PBS keeps that model 24hours a day but to me the fact that Disney has matched this model from 6AM through Noon is impressive.

In general Disney has a better set of shows when it comes to the combination of entertainment and education.  By this I mean that when I consider the shows my son pays reasonable amount of attention to the Disney shows keep his attention while several of the PBS shows while potentially more educational are met with 'no- no' meaning - take me back to Disney.  After all one of his favorite shows is the Mickey Mouse show and Mickey's appeal is great and the show includes things like counting, shapes and colors.

That's great however last fall Disney and PBS Kids each 'introduced' from my standpoint a new show.  On Disney the new show was Bunny Town.  It was preceded by weeks of over-promotion telling us how great it would be. As usual the overwhelming hype was indicative of just how weak the show was.  On the other side although to the best of my knowledge there wasn't overwhelming publicity, but PBS Kids introduced a show - the only show which we can switch to even against a showing of Mickey.

By now if you recognize the title of this post you know that show is Word World.  This is an awesome show, they introduce the idea of building words from letters.  The computer graphics not only create characters but literally use the letters to create the object they describe.  For example the Dog character is an adaptation of the letters Dog with legs, ears, tail etc. added.  The letters don't just disappear or appear they are used to create objects and the graphics are of the type you could only create in the past couple years. 

I have no doubt but that watching this show feeds into the fact that my son knows all of his captial letters (note reading books and playing with letters in the tub and talking about them elsewhere - including license plates - also plays a big role , not to mention that my son is surprisingly bright.) At any rate, the show is well produced and you can check out their site including a sample episode at: http://www.wordworld.com/

To view the show's opening scene head over to PBSKids.org (http://pbskids.org/wordworld/video/montage.html?load=montage1) or to get a feel for how the characters behave check out the embeded video below - although it omits the rich animated scenery and just focuses on the characters and building words.

Saturday, May 10, 2008 10:11:35 PM (Pacific Daylight Time, UTC-07:00)  #    Comments [0] -
Musings
# Friday, May 02, 2008

This is one of those musing posts and comes from one of the challenges I have when teaching a feature that Microsoft chose to call 'Generics'.  I think this name was picked by someone, who while reasonably familiar with English wasn't a native speaker of the English language.  Thus they found a definition and thought it applied - allow me to elaborate.

What is a .NET Generic - well in short - under the original implementation of .NET collection classes contained a set of other objects.  However, these classes didn't know specifically what kind of object they contained.  Instead a given collection might contain more then one different type of object, for example numbers stored in a collection with strings and image objects.  It wasn't possible to say thata given collection would contain only a specific type of class. 

With the introduction of 'Generics' it was possible to indicate that a given collection would only contain a specific type of object.  That's right the feature Generics describes a set of rules and syntax for ensuring a collection is of a specific type.  Now the challenge comes from how the definition of generic is phrased in some dictionaries: "Relating to or descriptive of an entire group or class"

Notice that the preceding definition basically associates the definition of a generic with a class.  Thus if you were searching the dictionary for a word that described a class - well there you have it.  Unfortunately this use of the word "class" doesn't relate to the use of the word "class" in object oriented programming.  In this use a class is more of a category of like items - not the definition of a single item. 

Webster's Revised Unabridged Dictionary - Cite This Source - Share This

(http://dictionary.reference.com/help/web1913.html)

Generic

Ge*ner"ic\, Generical \Ge*ner"ic*al\, a. [L. genus, generis, race, kind: cf. F. g['e]n['e]rique. See Gender.]

1. (Biol.) Pertaining to a genus or kind; relating to a genus, as distinct from a species, or from another genus; as, a generic description; a generic difference; a generic name.

2. Very comprehensive; pertaining or appropriate to large classes or their characteristics; -- opposed to specific.

Webster's Revised Unabridged Dictionary, © 1996, 1998 MICRA, Inc.

 

That's right the word I most frequently use to describe the feature Generic is the one which defines the opposite of the definition of the word generic....

I don't think Microsoft can really do much about this, it's just one of those things that make you wonder...

Friday, May 02, 2008 11:46:25 PM (Pacific Daylight Time, UTC-07:00)  #    Comments [0] -
.NET | Musings
# Monday, April 21, 2008

So officially it's not yet an option, after all the San Diego Chargers are still working with the city (suburb) of Chula Vista to keep the Chargers football team in San Diego County.  And of course the Chargers spokesman has officially denied it... http://www.sportsbusinessdaily.com/index.cfm?fuseaction=sbd.preview&articleID=120164 (account needed for full article - but the headline says it all)

However, if Chula Vista 'stumbles', one environmental suit or negative ruling in the next two years, and lets face it the Chargers are moving to Los Angeles and this brand new, very fancy stadium.  Construction should be ready to begin in 4Q of this year and my guess is if it does and if the inevitable challenges to the Chula Vista site arise - "Los Angeles 'super' Chargers" will be the new theme song...

http://www.losangelesfootballstadium.com/

I easily could be wrong but let's face it if there wasn't already a sequence of events (or perhaps more than one) that would result in a team moving here, this idea would be crazy.  Fact is, IMHO that's what you would have to be to think that this isn't the future home of the Chargers.  BTW, check out the background color scheme - which NFL team has uniforms in Baby Blue?  Heck another story even has Roski on the record as stating that the team moving could play in other LA venues for 2009, 2010 till this place opens in 2011.

Monday, April 21, 2008 2:05:07 PM (Pacific Daylight Time, UTC-07:00)  #    Comments [0] -
Musings
# Thursday, April 17, 2008

This is one of those 'hey look at me' posts that always make me feel like... well if you recognize the title of the movie that the quote which is the title of this movie comes from - that pretty much sums it up.

Anyway a few 'ads'. 

First off, I have a new article available over at SQL Magazine.  It's a very introductory article to LINQ for SQL so if you are looking for a good starting point for just getting started with LINQ, here's a short article that might be of assistance: http://www.sqlmag.com/Article/ArticleID/98205/sql_server_98205.html

The second item fits the post a bit better.  Back in the first Quarter I signed on to do another book - yes my wife is ready to kill me - which since she is pregnant get's the pregnancy multiplier (we're currently around 7 or 8 so the danger level is getting pretty high).  At any rate if you are interested it's still way out in the future - like October 2008 - if "we" (me) make "our" (my) final due date - here is the page: http://www.amazon.com/o/ASIN/0470377313/105-1544171-6096430

As you can note on that page this next book is an Office Business Applications book.  Of note, it will have both C# and VB samples (ok VB sample - but more on that later) and covers using WPF with Outlook Form Regions and Excel not to mention server side document generation.  That's the good news - the bad news - well I'm late on my chapters - of course that's pretty typical for me - the question is can I catch up in the next few weeks - especially given the increasing pregnancy multiplier...

Finally, I thought I should mention that my last book is finally getting read to be available.  At 1600 pages it pretty much is a phone book, and it should ship for the first week of May which apparently is fast approaching: http://www.amazon.com/Professional-Visual-Basic-2008-Evjen/dp/0470191368/ref=sr_1_1

 

Thursday, April 17, 2008 5:27:25 PM (Pacific Daylight Time, UTC-07:00)  #    Comments [0] -
.NET | LINQ | SQL Server | Technology | Visual Basic | VSTO
# Wednesday, March 19, 2008

I'm in week 5 of teaching my Visual Basic I programming class at the University of California San Diego Extension.  The week 5 class is going to focus in on WPF and helping students get a better feel for working with this new user interface paradigm, and it's custom 'script' language XAML. :-)

WPF comes with several new concepts and I think that for developers who are just getting started and or coming from a solid web application background many of these concepts feel very natural.  On the other hand there are a host of developers out there who are coming from a Forms/Win32 based background.  For these developers, even though most people think of WPF as a Forms replacement the new declarative model and in particular the new buzzwords leave them overwhelmed.

After all most people that show of WPF applications are busy making sure they've included as many graphical elements as they possibly can, for example one famous paraphrase of Tim Huckaby is "It's just not a WPF application without some form of gratouitous animation."

However, from my standpoint, in the way I approach introducing developers is to explain some elements on XAML and then focus on the similarities between WPF and Windows Forms development.  For example in Chapter 17 of the soon to be released Professional Visual Basic 2008 which will ship this May, my approach is to literally have you start by designing what could easily be a Windows Forms application using WPF.  Over the course of the chapter the application is migrated with the title bar being hidden, buttons being customized, etc as you introduce more and more concepts that are native to WPF. 

In the beginning you start by working with the Visual Studio 2008 editor.  This editor is well known to be VERY limited in comparison to Blend.  However, if you are moving from Windows Forms to WPF then you'll feel much more comfortable in this environment.  Start here and work towards the same type of applications, then introduce Blend.  Blend not only provides several key examples that you can use to get a better feel for the WPF paradigm, but allows you to start to take that item which you feel comfortable with and migrate it to a WPF paradigm with routed events, complex styling and other elements that are much more in keeping with the declarative programming model.  Of course this book isn't about WPF so I don't go deep on things like styling and databinding and other topics, but it will help you start so that those topics combined with everything else in WPF aren't quite so overwhelming.

Keep in mind that while there are rumored to be several WPF related updates coming in the next update to Visual Studio 2008 (I think I covered when to expect that to appear) even with these updates you as a developer are still going to need to start to transition to this new UI paradigm.  Fortunately because WPF performs better on Vista then on XP, and has no backward compatability below XP there is still time for you to get up to speed... but that grace period won't last forever.  More importantly those performance issues are primarily for heavy duty graphics, if you are working in a more Windows Forms paradigm you won't see much of a difference at all.

Which brings me to "Why do it now?" - Well we already have an announcement that Windows Forms 2.0 was the last of the new development on that model.  By starting to work with WPF now, even though you might not create a gratouitous graphic, you are creating an application tier that as WPF takes over (and with it's relationship to Silverlight 2.0 the pace of adoption is imho going to accelerate) your code even though it still has the standard Windows Forms look will integrate and be able to be adapted much easier then people who are continuing to create new solutions using Windows Forms.  So now is the time to take those existing designs and just start by implementing them in WPF with little or no leverage of the high end graphics - and then as you get more comfortable with just how much power WPF provides you can update them to leverage that power.

Wednesday, March 19, 2008 11:39:21 PM (Pacific Standard Time, UTC-08:00)  #    Comments [0] -
.NET | Technology
# Tuesday, March 11, 2008

As I noted in my last post I’ve been working with a State based custom MOSS workflow.  I’ve actually reached the point where I’m into resolving minor issues during my unit tests.  One of my tests involved having a user other then the assigned user take a pending task and resolve/address it.  So for example a document waiting to be approved is recognized by a manager who is covering for the assigned manager.  The covering manager has “permission” to complete the task but isn’t the assigned user.  This is where I had what I consider to be unexpected behavior.

What happens in SharePoint is that when I start in the debugger (or after deploying my workflow outside the debugger) the workflow is run in the context of the administrator.  Now before you read that as “administrator” let me clarify – it’s run under a fixed account.  The context of the thread executing the workflow isn’t assigned based on the current user.  So whether it’s the administrator account or the Guest account the point is that at runtime if a parameter containing the user who triggered a workflow event isn’t passed into the workflow there is no way to determine the actual identity of the person triggering that next step in the workflow.  This is important because if you are planning a workflow, then like most you are planning to capture a history of events which occurred.  The problem if you don’t explicitly pass the name of the current user triggering an event then the name available as part of your running context will not be correct.  Thus your history can at best reflect the name of the user who was supposed to resolve/address that action.  Lost is the identity of the user who actually accessed your site and did take action on that workflow item.

If someone actually has an answer for getting that user (aside from explicitly setting a parameter) that I'm not aware of please feel free to let me know?

I spent quite a while looking at the parameter and runtime environment data and created a new WindowsPrincipal.GetCurrent() instance to see if I could find the actual current user. I also checked for example the current user value in this.workflowproperties.web, and it also was the administrator.  Of course it might turn out to be a setting within SharePoint that I'm not aware of.  Not that I would have explicitly set it since I can only begin to guess at where the setting comes from when my workflow is deployed from Visual Studio 2008.  (btw, the account I deploy from isn't the administrator account.)

I actually consider this to be a pretty major workflow failing… in theory there is a reduction in security since the process executing the workflow has the permissions associated with (in this case the administrator) the most privileged account that will need to run any workflow.  Additionally it breaks down on tracking reliability since it is in theory possible to apply the wrong account name to some of the history data, or if you haven’t planned for it to not explicitly capture the actual user executing the workflow. 

Keep in mind if you are building and testing your workflow under the administrator account you might not ever notice this.  However, knowing about this issue you can set up an InfoPath form and at least capture the name of the user who actually acted on the associated workflow.

Tuesday, March 11, 2008 9:42:54 PM (Pacific Standard Time, UTC-08:00)  #    Comments [0] -
.NET | Technology
Archive
<October 2008>
SunMonTueWedThuFriSat
2829301234
567891011
12131415161718
19202122232425
2627282930311
2345678
About the author/Disclaimer

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

© Copyright 2012
Bill Sheldon
Sign In
All Content © 2012, Bill Sheldon