"Doubt is uncomfortable, certainty is ridiculous." - Voiltaire

Archiv der Kategorie ‘Uncategorized‘

 
 

Cleaning Out the Bookmarks 1 – Eye Candy Is Business Requirement

Shaving the bookmark/desktop icon collection in preparation for a Windows 7 upgrade, thought I’d at least want to keep them around on the blog.  Most of these bookmarks are things I bookmarked to blog about, but never got around to it:

#1 Good collection of slides about how important a creating an appealing user experience really is.

http://www.slideshare.net/stephenpa/eye-candy-is-a-critical-business-requirement

Recently I was at work and somebody in management said “I just want to know how to create bad UIs faster”.  Ouch.  That goes against a lot of the points brought up in this slideshow.  My opinion is that when you create a pleasant user experience people are more likely to give a shit about your application and I’d rather have 10 enthusiastic users than 100 ambivalent ones.  ( somebody else quoted that last line better )

Users that give a shit are more likely to suggest the features they need, help with testing, and help share and promote your application to other potential customers.

I know its unprofessional to say “give a shit” instead of something like “care” but its the passion and intensity I feel when I talk about user experience makes using anything less shocking and brash very feeble sounding.

Wordpress Pain

Blogging has always taken a backseat to experimenting with cool new .NET bits.  I still get the impetus to blog but whenever I have time to do anything I always have to upgrade Wordpress to the latest version for some security reason.

Wordpress’s success has always been a doubled edge sword when it comes to security.  Since its so ubiquitous its just a huge target for spammers and security violations.  I don’t blame the developers or any aspect about Wordpress for these problems, I just blame success.

Success comes with pain though, for me.

I want to blog, I have to upgrade, I want to blog, I have to upgrade, blog, upgrade.

By the time I’m done upgrading the site, 20 minute to upload and upgrade at max, my motivation is gone.  Sucks really.  I may have to migrate platforms or I’m never going to post anything.

So I update to 2.8.4, check wordpress.com for some information about a plugin and 2.8.5 the hardening release was released… 2 hours ago…

I can’t win.

WebForms the lie!

I love when people hate webforms the same way I do. Every time I write runat=”server” I repeat my favorite webforms quote under my breath:

“WebForms is a lie. It’s abstraction wrapped in deception covered in lie sauce presented on a plate full of diversion and sleight of hand. ”  -Rob Connery

Breaking the Last Wall – That’s a nice picture!

Since I’m assuming that most readers of this blog have opened a Twitter account I can also assume most of my readers have also uploaded a picture at Twitter.   What I also can assume is that most people who have fulfilled these conditions have been pleasantly surprised that Twitter thinks your picture is nice.

Surprise because most websites do not recognize your outer beauty when you successfully complete an operation.  You’ll usually get a boring message surrounded or created in various tones of a mint green.  ”Success: User Account has been added successful” or “Your order has been processed” are the kind of message I’m talking about.

Does that make your users feel good about good about their transaction?  Did you attempt to foster a connection between your site and your users?

No, you attempted to satisfy a lame user experience requirement of letting the user know whats going on.

Your wasting an opportunity to connect with your visitors and make their experience a little better.   Your not attempting to break the “last wall”, similar to the Turning Test ( wikipedia ), and letting your visitors know a human designed this site, a human programmed the systems behind it, and there are humans who appreciate your interaction and are happy your making a connection with their business.

Sometimes a user entering their details into a form marks the last time you’ll be able to make an impact.  This is especially the case with ecommerce.  After that last “Verify Order” click your business is nothing but a tracking number and a cardboard box on a doorstep. We can all create better experiences for our visitors and increase our customers/users loyalty to our sites just by taking a little extra time to think about how to talk to our users while they interact with our site:

User enters their shipping information correctly: “Thanks, never been there, but it looks nice from here.”

User encounters an error: “Whoops, something went wrong somewhere, lets just assume this was our fault, but could you help us out and click that “Confirm” button again?”

Let’s stop regurgitating those same old user messages, lets connect with ours users, be the rare site that puts the correct time and effort into user experience and interaction, lets make people love our brands, and most importantly, lets be more human about this.

Personally I’ve been trying to put more “human” notification in programs I write and had a great response while working on a Facebook application.  The page I first used very human errors on was originally designed with big red angry “ERROR” text that told users how bad they sucked at life when they made a mistake on a form; ”Error: Your phone numbers must match!”  I replaced them with messages like: “Oops, these two phone numbers don’t match and should, would you mind entering them again?”

The final result was after a tester finished up some testing he came back to me and said “When I got those validation warnings last night I swear I could hear you talking to me“. How perfect is that? Of course because he knew me and we spoke everyday this was easy, but the application in question certainly gained a nice human element that I’m sure our visitors appreciated.

Had to include this. This is what cdbaby.com sends their customers when they ship an order: Can you possible forget CDbaby and their brand after this?

Your CDs have been gently taken from our CD Baby shelves with sterilized contamination-free gloves and placed onto a satin pillow.

A team of 50 employees inspected your CDs and polished them to make sure they were in the best possible condition before mailing.

Our packing specialist from Japan lit a candle and a hush fell over the crowd as he put your CDs into the finest gold-lined box that money can buy.

We all had a wonderful celebration afterwards and the whole party marched down the street to the post office where the entire town of Portland waved ‘Bon Voyage!’ to your package, on its way to you, in our private CD Baby jet on this day, Friday, December 1st.

I hope you had a wonderful time shopping at CD Baby. Â We sure did. Your picture is on our wall as “Customer of the Year”. Â We’re all exhausted but can’t wait for you to come back to CDBABY.COM!!

Thank you once again,

Derek Sivers, president, CD Baby
the little CD store with the best new independent music

You don’t need an expert for Social Media

I spend a lot of time reading and trying to figure out social media.  Generally I don’t trust “social media experts” because how can you have expertise in a subject that has only been relevant for a short period of time?  I’m pretty sure the “social media” space consists of 10,000 cowboys just trying anything and everything to drive traffic to their clients.  Even though Dell has reportedly brought in 3 million in orders from Twitter I’m still a little skeptical about the space.

Skepticism aside social media is probably going to be very important in the next 2-3 years but for right now success stories are few and far between.  That’s why I was amazed when I watched a great episode of social media delivering its promosies and saving a family business.

Soaps your afraid to useThe story starts last week when the reddit user posted a a pretty sad tale involving a lot of work, passion and sudsy bubbles.  To summarize a family’s soap business was starting to feel the effects of a shakey economy and a brother son wrote the reddit.com community telling their story and asking for help.

Whats remarkable is that cleanliness and the horror or working part time jobs struck a chord with the reddit community and the business, sopier.com, saw a massive increase in orders.  Redditors from all over the world started becoming serious about being clean and really helped this family business out. The story was eventually featured on a local news station, bringing in some extra exposure and orders. Even Reddits owners have taken an interest and there has been some talk of developing some some reddit.com branded soaps.

I think the best part about this story is it wasn’t brought on by some expert, sopier.com didn’t hire anybody. A concerned brother and son just told it like it is and boom the digital community responded.  Think about the fact that he hired no PR company to come up with a message, no marketing or advertising dollars were spent, yet a business was saved and it’s future looks bright.

My personal opinion is that social media experts are just a bunch of mouth flappers don’t serve much of a purpose. All sopier.com had to do was write their story and people became interested.  If you need an expert to tell you how to tell other people about your life then… well… I don’t know what to tell you.

Interview question answers worth a blog post.

Today I was asked to answer some pre-interview questions in an email. This is a little different as the interviewer must assume I have google at my fingertips and could easily find the answers. I’m assuming the interviewer is asking for something more here.

I like “tricky” questions and trying to understand the underlying motivation and meaning for asking such a question. What is the interviewer trying to get at?

Since I would have had to type the answers anyway I’ve decided to put them into a blog post.

  • Do you understand and/or have you worked in a clustered environment with SQL Server?
  • Can you write an example of cursor query syntax?
  • Explain the difference b/t a unique key and a primary key
  • When writing a report for a customer, what methods would you use to come up with the business requirements?

1. Do you understand and/or have you worked in a clustered environment with SQL Server?

No, I have never worked in a clustered environment but have a basic understanding of why you’d use clustering and some common clustering techniques.

2. Can you write an example of cursor query syntax?

Off the top of my head, no, and here is why:

I’m a strong follower of the mentality that most if not all RDBMS database technologies are written with set based operations in mind and cursors violate a set based theory by facilitating sequential row by row access. The query execution engines, IO strategies, and database design principals are all based off of the theory of sets of data. Using cursors and a more iterative row by row approach solves problems in a way RDBMS’s are not meant to solve them.

Whenever I’ve been presented with a large data processing problem that made cursors seem like a perfect solution for I’ve always either taken the time to really optimize a set based solution, usually resulting in reading less rows and incurring less hardware resource costs, or bringing the large data set into a language like C# to process. So while I know what cursors do and have seen them in action I could not write the syntax without looking it up on BOL ( Books Online ) or MSDN because I’ve always recognized and sought the benefits of other solutions.

However I do realize that certain security scenarios, and maybe database level reporting scenarios, mean cursors are necessary and would feel comfortable working with them. My lack of in depth experience with them could be attributed to having an environment where hooking up a remote C# application or using something like xp_cmdShell to execute an .exe was always a possibility to process data in a more efficient way.

3. Explain the difference b/t a unique key and a primary key?

In conversation the two terms can often be used interchangeable without too much confusion. By definition a primary key must be unique so the two terms distinct definitions can be blurry. This is especially the case in single database server scenarios.

However in a clustered environment however these terms do take on different meanings. The key difference is that a primary key would be referring to a table only constraint that ensures data integrity in a single table while a unique key would refer to a cluster wide key so when a table is distributed across multiple machines you can still ensure data integrity and uniqueness of rows.

Usually you’d see the term primary key used in with some kind of auto incrementing column, usually an int that is managed by Sql Server. In a clustered environment usually you would see GUIDs being used or a separate key assigning service located in a place that all clustered servers can access. In that situation a primary key asserts data integrity constraints in a single instance of a table while a unique key would ensure data integrity constraints across the clustered environments tables.

4. When writing a report for a customer, what methods would you use to come up with the business requirements?

When a customer asks for trivial report functionality such as “Give me the sum of all orders entered by Jimmy” I don’t think there is any particular method for ensuring you’ve captured the requirements. Most of the time I’m already writing the SQL in my head by the time the customer finishes their statement: Select sum(price) from orders where orders.customername = ‘Jimmy’ group by price

For non-trivial and non-intuitive reports such as “I need to know the increase in average orders placed in July in response to our marketing efforts, including the months before and after our promotions, and an easy way to quantify the increase as well as the expected amounts compared to the last 2 years” my opinion is that you need an extremely iterative approach to accurately meeting the customers requirements.

When I say iterative approach I mean that I would try and include the customer during every stage of development of the report from initial alpha preview to final design and asking for feedback at as many stages as possible. I would try and keep the feedback cycle as short as possible and try not to over engineer or complicate the design at the beginning of the report’s development.

Many times the customer does not know what they want or how to explain it well to the developer making the report. This is usually because the customer has limited technology experience and may assume something she thinks “all programs ( or reports ) do” also the customer might not include various business rules or “insider information” that may only exist unconsciously in her head.

For example the customer did ask for a sales comparison, but did they ask for a graph or chart? Do they assume that any comparison type report? They may ask for a product summary for a promotion but they may intuitively know to exclude garden products for a winter promotion which a developer may not immediately grasp.

The most widely used solution to this problem is to be incessantly focused on getting an understanding of the most minute details and try ask as many questions as possible. Does the report need a chart? Bar or Line Chart? Are we excluding certain product categories? Are we using this report for future promotions? Should this report work with older promotions? Are we looking for percentage changes or actual sales figure changes or both?

In my opinion this is often not enough and must be supplemented with incremental feedback. The risk of missing a the target requirements or not including a feature often means spending a lot of time back tracking to implement those features and could lead to missing deadlines.

Overall it has been my own experience and the experiences of other authors and bloggers I’ve read that a projects initial requirements rarely reflect the final state of the software. Therefore although asking for details mitigates the risk for a project or a solution to not be reflective of the customers needs and requirements. You can never ensure, regardless of a technique, that your able to craft the perfect set of requirements. In my opinion iterative development and short feedback cycles are the the best way you can guarantee your final product or report matches your customers expectations without wasting time on backtracking or writing features your customer doesn’t need.

Code generation is a ROUS?

Saw “code generation and datasets are rous’s” on Twitter tonight and it got me thinking.

I look at T4 templates and code generation as a big part of the future of .NET. EF uses code generation, Asp.net MVC generation, and Microsoft is supposedly bumping up their support for it in Visual Studio 2010.


Code generation is also gaining some traction as a performance solving alternative to using expression trees to produce more strongly typed development experiences.

Expression Trees aren’t the fastest things on the planet and throwing huge nested sets of nodes in your web application is probably going to muck things up.

Right now the .NET blogosphere I browse is absolutely full of expressions and I’m slowly adding things to my toolbox that use them. If it can’t be configured with a lambda I just don’t want to see it.

I’m predicting that either we get some compiler or runtime optimizations in the next version of C# 4.0 or everything we write up is going to be a little bloated with expression tree parsing. One possible solution we have is using T4 generation to get the strongly typed code we want without the extra overhead. Once writing up a T4 template to inspect our types and provide fluenty extension methods gets a little easier I’m sure it will be the new way to build the strongly typed options and configurations we need.

ROUS? Not really. Although I do admit code generation seems a bit like resurrecting ancient technology. Heck, Php just implemented GoTo so it can’t be that bad. ;)

Snowed Slashy/Slash Software

You know software or website that just do too much? Too many buttons to click on, too many features to learn, too many distractions?

Two sweet terms have entered my vocabulary that sum up whats wrong with these sites and how to classify them in a neat and tidy way.

The first is S.N.O.W.E.D which stands for Stakeholders Needs Overwhelm Web Experience Design. In a nutshell it comes into play when a nice and clean web experience becomes cluttered up by the “needs” of multiple departments. The laywers need this to go here, the marketing guys need this to go there, all of a sudden you have an americanairlines.com disaster on your hands.

Take a look at this video of Microsoft’s attempt at redesigning the iPod box art for a great example of what I’m talking about.

This term has been longing in my brain since 2002 when I was taken to some high numbered floor of a NYC office building to work with a Fortune 1000 company on an ecommerce project ( naming them wouldn’t be polite ). The CEO of the company wanted to change some navigation elements on JUST the homepage of the site. I argued that this would lead to navigation inconsistency, a big no no, and would just confuse visitors on how to navigate around the site. Since his request was a Hippo ( Highest Paid Persons Opinion ) I had no choice but to tarnish the web experience with inconsistent navigation.

The other terms that I’m starting to use a lot, albeit just in my internal conversations is “slashy/slash” software. Although I first heard this term used in the humor/programming “shock” site worsethanfailure.com it carries an efficient YAGNI tone to it thats easier to describe in your head.

YAGNI is of course “you aren’t going to need it” but I usually see that term used in the context of software design and development. “Slashy/Slash” is more of an overreaching term that can be used in the conceptual stage of the design of a product.

My own personal projects always seem to hit a brick wall of functionality paralysis when I think of all the awesome feature that exist outside of the core functionality and only supplement the main goal of the software. Sometimes I just get so overwhelmed thinking of everything that SHOULD go into the software and start missing the point.

I’m not trying to create a Message Forum / Comment System / Geo meeting tool. I’m trying to create something that makes it easy for people to talk with one another. Once you get rid of the slashy slash parts it all becomes clear.

Used together these terms can describe a lot of different websites I no longer visit or see myself visiting less once the snowed slashy/slash bits get brought into place. Myspace profiles became very slashy slashish once everybody’s profile consisted of things about them and all the animated and sparking bullshit they could google up. VBulleten and phpBB boards are very Snowed and Slashy Slash with their pages cluttered up by 1000 features I don’t need nor do I care about.

I utterly believe users appreciate simplicity and ease of use over features and by keeping these terms in mind I think I’ll prevent myself from both overthinking problems I’d like to solve with my applications as well as helping clients, customers, and employers of mine keep their focus on web experience and not including every bell and whistle they can think of.

Now all I need is hard logic evidence that slashy slash or snowed terms really do effect the bottom line, if anybody can think of a study or research paper please link to it in the comments. I’d love to expand on this topic and blog more about it.

Redneck Databases

Just a throw away post here to share a link:

Your database might be a redneck if.

I’ll add my own and this is from a real life experience:

Your database might be a redneck if your use triggers to handle cascading updates and deletes.

Learn ORMs

Writing hand crafted SQL is like lighting money on fire, inhaling the smoke and passing out, hitting your head on you computer desk while falling.

Not only are you going to run into stupid typo problems like having the typing the “Products” table as “Product” but your going to waste time working on your own DAL, baking in features like schema to class mapping, lazy loading, caching, and transaction support that have all been written, testing, and battle hardened by hundreds of programmers.

RDBMS persistence is a solved problem at this point and with lots of ORM choices in the market right now, both commercial and open source, its going to be almost impossible not to find one that doesn’t meet your requirements.

The only negative aspect of using ORMs is the learning curve to get up and running with them yet there are more than enough resources around at this point its rare I’m ever stuck with an unsolvable problem. Every ORM I’ve tried ( NHibernate, Subsonic, Linq2Sql ) has had more than enough documentation and newbie tutorials to get started reading and editing database rows within an hour of downloading the assemblies.

When I started out as a developer I wasn’t really aware of ORMs and what they did. At one point I even tried to write my own and was really annoyed when I started using ORMs. All the time spend fighting with SQLCommand wasn’t all that useful once ORMs started appearing in my projects. Writing and debugging SQL is a rare event these days.

The reason I’m writing this post, and that its tone may be passionate, is because I tried responded to a blog post to tell another new developer that he should be using a ORM instead of fiddling with Commands and raw Sql. One of the comments on the post really annoyed me because he blames ORM for problems that would have happened with or without an ORM anyway like tediously complex abstraction layers and being unable to step through a debugger:

I’ve become sceptical of ORMs and abstraction layers. Great in theory but I’ve not yet seen an implementation that doesn’t suck either for maintenance coders or for performance, or both.

I used to be big on following principles when coding. After several years of contracting, working on existing code bases, I’m now in favour of practicality. I rate everything now based on the two criteria I mentioned above:

1) Is it easy to maintain?
2) Is the performance adequate?

Almost all the code I’ve come across fails one or both of these two criteria.

The code-base I’m working on at the moment is a case in point. I need to change the way the data is stored in the database. First step, reverse engineering the existing code to find out how it saves the data. 10 – 12 nested methods between clicking a button on the UI and something happening in the database (not to mention side calls to read properties or get specific data). And slow as a dog. All the business logic in the middleware layer. Great idea but it involves 3 database writes and 4 reads to add an item to an order. Maximum of 99 items can be added at a time. I make that up to 693 database accesses to perform a single operation (adding a bunch of items to an order). It took two days to rewrite the code to perform a single database update for all items. Still using a data access layer but moving the business logic to a stored procedure in the database. No good from a purist’s point of view but all the business logic is in one place (the stored proc) and we got a several hundred-fold improvement in performance, on average.

My .Net learning experience was full of reading comments like that when deciding how to handle rdbms persistence. Being unable to separate what was just bad programming and an actual issue with a piece of technology I decided that ORMs weren’t worth it and fought with raw sql strings for months.

ORMs are a big part of the future of programming. All major Django, Php, and Ruby frameworks are based off an internal ORM and Microsoft is shipping two at the moment which don’t seem half bad. Chances are your going to encounter a lot of ORMs in your professional career and learning them will be a definite benefit to your overall productivity and job opportunities. I probably lost a job last month because I didn’t have any NHibernate experience at the time. I just wish somebody told me earlier, like I am now, so I wouldn’t have wasted time trying solve a solved problem.