<CharlieDigital/> Programming, Politics, and uhh…pineapples

28Sep/11Off

SharePoint 2010 Service Applications Thoughts

Posted by Charles Chen

I can't say that I can add much more to the tutorials and articles already out there on the Net on this topic, but I'd like to point to the definitive example of how to implement one: http://msdn.microsoft.com/en-us/library/gg193964.aspx

David Taylor's blog also has a good 10 part walkthrough with a bit more explanation; however, I would caution that the example he provides is broken as heck and was part of the problem that it took me a good part of 3-4 days to get something so simple to work right.

One bit of knowledge that I'd like to impart is that you will -- more than likely, 99.99% guaranteed -- run into errors with WCF.  In these cases, the errors will:

  • Not show up in any level of detail in the SharePoint logs
  • Not show up at all in the system event logs
  • Not show up in the IIS logs with any level of detail

You'll want to use SvcConfigEditor to enable tracing and of course, SvcTraceViewer to view your logs.  Part of my problem was that I had an error in the configuration file for the service and part of the problem was that I had an error in the VirtualPath of the service in my service application.  I was only able to track these two down through the usage of the aforementioned WCF utilities so keep them handy!

Filed under: Dev, SharePoint, WCF No Comments
23Sep/11Off

Thoughts from Switzerland

Posted by Charles Chen

Unorganized thoughts from Switzerland:

  • It reminds me a little of Taipei, oddly enough.  I can't quite put my finger on it, but it has a similar feel (except it's not 98% Asian and things are a lot more expensive).  I think it's the way the shops are built, the little markets, the meandering back alleys, the smaller cars, the bicycles (though in Taiwan, it's mostly motor scooters), the closeness of everything.  Of course, the air is much nicer here and the buildings much older.
  • There racial diversity is pretty surprising.  I would have thought it more like Utah, to be honest, but there is a noticeable presence of minorities here.
  • Things are expensive.
  • Lots of bicycles...everywhere.  Men, women, professionals, students, young, old-- all sorts of folks can be seen riding their bicycles in the morning.  Also, people don't generally lock their bicycles; they just park them and go.  A fellow American traveler commented that in the US, they'd probably all be on the back of a pickup truck in under 10 minutes...
  • Basel, where I'm staying, is very small and very walkable.  However, the free tram system here is superb and traveler friendly.  They are frequent and accessible from nearly everywhere in the city - no need to purchase tickets.
  • As a consequence of the previous two bullet points, there aren't very many cars here for a metropolitan and business center.
  • Maybe I notice it more because I back up to the woods at home, but there is a surprising lack of insects.
  • The toilet paper is much thicker and the sheets are longer (yes, these sorts of mundane things interest me).
  • The city is very clean compared to other metropolitan areas I've visited.
  • The coffee is fantastic nearly everywhere I've had coffee (maybe this is a general European characteristic).  Even the hotel coffee is superb!  It surprised me to see several Starbucks in my wanderings in the city given the general quality of the coffee I've had here exceeded the coffee I've had at any of the US Starbucks I've had.  A fellow Danish traveler said that it's because it's "American" and folks like the flavored coffees, which is absurd to me.
  • The McDonald's here is the most expensive McDonald's I've ever had.  That said, the Big Tasty was huge and had bacon and the bun had caramelized onions on top.  Way better than in the US.
  • Smoking - it's everywhere.  I guess I'm not used to this anymore as there's pretty much no open areas where people can smoke back in NJ.  I will tell you this: I do not miss that aspect of New Jersey.
  • The aforementioned Danish traveler mentioned that he never eats breakfast at hotels here in Europe but never skips them in the US.  I can understand why.  The breakfast fare here is mostly bread, cheese, bread, cereal, and more bread.  Not quite as satisfying as some bacon, sausages, scrambled eggs, and hash browns.

A water fountain near Claraplatz. There were some pigeons bathing in it moments before this picture.

A random side street with little shops along the side

A mural of pop/rock legends

Buildings along the river Rhine

Another fountain.

Caught these kids breakdancing at the University of Basel

A picturesque building facade

My $15 Big Tasty meal....

Bicycles, bicycles, bicycles everywhere

Filed under: Life No Comments
15Sep/11Off

Now I REALLY Can’t be Bothered to Learn Silverlight

Posted by Charles Chen

I've blogged about it before, but seriously, the question has to be asked: if you're a developer with limited bandwidth to focus on mastering new technologies, why would you spend that time on Silverlight?

Not only is WP7 floundering, but now the news is out: the Metro version of IE 10 in Windows 8 won't support any plugins - including Silverlight:

Windows 8 will have two versions of Internet Explorer 10: a conventional browser that lives on the legacy desktop, and a new Metro-style, touch-friendly browser that lives in the Metro world. The second of these, the Metro browser, will not support any plugins. Whether Flash, Silverlight, or some custom business app, sites that need plugins will only be accessible in the non-touch, desktop-based browser.

Should one ever come across a page that needs a plugin, the Metro browser has a button to go to that page within the desktop browser. This yanks you out of the Metro experience and places you on the traditional desktop.

The rationale is a familiar one: plugin-based content shortens battery life, and comes with security, reliability, and privacy problems. Sites that currently depend on the capabilities provided by Flash or Silverlight should switch to HTML5.

If you're not on the HTML5 boat yet, I think the writing is on the wall: the Silverlight party is over (thank goodness).

Filed under: .Net, Awesome No Comments
13Sep/11Off

Lesson Learned on SharePoint Service Applications

Posted by Charles Chen

If you're setting out on writing your own SharePoint service applications, there is an important lesson that you should keep in mind (instead of learning it the hard way): ensure that all of your proxy, application proxy, service, service application, and service instance classes have public parameterless (default) constructors.

Otherwise, you'll have a heck of a time starting, instantiating, and uninstalling services with lots of MissingMethodExceptions and "{class} cannot be deserialized because it does not have a public default constructor" error messages.

Oddly enough, one thing I've learned from this is that the STSADM commands are often more "powerful" than the equivalent Powershell commands.  For example, Remove-SPSolution, even with the -force parameter, still failed with the aforementioned exceptions.  On the other hand, stsadm -o deletesolution {name} -override seemed to work fine.  Puzzling, for the moment, but it got the job done.  Similarly, stopping a service application that's AWOL (stuck on the processing screen) can be accomplished with stsadm -o provisionservice. Deleting it can be done using stsadm -o deleteconfigurationobject (though this one does seem to have side effects...).

Seems that Powershell is still a second class citizen when it comes to basic SharePoint command-line management.

But in any case, if you set out building your own service applications (<rant>and damn it Microsoft, can't you put some better examples out there?!  Even the few that are out there are convoluted, missing key details, hard to follow...</rant>), be sure to include public, default, parameterless constructors.

Filed under: .Net, Rants, SharePoint No Comments
7Sep/11Off

Why Teachers Are _Really_ Leaving the Profession

Posted by Charles Chen

I caught a portion of an interview last night on NPR as I was in my truck, leaving Lowes.

I sat there for a moment, dumbfounded by what I was hearing and entirely outraged by the bullshit that Republican Wisconsin State Senator Glenn Grothman was spouting.

LYDEN: Last week, the Associated Press reported that nearly 5,000 Wisconsin teachers retired since the beginning of the year and that's more than half of the number from 2010. It's not a great way to start the year. Could the Republicans who passed this bill have done a better job of talking about it?

GROTHMAN: Well, I'm trying to talk about it right now. I will point out that at least one of the reasons why more teachers are retiring - we have heard anecdotal evidence that some of the worst teachers not waiting around for the inevitable and finally deciding it's time to retire. And I think some of those teachers who shouldn't have been there all along realized that without collective bargaining their time is up.

I was kind of riled up by this given that my wife is a former teacher (now an Learning Disabilities Teacher Consultant, but still works in the school system).  I've seen the dedication that she put into her work, I've seen the long hours grading papers and dealing with parents, I've seen results of her labor when parents stop her in stores years later and thank her for transforming her kids, I've seen parents specifically request to be placed into her class.

For all of this, she collects a relatively meager paycheck, but it's her passion and it's rewarding for her to be involved in the education of children -- in one capacity or another.  The low salary is made up for, somewhat, by the benefits that she receives.  Today, she came home with news about our insurance premiums: we're now required to pay about $280/mo. more for our health insurance plan because of changes enacted by Chris Christie and possibly the entire sum in a few years time.  To be clear, the sum of those premiums for a family of 3 is pretty much more than half of her monthly income -- enough to pay the mortgage on a small house.

I don't want to get into a long discussion on whether tax payers should or should not pay for the benefits of public employees, but at the end of the day, it is my belief that public employees are by-and-large hard working, middle class folk who provide valuable services to the taxpayers that are often hard to put a price tag on.  A good teacher can set a child on a path for success and help produce members of our society that contribute to our prosperity instead of being a drain on it.

But how can we possibly entice highly qualified candidates to these important jobs when as a society, we decide to strip these individuals of the benefits which largely make up for the otherwise less then illustrious labor of love?  Even those with a passion for teaching and helping transform kids will have to do a double take now and consider alternative career paths as we the movement against labor and the public sector continues to erode the middle class in America.

So I say to Glenn Grothman: the reason that teachers are retiring from the profession or quitting out-right is because society has created an environment where it's become untenable to put in the long hours and dedication required to be a good teacher for the already low salaries.  As the benefits that used to make up for the low wages continue to be eroded, the financial calculus will surely force more teachers -- especially the smartest and most qualified -- to reconsider their career choices for more profitable alternatives.

Post script: I think this is another case of Republicans driving the public sector to fail (by creating a dis-incentive for the most qualified, most skilled applicants) so that they can later point to the failure of the public sector!  Well, no shit, Holmes!  If you set the system up for failure, of course it'll fail.  Instead of the worst teachers leaving the profession, it's the best teachers that will leave the profession for better paying opportunities because these individuals are the ones that have the highest qualifications, the highest levels of professional ethics, and the highest ability to translate their skills outside of the classroom.

Filed under: Rants No Comments
7Sep/11Off

Confessions of a Sriracha Fanatic

Posted by Charles Chen

Count me in :)

The smidgens and dabs became double-fisted squeezes and dripping spoonfuls. The table was not fully set until the squeeze bottle was centrally placed between the salt and pepper shakers. I carried breath mints in my bag to mask the telltale scent of garlic on my breath. Any savory item at all hours of the day was a candidate for a squirt of sauce.

I knew I had crossed the line when one day I found myself squirting a little red sauce on dark chocolate. I looked in the mirror and took a deep breath as I wiped a trail of red sauce dribbling from my mouth. At that moment, I realized I had transformed from a sriracha-ignorant food snob into a full-blown rooster addict. Hello, my name is Lynda and I am addicted to sriracha. There: I said it.

7Sep/11Off

Why the USPS SHOULD Lose Money

Posted by Charles Chen

The whole fracas over the USPS losing money has been overwhelming lately with the predictable arguments from the Right citing it as another example of Government Failure and a system that is better served by fully private corporations -- not this funky implicitly government backed entity.

Let's forget all of the other details for now like the decline in mail volume and the odd requirement that the USPS fully fund its pension plan.  Forget the odd restrictions that Congress has placed around the USPS and how it runs its ship.

Forget all of that for a moment.  It occurred to me a while back when sifting through the tons of junk mail that I get, the USPS is a business subsidy.

Yes.  Those credit card offers?  Those coupon mailers?  Flyers and ads?  Brochures?  Would it be possible for small businesses (and big businesses) to afford these services if the USPS charged a fee that actually covered the costs of running a profit at the USPS?  In that sense, the USPS is important as a small business subsidy as physical addresses are easily enumerated whereas email addresses are much more "ethereal".  Not everyone watches TV.  Not everyone listens to radio.  Not everyone has Internet access.  But every person has a physical address that can be targeted for advertising.

I mean, of the volume of mail that I receive, I would guess that over 80% of it would be what we consider "spam" in this digital age.  But it's different from "spam" in that the coupons and ads are typically much more relevant.  I've used many local service providers (plumbers, gutter cleaners, driveway sealers, landscapers), visited local merchants, and patronized local restaurants based on coupons and promotions I've received in the mail.

I conclude that proposing that the USPS curtail services or charge higher rates is tantamount to proposing placing a tax on businesses which will especially impact small/local businesses.

6Sep/11Off

A UX Pattern That Needs to DIAF

Posted by Charles Chen

Why, Home Depot, why?

There are more than a few shopping sites out there with these "fancy" picture viewers like Home Depot and Newegg.com.

This has to be one of the worst UX patterns out there and every site that uses it never fails to piss me off with aggravation just trying to get an idea of what a product looks like.

You see, these web designers, programmers, and architects seem to not realize that most browsers nowadays (and even a few years back at this point) have supported automatic resizing of images to fit the browser window with full-size "zoom" capabilities and that the built-in browser scrollbar is a perfectly acceptable method of navigating an image.

Better, but still a poor UX

Even worse in the case of the Home Depot site, the cursor shape over the image leads one to believe that the image can be clicked and dragged.  Instead, you can only drag and move the little red box on the right to pan the picture.

Newegg actually does the same thing, but it's a bit better because at the least, it doesn't popup in a new window in Firefox and to some degree, I can understand why they do it because of the gallery navigation and the 360-degree view (there's some "added value"), but I would appreciate the option of just being able to see the full image without it being cropped off within some silly window.

This pop-out, image viewer UX pattern is definitely one that needs to DIAF.

Filed under: Rants No Comments