I'm Not Sold on HTML 5

Ok, let me get this straight.  HTML 5 is supposed to offer RIA (Rich Internet Application) type abilities to the browser rendered (i.e. no compile, Just In Time-JIT) web.  How JIT & no compile, markup based, mixed platform technologies are supposed to offer a comparable performance and UX/UI experience seems sketchy at best.  Now let me clause with, I am not writing this idea off, just hesitant to believe that there will be comparable performance to frameworks such as JavaFX, Silverlight, or Flash.  With out of browser Silverlight, or Adobe AIR Apps, or heaven forbid WPF based RIAs there really is NOT a performance comparison.  I can safely assume that Silverlight & WPF (mainly because I've seen them perform) will smoke HTML 5 for advanced rendering or solid advanced RIA style interfaces.  Especially in a Line of Business (LOB) type application.  There just is NOT a comparison in this sense.

The video & audio elements are an entirely different rant.  Sure, it looks great, the O3D demo looks great, but this is still not going to compare to Silverlight or Flash.  These tools are going to smoke HTML 5.  The complexity of getting video, audio, and these other advanced elements of HTML 5 supported has the same issue as Silverlight has for penetration.  Sure, the browsers will start having these things built in, but that will be completed about the same time as Silverlight has similar market penetration as Flash (i.e. the 98th percentile).

Now some, such as Matthew David, wax somewhat poetically about HTML 5.  His article Inside HTML5:  The Browser becomes a first class RIA citizen is an interesting read.  He obviously has great enthusiasm behind this idea.  But I'm not buying it.  The technology is not comparable, HTML is band aided already beyond belief (remember, it was supposed to render documents for linking kind of like a library - NOT for all the advanced things people tend to try and use it for these days).  HTML 5 is merely another band aid, albeit a bigger band aid, then the last several versions of HTML.  The core focus of the markup at this point is basically ignored.

The Positive

The cool thing, I will admit, is HTML 5 does add a lot of options to the browser based web.  I don't think we'll keep going down this rather archaic version of the web forever, but it does provide a stop gap between much more interactive applications.  It also provides a stop gap fix for companies that aren't ready, for whatever reason, to jump on the RIA bandwagon.  HTML 5 will provide great features, but I just don't see it as a prime mover, but more of a stop-gap between the next best way to connect to the web.  Maybe that is Silverlight, Flash, and AIR, or maybe it is some other type of platform or tool.

In the end, something will definitely eclipse HTML 5, but HTML 5 will be great in the meantime.  At least until we run out of fingers to poke in the holes of the dam (i.e. HTML 5).

Digg It!DZone It!StumbleUponTechnoratiRedditDel.icio.usNewsVineFurlBlinkList

Posted by: Adron
Posted on: 3/2/2010 at 11:07 AM
Tags: , , , , ,
Categories: Discussion Points or Ideas | Rants
Actions: E-mail | Kick it! | DZone it! | del.icio.us
Post Information: Permalink | Comments (9) | Post RSSRSS comment feed

iPhone == IE6 ? Yeah, You Heard It? iPhone Dev is?

So I was reading some blogs related to Windows 7 on Mobile and iPhone Development.  I will say right off, I am biased AGAINST developing for the iPhone because the development environments, language, and other characteristics are horrible.  Horrible being a kind way to put it.  The iPhone may seem like some whiz bang advanced phone, but the development of it is somewhat archaic at best.

This character quirksmode wrote a great write up about The iPhone Obsession.  In the write up the IE6 and iPhone Parallel is drawn.  Eerily the writer makes a VERY good point.

For now, that is all, I liked the write up and want to do more mobile development, but the iPhone Development has got to feel some heat and either modernize and improve, or die.

I will admit, I love my iPhone.  Again though, I hate developing for it and the process compared to developing for most other things.  Even developing for the previous Windows Mobile Phones was better.  Albeit Windows Mobile phones of the past where HORRIBLE in UX and UI overall.  No comparison there.

I do see though, if Microsoft plays their cards right, they could make some serious inroads to Mobile Development with Windows 7 Mobile.  The initial screen shots and descriptions I have heard seem pretty awesome.  Some very very picky developers I know have seen and played with some of the devices, and they love it.

So we shall see.  May the battle begin!

Digg It!DZone It!StumbleUponTechnoratiRedditDel.icio.usNewsVineFurlBlinkList

Posted by: Adron
Posted on: 2/17/2010 at 9:05 AM
Tags: , ,
Categories: Rants
Actions: E-mail | Kick it! | DZone it! | del.icio.us
Post Information: Permalink | Comments (0) | Post RSSRSS comment feed

Microsoft Beta, SP1s, and Empiricism

Ok, so over the last 30 years or so, Microsoft has made a lot of software.  Probably more software than any single entity on the face of the earth.  The first two decades of software was rough when released in beta.  If it was even released in beta, or alpha, or as service packs.  Most IT people, software developers, or anyone using software would almost always steer clear of beta, alpha, or service updates of software.

Why?

That is the easy thing to answer.  Most of the time, the software would not even work.  At least not in any semblance of the way it was supposed to.

Fast Forward to Today. . .

Software works.  Rarely does one download software that is in beta and it doesn't work.  At least on a fundamental, core functional basis.  This is very much apparent at Microsoft.  The competition lit a fire and Microsoft has answered with more frequent releases, more service packs and updates to keep things secure and up to date, more quality packed into every release.  Why did they make this massive transition?

Agility.

Yup, I said it, the firestorm that has been the Agile movement has caused a major upheaval at Microsoft.  Out went the Waterfalls and in came the Maneuvers of Agile.  In all honesty, if someone is still arguing the tenants of this success, they?re lost in a bygone era of questioning agile processes.  Of course, I will admit, many of the processes are up for debate in various ways.  But the core culture of software development has been dragged kicking and screaming.

Gone are the grognards sitting in the corner being anti-social, hacking away on some code that nobody else will ever be able to maintain.  Gone are those days when a development team works in a vacuum, and fails.  Instead we have faster teams, more customer involvement, iterations or sprints, and in the end higher quality software.

The reason I bring this up really has one simple intention.  Stop freaking out over beta software.  Implement things with it.  Use it.  Love the stuff.  I am regularly using beta software, with all sorts of new goodies, and releasing these projects into production environments.  You might say, "really?  that is so dangerous", but I have not had a single failure, crash, or error related to a beta issue in production for at least 5 years.  Back when Agile was really just starting to gain steam to run the course.  So use new software, stay on the bleeding edge, and help everyone by helping yourself keep up to date!

Digg It!DZone It!StumbleUponTechnoratiRedditDel.icio.usNewsVineFurlBlinkList

Posted by: Adron
Posted on: 12/11/2009 at 8:12 AM
Tags: , ,
Categories: Discussion Points or Ideas | Rants
Actions: E-mail | Kick it! | DZone it! | del.icio.us
Post Information: Permalink | Comments (0) | Post RSSRSS comment feed

I've Been Pondering Android, But Now?

This is a serious smackdown ad, I LOVED it.  I've been pondering dropping the iPhone as it has never felt robust, but the Windows Mobile was just a disgrace.  Now though, WOW!  Between the ad & the seriousness of Android coming to other phone platforms I am honestly getting pretty stoked.  The development environments are better (I mean, Object C, come on), there are multiples to choose from, the platform is open.  Sounds like Windows stomping Macintosh those years ago.  Cept' this time it is Google vs. Apple.  It is about time this battle got real!!  I'm looking forward to it with bated breath.  :)

So with that, it just kicked off the motivation to start doing some real Mobile Dev.  Yes, I will probably get some iPhone Apps built, but my focus will definitely be Android.

Digg It!DZone It!StumbleUponTechnoratiRedditDel.icio.usNewsVineFurlBlinkList

Posted by: adron
Posted on: 10/18/2009 at 8:28 PM
Tags: , ,
Categories: Just Stuff | Rants
Actions: E-mail | Kick it! | DZone it! | del.icio.us
Post Information: Permalink | Comments (15) | Post RSSRSS comment feed

OMFG, Please Make the Tests Work FIRST!

Alright Mr & Ms Developer.  This hasn't happened in a while, since most of my work as of late has been green field (i.e. brand new development).  But in the past, oh boy have I gotten some pure crap.  I am a bit arnery today, so just bare with me, I need to rant a bit.

When I am handed code to fix, maintain, alter, or read for any reason I would love to have unit tests come along with it.  If someone then promises to provide unit tests for the code they are writing that is being handed off to me, I expect the unit tests to run, execute isolated, and throw green lights across the board.  However there are a billion different things I run into all the time that frustrate me to no end.  If you promise me unit tests, do NOT . . .

[RANT ON]

DO NOT give me unit tests that take 13 steps to setup, fake data INSERTs against an un-configured or even pre-configured database.  That is NOT isolated and it makes them almost entirely useless to me.  It might be great for your own personal testing, but it doesn't help me understand the isolated unit of work, the separation of concern, or anything else about the actual code.

DO NOT give me unit tests that outright fail immediately.  If they all fail that means you have NOT finished your work.  It means your code doesn't work.  Please, make the tests work right, make the code work right before passing the buck.  Note:  I said please! :)

DO NOT write a unit test for something that checks the length of a string when you need to check the content of the string.  Don't check that something is a number when the method adds two numbers, instead check to see if the numbers are aggregated correctly.

DO NOT tell me you have 100% code coverage and then hand me tests that basically asset that a mocked method executes on an object.  OF COURSE THE METHOD EXECUTES, YOU ARE MOCKING IT!!!

DO NOT give me unit tests that test so far across boundaries that isolation is lost by so many degrees it would take many minutes, if not hours, to figure out what the test doesn't work.

[Rant Off]

In all honesty I would rather get code and just be told the truth;  ?X tests do not work anymore?, ?I could not figure out a way to test this so I did this dumb partial test thing?, or simply ?I was screwing around so I didn?t get full coverage, to make management shush up I did a quick assert fake to get the rest of the coverage?.  I'm a developer too, I will understand and probably have no problem at all that something is not completely done, partially done, or you hit a stumbling block.  I do it all the time, I also make a point to lay it out the way it is.  No point in beating around the bush.

Keep in mind, if your management thinks you need to slave away and be forced to lie about things, you can probably go work somewhere else within a few weeks.  Even in this crappy market there is barely any reason to allow bad management to treat develops like crap or to mismanage projects.  So don't take the bull and just make sure to keep things on the up and up with your fellow developers.  i.e. DON'T lie about your unit tests!  Cheers!

Digg It!DZone It!StumbleUponTechnoratiRedditDel.icio.usNewsVineFurlBlinkList

Posted by: Adron
Posted on: 9/14/2009 at 11:51 AM
Tags:
Categories: Rants
Actions: E-mail | Kick it! | DZone it! | del.icio.us
Post Information: Permalink | Comments (0) | Post RSSRSS comment feed

Project Failure? Are You Serious? Because I Am!

Beware, this is a LONG entry and if you don't read all of it you may end up offended, but rest assured what I'm writing here is the absolute truth and recruiters, project managers, project leads, development leads, developers, and anyone getting into the software industry or that has been in the industry I have many points of advice and warning.

I was recently hanging out with one of my friendly local tech recruiters over a drink or three and some good food.  They asked me to proof their position they where about to post.  As I am a friendly guy, I decided I would.  It has been a LONG time since I've looked at a post like this, as I haven't actually used Monster, Dice, or any of those sites in a rather long time.  Maybe I've thought the industry had matured a bit sense I last checked the pulse.  Being in Portland where the industry is generally about 5-10 years ahead of the rest of the country (and the world for that matter) I am always hopeful.  Here are some snippets from the post and an immediate translation.

Under the required skills section I saw a couple of points;

  • Creation of automated unit test cases.
  • Automated builds
  • Ability to manage multiple projects and tasks simultaneously.
  • Dedicated to completing assigned tasks on time.

Under the preferred skills and characteristics where some more real gems, but this one just stood out.

  • Willing to work overtime, holidays, and weekends as requested by management.

My first response when looking at this was, "are you serious?  you really expect someone to take this job?  It has abusive environment and poor conditions all over it!!!!"  I was seriously shocked, after all these years, and maybe I just don't read job requirements much anymore and there are tons this crappy.  So let me elaborate a little more on this description.

First off, just from those descriptions the position looks aberrantly abusive, environmentally (i.e. work environment) bad, and probably psychologically torturous for a software developer.  Maybe I'm wrong, but whoever decided to put these requirements in the post is looking for either A: someone who is desperate for work and will last for a very short time under the abuse or B: someone who is already sadomasochistic and loves the pain of the torture.  There are amazingly software developers like that.

Now I have to pick apart some of these.  "Creation of automated unit test cases."  This immediately tells me a couple of things;

  • There are some tests, they are NOT unit tests if this has been slammed into a requirement spec for automated tests cases.
  • There are so many contradictory words in this request that it just doesn't make any actual logical sense.
  • Unit tests are isolated, often used during refactoring, not always during automation.  Automation tests are not particularly unit, often are integration tests, and aren't really used during refactoring but instead during QA. 
  • "Cases", well cases just hangs there as if Agile Processes & Waterfall Processes are having a subversive fisticuffs fight right after the specs are finished.  Whatever the "case" this requirement only really shows one thing, some type of testing is required, and the prospective candidate won't know what kind and it appears nor does the person writing the requirement.

Let us hit on the next statement.  "Automated Builds".  Ok, this one sounds like a legitimate requirement.  But stop a second and think about it along with the other requirements.  Is it logical with the others or does it exacerbate the other requirements by its simple specification?  Considering people these days people are doing CI, continuous integration, along with automated builds it leaves me with this thought that someone hasn't modernized the build process for a long while.  With that said it leaves me to this next specification and the point I want to make.

"Ability to manage multiple projects and tasks simultaneously" is a beauty.  That's the spirit for destroying any good velocity and productivity a developer might have, interrupt them a lot and give them multiple tasks all at once!  If it is a contract position, one would probably want the hire to stay productive on task, if it is a permanent position you might want them to handle multiple efforts.  However stating this immediately, before any discussion or interview is made with an individual this specification should leave a developer with the inherent fear that the project, whatever it may be, IS BEING MANAGED POORLY!  This is a massive, glaring red flag.  Sure, most projects these days are probably running through rough spots, but don't chase away the smart talent before the position even gets a glance at by the top talent.  I can promise you the top talent will look at this, and think, "well maybe they can hire me as a consultant to get them back on track, but I'm not going into the trenches because it already sounds like a "death march" with many "mythical man months" being consumed.

"Dedicated to completing assigned tasks on time" is always a hilarious thing to read.  This should be translated to "working insane hours to get tasks done based on a schedule that you have not be consulted on, or at least ignored after you?re consulted, and then getting reprimanded because you didn't finish a task that has been mismanaged from the beginning!"  This specification is probably the biggest alarm of them all.  This specification almost immediately should tell a prospective candidate that the project, or project(s) are probably being mismanaged.  If the project has had so many problems as to need to put ?dedicated to completing?" in the specification as a point there are problems.

Now someone might read this and think, "but it sounds like a good trait" and I'll state simply that it is a very good trait in a developer.  I can tell you with high confidence, developer's absolutely have this trait but are often put in circumstances that they can't meet deadlines.  I can also say with high confidence that probably 80% of the time a task is not met by a deadline it is not the developer's fault, it is the planning process & management that is in place.  Mind you, 80% is a conservative estimate, a more accurate number would probably be in the 90% range.  Developer's want to create, design, developer, and do good work. Developer's are not your McDonald's employees, these people are highly skilled.  Even the weakest developer is likely to want to get things done, but if the leadership has mismanaged the project, they'll then have to fail.  It is a sad situation that it is so often this way, but that's the cookie crumbling.

The last one anyone can see is a major red flag.  "Willing to work overtime, holidays, and weekends as requested by management".  If this where a contract position, that is a command to abuse the hours ? spend a ton of em' and bill em' because you know, just from this requirement that you'll have to anyway.  If it is a permanent position, this is really bad news for the developer.  Right from the get go a developer should look at this and realize their social life, their love life ? if they have one, marriage, or whatever else is about to go down the drain.  If something like this is in a job profile specification then you can bet money, that you'll be expected to and will have to work ridiculous hours.

With all the other specifications combined the sad fact is that you'll probably be stepping directly into a project death march from day one.  Simply put, this project, whatever it is will fail with about a 90% chance on delivery date and cost.

The Awesome Shiny Good News Out of All This!

There are ways that everyone in this scenario can get things straightened out (and no, I'm unfortunately not available right now I'm happily employed ;p ).  Here are the first 9 steps to getting things going in the right direction and staving off the death march and immanent failure.  I would have written up the first 10, but that seems touch?!

  1. Get existing members into a room that are involved in this project and show them this specification.  Then throw away the specification and dig deep to find the GOOD PARTS of the project that might make it fun and exciting to a prospective candidate!
  2. Immediately toss as much Waterfall Methodology in the dumpster out back AS FAST AS YOU CAN!  Read up immediately on Agile, lean style, scrum style, anything of that sort.
  3. This one will be painful for the project managers, but do it if you want to succeed.  Throw away the gantt charts and project plans, if you don't you've already failed the software development effort.
  4. Sit down and create some stories about what this software has to do.  Talk to the users and get it straightened out, look at the components that might need to communicate.  Bring in all the key stakeholders again and tell them the project is at RISK.
  5. Find ways to get happy developers, existing and future.  If you don?t have happy developers you WILL NOT have a solid, reliable, quality product or service in the end.
  6. Either figure out your burn down chart or your iterations, get stories lined up for the next steps ? i.e. the ones in the immediate next week or two and DO NOT start putting stories on a scheduled chart or out past the 2nd or 3rd iteration.
  7. Get a steady velocity, stop abusing the developers, stop working overtime at every opportunity.  Overtime slows down a project, don't tell me you have to because there isn't enough time because you're perpetuating the lie that OT will build a product.  Steady, consistent, happy, clear thinking developers get a product built.  Some OT might happen, but get it the hell out of a job specification and reduce it to a minimum on the job.  You want developers that want to do a little extra, not developers that feel slave driven.
  8. Make sure the teams eat lunch, communicate, get to know who everyone is, and can deal with their respective team members traits and can communicate.  Without effective and regular communication nobody is going to finish anything on time, let alone of high quality.
  9. Seriously, go have a beer/beverage/cold drink or something with the team and get things out in the open.

Ok, so there are a ton more steps.  There are things that come after this, that come after the project is repaired, and even after that.  But this is the simple start to correcting the problems.  I really hate seeing projects fail, I HATE seeing projects fail because often, there is no reason for it.  Almost every project I see that fails is because of the dumbest list of reasons;  fear, bad management, Waterfall, miscommunication, and others.  The wicked thing is, every single one of these reasons has a solution that humanity in its everyday project endeavors has resolved!  We as human beings have the knowledge, out there, we just have to search for it and find it and know it!  So many projects don't have to fail!

So get to it, and I hope everyone that reads this can straighten out their projects and add to the list of successful projects, instead of outright failures.

Digg It!DZone It!StumbleUponTechnoratiRedditDel.icio.usNewsVineFurlBlinkList

Posted by: adron
Posted on: 7/19/2009 at 8:32 PM
Tags: , , , , , ,
Categories: Agile, Theory, and Process Stuff | Rants
Actions: E-mail | Kick it! | DZone it! | del.icio.us
Post Information: Permalink | Comments (10) | Post RSSRSS comment feed

Apple Lost Me

[Rant On]

I went to re-download a video I had purchased, Casino Royal, and realized after some searching that I couldn't.  I have purchased music, video, and other content on the Internet before and this is the FIRST time ever that a recoverable solution wasn't provided.  Not only does Apple not provide movie downloads for the same content you?ve bought, they offer some second downloads on other things, let you download apps multiple times, and in certain circumstances might let you do this or that.  Needless to say, for a company that is supposed to keep it simple, that is the WORSE UX (user experience) and mismanaged business logic that simply, I wouldn't have expected from Apple.

I've been contemplating getting an Apple PC for a while now.  With this policy, I'm not sure I want to.  What other ways does Apple jack somebody for hard earned cash?  I also started contemplating getting an IPhone for personal use, but just realized that IPhones operate like Windows 3.11, they pretend to be multi-tasking but they aren't.  Every time I'm trying to listen to music I get interrupted by text messaging or something.  VERY annoying.

In addition to these two silly little things, the new Windows Mobile doesn't look or perform too bad.  Guess what else, I can have two apps running at one time!  OMG are u serious!  Yes, hell, I can even run 3 or 10 apps.  I guess MS developed the OS for real business use, and that usually requires the ability to do multiple things.  Sure, Windows Mobile is still rough around the edges, but it in my opinion is gaining pretty fast and already has some unique advantages.

Don't even get me started on the Blackberry Business Leader.  The functionality on it along with the fun of apps like Pandora really don't leave anyone reasons to switch from Blackberry over to IPhone.

Between bad purchase policies, betting you'll just leave whopping backups of your crap everywhere on all those extra drives and tapes people always buy (NOT) Apple is making some rather huge mistakes.

But this is why, Apple has been a 2-bit player in the competition between Apple & Microsoft for a LONG time.  Apple is by far more monopolistic, with bad business practice, and other concerns all because they expect their users to ?not think about using the computer? mess.  Bad idea.

I'll be sticking to Vista reluctantly after these two divisive observations and getting screwed out of my $15 bucks for Casino Royal.  BTW Apple, no, I'm not reading your stupid 8 gazillion page EULA about movie purchases, if I can't download what I've bought before ? and I'm buying a single time download ? it really should be a little more obvious.

Then of course, I guess I'm used to the Internet that has choices, with my options being my choice versus handed to me.

Thanks Apple, I'll keep my choices with more computing power and more options, more applications, more games, and *gasp* more hardware.

[Rant Off]

Fini.

Digg It!DZone It!StumbleUponTechnoratiRedditDel.icio.usNewsVineFurlBlinkList

Posted by: adron
Posted on: 6/2/2009 at 6:27 PM
Tags: , , ,
Categories: Rants
Actions: E-mail | Kick it! | DZone it! | del.icio.us
Post Information: Permalink | Comments (2) | Post RSSRSS comment feed

Difficult Even Among Ourselves, Developers

Ugh.  I was interrupted after a solid 30+ minutes of concentration while working through a recursion problem.  It all screeched to a stop.  I lost track of what was going on.  Everything I had been concentrating on was immediately dumped as a request for my attention came to assist in doing something else, something completely unrelated.  That 30 minutes of work was completely erased, only the skeletal remains left in actual code, that at least built, but was not working appropriately.  Everything I held in memory, the multiple memories I was using in my gray matter, each was catastrophically purged.

I then completed this alternate, non-related development task.  It was fun, I enjoyed it.

Now knew I?d have to step back into that 30 minutes of memory, and spend another 10 minutes just to get back to the point where I could continue with what I was working on.  I now faced the challenge of putting all of those multiple memories back into place, of remembering each and every piece of data that I held in my mind, and assure that each connection was once again related appropriately in my gray matter.

What was originally about 20-30 more minutes of work before the interruption, now grew into the 20-30 minutes plus the 10 or so minutes taken to reacquire the appropriate working state.  This happens to every developer, sometimes we can maintain our state, but mostly we?re completely ruined and must start by rebuilding our working state.

How many project managers, significant others, and generally the planet just disregards this fact?  Maybe people just don?t understand, even though it is inherent to the human process of thought.  Simply, anything requiring attention and thought cannot be interrupted without devastating consequences to the intended end result.

Digg It!DZone It!StumbleUponTechnoratiRedditDel.icio.usNewsVineFurlBlinkList

Posted by: Adron
Posted on: 2/8/2009 at 2:13 PM
Tags: , ,
Categories: Discussion Points or Ideas | Rants
Actions: E-mail | Kick it! | DZone it! | del.icio.us
Post Information: Permalink | Comments (0) | Post RSSRSS comment feed

You've GOT to be kidding me... ADO.NET Entity Framework no Guid Keys?!?

Here I am working through some ADO.NET Entity Framework samples and I come to a standard situation, a Guid as a key.  I generate the model and try to do inserts to no avail.  I start digging and stumble upon a Stack Overflow answer to this problem.  The answer states,

Unfortunately, in v1 of the EF this is not supported. While it is possible with SQL Server to have a column of type “uniqueidentifier” and to set it’s default value to be “newid()”, with SQL Server 2000 there’s no good way to extract the value that the server generated at the time you do the insert. This can be done on more recent versions of SQL Server, though, so the intent is that we should find a clean way to special case this support in future versions of the EF so it can be supported on those databases that allow it and not on others. For now, the work around is to generate the guid on the client (ideally in the constructor of your object) rather than on the server.

Ok.  This is stupid.  This is a STANDARD practice for many database teams and developers.  Sure, sure, someone would probably fuss and say, use an int or a bigint.  No, I don't want to, I have my reasons, and I want to use a Guid.  What other bloody purpose does a Guid really have anyway except to garauntee uniqueness!  Ugh.

This I see as a failure of ridiculous magnitudes.  Seriously Microsoft needs to get in gear, and STOP releasing stuff that is supposed to compete with well baked frameworks that is completely unprepared.  The only reason the stupid Entity Framework is getting any penetration is because there are those that won't touch something (no matter how great it is) until Microsoft releases one of their own.  There are reasons behind this too, albeit somewhat stupid.

Ok, rant over, I'm going to go fix my database and use a bunch of ints for now.

Digg It!DZone It!StumbleUponTechnoratiRedditDel.icio.usNewsVineFurlBlinkList

Posted by: Adron
Posted on: 12/27/2008 at 12:41 PM
Tags:
Categories: Rants
Actions: E-mail | Kick it! | DZone it! | del.icio.us
Post Information: Permalink | Comments (2) | Post RSSRSS comment feed

Unit Testing Microsoft's Way? :: Tip o' The Day

I really don't get the complexity Microsoft has put into their testing framework.  The basic testing class that one gets looks like this.

   1:  using System;
   2:  using System.Text;
   3:  using System.Collections.Generic;
   4:  using System.Linq;
   5:  using Microsoft.VisualStudio.TestTools.UnitTesting;
   6:   
   7:  namespace PipServices.Tests
   8:  {
   9:      /// <summary>
  10:      /// Summary description for UnitTest1
  11:      /// </summary>
  12:      [TestClass]
  13:      public class UnitTest1
  14:      {
  15:          public UnitTest1()
  16:          {
  17:              //
  18:              // TODO: Add constructor logic here
  19:              //
  20:          }
  21:   
  22:          private TestContext testContextInstance;
  23:   
  24:          /// <summary>
  25:          ///Gets or sets the test context which provides
  26:          ///information about and functionality for the current test run.
  27:          ///</summary>
  28:          public TestContext TestContext
  29:          {
  30:              get
  31:              {
  32:                  return testContextInstance;
  33:              }
  34:              set
  35:              {
  36:                  testContextInstance = value;
  37:              }
  38:          }
  39:   
  40:          #region Additional test attributes
  41:          //
  42:          // You can use the following additional attributes as you write your tests:
  43:          //
  44:          // Use ClassInitialize to run code before running the first test in the class
  45:          // [ClassInitialize()]
  46:          // public static void MyClassInitialize(TestContext testContext) { }
  47:          //
  48:          // Use ClassCleanup to run code after all tests in a class have run
  49:          // [ClassCleanup()]
  50:          // public static void MyClassCleanup() { }
  51:          //
  52:          // Use TestInitialize to run code before running each test 
  53:          // [TestInitialize()]
  54:          // public void MyTestInitialize() { }
  55:          //
  56:          // Use TestCleanup to run code after each test has run
  57:          // [TestCleanup()]
  58:          // public void MyTestCleanup() { }
  59:          //
  60:          #endregion
  61:   
  62:          [TestMethod]
  63:          public void TestMethod1()
  64:          {
  65:              //
  66:              // TODO: Add test logic    here
  67:              //
  68:          }
  69:      }
  70:  }

After clean up and removal of all the using statements and such that one does not need to start writing test, the class looks like this.

   1:  using Microsoft.VisualStudio.TestTools.UnitTesting;
   2:   
   3:  namespace PipServices.Tests
   4:  {
   5:      [TestClass]
   6:      public class UnitTest1
   7:      {
   8:          [TestMethod]
   9:          public void TestMethod1()
  10:          {
  11:          }
  12:      }
  13:  }

I'd love to know what the mentality was behind all that other stuff being added.

After the cleanup there is 13 lines of code versus 70.  The intention of unit tests is to be simple, straight forward, and effectively explain via code what the functional code does.  So why all the extra deluge of mess?  Also the excessive comments are not needed, the test itself needs to provide the description of the code functionality.  If the test doesn't do this it isn't a very good test.  If there is a bunch of documentation describing what the test does it absolutely isn't that useful of a test.  The likelihood that the test is not done in isolation increases exponentially when there is comments and such, and every time I see them I just shrug at what usually is a useless test.  I don't quit get that, but would be happy if anyone could add to the reasoning (or know of any good links that might explain).

Digg It!DZone It!StumbleUponTechnoratiRedditDel.icio.usNewsVineFurlBlinkList

Posted by: adron
Posted on: 12/14/2008 at 10:25 AM
Tags: ,
Categories: Just Stuff | Rants | Unit Testing
Actions: E-mail | Kick it! | DZone it! | del.icio.us
Post Information: Permalink | Comments (2) | Post RSSRSS comment feed