Dan Rigsby – Coding Up Style

Developer.Speaker.Blogger

Archive for May, 2008

Heroes {Community} Launch – Ft. Wayne

Posted by Dan Rigsby on 14th May 2008

I finished another Heroes {Community} Launch event last night in Ft. Wayne, IN for the .Net Users of Ft. Wayne (nufw).  I volunteered to speak up here because my in-laws live in Ft. Wayne, and I figured it would be nice to give my wife and daughter the chance to visit with them while I was speaking. I have had this event planned for a couple of months, but I knew it would be hard to do an entire launch event in just one night.  Fortunately, they were really only interested in Visual Studio, but it was still difficult to squeeze everything into one event. The major areas of discussion were:

Visual Studio 2008

  1. What are the features in Visual Studio itself targeted to different types of developers: All, Windows Client, Web Client, Office, Mobile, and Server.  I went into highlights in each one of these that people may or may not know about.
  2. New project properties
  3. UAC support in application manifests
  4. New Css Support in web projects
  5. New Web Designer
  6. Javascript Intellisense
  7. Javascript Debugging

Languages

.Net Framework

  • Additions to .Net 3.0 features (WCF, WF, WPF, Cardspace)
  • Additions to Windows Forms
  • Additions to ASP.Net
  • System.Addin
  • Additions to CLR (HashSet, ReaderWriterLockSlim, DataTimeOffset, TimeZoneInfo, etc)
  • Expression Trees

Overall, I think my presentation went pretty well.  We started a bit late since we had to wait an extra half hour for the pizza to arrive.  It would be hard to hold a 2 hour meeting with a bunch of hungry developers.  The meeting was held in a small conference room at local company. We had 30 people attend which was one of the highest attended events that NUFW has ever put on, but meant that the room was very crowded.  We had to bring in seats to fit everyone, and I was forced to have some attendees sit behind me which was a bit uncomfortable.

I really enjoyed presenting there, and I hope they invite me back again in the future.   Unfortunately though, they didn’t provide questionnaires to the attendees.  So if anyone who attended this event is reading this, please provide any feedback (both good and bad) either as a comment to this post or directly to me.  I would like to know what I am doing well and what I could do better, but I hope everyone enjoyed the presentation.

Here is the entire presentation including slides, before and after projects, code snippets, notes, etc.: http://www.danrigsby.com/files/Presentations/HeroesCommunityLaunch-FtWayne.zip

Posted in Community | 1 Comment »

ArcReady: Architecting for Scalable and Usable Web Applications

Posted by Dan Rigsby on 13th May 2008

ArcReady is a quarterly Microsoft architecture meeting that travels through the Midwest.  This quarter Larry Clarkin himself is presenting on "Architecting for Scalable and Usable Web Applications".  Larry is the Architect Evangelist for the MidWest region and well known in Indianapolis. This session is about how to prevent scalability problems in web applications and how to handle them before they happen.  This is not a quick fix session about how to fix applications that already have an issue.

The room here in Indianapolis was packed.  There was a mix up in the rooms, and the ArcReady event got the smaller room.  There ended up being over 50 attendees with quite a few standing in the pack.  I was pleased that I left early and got a seat.

Performance vs Scalability

Performance is how your application behaves when there is just one user. Scalability is how your application behaves when there are many users.

Scaling Later: Don’t worry about how to handle your 1 millionth customer when you don’t have your first yet.  It’s good to start thinking about scalability early, but don’t spend a lot of time on it until the system is being used.  Getting revenue means that you have money to work on scalability in the future.

Patterns for Scalability

  1. Block and Tackle: Diagram your network layout and all of its resources so you can identify potential bottlenecks early.  Caching can really help elevate the load.  For instance, cache the list of States in the country since this list isn’t going to change between page requests.
  2. Scale Up: Taking existing architecture and improving pieces of it.  Many times this means work on the database server.  Web servers are easy to scale out, but databases can’t be farmed like web servers.
  3. Scale Out: Adding more servers and potentially changing your architecture.  This often means adding more web servers in the web farm and moving the session to the database.
  4. Specialize: For each server you add, give it a dedicated role such as a web application server, web service server, and a resource server.
  5. Split the application: Put different parts of an application on a different server.  For example, at Amazon.com each tab for its’ store is on a different machine.  Microsoft has parts of its’ site on separate machines such as microsoft.com, msdn.microsoft.com, and technet.microsoft.com.  Microsoft ties its’ sites together with Live Passport and search indexing.
  6. Split the database 1: Split the database based on data.  Perhaps have a Reference (read) and Transaction (write) databases.
  7. Split the database 2: Reads happen a lot more than writes.  So have a lazy replication from writable database to a read database.  This could be done with replication.
  8. Split the database 3: Sharding – Split data on some key such as area code or A-L & M-Z, etc.
  9. Geo Distribution: You need to keep multiple copies of the data in multiple locations to avoid things such as power outages and natural disasters.  You could even use these sites to help route the traffic to its closest server center.  This does take a lot of replication work, but can really help with failover and scalability.
  10. Offload the Work: Content distribution networks can help help funnel the work.  You could even push your entire web server farm to a company that specializes in this.

Anti-Patterns for Scalability

  1. Spending all your time looking at code: Chances are the problem may be a setting or a hardware related issue
  2. Caching everything: Scalability can be destroyed because of everything stored in memory.
  3. Services calling services (especially across the network): This is a mess and causes performance issues.

Scalability Tips

  • Make sure you set debug=false in your web.config file before deploying.  Partially because the timeout becomes timeout and the resources held by that request are kept with that infinite timeout.  You can put a string in the machine.config to prevent debug=true settings on any website on a machine.  It’s best to turn this on for every production webserver.
  • Load balancing SSL is specific to the session and the service.  So if you just do true load balancing, performance and scalability will drop with SSL because of how the SSL negotiation works.  For each server a request gets routed to the SSL tokens need to be renegotiated.  To help prevent this, you can use server affinity so that every request for a client stays on the same server.  You could also have a single SSL negotiator that is in front of the web farm.
  • Many times images and resources take up the majority of the data in a web request. So you can move these files to a separate server to help distribute the load.  This can include images, javascript files, css files, etc.

Usability

Application Archetypes

  1. Information/Reference: Wikipedia, blogs, etc
  2. E-Commerce: Amazon, e-bay, etc
  3. Utility: Windows Update, etc
  4. Data Viewer/Editor: Reporting sites, etc
  5. Document Viewer/Editor: Office, etc
  6. Entertainment: Gaming, Movies, etc

Web UX Continuum

  1. Ubiquity: Web
  2. Richness: Supplemented Web such as Silverlight
  3. Next Generation: Platform Optimized such XBAP

Overall there are 35 different UI platforms that Microsoft gives developers.  You can run UXIQ (download) to give you the best option for your needs.

Usability Best Practices

  1. Form follows Function: Think about functionality first
  2. Create a set of design tenets: 5-6 pillars of design principles that the application must have such as "I don’t want the user to have to click more than 3 times to get anywhere".
  3. Use the appropriate level of fidelity: How rich is the application?  Or have a different level of fidelity depending on the user.
    •  ProtoXAML is a template that allows you to take WPF mockups and skin them with "napkin" or "whiteboard" like look to the took.  People like the whiteboard metaphor and respond well to UIs that look this way when giving feedback.  This is an example of using very low fidelity to get a point acrossscreenshotNapkin
  4. Build with the customer and user’s input: Get customer input early and often.  However think about all potential users of the application.
  5. Build for ease of use, but don’t forget the power users: (70-20-10 rule)  Make your application easy to use, but make sure you have options for the power users.  Tripit.com is a good example of this in use.
  6. Plan for concurrency: You will always have more than one user in an application.  Think about locks and other data sharing
  7. Balance computing load: This can make things faster and more scalable (see scalability topics)
  8. Balance security with usability: Make sure you security mechanisms are also easy to use. Some password reminders can be confusing because the answer could be expressed in many ways.   For instance, you may be able to shorten the answer in some way or what about casing of the words.
  9. Build for supportability & maintenance: Marketing always wants to update a website.  Make sure your site is easy to maintain and make changes to in the future.
  10. Compliance: (Section 508 and Accessibility) One such issue is screen readers.  These are programs that read a website out loud for the visually impaired.  The readers have to be able to read your site in such a way that user’s can make sense of the data.

Anti-Patterns for Usability

  1. Golden Hammer: The same solution doesn’t work for all applications
  2. Breaking UI Conventions
    • An example of this could be using a hyperlink to represent a submit button.  Hyperlinks usually open pages or change navigation.  Submission is usually handled via a button.
  3. Overuse of Animations or other types of bling
  4. Not considering multiple "heads" for complimentary online vs. offline scenarios

Overall, it was a very good event (although seating was cramped).  It was Probably one of the best ArcReady events I have attended in quite a while.  Lately, I have thought the sessions have been a bit boring and not very useful.  I am glad to see the event is picking back up again. Larry is an excellent speaker (and mentor of mine).  He did a great job of engaging the audience and getting them involved.  This can often be a very difficult thing to do.  He wasn’t afraid of silence and to solicit the audience to get a response.

During the break, Larry showed a video of the WorldWide Telescope.  You may have seen this video.  Its of a little kid talking about where he lives and how see sees the sky at night. Larry stated that he couldn’t give us a copy yet because it wasn’t out.  I corrected Larry that it was released today (see last post) and can be downloaded.

The event ended with Larry asking the audience about some of the best practices for UI development.  The audience suggested things such as compressed scripts, no vertical scrolling, keep buttons together, keep consistency in site navigation, etc.

If you missed this event you can try to catch it at one of these locations:

  • Columbus – 4/29/2008
  • Kansas City – 4/29/2008
  • Cleveland – 4/30/2008
  • St. Louis – 5/01/2008
  • Austin – 5/06/2008
  • Southfield – 5/7/2008
  • Minneapolis – 5/08/2008
  • Indianapolis – 05/13/2008
  • Downers Grove – 5/14/2008
  • Milwaukee – 05/15/2008
  • Houston – 05/15/2008
  • Nashville – 05/20/2008
  • Dallas – 05/20/2008
  • Cincinnati – 05/21/2008
  • Chicago – 06/11/2008

You can also download the presentation directly from the ArcReady website.

Posted in Community, Software Architecture | No Comments »

Microsoft’s WorldWide Telescope is Available

Posted by Dan Rigsby on 13th May 2008

Microsoft has released its Worldwide Telescope software, and it is available for download. This software can be used by astronomers and non-astronomers alike to explore the heavens with a desktop client much like Google Earth.  I have a vested interest in this after having working on some Observatory Simulation Software and my life long love of astronomy. I am excited about spending my evenings exploring the cosmos. Long Zheng has a good review of this product here: http://www.istartedsomething.com/20080513/capturing-screenshots-from-worldwide-telescope/.  I am very exciting about this product.   It’s one of the coolest applications I have seen in a long time.  Supposedly, a video of this product even made Robert Scoble cry.

wwt5

I doubt you will find evidence of alien life, but I urge you to download the software and try it out yourself here: http://www.worldwidetelescope.org/experienceIt/ExperienceIt.aspx?exp=true.   You won’t be disappointed.

Posted in Applications | 1 Comment »

West Michigan Day of Dot Net

Posted by Dan Rigsby on 10th May 2008

 

Live blogging this event, expect updates throughout the day.  Pictures will be available in a day or two after the event.

WM Day of .Net May 10, 2008 - I'll be there!

I made it out to Grand Rapids, MI around 8am today to attend the West Michigan Day of .Net (WMDoDN). It was a 5 hour drive from Indianapolis.  However, I spent the night with my In-Laws in Ft. Wayne which cut the trip this morning down to only 3 hours.  Much like with the Central Ohio Day of Dot Net there hasn’t been much representation of Indianapolis in Michigan thus far either.  It seems if you are in a different Microsoft district, you either don’t know much about what is going in other districts, or are afraid the break the barrier.  I have met with a number of people know from Ohio and Michigan, and we are hoping to change that over time. I have another session over Wcf up here, and again no one seems to know any other speakers from Indiana.  I ran into a few familiar faces from other events and meet a few new people(Wally McClure, Bruce Abernathy, Dan Hibbitts, Chris Woodruff, Amanda LaucherSteven Harman, Tim Wingfield, James Bender, Jay Wren, Josh Holmes, Jeff McWherter, Dave Redding, Joe Wirtley, Dan Hounshell, Joel Ross, Jennifer Marsman, Patrick Foley, etc).

I liked the layout of the event.  The 4 rooms, but the were a little bit spread out.  I saw a number of people get lost between rooms.  However the amount of space was very refreshing.  There were a few “break out” areas and there was a dedicated speaking room.  The vendors and sponsors were spread out throughout the hallways which was good.  Many times attendees try to avoid the “sponsor” corner, which is unfortunate for everyone.  The sponsors make these events possible and really do have good things to say.

Soft Skills – They’re not just for humans anymore

I am trying to attend as many sessions as I can and learn as much as I can while I am here.  I started the day attending Josh Holmes session on Soft Skills.  I had seen Brian Prince’s presentation before and wanted to watch Josh’s perspective on it.  Josh got thrown this session at the last minute and piggy-backed on Brian’s slide deck.  However, he brought his own unique perspective to each of the topics:

  • Mentoring: Always have a mentor.  In fact get 3+. Josh attended the toastmaster’s club to find speaking mentors
  • Manage your Career: You are your business.  Your employer just happens to be the person paying you to do your job right now.
  • Creativity: Like myself Josh doesn’t have a CS degree and it does give us a creative edge because we think outside of the box.  This is true for everyone.  Stay creative and think in other ways.  Keep a log or use something like OneNote or a notepad.
  • Brain Storming: Josh asked the question, “If you have an infinite supply of bricks, how would you raise money for your user group, school, or church”.  The audience threw out some of the standard responses, but
  • 3 Illegal Topics to Talk About: Sex, Politics, and Religion – don’t talk about these at work, just don’t do it, unless the setting is totally appropriate.
  • Don’t Assume all People Above you are Idiots: Sometimes they aren’t the smartest people, but there is a reason they have their position.  They are bringing something to the table and at the very least have power and control.
  • Communication Skills: Communicate like a human, not like an alien.  Know your audience: geek talk is ok only if all people are geeks.
  • Know when to say “I don’t know”: It’s ok not to know everything, and if you give wrong answers, you lose all respect.  Don’t be an encyclopedia, be the index.
  • Ask Open Ended Questions: If people just answer Yes/No you never really learn much
  • Don’t Take Reactions Personally: People don’t always mean what you think.  Especially in things like emails.  Some people come off more rigid than others as well.
  • Be an Active Listener: Don’t have distractions, ask smart questions, don’t multi-task in your head.  Take what a person says and rephrase it back to them, and if they can confirm that, then you can answer the question.  Also avoid filler words, enjoy the silence.
  • Take Notes: Notes don’t have to be a distraction, but write down things as much as you can.
  • Tape Yourself: learn to find the filler words in your presentations and how you can improve yourself.
  • Avoid Bad Language:  There is no need for it.
  • Integrity & Honesty:  always tell the truth and remember that its hard to get respect back.
  • Everything you know today will be obsolete in 2 years: which is true from a technology standpoint, but soft skills will always be with you.  So eat like a bird and poop like an elephant.

Josh ran out of time during the presentation, but that’s ok.  Its unfortunate that some of the most important topics are at the end of the slide deck, but it’s better to get a few points across well rather than just throwing out a mess of information sometimes.  A presentation like this is more training rather than a survey of some technology.

Overall, I would say Josh did just as well with the presentation as Brian did.  Brian overall probably had the better pitch of the ideas, but that is understandable since he put together the slide deck.

I did enjoy watching Josh after reading a couple of his latest posts: Words as Filler when Public Speaking and Public speaking and movement onstage.  You could actually see the 2 points on the floor that Josh positioned himself as “home” and “away”.  I didn’t go as far as to try to count his “filler words”, but I either didn’t notice many or at the very least they weren’t a distraction.

You can download the Soft Skills presentation here: http://cinnug.org/files/folders/cododn2008/entry1045.aspx

How to Architect Rich Internet Applications (RIA)

I went ahead and stayed for Josh Holmes’s second session. Josh is a good speaker and potential “mentor” for me, so I wanted to learn all I can.  I always feel awkward talking to Josh in person sometimes though.  The session was packed.  I think I only saw 3 empty seats which brought the audience total up to 60+.

What is a Rich Internet Application?  Its all about context.  The challenge in an RIA is to not make things more difficult by adding some flash.  RIA is web application that has the attempt to bring features and functionality of a traditional desktop application to the web.  There is some overlap between desktop and web, but the differences are killer such as: lack of state on web, non-text layout on desktop, business logic in UI on desktop, limited runtime on web, the nasty back button on the web, etc.

“The Inmates are Running the Asylum” and “About Face” by Alan Cooper bring out the idea of treating the user of your application as “God”.  If “God” says close the application, are you going to ask “Are you sure”?  The reality is that we treat our users as morons.  You need to know when to trust your users, put the user first, and know when to help them.  A big anti-pattern that we often get into is making our SOA layer look like our pure CRUD operations.  Instead we want to think about it more from an end user perceptive.

“Hype” is often very misleading.  Sometimes a manager will say something like, “We need a better web UI.  Let make it more Web 2.0 or Ajaxy”.  The problem is that you want what is best for the user and that shouldn’t mean attaching words and labels to it.

The C# Variety Show

The yield statement as compared to beer: If you ask your wife to get you beer, and she brings you a 6-pack, that would suck to have the entire 6-pack dropped in you lap.  Instead you would want them one at a time.  Yield allows you to get a item one at a time and consume them as needed.

Operator overloading: Barely class, Hops class, Water class, overload the plus operator to add them together to create beer.

Unfortunately, I only attended these 3 sessions.  I had some last minute testing to do of my presentation and spent some time talking in the speaker room.  My session went pretty well.  I had a packed room which was probably around 40-50 people. I felt I was a bit dry, but I did have a lot good questions and comments.  I only had two people doze off, which actually isn’t that bad for a session that late in the day.  I didn’t have any presentation glitches, but I really need to add more images and “real world” examples to my slides.

Posted in Community | 4 Comments »

Heroes {Community} Launch – Indianapolis, IN (Part 2)

Posted by Dan Rigsby on 9th May 2008

Last night I presented at the Indianapolis .Net User’s Group (IndyNDA) monthly meeting.  This is actually the third time I have spoken at IndyNDA in the last 4 months.  I am sure the attendees are getting tired of seeing me up there.  The president of IndyNDA, Brad Jones, jokingly told the audience that they would give me a four month break from speaking at the monthly meetings.  This month was part 2 of the Heroes {Community} Launch event series we have been running for Windows Server 2008, SQL Server 2008, and Visual Studio 2008.  Part 2 focused on new features in C# 3.0, VB 9.0, and .Net Framework 3.5.  The major areas of discussion were:

Languages :

.Net Framework

  • Additions to .Net 3.0 features (WCF, WF, WPF, Cardspace)
  • Additions to Windows Forms
  • Additions to ASP.Net
  • System.Addin
  • Additions to CLR (HashSet, ReaderWriterLockSlim, DataTimeOffset, TimeZoneInfo, etc)
  • Expression Trees

We had around 85 people attend.  Which is on the low end of average, but they were a very active audience.  I had some great questions and answers to the questions that I proposed to the audience.  There were times when I felt like I was losing the audience, but there was a lot of material to cover all at once.  The goal of this meeting was more to show what is possible with the Languages and Framework, not to do in depth training.

Immediately after the IndyNDA meeting, I spoke at the Team Foundation System Special Interest Group (TFS Sig) and covered Scrum in a duet with Jamie Kurtz where I did a short version of my Scrum talk and Jamie covered Scrum in TFS.  As with most special interest group meetings, we had a small attendance.  However I was pleasantly surprised to see that 3 people drove over 3 hours from Decatur, IL specifically to see the Scrum talk.

For those who attended either event, I am always looking for presentation feedback (positive or negative).  Feel free to post a comment here or email me (see address on About Me page).

Here are the presentations including slides, before and after projects, code snippets, notes, etc.:

Posted in Community | No Comments »

When to make an action Invisible or Disabled

Posted by Dan Rigsby on 2nd May 2008

When I want to prevent a user from performing an action on a page, do I disable that control, or do I just make it invisible?

It seems no one has really published any rules about when to use either of these options (at least none I can find).  Some applications use one method, when they should probably be using an other.   Many of you may think this to be trivial knowledge, but I see applications all the time that don’t follow general standards or even show consistency in the application itself. I would like to officially propose the following "soft" rules:

Rules:

  1. If it is an action the user does not have permission to use, make it invisible. If the user is never going to have permission to perform the action, then there is no harm in not showing.  This may be preferable too so that casual users don’t know about actions that more advanced users may be able to perform.
  2. If it is an action that the user normally has permission to perform, but is not available at that time, make it disabled.  Making actions invisible and visible again can confuse users because they expect to see certain actions in certain places.  Disabling it keeps the action in place, but the user can no longer select it.

For instance, lets say you are working on an ordering application.  There may be a "save" button that is disabled until the user enters in all relevant data.  Once the order is placed, no one can edit the order except an administrator. So, on a summary page you may have a "save changes" button that is only visible to those users with administrative permissions. However, what if you use the same form for adding and editing the order?  The regular user normally has the permission to "save" a new order, but not the permission to "save" and edit to an existing order.  Since this is technically a different action now, making this button be invisible is acceptable in accordance to the defined rules.

As with most rules, there may be exceptions.  These exceptions should only be used in "special case" scenarios.  Your application and company as a whole should have standards that are routinely followed.  Here are some proposed exceptions:

Exceptions to the rule:

  1. When you need to disable an action and are working with a control which doesn’t have an enable property:  In this scenario you might look at a ReadOnly property or find some other way to "gray out" the action.  You should avoid making the action invisible if you can help it.
  2. When you want some descriptive information displayed to the user even if they don’t permission: You might want to go ahead and show an action as disabled even if the user doesn’t have permission just so the user knows it is there.  You should avoid this doing this all together, but you may come up with a scenario where this makes sense.  If you do this, you may want to append something like "(admin)" to action name to inform the users that this isn’t a task they can perform.

kick it on DotNetKicks.com

Posted in UI | 2 Comments »