Updates from January, 2013 Toggle Comment Threads | Keyboard Shortcuts

  • Steve Lydford 12:44 am on January 31, 2013 Permalink | Reply
    Tags:   

    YAGNAC – Why we should all be building sheds… 

    “… it is simplicity that is difficult to make.” – Bertholdt Brecht

    Developers are creative people; we love to build stuff. We all spend our days, and sometimes our nights too, building stuff. Building stuff is what we do best, often we just can’t help ourselves.

    And therein lies the problem. Let me say it again:

    “often we just can’t help ourselves.”

     

    How often have you seen code-bases where developers have been let loose to just build “stuff”? This can manifest itself in any number of ways; huge amounts of abstraction, nightmarish levels of inheritance or code which has been made ridiculously generic in the name of re-use, to name but a few.

    Blindly following “good software engineering principles”1 can lead to some horribly unreadable and unmaintainable code. Take the “Don’t Repeat Yourself” principle for example. We all know that good code is DRY, right? But the key to this principle is the avoidance of repetition. The clue is in the name; if there is no repetition, it doesn’t apply. Trust me, you will know when a piece of code needs to be DRY – it will happen just at the point you are going to repeat yourself.

    Remember, it is called “refactor”, not “pre-factor”.

    Let’s spend a moment thinking about another prime cause of unreadable and unmaintainable code – unnecessary implementation of design patterns. Now don’t get me wrong, design patterns can be very useful aids to software development. But they are just that, an aid. Patterns should be implemented when a need for them has been positively identified, not because someone once told you, “that’s the way it should be done”.

    In fact, take one of the most common design patterns – Inversion of Control. Overuse of IoC/Dependency Injection can lead to code which is horrendously difficult to maintain and debug. .NET developers who have encountered this pattern will no doubt have come across this, infamously hard to debug, little beauty:

    No parameterless constructor defined for this object.

    Many of you will have used, or at least be aware of StructureMap. It is a well-regarded Dependency Injection / Inversion of Control tool for .Net that can be used to improve the architectural qualities of an object oriented system by reducing the mechanical costs of good design techniques”. However, a brief scan of the StructureMap home page itself reveals some useful guidance:

    Do not use StructureMap if an application or process requires little flexibility. The abstraction and indirection afforded by StructureMap is unnecessary and even harmful in simpler systems or processes. 

    DI should stand for Dependency Injection, not Developer Indirection.


    YAGNAC

    I am sure we are not alone. Imagine giving a building architect the following brief: “I just got a great new lawnmower. I would like you to design me a great building to go with it”. That is it; no budget, no use cases, no specification of building materials, no sort of high-level design, no other requirements. If the architect constructed the building in the same way that much software is built you could easily end up with something like this:

    cathedral

    There can be no doubting the skill of the architect. After all, it is a beautiful, classic design, built from the finest materials by master craftsmen. However, it is slightly over-the-top if the “great building” you wanted was one in which you simply intended to store your lawnmower and nothing more. The optimal design would probably look more like this:

    shed

    The architect’s design, while it would amply fulfil the function, would be immeasurably more complex, take much longer to construct, be harder to maintain, take up way more room and be vastly more expensive.

    So who’s fault would this be? Is it your fault, or the fault of the architect? Well, the simple answer is both – you for not stipulating sufficient constraints and the architect for building way too much stuff. But, in the same way as software developers, architects just love to build stuff.

    So how does this apply to software projects? It is imperative that the people responsible for the solution design provide a clear definition of requirements and constraints, and the people responsible for the implementation of the design (i.e. the software developers) need to learn to build sheds where a shed is all that is required.

    Simply put: YAGNAC – You Ain’t Gonna Need A Cathedral.

    Further reading:

    Reuse Myth – can you afford reusable code? – Allan Kelly

    Cargo cult programming – Wikipedia

    Why I Hate Frameworks – Joel Spolsky

     

    1 to be read in a high-pitched nasally whine

    Digg This
    Reddit This
    Stumble Now!
    Buzz This
    Vote on DZone
    Share on Facebook
    Bookmark this on Delicious
    Kick It on DotNetKicks.com
    Shout it
    Share on LinkedIn
    Bookmark this on Technorati
    Post on Twitter
    Google Buzz (aka. Google Reader)
     
    • Deborahnvd 4:49 am on April 10, 2013 Permalink

      pilsner glass retractors ge monogram cooktops free reverse cell number search french soap motorola hf 850 rb2129 peritoneal dialysis cycler restless natives jeremyganss ルブタン
      バーバリー 財布
      nintendo joystick rash guards platos republic sony fd lian li v2000 シャネル 店舗
      far cry: instincts predator price right silver claddagh rings ryobi bts20 panasonic batteries dual turntables” scanner large format clear box holo screen raised

    • escacethuntee 5:20 am on April 10, 2013 Permalink

      Your place is valueble for me. Thanks!

      christian louboutin 2012

      http://cheapsredsoleshoesa.humorme.info

    • Semenax in canada 11:04 am on April 18, 2013 Permalink

      ofoepcmph/tufwfmzegpse/dpn, Semenax sperm production booster, OrRoTqU, [url=http://aboutsemenax.com/]Shop semenax[/url], kGFPRsz, http://aboutsemenax.com/ Semenax user, KOAfusE.

    • Fioricet cheap 11:17 am on April 18, 2013 Permalink

      bxqnycmph/tufwfmzegpse/dpn, Can fioricet be used for anything other than migraine headaches, NlHAHmf, [url=http://www.fioriceta.com/]Snorting fioricet[/url], ACrWSsY, http://www.fioriceta.com/ Fioricet urine test, PQDKtjb.

    • IdedayAttaina 4:34 am on April 21, 2013 Permalink

      Can who know, seem in Tang San’s palm the vacuum force of having a kind of oddity, Tang Yu Zhi feels shoulder one hemp, the soul dint that coagulate by oneself inside the body unexpectedly has already been limited and descends a moment, and he drives fog to generally fly like Teng cloud in the surprised noise of shouting.
      Nature not the ability moved out of the way so.”Night cloud and night rain in every mulberry purse aspect and mutually Qu, at present this weird felling again shocked their hearts.See finish back battle armor, the master carefully observed Tang San to take place to change again of eight Zhu pikes, eight Zhu pikes superficially exaggerate 1 F thick invite the inch allow of blood-red color and red long grass, the bloody breathing of the improbity is very heavy, cautiously see.
      Blue gold color ground the mulberry sale figure float however arrived at that demon killer whale king’s body hugely just above, the icy cold look in the eyes has no half emotion motion for cent, in the palm.Suddenly.
      In the such real strenght mulberry handbags in front, at present soul teacher of these lower classes is in his in front originally like mole cricket and ant general, want to kill off them, really like explore a bag to take a thing generally easy.

  • Steve Lydford 11:18 am on February 3, 2011 Permalink | Reply
    Tags: ,   

    What’s Happening to Reflector? 

    So Red Gate have made the announcement that the next version of their excellent Reflector application will be a “paid for” product. This is OK, I totally understand the reasons for this – they have a business to run and have tried the free model, but it’s just not working out for them.

    Neil Davidson, Co-CEO of Red Gate Software said this in an “Open Letter to the .NET Community“:

    “As many of you know, our original intention was to maintain .NET Reflector as a free tool. But, after two-and-a-half years of providing it without charge, we realized that we could not make the free model work. We know that this will cause pain for some people in the .NET community, and we apologize for the change in policy.”

    So my initial thoughts were, “You know what? It’s only $35 and I have been using it free for a couple of years, so I’ll take the hit if I want to upgrade. No hard feelings.”

    And then I read this in the FAQs:

    “A free version will be available for download until the release of Version 7, scheduled for early March. The free version will continue working until May 30, 2011.”

    So the version I have on my machine will cease to function on the 30th May!

    I will spend $35 on the new version, but I won’t be happy doing it, I have little choice. I like Reflector, a lot of people do. It is a very useful tool for looking behind the scenes of an assembly to see whats going on (both for debugging and educational purposes). I recommended it as an essential .NET development tool in my last blog post.

    In my opinion, disabling the free version of the software on 30th May is not a good way to go. Why not make the new version so awesome that I NEED it? Don’t FORCE me to begrudgingly pay you money – make me WANT to pay you for an even better product. Maybe the new release is going to be that good, but let me decide for myself.

    You have only got to look at Twitter or search around a few blogs to see that this has already annoyed a lot of people. All that Red Gate is doing is giving someone the incentive to start, or improve an existing Open Source project (like Monoflector) to give equivalent functionality because they don’t give out a free version anymore. Someone could make a big name for themselves by writing the new Reflector.

    I hope that Red Gate have a strategy re-think. Reflect on it, if you will.

    Digg This
    Reddit This
    Stumble Now!
    Buzz This
    Vote on DZone
    Share on Facebook
    Bookmark this on Delicious
    Kick It on DotNetKicks.com
    Shout it
    Share on LinkedIn
    Bookmark this on Technorati
    Post on Twitter
    Google Buzz (aka. Google Reader)
     
    • Alex 9:32 pm on February 4, 2011 Permalink

      Well, JetBrains has ‘hinted’ at the fact that they may be including a ‘Reflector’ in ReSharper. It’s also not free, but if you already are using ReSharper (like me), it’s one less thing to buy…

  • Steve Lydford 1:27 pm on October 4, 2010 Permalink | Reply
    Tags:   

    HTML5: The Facts And The Myths 

    Just stumbled upon a great article about HTML5. It is basically an FAQ putting all the myths and rumours to bed. Take a look.

    http://www.smashingmagazine.com/2010/09/23/html5-the-facts-and-the-myths/

    See, it’s not going to be as hard as you thought is it!

    Digg This
    Reddit This
    Stumble Now!
    Buzz This
    Vote on DZone
    Share on Facebook
    Bookmark this on Delicious
    Kick It on DotNetKicks.com
    Shout it
    Share on LinkedIn
    Bookmark this on Technorati
    Post on Twitter
    Google Buzz (aka. Google Reader)
     
  • Steve Lydford 11:48 am on September 15, 2010 Permalink | Reply
    Tags:   

    MSDN UK got a facelift 

    This is the first of two very quick posts to share some stuff I stumbled across today on the web.

    I just happened to browse to the UK MSDN homepage and noticed that they have had a major redesign. First impressions are good, I like it. I just hope I can still find everything….

    Digg This
    Reddit This
    Stumble Now!
    Buzz This
    Vote on DZone
    Share on Facebook
    Bookmark this on Delicious
    Kick It on DotNetKicks.com
    Shout it
    Share on LinkedIn
    Bookmark this on Technorati
    Post on Twitter
    Google Buzz (aka. Google Reader)
     
  • Steve Lydford 10:37 am on July 2, 2010 Permalink | Reply  

    Blog URL Change 

    Just to say that if you have bookmarked any posts before today, I have moved the blog to blog.stevelydford.com. I have new plans for the root domain so I thought I should move the blog early to minimise disruption to readers.

    You will still get to the posts for the time being, but you will have been redirected. This will only work while nothing is hosted on the root domain though, so you should update your bookmarks in any case.

    If this has affected you, please accept my apologies and assurances that it won’t happen again.

    Digg This
    Reddit This
    Stumble Now!
    Buzz This
    Vote on DZone
    Share on Facebook
    Bookmark this on Delicious
    Kick It on DotNetKicks.com
    Shout it
    Share on LinkedIn
    Bookmark this on Technorati
    Post on Twitter
    Google Buzz (aka. Google Reader)
     
  • Steve Lydford 12:21 pm on June 28, 2010 Permalink | Reply  

    Hello World!

    That’s how all new things are supposed to start right?

    I’ll be posting stuff here mostly about Web technologies and other software related news, views and comments. I hope to post fairly regularly, but this is about my 47th attempt at blogging, so who knows?

    Digg This
    Reddit This
    Stumble Now!
    Buzz This
    Vote on DZone
    Share on Facebook
    Bookmark this on Delicious
    Kick It on DotNetKicks.com
    Shout it
    Share on LinkedIn
    Bookmark this on Technorati
    Post on Twitter
    Google Buzz (aka. Google Reader)
     
c
compose new post
j
next post/next comment
k
previous post/previous comment
r
reply
e
edit
o
show/hide comments
t
go to top
l
go to login
h
show/hide help
esc
cancel