Welcome to VSTSC's Community Server Sign in | Join | Help

I received an 'advertisement' in my inbox today from one of my email subscriptions.

This is what is exactly what is wrong with our industry!  We have marketing ads like this that imply that more lines of code faster equates to a better product!  CIO's and managers who don't know any better think this is great.   Just plug it into your database and your done!   Why's it taking you so long to code that specification?   I thought you just had to use this new tool and you'd be done in 10 minutes?

So yeah, sure if you want an ERD driven, non-intuitive Alan Cooper nightmare, tools like this are a great option.  [Note: If you don't know who Alan Cooper is get off my blog now and go read his books because you are robbing yourself of precious knowledge that will take you further in your career than Agile, TDD, DI, or your CS degree will ever come close to doing. (The book 'Slack' falls in this category too, but that's another post.)]    But if you want an application that is going to stand the test of time, be flexible to the business needs, not require large amounts of work every time you tweak the database, or have any REAL business logic in it you're going to have to actually turn off the code generator from time to time, if not forever.   And by real business logic I'm not talking about a SSN must match the pattern \d{3}-\d{2}-\d{4} or some data validation rule like that but something real like 'if the user has poor credit rating with agency whose web service you use for credit look-ups but has made good payment to your company for the past 12 months then this product should be available to them as part of their service account otherwise a product from this other category should be available based upon how much usage of their service per month they have and whether they pay by automatic debit or send in their payment'.   Or: 'The system should allow different product to be available to different customers based upon whether the customer has called a company sales person and is looking for a product or has gone through the company public facing web site', and as a designer you don't want to maintain a whole different set of page or object for any of this.   The system should through black box magic 'know' what to do based upon the parameters entered.

As an industry we will never be successful and rid ourselves of much cheaper foreign competitors until we can drive out these folks who think that QUANTITY is what counts and that QUALITY should take a back seat.

As a friend of mine said in response to an email thread about this subject:

I can get more food at Golden Corral but it's certainly not better than a lot of places to eat.  I'd rather have a filet any day than a 1 lb sirloin.  This sounds like bloatware not software to me.  Buy your code in bulk at Sam's

I constantly hear (or read about) people bashing Microsoft and make a fuss that they need to unseal their classes in the core framework.  The reason usually being for testing because all other reasons are usually academic examples that nobody in their right mind would do in the real world.  I hear it over and over again and read it over and over again on blog posts.  I'll admit that maybe 1 out of 50 is a valid reason, but most are folks hopping on the bash Microsoft bandwagon IMO.  Those singularities usually could be worked around though by a change in design.

To me, unsealing a class for a mocking framework is like driving a car with no body or interior (just a frame with a steering wheel, pedals, and gear shifts stick through it) so your mechanic can work on it easier.  Of course this is then 'justified' that it's a 'better' car because the emergency brake cable is exposed and can easily be changed.

Mechanics spend $1000's of dollars on getting tools that make working on cars easier that doesn't require Ford/GM/Toyota/etc to make cars with no bodies.   Perhaps those whose argument has been for 'testing' sake should spend a couple of bucks on getting some better tools or invent one's.  Perhaps people making this claim are the equivalent of people who are trying to rebuild their engine with only hand tools they bought at the local parts store.   Sure they can do it, but it's going to be a mess of a job.   A real mechanic is going to have a arsenal of pneumatic tools made by a high quality manufacturer like Matco or Snap-On and most importantly a lift and engine jack.

Disclaimer:  This isn't about DI, this is about unsealing classes for testing.

0 Comments
Filed under:

Sometimes you just have to accept that it works, follow the recipe, and just use it rather than understand it.   I call it hitting the 'I believe' button.

Then an amazing thing happens; over time the more and more you use the technology or work with it, you'll come to learn how it actually works and understand it better than you ever would if just sat and tried to understand what you were doing before you started doing it.

It's a paradox, and definitely doesn't apply in many situations, but I've found certain things over the decade I've been doing this it has certainly applied to.

Okay, I know there are a lot of lovers of this IDE, but seriously it's been a royal PIA to use for this PHP work!

Maybe it's just because I've been using a top of the line IDE for the past 6 years and am use to things just being where you expect them to be and just working (like finding preferences under 'Options' instead of under 'Window' - WTF???). Around 80% of my learning PHP time is soley focused doing hand to hand combat with Eclipse on an hourly basis which has made the experience VERY frustrating.   Now I will admit that probably 50% of my complaints are just whining due to not being familiar with the tool - but the other 50% is purely frustration from the lack of intuitiveness in the tool and the amount of hoops you have to jump through to do the simplest things (like changing the start up page...instead of right-click -> Set As Start Up Page I have to open the hit the properties of the page, go to the run/debug settings, highlight the page again (even though I just right-clicked on it two steps ago), change the 'file' to location of the page that I want to be the start up page (oh and turn off auto-generate because for some reason Eclipse can't figure out that my project folder isn't part of URL even though in my build settings isn't absent from the build path). 

Oh, then there's the constant pop-ups of some java error which is the equivelent of the Windows HRESULT pop-up message (at least one an hour) - absolutely frustrating and serves no purpose to me what so ever.   Do me a fricken favor and do like Microsoft, log it, and then occassional just request to send the errors to the server - keep me out of the loop!!!

Does anyone out there who is familiar with working with VSTS have a product that they can recommend?  Is Zend Studio really all it's cracked up to be?   Is the cheap version that apparently plugs into Eclipse any good or is the only decent one the $1200 one?  I've said it before, and I serioulsy mean this, if the OS anti-Microsoft people ever want to convert the masses they need MUCH better tool sets; the tool set has been the single most limiting and frustrating part of their world.   Seriously, I'll drop $250 today if there is a decent one that allows me to get away from this frustration.

Any good developer (who's doing this for a living and not just a geek who's trying to make them feel superior to others by showing how well they can work with a complicated tool that others can't), knows it's all about the ease of the tool sets and will spend a few hours worth of labor in a heart-beat to save them hour upon hour of stupid frustrations like these.

Oh ditto with MySQL admin tool - that thing is a joke compared to SQL Server Management Studio - like working in the stone ages.   If you know of good admin tools for MySQL, pass those along too!

0 Comments
Filed under: ,

One of the many joys I get out of life is being able to get away from all the horrible politics of my day job and get a nice clear dark night to look at the stars.  Very relaxing.  Something that is actually fun.  A nice hobby where I feel I can go out and there is no competition, no stress of deadlines or watching your back for someone trying to sabatoge you. About a decade ago my thing was music, played guitar and got decent at it (was in the Army and had a lot of time for it), but now time is too short to think about it and I don't have the desire - maybe again some day if the inspiration strikes.   But now-a-days my thing is getting out and looking at the stars.   I always had a fascination with them, but it's an expensive hobby that sucks you in so I couldn't really afford it before - you need to count on dropping at least $500 to get started by the time you buy a decent starter scope and good eyepieces (they never come with good ones from everything I've heard - at least the lower end models).  Now that I'm minus one car payment and no longer have to buy formula (very expensive!) and have quit smoking (very expensive!) I have money to spend on the discretionary items.

This past winter I got a little 4.5" Newtonian which has served me quite well and some good eye pieces (that's where you'll initially drop a lot of cash, but a good EP makes all the difference).  Problem though is that light pollution makes finding some of the cooler things in the sky hard here in the suburbs.   I have a friend who lives in a place where you can see really well, but it's almost an hour drive on winding back roads on a good night - not fun to do at 1:00 am.   So recently I found a spot just as good that was much closer on the parkway.  I was able to catch a good glimpse, or as good as you're going to get in a 4.5", of M51 and M3.  M51 is a spiral galaxy that almost looks like it's feeding (or be fed from) another smaller spiral galaxy; Google the 'pretty' picture if you're interested, but for me they're just two cotton balls loosely connected - but still cool to see with your own eyes.   Light pollution here you can't really see at all.

Last night my in-laws were down and my father in-law brought his telescope that he really hadn't used yet to look at stars (he had gotton as a retirement gift); a nice little 70mm refractor, but good enough to see Saturn and its rings in (which is in a prime location right now - straight above you almost, a little south around 11:00 EST, just may be a couple degrees below the belly of Leo if you know your constellations - look for a yellowish star).  I also tried to show them M51 but it's too elusive to see in suburban skies, and only with averted vision am I able to make it out.   But on the cool side I showed them M3 (a global cluster) which does 'okay' in suburbia, and then was finally able to track down M13 which is a 'cooler' GC.  I think my father in-law was really happy to be able to use his telescope for something other than bird watching.

Interestingly enough I was unable to find M13 the previous night in 'better' skies where the sight would've been much cooler.  I've found that I've gotten so use to light pollution that when you throw me in an environment where my limiting magnitude goes from 4.2 on an exceptional night (average here I'd say is probably 3.1) to mid 5's or even 6's that all those stars makes it REALLY hard to find the 'road signs' your use to using as your 'start points'.   And that is what made it so hard for me to find M13; I made out Bootes and the Corona Borealis, and I knew where Hercules was suppose to be, but I just couldn't find the trapezoid that made up his body in order to find M13 - there were too many stars!

So I know this post has absolutely nothing to do with programming or computers of any sort, it's cool geeky stuff that some of you might find pleasurable, and if so clear skies to you!  Not to mention it's a blog for Brian not a 'Brian's programming diary' which would be utterly mind numbing.

0 Comments
Filed under:
I was asked 'how much does it cost to get the last 15% of code coverage?', which also led to the question of 'how much does a unit test cost?'   So I went on a mission to determine this.

For this post, substitute $$ for whatever your hourly rate is, or your companies 'billable' rate, or any 'constant' number that represents a cost per hour rate.   For this post, to keep things simple on math I'll use $60 for my $$ constant for our fictious company we'll use as an example.

So let's use a project I'm working on which is an average project of average size and complexity for my skill set to get the time per test which we can use with our constant to determine our cost per test.  Based upon my development time that has been logged on that project and the number of unit tests in that project, assuming all I’ve done is wrote unit tests, no new screens, no stored procedures, no tables, no integration of external libraries or services, no reusable components created, etc; the cost of EACH unit test would be 12 minutes or using our variable for $$ this equates to $12.00/test.

Ok, now let’s be slightly more realistic and say I spent 50% of my time doing tests.  Probably still high, but some books/white papers I've read might suggest that is how much of your coding time might be writing unit tests.  This change lowers the cost to $6.00/test.

Next, let's look at the cost of the bug.   There's the time it takes for the user to report the bug (assuming theu doesn't think it's their mistake and they try several times before reporting), the time it takes for the whomever handles the call from the user to enter the bug into your tracking system, the time it takes to reproduce and verify the bug, the time it takes to fix, deploy to your QA department or equivelant, QA to test the fix, and deploy to product the fix for the bug.  And let's assume you got it fixed right the first time.   So a totally unrealistic best cost of a bug would be 2 hours (and I feel I'm being EXTREMELY generous here), using our constant would be $240.  If you don't feel '2 hours' is accurate, substitute a time you think is appropriate and adjust the numbers below.   But I urge you to look at all of your bugs for the past year and see what the TOTAL average is, not just the 'developer coding' average for time submitted against it.

In the cost of $240 using the rate we mentioned above, using the average cost of a test we determined above ($6.00), we could have wrote 40 unit tests.

All it takes is 1 bug to cost our fictitious company at least $240 using these numbers, which is nothing to a company.   Lets say there where 25 bugs for the year (extremely good year for most companies I've worked at), now we're talking $6000, and that's just ONE application.  In reality we all know that often a bug takes a lot longer than 2 cumulative hours between all parties involved to fix a bug from start to stop and most companies that don't have good testing departments/practices surpass 25 bugs per year easily.  

All it costs our fictitious company to write a single unit test that would’ve potentially caught that single bug is $6, or $150 for all 25 for the year (assuming one unit test would've caught each bug).  So we can say that a bug cost 40X that of a unit test that would've caught the bug to begin with.  Or to put it another way, writing the unit test instead of allowing the single bug it covered to go to production could have been a cost savings of 3900% to our fictitious company.

So now, the question of code coverage – how much does it cost to get that last 15% of code coverage.   Take the number of tests it would take to cover that 15% and multiply it by $6 (using our constant) and there is your cost.   To know how much it potentially cost our fictitous company not to have that coverage and have it show up as bug, take the number of tests it would’ve took to get 100% coverage and multiply that by $240 because each of those paths is a potential bug.

Let’s say it would take 20 tests to cover that last 15%.   This would cost the company $120.   On the flip side, not to have it could cost our fictitious company as much as $4800 worst case where a unique SINGLE bug would've been caught by each of the 20 tests and fixed the first time.

Now these are the extremes and averages and rely on using my average test writing time for this particular project (which happens to be close to the average with 'suggested' average unit test writing time I've seen in books).   Certainly there are cases where 15% coverage won’t cost the company a dime and tests that cost more than our fictitous $6/test, just as there are ones that will barely cost a dime.   But at the same time, we also have keep in mind those bugs that have 20, 30, 50 hours on them which cost our theoritical company thousands; we all have had them and don't pretend you haven't!   Really, it’s all a gamble, that at $6/test on average in comparission to $120 for a bug I’m not willing to take if at all possible unless I can say definitively some other way that the 15% isn’t a risk.   This also doesn’t mean bugs won’t be found as there are no silver bullets, but I rather have the unit tests there and have the confidence that I covered everything rather as much as possible at the time than putting it out there and seeing what happens and hoping for the best.

Unit testing is all about safety and confidence.   If your building where you work was missing 15% of it's fire saftey features, would you feel comfortable there?   What was in that 15% that's not covered?   The sprinkler automatic valve that release the water?   The alarm siren that goes off?   The automatic movement to the first floor and shut down of your elevators?  How confident would you be in your safety there?   Would you just sit there while you smelt smoke coming from the office kitchen and say 'well we'll see what happens, may not be a fire, maybe burnt popcorn in the microwave'?   I guess that's okay to do if you're on the first floor near an exit, or your going to stop what your doing and go manually check each time you 'think' something might be a problem.

Just some things to think about.   I emplore anyone who would disagree with the statement of 'not writing a test costs more than writing a test in a enterprise application' to post their comments as I'd be very interested to here about that and meet what is apparently the perfect programmer or near perfect programmer who can find, fix, and deploy bugs nearly the instant they are found.

For those who will say 'but what about the maintenance costs of unit tests?'.   I'll say the same thing I read in a very good book by Roy Osherove - the only time a test should fail or require changing is because of requirements changes.  It's that simple.   So your question now is essentially 'but what about the maintenance costs of changing requirements?' - and that has been answered in twice as many books as there are on the cost saving of unit testing.   In short, please show me list that contains 1/20th the amount of printed books on why you shouldn't have unit tests as there are on why you should and I might entertain a response to your question.
0 Comments
Filed under:

Until version 5.0.2 I think it was, it apparently was legitimate to put the date of 2/30/2009 or any other day in February that didn't actually exist (some > 28 on non-leap years or > 29 on leap years).   I don't know if that's true or not, read it in a book, but if it is - WOW!   Glad that was fixed (too bad it was missed/delayed in versions 1 - 4!)

But again, not to poke too much fun, MySQL does have this 'LIMIT' function which I just love:

SELECT * FROM table WHERE whatever = "whatever" ORDER BY something LIMIT 20, 10

It's so clean and simple.  This is effectively giving you page 3 of data in a result set that is being paged by 10 records at a time.   I love the simplicity of it, and sure, it's still doing the full SELECT, but it doesn't show as a performance hit on any tables I'm working with.   Since PHP is very 'data' driven language I can see why these two play so nicely together.  I've heard a similar feature exists in Oracle, but I really think this should be standard in all databases where it isn't already.

They also have the ability to SHA1 encrypt a value as built in function so you *could* encrypt at the database on an insert if you wanted to, think it also has MD5???   Regardless, nice little bonus feature/function; maybe it exists in other worlds (MS) but I haven't run across it yet - I'm sure somebody will let me know one way or another on that.   And again, with PHP being such a 'data' driven language I can see where this works well.

Stupid stuff I know that most people wouldn't car about, but all part of the fun of learning something new for me.

0 Comments
Filed under:
  1. Writing unit tests?
  2. Doing design
  3. Having requirements that meet the 12 basic system requirements specifications

I have probably found countly white papers and read a stack of books in the past 5 years alone that speak at length of the benefits of unit testing.   Yet I've never seen one shred of evidence to support that a system without them is better.   Yet I run into people constantly who fight tooth and nail against them but can't offer a shred of evidence from industry experts to show that there is no value or why they shouldn't be done.   When you show them the evidence of it success' written and backed by the top 10% of the industry, the fortune 10 software companies, etc, etc, they like to say 'well we're not them'.   Well gee, you wonder why your software is buggy, takes forever to develop, is fragile as anything, and sits in a revolving door of bugs?   I mean to me it's common sense, but then they say that common sense is an oxy moron so what do I know.

So am I nuts in thinking that just because you have tenure at a company that it doesn't excuse you from writing documentation for others to have (or yourself to reference for that matter)?   Sure, you've all been on the team for a while but hey, we've all driven cars for a while, I guess auto-manufacturers shouldn't be required to put owners manuals in cars anymore.  Hey Microsoft - it's okay if you don't send help files with your next version of SQL Server - we've been using it for 10 years - we don't need it!    We have a certain level of knowledge and we should be able to just 'figure it out'.

And my favorite - 'it's okay that we have crappy requirements, the developer knows what to do'.   That is just so baseless of an arguement I don't even know where to begin.   That's the equivelent of saying, I don't need to check my oil - the oil light will come on if there's problem (which by the way when that oil light comes on, your usually almost out of oil and there is already severe damage to your engine at this point).  No, actually, it's worse than than that; I just can't come up with a good anology.

1 Comments
Filed under:

So last night the install went fine after I changed the port (if you remember that's where I left off).   Thought I was good.   Nope, today went to my hello world only to find a 404 message.  

I opened my XXAMP control panel and saw Apache wasn't running, weird.   Clicked 'Start' and nothing happened.   Weirder.   Opened up the admin 'Services' tool to start Apache from there - error when trying to start.   Okay, well that's something at least.   Look in event viewer - can't bind to port 443 (I was hoping to find the error in the apache log file so I wouldn't have to use that pesky GUI based tool, but I guess there's config file I don't have set up correctly somewhere because it's log file was blank).   Okay, no biggie, let me just change the SSL port like I did for port 80.

So now Apache starts.   I decide I don't like the port I'm using for non HTTP, stop the service and change the config.   But now I'm getting errors saying that the new SSL port can't be bound too - WTF?. So apparently Apache is sticky and doesn't like you changing things without rebooting.  After a reboot I was good (and yes the apache services and everything using it was stopped!  Of course I checked that first).   So today, I have Apache officially running on my machine (along with MySQL) and after a reboot everything seems okay.

One other thing, I assume you realize this, but just to point out anyway and have some fun: I had to be a real programmer to do this - no wimpy GUI's for me - I went pseudo hard-core and used Notepad for this!   Woohoo - I rock!   I can use a basic text editor to configure something in a couple of buried files over the course of 20 minutes (15 minutes was searching for the darn things) that would've taken me 5 minutes in in the IIS GUI admin tool - take that Microsoft and your dumbed down GUI's!

In all seriousness though, once I got through this hassle with the config files (for this round) things have been pretty smooth.  The start page for XXAMP notifies you what you don't have secured by default (funny when Microsoft does that they're being irresponsible because they're giving the users an insecure system, but then when they lock down Vista their being big brother).   The start page goes on to gives you some instructions/help on fixing those items which was I though was pretty cool; in fact one just is a 'take me to the Wizard' type of thing which I have to admit is better than when Microsoft product pop-open a help file to step you through things that they could've easily created a wizard for.  Although on one particular item I got quite the chuckle out of:

[quote]

  • For FileZilla FTP und Mercury Mail, you must fix all security problems by yourself! Sorry.

 [/quote]

Could you imagine this popping up when you were configuring Exchange Server?   Now that would be hoot!   But hey, it was free, I can't complain right?  And in fairness it does take a considerable amount of effort to put together such a large package (and do it for free) and I know the guys/gals who worked on this probably in reality could run circles around me on a level playing field; I'm just poking fun.

0 Comments
Filed under:

So no, you're not on the wrong blog.   Yes, even though I am a faithful follower of all things that come from Redmond and bare the seal of Microsoft I'm doing some side work in PHP w/MySQL.   And how interesting of an experience it has been!   I'm doing this for my church which is in a serious need to get out of 1992 and into the modern era of web pages.   It's a great church and should have a great web site; well I'm doing this - so we'll live with 'okay website' for now.  There are reasons I'm not going to go into, but in the end the decision was made that we're going to go with PHP with MySQL.   As a developer I find this a nice opportunity to get into a language I've only read about and do something 'real world' (or close enough) with it.   I am a Microsoft guy, but I know there are plenty of things just as capable out there and have long passed that naive stage that so many get stuck in of 'anti-something' because it's not what they're used to or they have some sort of bad history with it or it's not accepted in the 'cool kids club'.   So going into this my mind is open and ready to try something totally out of my comfort zone.   Plus, it's a good excuse to become more familiar with jQuery (I'm lazy at work and use UpdatePanel for everything because we're on the LAN).

So first, let me just say PHP itself isn't a hard language or a bad language; I mean come-on, any of us who have been doing this for any length of time know that a language is just a language and you can write a crappy program full of bugs in any of them; I don't find it any hard or any easier than C# syntatically.   I do find some things frustrating but that's more being a new user of the language.   For instance, they don't really have arrays in PHP; an array in PHP is basically a dictionary in the .NET world - but that's just a simple thing to remember; a syntax thing that in the end doesn't matter.   My real frustration has been in tool support and setup.

So let me tell you about my experience setting up PHP:

The PHP web site (or README, I don't remember which) recommends that you not use an installer, that you set it up using the install text file and then proceeds to goes off on a little 'holier than thou' bit about 'by doing so you'll understand the software you are installing' blah blah blah.   Whatever!   Seriously folks - installers exist for a reason - I DON'T CARE how to install it if it doesn't involve 'Next...next...next...Finish'.   Ok, so I'm not a real programmer in you're mind - but I still make a very good living writing applications with all my fancy GUI based tools - so whatever!   And if I have to, like I did with this PHP install, I can follow instrucitons - but why would anyone in their right mind do this!?  

Put it like this; for a number of years, before I was in the Army I was a mechanic.   There's virtually nothing I couldn't fix on a car (provided I had the tools and proper manuals), but I still take my car to trusted shops to get it fixed when needed (unless the pricing is too high).   And that I think is the crux of it all.   These people don't care about being a real programmer; there just too darn cheap to pay Microsoft the very small fees that they get for what they deliver, so they glorify themselves by saying it's real programming!   Can you imagine how many copies of Money Microsoft would sell if they manually made you install services, add registry keys, set environment variables, and manually update config files!   Or for the Redmond basher, you could say the same about Quicken or any other home finacial tool.   Seriously!

So anyway, I read through the install instructions line for line and got my Hello World in php going.   This took about an hour (the install, not the Hello World - that was like 30 seconds).   Except one thing...I kept getting these two 'error in Unknown Module at line 0' printed at the top of the page (very helpful descriptive error message btw for those who say Microsoft error message suck).   Google resulted in zilch (which is rare) other than other PHP pages that had the same error (and there were a lot).  So I call up a friend of mine who works 80% on PHP, the other 20% in Pearl, teaches CS for a living, and in general is a pretty darn smart guy in the OS world.  He says it's probably because I'm trying to run PHP on IIS.   So I say, but yeah...the whole big thing that the open source community jumps all over is that PHP is cross platform - it's not like .NET which has to run on IIS (which isn't true if you're using Mono on Apache by the way).   He goes, 'yeah but you know Microsoft doesn't play friendly with other competitors', to which I say 'the hell it doesn't - when something isn't working right in the JVM people jump all over it because 'Microsoft is being incompatible' and it gets fixed - so why isn't PHP doing this for IIS?  Who do I call for support?   The forums just say I need to install Apache.   I don't want Apache on my machine.   This is suppose to work on IIS and dang it I want to see it work on IIS!  Furthermore why did PHP guilt me into doing all this manual set-up crap which is probably where I (through human error) caused some sort of problem that can now only be found by a PHP guru?!   He hawed and himmed for a minute or two and finally convinced me to undo what I did (great - more manual steps) and use XAMPP.  Don't get me wrong, he's a great guy and we both enjoy these kind of spirted conversations and he finally talked me into installing Apache (via the XAMPP) install, but I can't say I'm happy about having Apache on my precious machine.   I feel dirty and guilty just saying it.

The XAMPP install went well if not long because it wants to tell you about every file it's extracting as if you care - but to not do that might appear Microsoft like and we can't have that.   The only issue was changing the Apache default port (IIS is not about to take second seat on my computer!), but after Googling, I found the correct config file to alter it to 81.   What, you thought they'd actually have a configuration window to do this in like in IIS?  (in geeky anti-Microsoft Unix hacker voice) Shah, right!   I do like how XAMPP comes with a little minimilist control panel for shutting Apache, MySQL, and others, down so that it doesn't have to run as service, but you can if you want to.   From the developer aspect, I think that's great.   From the network admin aspect (what I did prior to programming) I'd never want the option for it to not be a service, but to each his own.

Ugh.   Anyway, that's where I'm at now - as the journey continues I'll post more - I think the next blog post will be on IDE's - so far that has been an absolute nightmare subject.   But you know what they say - you get what you pay for (do you ever - I'm looking at you Eclipse!) - except in the case where I'm looking at paid products that can't even hold a candle stick to VSTS and certainly are worth the $250+ they're charging.   heck they can't hold a candle to the Express editions.   But I guess I'm just being a spoiled brat and not a real programmer.   Maybe I should break out some punch cards.

0 Comments
Filed under:

Yesterday morning I got my new XPS M1730.   I spent the next 6 hours loading Visual Studio, MSDN, add-ons for Visual Studio and other software.  Then using HijackThis! I went and removed all the crap Dell puts in at start up - why the heck do they do that anyway?   I mean there's nothing worse than getting a brand new machine with a 2.5 Duo/4GB or RAM/7600 RPM drive take forever to boot up because Dell has to wrap 'Network Connection' in their own GUI (which is less user friendly than the Windows one), their own 'Power' and 'Display' GUI (again, worse than Windows) and just other needless pointless crap.   As a programmer I can say that they definitely are doing some gold-plating there! I digress though...basically in the end I spent about 5 hours getting *my* stuff installed and tweaking the install from the factory.   Doing all this I missed the initial 'back-up' time frame on WHS, but something told me at the end of the night to go ahead and do a manual back-up instead of waiting until tomorrow afternoon when it would automatically be backed up.   Dell comes with a free year of 'data back-up' but why bother when you have WHS - another item removed from start up by HijackThis! (man I still love that tool after all these years!)

So this morning I was adding all the updates for Windows and Office.  After reboot I got the good old BSOD...figures.  Tried safe mode - BSOD...that's bad.  Tried again to make sure.  Yup - she's a gonner.

In the past I'd be cursing up storm, having a major coronary, and in short just be really miserable (and the world would know it - believe me).  But, I have WHS - not just a simple data back up, not a manually ghosting program.  So I pop-in the restore CD, hard-wire into the GB router and 9 minutes later, full system restore to where I was last night.   Sweet!  Sure the heck beats going through the Dell disc restore PIA and then another 6 hours getting the system back to what it was.

This is 2nd time WHS has saved my rear!  So to all you haters out there who think Redmond and Microsoft are evil - suck it!

Preface - as a note, at my job we all work remotely in different areas and do most of our communication via IM and phone (yet we still manage to write decent software despite what some would say about that being possible).

One of our uppers has been helping steer the ship where we've been banging the drums on and we've finally gotten to the point where we've got some of our bigger previous obstacles out of the way.   These and other things that have been helping us move in the right direction allowed us to finally start doing 'technical documentation' at the level we want to.   Yeah, I actually like documenting what I do versus cowboying it out.   Paper on a computer erases pretty cheaply and doesn't take long to write or update.

Anyway, me and and one of the guys were IMing and I asked if he needed some work (we've been slow during the holidays and we follow a defined process so we can't just go working on something that isn't approved).   He did, so I sent him some design documents I had been working on in UModel, we briefly chatted on it (like 2 minutes) and he set off to work.

Later on he IM's me and asks if on my copy of the development path we were on (we work on several branches at once - our build and config management is very sound, so this isn't a problem for us) I had created a certain folder yet to hold a new set of class in a new namespace.  I told him I hadn't and that he could go ahead and do it.   It then occurred to me, even though we didn't discuss it, because he had a design document to refer to, I didn't have to tell him to make a folder for these new classes and that they would be part of a certain namespace and would be structured a certain way.  He just knew to do it, we didn't have to babysit each other.   It's been a while since I've been able to work so effortlessly like that, so I forgot how nice that is.  

So I realize this and say 'hey, you know what, we didn't have to spend a long drawn out session talking about this - you just got right down to it'.   He said 'yup'.   And I just said - 'wow, we got good requirements from our BA's, we got a design to refer to, and we're just coding and writing unit tests - man - we should write a book about that and revolutionize the industry; you can write software without just going out and 'doing it' and have something to refer back to when there's a question'.   We both laughed at it and continued happily about our day.

This person is a good developer so I know any changes he needs to make for the tests he creates along the way will make it back into the final design.   Some he'll do before he writes the code, some he'll do after - regardless we'll have 100% code coverage in the end and each test will run under a second and not be coupled to other objects, data, state, etc.

The point of that I want people to take away is to note that I'm not rigidly following any 'pattern' here, I'm just doing what works for this particular project, in this particular setting, for this particular set of developers.  I could easily do this a totally different way if I was part of a different group of people (in fact I have).   My fellow developer in this case isn't following a particular pattern either in the way he writes the code.  But in the end our code will be covered by tests, be extensible (by design) and I know when we do code reviews I'll see good comments and structure.

I guess I'm just going back to what I say to people over and over again: It's people, not process.  It's dicipline, not rules.  It's art, not instruction booklets.  It's the bell-curve, not the purists.

Just food for thought.   Flame on those who want to poke holes.

 

I managed to upset somebody on their blog and felt there wrath for it here.  I wasn't trying to do that, he's a pretty smart guy whom I respect and read his articles often.  But alas, as all who know me well, know that I speak my mind and at some point or another it rubs somebody wrong because I don't word it correctly or hit a nerve with them.  Developers aren't exactly well known for their people skills (especially me) and I think we worked it out like gentlemen in the end as a misunderstanding.

Well anyway, at the source I think Jeremy's response sum's up the point I was trying to make:

Ok, but I would say that that's a matter of design, or at least of using "Testability" as a design heuristic and/or design goal.

This is what I was getting at and where I tend to rub people the wrong way when I don't jump on board whole heartily with the TDD philosophy (I believe in it and support it, but it isn't a cure-all).  Many, in my opinion, have (or appear to have IMO) this exclusive 'and' relationship in regards to testing and design; or at least when I read there posts, that's what it sounds like, and this is their pitch behind TDD; that a 'good design' is facilitated by TDD.  I disagree with this (to a point) but not to digress I'll bite my tongue for a minute, but to be clear and avoid being chastised: that doesn't mean I'm saying TDD doesn't work, but I wouldn't expect somebody to let 'RUP faciliates good design' or 'XP facilitates good design', or 'SCRUM facilitates good design' fly either if I blogged it here as I don't believe in process being a factor to success or good design, but that people are - and that's all I'm saying.

So lets look at the scenario that I think gets people into trouble sometimes: 

You come into a shop of 'gray-beards', and start talking about their design 'isn't as good as it could be' had they used TDD and you begin to show them all this 'great methodology' that allows you to write a test that fails, then write code until it passes, lather, rinse, and repeat and by doing this they're going to have a better designed and stable system in the end.   The gray-beards, who've been doing this since the late 70's (or earlier) and probably dated your mother, say 'well that's nice but we don't do that here' or say 'how that's better?'.    In your frustration, you didn't notice that they see as much value in testing as you do, but their testing methodology isn't the same, so therefore friction is created when they don't 'get it'.   They like the idea of having 'quick/fast/isolated' tests, and see value in it - to a point, but they're not about to give up design patterns which despite what your telling them has gotten them through the past few decades of their career in more languages than you can count just to implement some 'fad' (in there minds - not mine) way of testing that forces them down a certain design path that they have no interest in either for various reasons.  So by doing this you've effectively killed TDD from ever being implemented at that particular shop because (and I'm well educated in this subject) rubbed people the wrong way.  The rift that has been created can only grow larger if you go out on your blog and start pointing to these people saying they are part of the problem.

Now here's how to have a better chance of success (as I have learned the hard way):

Sell the 'good tests' part of TDD.  Sell that you want tests that are isolated (don't require length set ups, or database management), durable (tests that are against functional points of the system, not implementation aspects), repeatable (anyone can run at anytime), fast (run in less than a second in most cases), and maintainable (very few lines of code).  Demonstrate that capability using their design patterns and you'll have them hooked because you will of shown them how to cover their rears without having to jump through hoops (in their mind) to do it.  As they start doing this kind of testing themselves, they will naturally gravitate to more testable design patterns which we all want in the end.

Now based upon burning myself a few times, and pissing some gray beards off (again, my people skills aren't the best), I've learned to be 'open' to whatever works for a particular shop; let's say I've learned that there is a delicate curve between being a salesman and being a telemarketer, and I've had experiences where myself or some other individual came off more as telemarketers than process champions.  I have found now, that when I let those who may otherwise immediately reject TDD as a whole because it's too fundamentally different, instead focus on just writing good tests, they're more likely to play along. 

So my point to all of this is exactly what Jeremy brought up - I use testing as design goal, rather than design as a testing goal - and that's where many who tried and failed to sell TDD hit a rock I think.   Testability is a goal that all design school of thoughts can get on board with, make that your common ground (get good tests that run fast, test one thing, are maintainable, don't rely on external data/classes, etc).  Then once that is hardened and dried, look towards the test first design and other aspects of TDD (test often, write failing test and then code until it passes, write more tests that fail, etc).


 

0 Comments
Filed under: