﻿<?xml version="1.0" encoding="utf-8"?><rss version="2.0"><channel><title>Ayende @ Rahien</title><link>http://ayende.com</link><description>Ayende @ Rahien</description><copyright>Copyright (C) Ayende Rahien  2004 - 2021 (c) 2026</copyright><ttl>60</ttl><item><title>Andriy commented on Enabling change by hard coding everything</title><description>I'm the guy he was talking to when this came up. In context of our conversation what he meant was, do not try to over-design a super flexible (and hard to maintain) infratructure early on. Start with hardcoding, then refactor as you see the pattern of repetitive changes emerge. But not until you see the system.
</description><link>http://ayende.com/3543/enabling-change-by-hard-coding-everything#comment32</link><guid>http://ayende.com/3543/enabling-change-by-hard-coding-everything#comment32</guid><pubDate>Tue, 26 Aug 2008 00:50:05 GMT</pubDate></item><item><title>David Nazarov commented on Enabling change by hard coding everything</title><description>In terms of refactoring, sometimes it might be easier to work with a hard-coded module, if nothing more than to see more easily what might be abstracted.
</description><link>http://ayende.com/3543/enabling-change-by-hard-coding-everything#comment31</link><guid>http://ayende.com/3543/enabling-change-by-hard-coding-everything#comment31</guid><pubDate>Fri, 22 Aug 2008 11:52:57 GMT</pubDate></item><item><title>Neal Blomfield commented on Enabling change by hard coding everything</title><description>Isn't some code mantra somewhere that dictates encapsulate what changes (and inject it where you can).
  
  
Hardcoding != inflexible.  Hardcoding simply means the configuration (for example) is in code.  How many websites have you built that required config changes *after* they were deployed to production?
  
  
Not sure if it's what Ayende is referring to but sucessfully identifying the information that may need to change across environments / customers / installations / ... and defining a contract for that, them implementing the contract and injecting the result where it's needed is insanely powerful.  You get all the benefits of xml / database / ini type configuration but (as far as i can see) none of the downsides.
</description><link>http://ayende.com/3543/enabling-change-by-hard-coding-everything#comment30</link><guid>http://ayende.com/3543/enabling-change-by-hard-coding-everything#comment30</guid><pubDate>Thu, 21 Aug 2008 19:53:49 GMT</pubDate></item><item><title>Srdjan commented on Enabling change by hard coding everything</title><description>so amazing to watch this discussion...
  
specially, if you are one of the guys who Ayende suggested that in hour case, solution may be to
  
"Just hard code everything"...
</description><link>http://ayende.com/3543/enabling-change-by-hard-coding-everything#comment29</link><guid>http://ayende.com/3543/enabling-change-by-hard-coding-everything#comment29</guid><pubDate>Thu, 21 Aug 2008 19:14:08 GMT</pubDate></item><item><title>Chris commented on Enabling change by hard coding everything</title><description>* It's hard to predict how you will need to change things later. If you design with changes in mind, it will complicate your code now and cost you time now. Since your code is more complicated, it will be harder to extend in ways that you didn't plan. And probably even in ways that you did plan.
  
  
* In order to change one piece of code, I need to know what it is currently doing and how. That is much easier if everything is hard coded -- I look at the code to see the current behavior rather than switching between databases and config files and code. Not to mention Resharper doesn't integrate with NHibernate to quite that degree.
</description><link>http://ayende.com/3543/enabling-change-by-hard-coding-everything#comment28</link><guid>http://ayende.com/3543/enabling-change-by-hard-coding-everything#comment28</guid><pubDate>Thu, 21 Aug 2008 14:42:58 GMT</pubDate></item><item><title>Notes commented on Enabling change by hard coding everything</title><description>Maybe Ayende is talking about this in terms of a maintenance nightmare that hardcoding brings. 
  
  
Going through a nightmare of dealing/fixing hardcoded stuff during an incident could be a great catalyst to change.
  
</description><link>http://ayende.com/3543/enabling-change-by-hard-coding-everything#comment27</link><guid>http://ayende.com/3543/enabling-change-by-hard-coding-everything#comment27</guid><pubDate>Thu, 21 Aug 2008 14:40:53 GMT</pubDate></item><item><title>Mike Brown commented on Enabling change by hard coding everything</title><description>That's one of the first things that goes out the window when I'm trimming the scope for a delivery. Let's make the configuration aspect part of the next release. For now we can hardcode some defaults in.
  
  
Of course, we're hardcoding those defaults in a central place that can be refactored easily into a per-user configuration.
</description><link>http://ayende.com/3543/enabling-change-by-hard-coding-everything#comment26</link><guid>http://ayende.com/3543/enabling-change-by-hard-coding-everything#comment26</guid><pubDate>Thu, 21 Aug 2008 14:24:29 GMT</pubDate></item><item><title>Bunter commented on Enabling change by hard coding everything</title><description>Jason, that is simple. Oren Eini used to be IDF guy who hired several of his "subjects" to do software development. Couple of them keep the blog, couple of them develop Rhino.* and Oren Eini itself goes only to public events drinking coctails and chilling.
  
  
Just my two utterly meaningless and not too serious cents ;)
</description><link>http://ayende.com/3543/enabling-change-by-hard-coding-everything#comment25</link><guid>http://ayende.com/3543/enabling-change-by-hard-coding-everything#comment25</guid><pubDate>Thu, 21 Aug 2008 14:22:31 GMT</pubDate></item><item><title>Valeriu Caraulean commented on Enabling change by hard coding everything</title><description>I agree with Michael Dorfman that hardcoding can have a YAGNI face.
  
Also, trying to make something hardcoded configurable or ortogonal, can smell as an early optimisation.
  
  
You change only and when you need it. This way you avoid unnecessary complexity and postpone the decision until the last responsible moment.
</description><link>http://ayende.com/3543/enabling-change-by-hard-coding-everything#comment24</link><guid>http://ayende.com/3543/enabling-change-by-hard-coding-everything#comment24</guid><pubDate>Thu, 21 Aug 2008 13:38:32 GMT</pubDate></item><item><title>Kyle commented on Enabling change by hard coding everything</title><description>Haha, Jimmy. If only that were not so common! I have a similar problem, though only one project of 500,000 lines. The boss brags to me about it being the most complex piece of software the company writes, and my response is, "You think that's a good thing? If it's that complex, for this simple of a domain, then you have failed at making a good design." It's partly so complex because every byte-value that gets sent to the piece of machinery that we're sending it to is hard-coded. There's no easy way to change it, there are no comments, and we unnecessarily wrap everything into a call through COM using a single integer as the definer of over 700 virtual functions. Blah.
</description><link>http://ayende.com/3543/enabling-change-by-hard-coding-everything#comment23</link><guid>http://ayende.com/3543/enabling-change-by-hard-coding-everything#comment23</guid><pubDate>Thu, 21 Aug 2008 12:50:35 GMT</pubDate></item><item><title>Jimmy Bogard commented on Enabling change by hard coding everything</title><description>I think that one codebase I recently ran into took that to heart.  There were no objects, and every method in a 1M LOC codebase took a NameValueCollection, with *gasp* every value retrieved with a hard-coded key.
  
  
Spread across 12 solutions, so a grep on one key I looked up found around 1500 matches.
  
  
Good times.
</description><link>http://ayende.com/3543/enabling-change-by-hard-coding-everything#comment22</link><guid>http://ayende.com/3543/enabling-change-by-hard-coding-everything#comment22</guid><pubDate>Thu, 21 Aug 2008 12:17:01 GMT</pubDate></item><item><title>Jason commented on Enabling change by hard coding everything</title><description>"BTW I have not been able to work out 'Oren Eini' vs 'Ayende Rahien' can somebody explain?"
  
http://www.ayende.com/about-me.aspx
</description><link>http://ayende.com/3543/enabling-change-by-hard-coding-everything#comment21</link><guid>http://ayende.com/3543/enabling-change-by-hard-coding-everything#comment21</guid><pubDate>Thu, 21 Aug 2008 11:53:42 GMT</pubDate></item><item><title>Ayende Rahien commented on Enabling change by hard coding everything</title><description>Nine Toes,
  
I am more interested in the discussion than anything else. I think it is fascinating to watch it.
</description><link>http://ayende.com/3543/enabling-change-by-hard-coding-everything#comment20</link><guid>http://ayende.com/3543/enabling-change-by-hard-coding-everything#comment20</guid><pubDate>Thu, 21 Aug 2008 11:51:26 GMT</pubDate></item><item><title>Ayende Rahien commented on Enabling change by hard coding everything</title><description>Rory,
  
http://www.ayende.com/Blog/archive/2006/05/28/7551.aspx
  
</description><link>http://ayende.com/3543/enabling-change-by-hard-coding-everything#comment19</link><guid>http://ayende.com/3543/enabling-change-by-hard-coding-everything#comment19</guid><pubDate>Thu, 21 Aug 2008 11:49:12 GMT</pubDate></item><item><title>Dennis commented on Enabling change by hard coding everything</title><description>Depends on your definition of "hardcoding"
  
if you mean you will use const strings rather than "xxx" everywhere, then that is a very good hardcoded const string :D
  
  
If you mean having a call through an interface rather than directly, then hardcoding is also easier to change. (perhaps except if you use resharper)
  
  
There are many examples of hardcoding function calls are more understandable, it just doesn't scale very well for testing or stability...
  
  
</description><link>http://ayende.com/3543/enabling-change-by-hard-coding-everything#comment18</link><guid>http://ayende.com/3543/enabling-change-by-hard-coding-everything#comment18</guid><pubDate>Thu, 21 Aug 2008 10:56:07 GMT</pubDate></item><item><title>Nine Toes commented on Enabling change by hard coding everything</title><description>O Giver Of Lessons and Keeper Of Secrets Until You Wish To Reveal Them,
  
I love you, but this is a little over the top.  Just post to your blog if you are going to post to your blog.  Nothing is as unattractive as arrogance.
</description><link>http://ayende.com/3543/enabling-change-by-hard-coding-everything#comment17</link><guid>http://ayende.com/3543/enabling-change-by-hard-coding-everything#comment17</guid><pubDate>Thu, 21 Aug 2008 10:11:48 GMT</pubDate></item><item><title>Rinat Abdullin commented on Enabling change by hard coding everything</title><description>It is easier, indeed.
  
  
And the change friction is reduced by the support from the compiler.
  
  
I've learned this the hard way after putting way too much configurability into one of the projects.
</description><link>http://ayende.com/3543/enabling-change-by-hard-coding-everything#comment16</link><guid>http://ayende.com/3543/enabling-change-by-hard-coding-everything#comment16</guid><pubDate>Thu, 21 Aug 2008 08:55:52 GMT</pubDate></item><item><title>Bunter commented on Enabling change by hard coding everything</title><description>It kinda goes along with your ordered lego philosophy. Hard-code but hard-code it as service.
</description><link>http://ayende.com/3543/enabling-change-by-hard-coding-everything#comment15</link><guid>http://ayende.com/3543/enabling-change-by-hard-coding-everything#comment15</guid><pubDate>Thu, 21 Aug 2008 08:41:21 GMT</pubDate></item><item><title>Dan Malcolm commented on Enabling change by hard coding everything</title><description>You're obviously not talking about connection strings and constants.
  
  
Do you mean hard coding the functionality that you need, but within an architecture that makes it easy to switch between these hard coded variations?
  
  
For example:
  
  
a) IOC and strategy pattern for complex calculations, e.g. discounts, instead of a monolithic rules engine with rules configuration stored in XML / database
  
b) Variations in calculation logic "hard coded" into a DSL instead of data used by rules engine
</description><link>http://ayende.com/3543/enabling-change-by-hard-coding-everything#comment14</link><guid>http://ayende.com/3543/enabling-change-by-hard-coding-everything#comment14</guid><pubDate>Thu, 21 Aug 2008 08:29:57 GMT</pubDate></item><item><title>Rory Becker commented on Enabling change by hard coding everything</title><description>I'm definitely not a coding guru like many I whose blogs I read. I may also not understand all the technical terms that are banded around so forgive me if what I say overlaps (hopefully) in some way.
  
  
Surely there is nothing wrong with hard coding stuff as long as it is always hard-coded in 1 consistent location.
  
  
For example all the settings in your code should be hard-coded inside a suitable class called perhaps settings.
  
  
This is very quick and simple to do. then later when you need to make something alterable, you simply change the code in one place to read a settings file or whatever (defaulting to whatever value you had before)
  
  
Is this perhaps what Ayende was referring to?
  
  
BTW I have not been able to work out "Oren Eini" vs "Ayende Rahien" can somebody explain?
</description><link>http://ayende.com/3543/enabling-change-by-hard-coding-everything#comment13</link><guid>http://ayende.com/3543/enabling-change-by-hard-coding-everything#comment13</guid><pubDate>Thu, 21 Aug 2008 08:25:27 GMT</pubDate></item><item><title>Frans Bouma commented on Enabling change by hard coding everything</title><description>"By hardcoding a value, you are enabling change by allowing someone later (with more information) to determine how to best manage potential changes to the variable. "
  
You can always decide later to drop a constant with a hardcoded value if you need to have a different constant at that spot. 
  
  
Using constants instead of hardcoded strings for example isn't always good: they're not compile time checked. So if the string value itself has meaning and can cause problems later on if it's not correct, I think using a constant / static readonly var is better because you don't run the risk of having a typo. 
</description><link>http://ayende.com/3543/enabling-change-by-hard-coding-everything#comment12</link><guid>http://ayende.com/3543/enabling-change-by-hard-coding-everything#comment12</guid><pubDate>Thu, 21 Aug 2008 08:07:32 GMT</pubDate></item><item><title>Michael Dorfman commented on Enabling change by hard coding everything</title><description>I'm guessing Ayende is going to go with a double-barrelled
  
  
a) Worse is Better, and
  
b) YAGNI (taken to the logical extreme.)
  
  
By hardcoding a value, you are enabling change by allowing someone later (with more information) to determine how to best manage potential changes to the variable.  
</description><link>http://ayende.com/3543/enabling-change-by-hard-coding-everything#comment11</link><guid>http://ayende.com/3543/enabling-change-by-hard-coding-everything#comment11</guid><pubDate>Thu, 21 Aug 2008 07:54:42 GMT</pubDate></item><item><title>Torkel commented on Enabling change by hard coding everything</title><description>I think I know what you are getting at here. I worked on a previous multi-tenant system, we had hundreds of settings so each company running the system could go into the admin area and configure everything from order process, reports, pricing, etc.. 
  
  
This was a webshop where a single instance was used by many country divisions of the same company. Each country had different laws and regulations and different process/wishes to how the system should work.
  
  
The settings and user admin customizable options just grew making the system very complex and hard to debug. We felt that a better solution would be to hardcode some of the settings, or the different behaviour, in separate implementations (of some interface). 
  
  
</description><link>http://ayende.com/3543/enabling-change-by-hard-coding-everything#comment10</link><guid>http://ayende.com/3543/enabling-change-by-hard-coding-everything#comment10</guid><pubDate>Thu, 21 Aug 2008 07:19:41 GMT</pubDate></item><item><title>Neil commented on Enabling change by hard coding everything</title><description>Nathan: I'm hoping for the same thing. I Don't mean to single out NHibernate but how many .hbm.xml files get changed after they're deployed to a production environment. Not many I hope!
</description><link>http://ayende.com/3543/enabling-change-by-hard-coding-everything#comment9</link><guid>http://ayende.com/3543/enabling-change-by-hard-coding-everything#comment9</guid><pubDate>Thu, 21 Aug 2008 06:49:11 GMT</pubDate></item><item><title>Nathan commented on Enabling change by hard coding everything</title><description>I'm guessing he means hard coding in the sense of writing code for everything as opposed to using XML (or some other text base) configuration.  With dynamic languages, this is very powerful.
</description><link>http://ayende.com/3543/enabling-change-by-hard-coding-everything#comment8</link><guid>http://ayende.com/3543/enabling-change-by-hard-coding-everything#comment8</guid><pubDate>Thu, 21 Aug 2008 06:34:09 GMT</pubDate></item><item><title>Tobin Harris commented on Enabling change by hard coding everything</title><description>I didn't expect this one from Ayende :)
  
  
Hard coding is simple. No need to worry about needing extra tools, dependencies and libraries to work with XML or databases or whatever. Plus you get to lean on your refactoring tools, and everything is in one place. 
</description><link>http://ayende.com/3543/enabling-change-by-hard-coding-everything#comment7</link><guid>http://ayende.com/3543/enabling-change-by-hard-coding-everything#comment7</guid><pubDate>Thu, 21 Aug 2008 06:33:48 GMT</pubDate></item><item><title>meowth commented on Enabling change by hard coding everything</title><description>Hope you meant hardcoding in the right manner =)
  
Instead of it you can meet same hardcode repeating 20 or 100 times thru all project, and that's not good.
  
  
And you want to use 'Search and replace' to change hardcodes due to it's immutability from place to place, am I right?
  
  
Anyway, having separate static (or not) class with all hardcodes is also as useful as config file.
</description><link>http://ayende.com/3543/enabling-change-by-hard-coding-everything#comment6</link><guid>http://ayende.com/3543/enabling-change-by-hard-coding-everything#comment6</guid><pubDate>Thu, 21 Aug 2008 06:28:14 GMT</pubDate></item><item><title>Dror Helper commented on Enabling change by hard coding everything</title><description>I guess you can hard code the 1st time you need a value/configuration but the 2nd time you need to use it in your code you probably want to change that.
  
A Code that is written twice is written once too many
</description><link>http://ayende.com/3543/enabling-change-by-hard-coding-everything#comment5</link><guid>http://ayende.com/3543/enabling-change-by-hard-coding-everything#comment5</guid><pubDate>Thu, 21 Aug 2008 06:27:03 GMT</pubDate></item><item><title>Nathan commented on Enabling change by hard coding everything</title><description>Well if you consider that hard coding, then I'm completely on board.  In my current project, we retrieve our WCF bindings, the actual objects themselves, from a boo config file.  
</description><link>http://ayende.com/3543/enabling-change-by-hard-coding-everything#comment4</link><guid>http://ayende.com/3543/enabling-change-by-hard-coding-everything#comment4</guid><pubDate>Thu, 21 Aug 2008 06:10:20 GMT</pubDate></item><item><title>Ayende Rahien commented on Enabling change by hard coding everything</title><description>Nathan,
  
Actually, no, it is exactly the same, you'll see soon
</description><link>http://ayende.com/3543/enabling-change-by-hard-coding-everything#comment3</link><guid>http://ayende.com/3543/enabling-change-by-hard-coding-everything#comment3</guid><pubDate>Thu, 21 Aug 2008 06:05:53 GMT</pubDate></item></channel></rss>