Geeking it Out at Deeper in .NET

by Nick Saturday, April 05, 2008 7:56 AM

I found a table right next to a power source, and I have WiFi so things are good.  I'm going to be live blogging the speakers as they come up.  If you want to see the line up, you can see the listing here.

LINQ Internals with Scott Wisniewski @ 8AM

Scott had an interesting approach which was to write an app using traditional ADO.NET data access methodology to show you how painful current techniques are, and then gradually change the app to utilize the new LINQ functionality in VB9.  Not sure this was the best approach given the relatively limited time, since we all know (or should know) how painful the current methods are.  It's pretty clear that he's new to speaking at these types of events.  He has good information, and speaks fairly well, but there is a degree of polish that is missing, which only comes with speaking at events often.  This started to kill him during the presentation because he had a lot to cover, and not being fully prepared meant that his live coding demos were slowing him up.

He started out pretty basic with talking about extension methods.  However, he doesn't go into some of the important caveats of extension methods, namely that it's syntactic sugar (utilizing good compiler tricks), and isn't polymorphic in anyway.  Scott Hanselman had a good post on this recently because this issue is causing a lot of confusion.  This is sort of like how var caused significant confusion with people when it was originally talked about, in that people think it's a variant (from the bad old VB6 days) when it's not.

Obviously in an hour, you can only give just barely a taste of LINQ, but the problem is that there are so many new language features that are required to make LINQ work (extension methods, lambdas, type inference, etc.) that it's really hard to do a good job in just an hour.  For most people, getting your head wrapped around some of these things, especially lamda expressions, is really hard.

He also showed the built in XML expressions that is in VB9.  C# needs something like this!  Normally with .NET, C# would get something before VB.NET (unsigned types, using directive, built-in nullable type support with the ? operator, etc).  To my knowledge, this is really the first time that VB.NET is getting a super cool feature that C# doesn't have first class support for first.

Scott recommended Rico Mariani's blog if you're interested in the performance of LINQ.  He's got some good posts that talk about how to squeeze the maximum performance out of LINQ.  I was surprised that he never mentioned LINQPad.  If you want to learn LINQ and use it a lot, get this tool!!!  It allows you to write code snippets with LINQ and run them without having to create a command line harness, and gives you powerful looks at your database just like SQL Management Studio, but with better features for navigating the relationships in your tables.

The Science of Great UI with Mark Miller @ 9:45 AM

I'm a usability nut, so I was really looking forward to this one.  What was good right away is that he talked about things besides controls, and grids, and code.  He was talking about real "human factors" like how your eye and hand movements, if not designed well, can make things harder on your user.  Of course, he hardly talked at all about CodeRush, which is too bad because I've wanted to see more of it without installing it at this point because of the cost.

Best quote so far... "You want to be able to spank your data like a porn star."

Mark spent this first part of the talk with observations of common interaction issues.  He talked about keyboard shortcuts, mouse travel distance, and poor GUI paradigms that require extra brainpower to run a UI.  What seemed strange to me was that use used Visual Studio as an example of these pains.  While its something we're all familiar with, the developer is definitely not your typical user, and so it seemed odd.  Maybe because we consider ourselves to be power users, we don't mind the pain... but maybe that also encourages us to make poor UI's for other users.

Mark recommended Visual Explanations by Edward Tufte.  He's not a programmer, which is a good thing.  This is just about how the human brain works, and how to present things in the easiest way possible for the user.  Mark talked about showing things with the smallest effective difference necessary, presenting things in serial vs. parallel, and also reducing the amount of noise.

He also recommended using a tool from Adobe called kuler which allows you to pick good color schemes for your UI using good hue combinations.  Mark talked a lot of the difference to use contrast appropriately, as well as size.  High contrast and larger size both attract your eye, so it should be used for important data, not mundane things like headers.

Another good quote... "This moving in and out, its sort of like coding masturbation."

As far as animation goes, be careful with it.  Animation attracts the eye (like moving a window in and out from the side), but you can't work with the dialog until the animation is done.  Use changes in opacity instead because you can start moving towards your target in the middle of the opacity change and it's less jarring to the eye and brain.

For making keyboard shortcuts better, utilize context better.  Make the same keyboard combination do different things in different contexts.  One drawback of this that he doesn't talk about is confusion.  One of the beauties of keyboard shortcuts is that they're viewed as "global", and by adding too many meanings to the same combination, it might confuse the user.

He talked a lot about wanting to have UI's reorganize themselves based on context, or move the mouse if the dialog get's shifted, etc.  Unfortunately, there aren't a lot of libraries that do this for you, so you'll spend a lot of time rolling your own for these ideas until someone does it for you.  He did talk a lot about the beauty of monochrome applications, but I'm concerned about physical eye strain, and really didn't have any information on that.  You don't want to physically tire out your users, and that might be a concern.

Speaker Q&A Panel @ 11:30

I'm eating, networking and not paying much attention.  Mostly its people complaining about this or that not being in Visual Studio, and what blogs people like to read.  Heard it once, heard it a thousand times.  Why do they always serve pizza and Diet Mtn. Dew?  I mean, I enjoy both... but how much more do we need to self identify as geeks?  Honestly.

The Scaling Habits of ASP.NET Applications with Richard Cambell @ 12:45 PM

Way too much information about his personal history that took away from what the topic of the conversation was.  I mean seriously, it's good to know who you are, but I'm here to listen about specific topics.  Get to it already.  He did push .NET Rocks, Hanselminutes and RunAs Radio, which are all good developer podcasts.  Once I figure out how to integrate podcasts into my life, I'll start listening to them I'm sure.

He had really good information about all the details around performance calculations.  I know its boring, but there are lots of things that people forget to account for when doing those calculations, and reminded us of those.  You know, things like Round Trip Time, extra HTTP Requests, etc.

Interesting thought... performance is how fast something works with one user.  Scalability is how fast something works with multiple users.  The difference between the two should be as small as possible.  It's ok to sacrifice single user performance if it improves multi-user performance.  Most testing is with single users, so some changes will seem as if they killed performance, when they in fact they improved scalability.

He does talk about using Firebug and YSlow.  You need to be careful with YSlow though, because it is skewed towards using things like Content Delivery Networks which really are only useful for certain types of users.  Jeff Atwood talked about this at length.

Funny perspective on software versions:

  • Version 1:  Make it work.
  • Version 2:  Make it work right.
  • Version 3:  Business Traction (now the app is important).
  • Version N:  Business Success.

What does failure look like?  It's usually not a smoking server.  So what is it?

  • .NET Memory consumption over 80% (because the physical server may still have 1 gig free)
  • Processor consumption over 100%
  • Request queues grow out of hand (usually during a GC b/c requests can't be served during a GC)
  • Page timeouts
  • Sessions get lost
  • People bitch at you.

Nobody ever needs 100% reliability.  The cost difference between 99% reliability and 100% reliability is huge (on the order of hundreds of thousands of dollars).

His view on optimization made me sad.  What is the cost of tuning your code vs. buying another web server.  It's usually cheaper to buy the second server.  How many people will simply use that as an excuse to write bad code?  *sigh*  Sometimes optimization makes your code harder to understand and more buggy though.  So there is a tradeoff.  Often times caching isn't used as much as you think, and you pay a memory cost.  So always instrument your cache code to decide whether its worth the penalty.

Building Next Generation Web Applications Using Silverlight 2.0 with Jason Beres @ 2:30 PM

Holy cow, he mentioned Silverlight as being similar to Flash!  Now we know he doesn't work for Microsoft.  Basically this talk is marketing talk about Silverlight from someone who doesn't work at Microsoft.  Kind of boring really.  Hardly any code.

Silverlight is still pretty Beta.  In Visual Studio 2008, the graphical display is read only, and so you have to know XAML and be able to edit it in order to do anything.  At that point, the graphical display area will correctly re-render with your changes.  This seems to be by design.  Expression Blend has all the drag and drop that you'd expect.  It seems that Microsoft is enforcing this idea of having developers separated from the designers.  That's great if you're working in the Flash model, but the reality is that most companies will have one person doing both.  Why do I need two software products then?!

Strange side note, he pulled one of the Silverlight assemblies into ILDASM.  Who still uses ILDASM?!  Doesn't everyone use Reflector?  And if not, you should.  Its also important to note right now that Microsoft Expression Blend is still in CTCP, and is free to use until July 1st.  By then, you should be able to find a free license of it somewhere.

Best quote so far... "It's super fast!  It's like running an old VB5 app on a 2.5 GHz machine!"

Deep Zoom was freaking cool.  It allows you to take an extremely high resolution picture and break it into grids of higher and lower resolution sections so that you can display the picture at lower resolution, and then zoom in quickly without the huge bandwidth penalties all at once.  Sort of like how Google Maps works, but at a much finer resolution.  Matt Berseth has as some really cool examples of this.

Sadly, when he finally got to the demos, they basically all blew up.

The Essence of LINQ with C# 3.0 with Charlie Calvert @ 4:30

This will be interesting because we already heard a LINQ talk with regards to VB.NET, so now we'll see it from the C# perspective, and also whether Charlie can accommodate the fact that we heard some of it before earlier in the morning.  So far he's covering the same stuff we heard this morning, but in a slightly different way.  Scott Wisniewski did this by showing us old code and new code, while this guy is doing it by talking with a single PowerPoint slide up.

However, he is talking about some of the features of LINQ that Scott never hit, like the ability to write custom providers like extensions to use LINQ to go after reflection data in assemblies, or use LINQ to go after web services in a query like fashion as opposed to a function call like paradigm.  For instance, there is an extension to query Amazon web services using LINQ to get book information.

Why is nobody using LINQPad?  Seriously.  Who needs to write a console app in Visual Studio when you can have the results immediately delivered in an output window for your demo?

He did explain the true nature of var, and that fact that you need it for anonymous types.  A lot of people are using var to be sloppy in their coding though, so they don't have to think about the types they're using, even though they ought to be able to know the type easily.

At least he is going into more detail about what Lambda methods are, along with the new enumerator syntax (with yield return), etc..  These are really hard core changes into the language that you have to know in order to get the most out of LINQ.  It will either be really successful, or it will be the downfall because of the perceived difficulty, even though the result is easier code.

You can tell that he's a compiler geek.  He's getting really, really, excited about about Expression Trees when realistically, for someone writing a business app, you could care less.  Why can't these demos be more practical?  Seriously.  Show me how it will make my life easier writing a real world application, not masturbating over how cool the compiler can figure out parameters in a lambda.

Summary:

Well that's pretty much it everyone.  Some pretty good speakers, and some interesting topics.  I'm off to the After Party... we'll see what other tidbits I can get out of them next.

Happy Programmer's Day!

by Nick Thursday, September 13, 2007 4:18 PM

Since today is the 256th day of the year (the largest binary multiple possible in a year), it has been officially declared Programmer's Day.  So give a hug to a programmer you care about.

Has It Changed Your Life Yet?

by Nick Thursday, August 02, 2007 10:27 AM

I'm kind of curious.  There was so much iPhone hype... and then people rushed out to get them... and I saw a flurry of "I'm posting from my iPhone posts" and "I'm taking a picture from my iPhone pictures"... but now not so much.  So now that the new toy feel has begun to fade... was it worth the money?

Happy SysAdmin Day

by Nick Friday, July 27, 2007 2:40 PM

Today is System Administrators Day.  Have you kissed your SysAdmin lately... or at least remembered to change your password?

Engineering IS Art

by Nick Monday, July 09, 2007 8:50 AM

Here's a pretty cool story.  My alma mater, MSOE, is building an art museum on campus:

MSOE is constructing a full-blown art museum on its downtown campus - complete with curator, exhibit manager and a permanent collection of 600 European and American paintings, prints and sculptures that date to the 16th century.

Ahead of an Oct. 20 opening, workers last week installed the steel-frame dome that crowns a four-story atrium entrance at E. State St. and Broadway.
...
What makes the art so valuable to MSOE, Viets and Grohmann concur, is its single unifying theme: work and workers in hundreds of manifestations.

Among the oldest pieces are canvases that show primitive Flemish iron smelters and old German foundries, dark and dramatic with flashes of hot orange ingots. The collection covers a gamut of realism, impressionism and expressionism - glass blowers and miners; sweaty muscles in blast furnaces and pastoral images of farm fields; railroad yards and stone quarries.

Of course I'm a little biased, but I've always considered engineering to be art.  It is the art of taking cold scientific knowledge, and combining it with craftsmanship, in order to create a useful object for the real world.  Quality engineering is something you want to have in your home, and use every day.  It's a stainless steel toaster that you don't put in your cupboard when you're not using it.  It's an iPod (or iPhone) which you proudly wear on your belt.

Engineering is the art of combining form and function to make everyone's life better.  A good piece of engineering is a thing of beauty to behold.

No Errors Or No Latency?

by Nick Monday, June 18, 2007 8:35 AM

Apparently the Internet is almost full again.  These sorts of predictions come and go quite often, and I don't pay much attention to them.  They generally show people's lack of understanding in the TCP/IP routing system, and the amount of dark fiber which still exists from over speculation during the dot-com boom/bust.  What bugged me the most though was this piece of inaccurate information:

"Video is real-time, it needs to not have mistakes or errors. E-mail can be a little slow. You wouldn't notice if it was 11 seconds rather than 10, but you would notice that on a video."

Well that's just completely inaccurate.  Real time has nothing to do with whether it has mistakes or errors.  There is an inherent difference between latency and errors.  More importantly, real time video always has errors.  That's how you get real time streaming video!  You sacrifice quality for speed.  When video is streamed to a client computer, packets get dropped all the time.  That's why the audio is sometimes choppy, and the video sometimes has visual glitches.

In fact, the very nature of video, and the ability of the human brain, allow this to work successfully.  Your brain can fill in 1/4 of a second of missing sound using the context of the rest of the audio.  An email has to be perfect.  If a sentence is missing from the middle of an email, you will notice that.

What's Your Programmer Personality Type?

by Nick Wednesday, June 06, 2007 9:39 AM

Your programmer personality type is:

   DLSB

You're a Doer.
You are very quick at getting tasks done. You believe the outcome is the most important part of a task and the faster you can reach that outcome the better. After all, time is money.


You like coding at a Low level.
You're from the old school of programming and believe that you should have an intimate relationship with the computer. You don't mind juggling registers around and spending hours getting a 5% performance increase in an algorithm.


You work best in a Solo situation.
The best way to program is by yourself. There's no communication problems, you know every part of the code allowing you to write the best programs possible.


You are a liBeral programmer.
Programming is a complex task and you should use white space and comments as freely as possible to help simplify the task. We're not writing on paper anymore so we can take up as much room as we need.

You can take the test here to find out what kind of programmer you are.  Via Chris Sells.

Give Away Your Old Computers

by Nick Sunday, March 18, 2007 12:35 PM

I blogged about this about two months ago, but it bears repeating.  Developers always make sure to have the best computers, and we upgrade often.  After all... it's our job to stay up to date, and as geeks we always like to have the best toys.  But what do you do with your old machines once you've decided it's too out of date for you?  Odds are that even though it's out of date to you, it's still a pretty good machine for someone else.

I just did this with my old laptop, and I've done it a few times before.  Don't sell your old computers on eBay.  Find someone who needs a computer and can't afford one, and give it away.  It won't take you long to format the drive and put a fresh install of Windows on it.  Now your computer can have a good hardy second life.  Odds are that it will have a more useful life than with someone who buys it on eBay just to scrap it for parts.

In one case, an old computer I gave away was lucky enough to have a third life.  After the person I gave it to was able to get something better, she asked me whether I wanted it back.  I laughed, and told her to find someone to give it away to.  And so it went on to serve yet another master to someone who needed a computer at a key time in her life.  My only regret at the time was not having something better to give away myself so she could have something better than a third generation hand me down.

It feels good to do, and it's something that we as developers can easily do.

Should I Upgrade to Vista?

by Nick Friday, January 19, 2007 2:49 PM

As I mentioned in my last post, I just bought a new laptop.  I'm currently in the middle of the long process of installing everything on there that I use on a regular basis, and also getting it set up just how I want it... or as I call it... Nickafication.  Along with that, I'm also copying over all the data from one machine to the other so I can wipe the old machine clean for it's next life.  One of the reasons that I was frustrated that my old laptop started to break on me when it did was that I wanted to wait until Vista was out in the wild longer before getting a new machine.

This laptop came with Windows XP on it, but I have the option to go to a Dell site and get a free upgrade until the March 1st I think.  So... what are your opinions?  Is it worth it?  I ask this question from a couple perspectives.  First of all, does Vista provide enough features to counter any performance losses?  Can those features be gained through other means?  For instance, I can get most of the WinFX feature set on Windows XP, so I'm not sure that is a good argument for an upgrade.  Also, is it worth the potential pain of a problem during the upgrade?  Has anyone had a bad upgrade experience?

Let The Fun Begin

by Nick Wednesday, January 17, 2007 11:09 AM

Last week Thursday my laptop decided to break on me.  I've had it for about 4 years, and it has worked amazingly well all this time.  I bought a fairly high end machine at the time, and what's amazing is that I've never felt a strong urge to replace it in all this time.  I figured I'd need to probably buy a new Vista machine in the next 6 months, but really... laptop specs haven't improved terribly since I bought the last one.  Memory is a bit cheaper, and video card options have improved.  You can get a dual core machine which is nice, but really, clock speeds aren't being pushed up because the clock is one of the main power draws on a laptop processor.  The faster you push the clock, the more power you burn.  And when it comes to a mobile computer, battery is life.

For whatever reason, the hinge on my Dell decided to lock up on me.  When I opened it up, I heard this cracking, creaking noise, and the top facing above the keyboard started to pull away from the case.  I've messed around with it quite a bit, but can't seem to get it to work properly again.  It is still usable.  It boots, and I can open and close the case, but the facing is cracking and the screen is unstable staying up.  So I went back to Dell and bought a new laptop.  This one had been very, very good to me, so I decided to go back to it.  Once again, I paid for a very nice machine, and full expect it to last at least another 4 years.

It's actually quite strange that I'm not the type to constantly turn over computer hardware.  Hell, my Uncle (who really only uses his computer for buying and selling stuff on eBay) goes through computers faster than I do.  My problem is that I'm very picky about my computer setup.  And once I have my machine setup just the way I want, with everything installed on it that I want, I just can't imagine going through all that again on a new machine.  I figure it will take me at least a week before I'm able to stop using my old laptop at least partially, and probably at least another full week before I feel really comfortable on my new machine.

I will definitely give it up for Dell though.  When I ordered my new machine last Friday, they said the ship date would be the 22nd.  I figured I could make my old machine last for that long.  Then Sunday I got notification that it shipped.  That's right... more than a full week ahead of schedule.  They said it would be at my door step between Wednesday and Friday.  I got it Tuesday.  However, I do have a few complaints which I will air here.

First, like any boxed computer, they put tons of useless crap on it that I don't want.  There were so many trials from so many different companies, it took me a full hour to remove them all.  Secondly, they set up the screen resolution terribly.  It's a wide screen laptop, and they had it setup as 120 dpi, so all the fonts were horribly distorted.  Had I not been an expert in my field and immediately recognized what was causing it, I would have probably had to call their technical support line for help.  Not smart on their part.

Now I have to decide what I want to do with the old machine.  Normally with my old computers, I reformat them, refurbish them, and give them away to a needy friend who has a really old machine (or in one case none at all) and could use an upgrade.  Several of my old computers have had long, healthy, second (and in one case, third) lives... and it just feels good to do.  But with this one physically failing this way, I don't feel good about giving it away.  So now I have a dilema.  One possibility is that I tear out the guts, and see if I can turn it into a cool digital picture frame, ala Picture Picture.  The other is that I take it out to a field somewhere and recreate a classic scene from Office Space:

Any thoughts?

About Me

Nick Schweitzer Nick Schweitzer
Wauwatosa, WI

Contact Me
I'm a Software Consultant in the Milwaukee area. Among various geeky pursuits, I'm also an amateur triathlete, and enjoy rock climbing. I also like to think I'm a political pundit. ... Full Bio

Community Involvement

Twitter

Archives

Flickr Photos

www.flickr.com
This is a Flickr badge showing public photos and videos from Nick_Schweitzer. Make your own badge here.

Standard Disclaimers

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

© Copyright 2017 Nick Schweitzer