The Extensible Menu

  • Keith Williams 2012-05-29 09:02
    I don't think this really gives a great insight into the issue. I would rather have seen the code that goes around this interface, perhaps some code behind that calls into the component...
  • MP79 2012-05-29 09:03
    Real programmers use spreadsheets.

    obligatory xkcd:
    http://xkcd.com/378/
  • tjb 2012-05-29 09:03
    trwtf: someone let a VB6 Monkey design a system.
  • Mr Clever Ideas 2012-05-29 09:04
    All we need is Microsoft to make a VB.NET version of Groovy, and this sort of design won't be a problem! ;-)
  • justsomedudette 2012-05-29 09:08
    Arggg where's the closing bracket? My inner parser is having a fit.
  • ThomsonsPier 2012-05-29 09:11
    It is probably bad that the first thing I noticed was the spelling error in row 24.
  • frits 2012-05-29 09:24
    I once designed a menu system for an embedded device that maintained something like 30 attributes in an Excel spreadsheet. At least 3 of the attributes were function pointers. There was an accompanying VB.NET winforms utility that read the spreadsheet and generated a .c file used in the device codebase. Management loved it.
  • Kryptus 2012-05-29 09:30
    msgBox("First to say Frist !")
  • Severity One 2012-05-29 09:32
    Some of our applications have Java class names in the database. I've been arguing for a long time, and not always successfully, to start using things like the ServiceLoader interface.
  • I forget 2012-05-29 09:35
    Yea, let's rewrite it in .net, that will magically solve all of our problems.
  • Crisw 2012-05-29 09:50
    Needs a .net wrapper.
  • toshir0 2012-05-29 10:12
    I forget:
    Yea, let's rewrite it in LISP, that will magically make us forget all of our problems.
    FTFY
  • TGV 2012-05-29 10:29
    Keith Williams:
    I don't think this really gives a great insight into the issue. I would rather have seen the code that goes around this interface, perhaps some code behind that calls into the component...

    I think the OP meant: the application looks for msr_SDI_ID, msr_par_ID, ... msd_Order in the database, and then just executes the string it found. That's just plain awful. It sounds like a bad implementation of a state table. But not only that, sometimes they modify this string in the VB app, while they obviously could have done so in the database.
  • MeesterTurner 2012-05-29 10:51
    ... and just how many options do you apparently need to end a program anyway?!!?
  • Annon Too 2012-05-29 11:22
    So is the real WTF not using XML?
  • Mr Clever Ideas 2012-05-29 12:01
    Annon Too:
    So is the real WTF not using XML?

    Unless anyone wants to speculate what a VB equivalent of JSON would look like...
  • Zapakh 2012-05-29 12:45
    Other obligatory xkcd:
    http://xkcd.com/378/
  • Keith Williams 2012-05-29 12:49
    That wouldn't make much sense...why would it need to interact with a third party component to provide windows and context menus if it 'only' ran the VB string it found in the database?
  • JimboJones 2012-05-29 12:50
    My recollection of Visual Basic 6 (and earlier) is that they didn't have any native Execute() / Eval() functions - they couldn't execute strings containing arbitrary Visual Basic code. I suppose it's possible, however, that they made use of the Microsoft Script Control, registered various objects with it, and then executed syntactically similar VBScript code from a string instead...
  • Nagesh 2012-05-29 12:54
    All VB6 programmer give programing a bad name. VB .NET slight better. that like saying central govt slight better then state govt.

    God saves us all in after-life.
  • Captcha: paratus 2012-05-29 13:23
    MP79:
    Real programmers use spreadsheets.

    obligatory xkcd:
    http://xkcd.com/378/


    Zapakh:
    Other obligatory xkcd:
    http://xkcd.com/378/


    I'm not an xkcd-hater, but that one doesn't even fit here.
  • LANMind 2012-05-29 14:08
    People who complain about "soft coding" are generally too stupid to recognize the subtle horror of hard coding. Sure you can go too far the other way, but the worst case soft code is far better than the worst case hard code.
  • KJ 2012-05-29 14:15
    JimboJones:
    My recollection of Visual Basic 6 (and earlier) is that they didn't have any native Execute() / Eval() functions - they couldn't execute strings containing arbitrary Visual Basic code. I suppose it's possible, however, that they made use of the Microsoft Script Control, registered various objects with it, and then executed syntactically similar VBScript code from a string instead...

    Yeah, VB6 is not an interpreted language. I am not sure how they are pulling that off. But then are we assuming they are calling that "code"? Why would you MsgBox("Edit") and MsgBox("Paste") off a menu item? Really, every time you when Edit/Paste you would get two message boxes? There's more to the story that we aren't being told so we are assuming that is how that table is being handled.
  • Scrummy 2012-05-29 14:38
    This just stinks of a Waterfall-developed project. When you allow for no refactoring of code, you end up with brilliant ideas like storing function calls in a database. By the time you hit one of your "milestones," it is far too late to do anything about it.
  • big picture thinker 2012-05-29 14:42
    I disagree. Too much "soft-coding" (planning for extensibility that will never be useful) is a huge problem. Nobody is going to fiddle with a table like this to change words on a menu. Most likely, the only reason anyone would ever need to edit the menu would be to add a new option or change the way an existing option worked (which would require access to source code in either case).

    CAPTCHA: enim. Give your projects an enim by getting rid of unnecessary abstraction.
  • Nagesh 2012-05-29 15:05
    Scrummy:
    This just stinks of a Waterfall-developed project. When you allow for no refactoring of code, you end up with brilliant ideas like storing function calls in a database. By the time you hit one of your "milestones," it is far too late to do anything about it.


    Always go with Agiel-Scrum, I think.
  • dkf 2012-05-29 15:33
    big picture thinker:
    I disagree. Too much "soft-coding" (planning for extensibility that will never be useful) is a huge problem.
    But with too much hard coding, you've got something that's not just instantaneously obsolete, but also dangerously brittle (e.g., server software only works on one machine because of all the hard-coded paths to a developer's pen drive that was mounted in a strange location).

    Not that you're wrong as such. More that you're doomed either way. Sometimes even both at once…
  • KattMan 2012-05-29 15:41
    In addition, just to show this isn't a VB issue.

    I'm workign on a C++, C# project right now where nearly every call uses a guid to look up in a database for an entity to grab the next guid, to reference a function call elsewhere.

    You can't trace through code without also doing database lookups just to see where the code is going to take you next.

    This is essentially the same thing as listed in the OP.

    One other thing about this, C programmers are just as bad if not worse then VB programmers, it's just VB code when done poorly was easier to read then C, so we all thought it was VB. No VB just showed the problem in a plainer syntax. Kinda makes you wonder if VB wasn't the real WTF, only the means of exposing them eaiser.
  • Scrummy 2012-05-29 15:59
    KattMan:
    In addition, just to show this isn't a VB issue.

    I'm workign on a C++, C# project right now where nearly every call uses a guid to look up in a database for an entity to grab the next guid, to reference a function call elsewhere.

    You can't trace through code without also doing database lookups just to see where the code is going to take you next.

    This is essentially the same thing as listed in the OP.

    One other thing about this, C programmers are just as bad if not worse then VB programmers, it's just VB code when done poorly was easier to read then C, so we all thought it was VB. No VB just showed the problem in a plainer syntax. Kinda makes you wonder if VB wasn't the real WTF, only the means of exposing them eaiser.


    You really should give Agile development a shot. Enforcing pretty strict TDD would force a removal of all the tight coupling in your codebase.
  • Zapakh 2012-05-29 16:02
    [quote user="Captcha: paratus"][quote user="MP79"]Real programmers use spreadsheets.
    [quote user="Zapakh"]Other obligatory xkcd:
    http://xkcd.com/378/[/quote]

    I'm not an xkcd-hater, but that one doesn't even fit here.
    [/quote]

    Sorry, meant http://xkcd.com/859/
  • KattMan 2012-05-29 16:03
    Scrummy:


    You really should give Agile development a shot. Enforcing pretty strict TDD would force a removal of all the tight coupling in your codebase.


    Trust me, I would, I just have no power at all here.

    There is another team working on re-writitng the entire system, once again waterfall though, going to get it all written before handing it over to testers.

    One other thing to note, the source will compile on first check out, but will not run. It's all those soft references that get you.
  • C-Octothorpe 2012-05-29 16:06
    Captcha: paratus:
    I'm not an xkcd-hater
    I am, and anybody sadistic enough to perpetuate the shit should die a painful death designed for pederasts and liberals...
  • dkf 2012-05-29 16:07
    KattMan:
    I'm workign on a C++, C# project right now where nearly every call uses a guid to look up in a database for an entity to grab the next guid, to reference a function call elsewhere.

    You can't trace through code without also doing database lookups just to see where the code is going to take you next.
    Vary it by sometimes putting compiled code in the database, preferably with anti-decompilation hacks applied. Don't keep the original source anywhere.
  • KattMan 2012-05-29 16:14
    dkf:
    Vary it by sometimes putting compiled code in the database, preferably with anti-decompilation hacks applied. Don't keep the original source anywhere.


    With the [lack of] code reviews here, I could get away with that and perhaps improve the system while doing so.

    Oh did I say We all sit in one big room, not even cubicals, just long thin desks [tables] we all work side by side on. Hey it increases collaboration right?!?!
  • Matt Westwood 2012-05-29 16:39
    C-Octothorpe:
    Captcha: paratus:
    I'm not an xkcd-hater
    I am, and anybody sadistic enough to perpetuate the shit should die a painful death designed for pederasts and liberals...


    And Christians.
  • Matt Westwood 2012-05-29 16:40
    KattMan:
    dkf:
    Vary it by sometimes putting compiled code in the database, preferably with anti-decompilation hacks applied. Don't keep the original source anywhere.


    With the [lack of] code reviews here, I could get away with that and perhaps improve the system while doing so.

    Oh did I say We all sit in one big room, not even cubicals, just long thin desks [tables] we all work side by side on. Hey it increases collaboration right?!?!

    That's like where I work. It's really cool.
  • bgodot 2012-05-29 16:40
    Hard coding or Soft coding isn't the issue.

    The real trick to computer programming is not being a fucking idiot.
  • C-Octothorpe 2012-05-29 16:42
    Matt Westwood:
    C-Octothorpe:
    Captcha: paratus:
    I'm not an xkcd-hater
    I am, and anybody sadistic enough to perpetuate the shit should die a painful death designed for pederasts and liberals...


    And Christians.
    Who would be left?
  • KattMan 2012-05-29 16:45
    Matt Westwood:
    KattMan:
    dkf:
    Vary it by sometimes putting compiled code in the database, preferably with anti-decompilation hacks applied. Don't keep the original source anywhere.


    With the [lack of] code reviews here, I could get away with that and perhaps improve the system while doing so.

    Oh did I say We all sit in one big room, not even cubicals, just long thin desks [tables] we all work side by side on. Hey it increases collaboration right?!?!

    That's like where I work. It's really cool.


    Stand up and cough and I'll wave to you, if I don't instead throw my mouse at you.
  • KattMan 2012-05-29 16:46
    C-Octothorpe:
    Matt Westwood:
    C-Octothorpe:
    Captcha: paratus:
    I'm not an xkcd-hater
    I am, and anybody sadistic enough to perpetuate the shit should die a painful death designed for pederasts and liberals...


    And Christians.
    Who would be left?

    Me and maybe Matt, it's a sad state, but hey, free beer for everyone left!
  • TGV 2012-05-29 16:50
    C-Octothorpe:
    Captcha: paratus:
    I'm not an xkcd-hater
    I am, and anybody sadistic enough to perpetuate the shit should die a painful death designed for pederasts and liberals...

    In that case, he probably meant: http://dynamic.xkcd.com/random/comic/
  • Jay 2012-05-29 17:44
    I'm all for making systems data driven and flexible. Making it possible to change how the program works without modifying code has been the Holy Grail of programming for decades. The catch is when someone says, "You can change the logic without writing any code!" and it turns out that what they mean is that they've invented their own custom language instead of using a standard language. Like instead of writing a line of, say, VB that says:


    amount=price+tax


    you can simply write a block of XML that says


    <operation>
    <params>
    <param seq="1" name="price"/>
    <param seq="2" name="tax"/>
    </params>
    <operation op="add">
    <result name="amount">
    </operation>


    I've seen programmers do this time and again. I ask, "Wouldn't it be easier to just write the one line of Java or VB code?" And they start at me with incredulity and explain, "But this way you can change the logic without having to write code! We don't have to recompile when we make a change. Users who don't know anything about programming can make changes for themselves." Etc. I'll point out that, sure, you don't have to recompile, but you still have to run your XML preprocessor or whatever "non-computer language" processor you have for these instructions in, so you haven't gained anything. Or that your custom language is harder to read and understand than VB. And they look at me like I'm an idiot. "Don't you understand why it's better to not have to make code changes?" they ask condescendingly.
  • Matt Westwood 2012-05-29 17:51
    Jay:
    I'm all for making systems data driven and flexible. Making it possible to change how the program works without modifying code has been the Holy Grail of programming for decades. The catch is when someone says, "You can change the logic without writing any code!" and it turns out that what they mean is that they've invented their own custom language instead of using a standard language. Like instead of writing a line of, say, VB that says:


    amount=price+tax


    you can simply write a block of XML that says


    <operation>
    <params>
    <param seq="1" name="price"/>
    <param seq="2" name="tax"/>
    </params>
    <operation op="add">
    <result name="amount">
    </operation>


    I've seen programmers do this time and again. I ask, "Wouldn't it be easier to just write the one line of Java or VB code?" And they start at me with incredulity and explain, "But this way you can change the logic without having to write code! We don't have to recompile when we make a change. Users who don't know anything about programming can make changes for themselves." Etc. I'll point out that, sure, you don't have to recompile, but you still have to run your XML preprocessor or whatever "non-computer language" processor you have for these instructions in, so you haven't gained anything. Or that your custom language is harder to read and understand than VB. And they look at me like I'm an idiot. "Don't you understand why it's better to not have to make code changes?" they ask condescendingly.

    ... to which you look them in the eye with an open expression and say, politely, "No. Why?"
  • brazzy 2012-05-29 17:52
    dkf:
    But with too much hard coding, you've got something that's not just instantaneously obsolete, but also dangerously brittle (e.g., server software only works on one machine because of all the hard-coded paths to a developer's pen drive that was mounted in a strange location).

    Not that you're wrong as such. More that you're doomed either way. Sometimes even both at once…

    I guess it depends on what exactly one considers worse: something that breaks quickly and obviously the second it's run outside its usual environment and needs every fix to be done in 25 different places, or a quagmire of empty layers of indirection and inner platforms where any change needs to be done only once, but there's 25 different places where it could be done, all of which have been used for various changes in the past, and each of which requires hours of research to understand.
  • brazzy 2012-05-29 17:58
    Matt Westwood:
    Jay:
    And they look at me like I'm an idiot. "Don't you understand why it's better to not have to make code changes?" they ask condescendingly.

    ... to which you look them in the eye with an open expression and say, politely, "No. Why?"


    And then they explain their change request process and their deployment process to you, and you start to see their point, at least a little.

    Of course, the correct solution would be to fix those processes, but good luck with that...
  • Coyne 2012-05-29 18:24
    Jay:
    Or that your custom language is harder to read and understand than VB. And they look at me like I'm an idiot. "Don't you understand why it's better to not have to make code changes?" they ask condescendingly.


    Seen it. Nothing like a zealot that has no idea what coding is. Like this:

    BrickZealot:
    We use bricks to 'brick' in nails here, because 'bricking' is so much better than hammering. Hammering is hard work and we created this so we won't have to do anymore hammering.


    A rose by any other name ...
  • aew 2012-05-29 19:38
    LANMind:
    People who complain about "soft coding" are generally too stupid to recognize the subtle horror of hard coding. Sure you can go too far the other way, but the worst case soft code is far better than the worst case hard code.
    Uhm....look at the paisely horses....
  • co 2012-05-29 19:44
    dkf:
    big picture thinker:
    I disagree. Too much "soft-coding" (planning for extensibility that will never be useful) is a huge problem.
    But with too much hard coding, you've got something that's not just instantaneously obsolete, but also dangerously brittle (e.g., server software only works on one machine because of all the hard-coded paths to a developer's pen drive that was mounted in a strange location).

    Not that you're wrong as such. More that you're doomed either way. Sometimes even both at once…
    Conversely with too much soft coding you haven't actually got anything except a program written as a series of variables.

    Any concept can be misused (badly).
    Sometimes the effort to hard code now coupled with the effort to make a value configurable later is only just more than making something configurable now and never having to configure it....

    That said, most of it comes down to planning. Good planning hopefully sees the right decision being made on hard coded vs soft coded most of the time. The rest of the time (hopefully) it's a minor inconvenience...
    Something like a time zone might reasonably need to be configurable. Something like the length of a day (not the length of a workday, but 24hrs) can probably be hard coded because the likelihood of it changing in the life of your app is fairly small, and the effort to make it configurable outweighs the risk.
  • Prashant 2012-05-29 19:55
    Matt Westwood:
    C-Octothorpe:
    Captcha: paratus:
    I'm not an xkcd-hater
    I am, and anybody sadistic enough to perpetuate the shit should die a painful death designed for pederasts and liberals...


    And Christians.
    Couldn't help but wonder the uproar if instead of Christian you'd said Muslims....

    What a funny ol' world we live in where discrimination, predjudice and vilification only count only for certain groups.
    eg:
    Sexism is discrimination against females (not often you see it the other way)
    Racism is discrimination against Asians, Indians, Africans, Aborigines and generally anyone who isn't Caucasian
    Sexual Discrimination is only when someone is homeophobic
    etc...

    No wonder I don't enjoy being a married, Christian, white, heterosexual male anymore. People can bag me as much as they like, and as soon as I reply I'm discriminating against them based on some group (generally minority) that they choose to align themselves with.
  • Cheong 2012-05-29 21:36
    I think this is designed to allow features written as delay-loaded modules that could be configured to add to the menu.

    Sounds like reasonably flexible design in the age of VB6.
  • Matt Westwood 2012-05-30 01:05
    brazzy:
    Matt Westwood:
    Jay:
    And they look at me like I'm an idiot. "Don't you understand why it's better to not have to make code changes?" they ask condescendingly.

    ... to which you look them in the eye with an open expression and say, politely, "No. Why?"


    And then they explain their change request process and their deployment process to you, and you start to see their point, at least a little.

    Of course, the correct solution would be to fix those processes, but good luck with that...

    Sort of my point. As they go through their description of the change process, your expression changes to baffled incredulity, and the enormity of what they are describing starts hitting home.
  • Matt Westwood 2012-05-30 01:09
    co:
    dkf:
    big picture thinker:
    I disagree. Too much "soft-coding" (planning for extensibility that will never be useful) is a huge problem.
    But with too much hard coding, you've got something that's not just instantaneously obsolete, but also dangerously brittle (e.g., server software only works on one machine because of all the hard-coded paths to a developer's pen drive that was mounted in a strange location).

    Not that you're wrong as such. More that you're doomed either way. Sometimes even both at once…
    Conversely with too much soft coding you haven't actually got anything except a program written as a series of variables.

    Any concept can be misused (badly).
    Sometimes the effort to hard code now coupled with the effort to make a value configurable later is only just more than making something configurable now and never having to configure it....

    That said, most of it comes down to planning. Good planning hopefully sees the right decision being made on hard coded vs soft coded most of the time. The rest of the time (hopefully) it's a minor inconvenience...
    Something like a time zone might reasonably need to be configurable. Something like the length of a day (not the length of a workday, but 24hrs) can probably be hard coded because the likelihood of it changing in the life of your app is fairly small, and the effort to make it configurable outweighs the risk.


    Then again, using "24" whenever you need to use the number of hours in the day is a bad idea. Not because of the pain of changing it but because you won't be able to tell it by searching for instances of 24 from other instances of 24 (e.g from the 24 you'd hard-coded as the number of employees in the company).
  • Matt Westwood 2012-05-30 01:11
    Prashant:
    Matt Westwood:
    C-Octothorpe:
    Captcha: paratus:
    I'm not an xkcd-hater
    I am, and anybody sadistic enough to perpetuate the shit should die a painful death designed for pederasts and liberals...


    And Christians.
    Couldn't help but wonder the uproar if instead of Christian you'd said Muslims....

    What a funny ol' world we live in where discrimination, predjudice and vilification only count only for certain groups.
    eg:
    Sexism is discrimination against females (not often you see it the other way)
    Racism is discrimination against Asians, Indians, Africans, Aborigines and generally anyone who isn't Caucasian
    Sexual Discrimination is only when someone is homeophobic
    etc...

    No wonder I don't enjoy being a married, Christian, white, heterosexual male anymore. People can bag me as much as they like, and as soon as I reply I'm discriminating against them based on some group (generally minority) that they choose to align themselves with.

    So throw it away and become an atheist. You know it makes sense. You'll never regret it.
  • Severity One 2012-05-30 01:17
    Prashant:
    What a funny ol' world we live in where discrimination, predjudice and vilification only count only for certain groups.
    eg:
    Sexism is discrimination against females (not often you see it the other way)
    Racism is discrimination against Asians, Indians, Africans, Aborigines and generally anyone who isn't Caucasian
    Sexual Discrimination is only when someone is homeophobic
    etc...

    No wonder I don't enjoy being a married, Christian, white, heterosexual male anymore. People can bag me as much as they like, and as soon as I reply I'm discriminating against them based on some group (generally minority) that they choose to align themselves with.
    Yeah, married, white, Christian, heterosexual males are really at a disadvantage in Western society. I mean, how many political and business leaders can you name that match all of those criteria?
  • peter 2012-05-30 01:34
    Severity One:
    Prashant:
    What a funny ol' world we live in where discrimination, predjudice and vilification only count only for certain groups.
    eg:
    Sexism is discrimination against females (not often you see it the other way)
    Racism is discrimination against Asians, Indians, Africans, Aborigines and generally anyone who isn't Caucasian
    Sexual Discrimination is only when someone is homeophobic
    etc...

    No wonder I don't enjoy being a married, Christian, white, heterosexual male anymore. People can bag me as much as they like, and as soon as I reply I'm discriminating against them based on some group (generally minority) that they choose to align themselves with.
    Yeah, married, white, Christian, heterosexual males are really at a disadvantage in Western society. I mean, how many political and business leaders can you name that match all of those criteria?


    For a moment I thought that you implied that being a political or business leader does not suck profusely.

    CAPTCHA: nulla (is that between null and nullb?)
  • Gibbon1 2012-05-30 01:34
    dkf:
    But with too much hard coding, you've got something that's not just instantaneously obsolete, but also dangerously brittle (e.g., server software only works on one machine because of all the hard-coded paths to a developer's pen drive that was mounted in a strange location).

    Not that you're wrong as such. More that you're doomed either way. Sometimes even both at once…


    Something like that is easy enough to fix if needed. Meaning that if you need a path a PathProviderFactoryFactory shouldn't be your first idea. Meaning adding complexity is often easier than removing it.
  • Darkstar 2012-05-30 03:38
    Interesting all-nulls row there at the bottom...
  • MORAN 2012-05-30 03:54
    Prashant:
    Matt Westwood:
    C-Octothorpe:
    Captcha: paratus:
    I'm not an xkcd-hater
    I am, and anybody sadistic enough to perpetuate the shit should die a painful death designed for pederasts and liberals...


    And Christians.
    Couldn't help but wonder the uproar if instead of Christian you'd said Muslims....

    What a funny ol' world we live in where discrimination, predjudice and vilification only count only for certain groups.
    eg:
    Sexism is discrimination against females (not often you see it the other way)
    Racism is discrimination against Asians, Indians, Africans, Aborigines and generally anyone who isn't Caucasian
    Sexual Discrimination is only when someone is homeophobic
    etc...

    No wonder I don't enjoy being a married, Christian, white, heterosexual male anymore. People can bag me as much as they like, and as soon as I reply I'm discriminating against them based on some group (generally minority) that they choose to align themselves with.

    .
  • Major DoucheBag 2012-05-30 04:39
    Severity One:
    Prashant:
    What a funny ol' world we live in where discrimination, predjudice and vilification only count only for certain groups.
    eg:
    Sexism is discrimination against females (not often you see it the other way)
    Racism is discrimination against Asians, Indians, Africans, Aborigines and generally anyone who isn't Caucasian
    Sexual Discrimination is only when someone is homeophobic
    etc...

    No wonder I don't enjoy being a married, Christian, white, heterosexual male anymore. People can bag me as much as they like, and as soon as I reply I'm discriminating against them based on some group (generally minority) that they choose to align themselves with.
    Yeah, married, white, Christian, heterosexual males are really at a disadvantage in Western society. I mean, how many political and business leaders can you name that match all of those criteria?


    I hope you do realize that you just discriminated against him.
  • TheRider 2012-05-30 04:46
    Prashant:

    No wonder I don't enjoy being a married, Christian, white, heterosexual male anymore. People can bag me as much as they like, and as soon as I reply I'm discriminating against them based on some group (generally minority) that they choose to align themselves with.
    Yeah, but don't you know how guilty you (or rather your ancestors) are? There's no way you could have recovered already.
  • Risky 2012-05-30 05:52
    brazzy:
    Matt Westwood:
    Jay:
    And they look at me like I'm an idiot. "Don't you understand why it's better to not have to make code changes?" they ask condescendingly.

    ... to which you look them in the eye with an open expression and say, politely, "No. Why?"


    And then they explain their change request process and their deployment process to you, and you start to see their point, at least a little.

    Of course, the correct solution would be to fix those processes, but good luck with that...



    Ah so basically having wrapped yourself up in change control red tape you stick a whacking great back door in the application allowing you to bodge anything you want without any record of it.

    Of course I'm in RAD/Tactical development where if it's wrong you fix it but at least if you fire me you'll find the logic in the code where it belongs.


  • blither 2012-05-30 06:22
    If it works, is quick to write, is well documented, and is easy to maintain, then IMHO anything is acceptable :)

    Anything 'better' is just snobbery unless it really is generally agreed to be significantly more elegant.
  • Strolskon 2012-05-30 06:48
    Jay:
    I've seen programmers do this time and again. I ask, "Wouldn't it be easier to just write the one line of Java or VB code?" And they start at me with incredulity and explain, "But this way you can change the logic without having to write code! We don't have to recompile when we make a change. Users who don't know anything about programming can make changes for themselves." Etc. I'll point out that, sure, you don't have to recompile, but you still have to run your XML preprocessor or whatever "non-computer language" processor you have for these instructions in, so you haven't gained anything. Or that your custom language is harder to read and understand than VB. And they look at me like I'm an idiot. "Don't you understand why it's better to not have to make code changes?" they ask condescendingly.

    You can solve this by making your own "config system": you copy each file (e.g. "main_code.py" to "main_code.config"), and then replace the original with something like:

    eval(open("main_code.config").read())

    And now you don't have to recompile, you are not technically editing the code files, and you can still write your functions in VB, Python or any language!

    (yes, you can do eval() in compiled languages, you just need a custom function that compiles the code on-the-fly, they exist).
  • Pedantic Dickweed 2012-05-30 07:05
    Prashant:
    Matt Westwood:
    C-Octothorpe:
    Captcha: paratus:
    I'm not an xkcd-hater
    I am, and anybody sadistic enough to perpetuate the shit should die a painful death designed for pederasts and liberals...


    And Christians.
    Couldn't help but wonder the uproar if instead of Christian you'd said Muslims....



    And Muslims.

  • Nagesh 2012-05-30 08:36
    Prashant (unreg):
    Matt Westwood:
    C-Octothorpe:
    Captcha: paratus:
    I'm not an xkcd-hater
    I am, and anybody sadistic enough to perpetuate the shit should die a painful death designed for pederasts and liberals...


    And Christians.
    Couldn't help but wonder the uproar if instead of Christian you'd said Muslims....

    What a funny ol' world we live in where discrimination, predjudice and vilification only count only for certain groups.
    eg:
    Sexism is discrimination against females (not often you see it the other way)
    Racism is discrimination against Asians, Indians, Africans, Aborigines and generally anyone who isn't Caucasian
    Sexual Discrimination is only when someone is homeophobic
    etc...

    No wonder I don't enjoy being a married, Christian, white, heterosexual male anymore. People can bag me as much as they like, and as soon as I reply I'm discriminating against them based on some group (generally minority) that they choose to align themselves with.


    If you are pretend to be white, married, christmas, at least have courtesy to not use Indian name like Prashant, madarchod!
  • Foo 2012-05-30 08:49
    dkf:
    dangerously brittle (e.g., server software only works on one machine because of all the hard-coded paths to a developer's pen drive that was mounted in a strange location).


    your development environment lacking search-replace in solution?

    Just ported 20+ projects full of hard-coded paths to a mounted network drive from VS2005 to VS2010, and found 2010 wasn't keen on mounted drives (some permission thing, I guess), but happy with UNC ones. 2 minutes to do a search-replace on the whole solution. Hardly a disaster.
  • Foo 2012-05-30 09:01
    Severity One:
    Prashant:
    What a funny ol' world we live in where discrimination, predjudice and vilification only count only for certain groups.
    eg:
    Sexism is discrimination against females (not often you see it the other way)
    Racism is discrimination against Asians, Indians, Africans, Aborigines and generally anyone who isn't Caucasian
    Sexual Discrimination is only when someone is homeophobic
    etc...

    No wonder I don't enjoy being a married, Christian, white, heterosexual male anymore. People can bag me as much as they like, and as soon as I reply I'm discriminating against them based on some group (generally minority) that they choose to align themselves with.
    Yeah, married, white, Christian, heterosexual males are really at a disadvantage in Western society. I mean, how many political and business leaders can you name that match all of those criteria?


    um... can't actually think of any...
    IIRC, the US doesn't have a white leader at the moment, don't think he practices any religion with any regularity, and his opponent is a Moron. Sorry, Mormon.
    There's a few political leaders who feign an interest in religion to get votes, perhaps, but those who do it for personal reasons not PR? Can't think of many.

    Outside of the US, very few political or business leaders even feign an interest in religion, and many are openly hostile to it. And lots are neither white or male, though probably most are hetrosexual and married.
  • KattMan 2012-05-30 09:05
    Gee thanks Foo, way to keep the white man down.
  • PedanticCurmudgeon 2012-05-30 09:43
    Severity One:
    Prashant:
    What a funny ol' world we live in where discrimination, predjudice and vilification only count only for certain groups.
    eg:
    Sexism is discrimination against females (not often you see it the other way)
    Racism is discrimination against Asians, Indians, Africans, Aborigines and generally anyone who isn't Caucasian
    Sexual Discrimination is only when someone is homeophobic
    etc...

    No wonder I don't enjoy being a married, Christian, white, heterosexual male anymore. People can bag me as much as they like, and as soon as I reply I'm discriminating against them based on some group (generally minority) that they choose to align themselves with.
    Yeah, married, white, Christian, heterosexual males are really at a disadvantage in Western society. I mean, how many political and business leaders can you name that match all of those criteria?
    10/10. The unabashed dis-ingenuousness of the argument puts it over the top. Well done, sir.
  • Peter 2012-05-30 10:40
    Nagesh:
    Always go with Agiel-Scrum, I think.
    "Agiel-Scrum"? What's that? Some sort of angel-demon hybrid?
  • Nik 2012-05-30 11:13
    Severity One:
    Prashant:
    What a funny ol' world we live in where discrimination, predjudice and vilification only count only for certain groups.
    eg:
    Sexism is discrimination against females (not often you see it the other way)
    Racism is discrimination against Asians, Indians, Africans, Aborigines and generally anyone who isn't Caucasian
    Sexual Discrimination is only when someone is homeophobic
    etc...

    No wonder I don't enjoy being a married, Christian, white, heterosexual male anymore. People can bag me as much as they like, and as soon as I reply I'm discriminating against them based on some group (generally minority) that they choose to align themselves with.
    Yeah, married, white, Christian, heterosexual males are really at a disadvantage in Western society. I mean, how many political and business leaders can you name that match all of those criteria?


    But the most powerful man in the free world is none of those things!

    *rimshot*

    I'll be here all week folks, don't forget to tip your waitresses.

    (CAPTCHA: tristique, your waitress)
  • Jay 2012-05-30 13:12
    brazzy:
    Matt Westwood:
    Jay:
    And they look at me like I'm an idiot. "Don't you understand why it's better to not have to make code changes?" they ask condescendingly.

    ... to which you look them in the eye with an open expression and say, politely, "No. Why?"


    And then they explain their change request process and their deployment process to you, and you start to see their point, at least a little.

    Of course, the correct solution would be to fix those processes, but good luck with that...


    Yes, there's truth in that. If the point is that it lets them circumvent the bureaucrats, I'll grumble about the rules rather than those trying to function within them. Of course, sooner or later the bureaucrats will figure this out, and they'll institute a change control process for your XML files.
  • Jay 2012-05-30 13:21
    Severity One:
    Prashant:
    What a funny ol' world we live in where discrimination, predjudice and vilification only count only for certain groups.
    eg:
    Sexism is discrimination against females (not often you see it the other way)
    Racism is discrimination against Asians, Indians, Africans, Aborigines and generally anyone who isn't Caucasian
    Sexual Discrimination is only when someone is homeophobic
    etc...

    No wonder I don't enjoy being a married, Christian, white, heterosexual male anymore. People can bag me as much as they like, and as soon as I reply I'm discriminating against them based on some group (generally minority) that they choose to align themselves with.
    Yeah, married, white, Christian, heterosexual males are really at a disadvantage in Western society. I mean, how many political and business leaders can you name that match all of those criteria?


    Okay, I'll bite. Name some.
  • Jay 2012-05-30 13:23
    Jay:
    Severity One:
    Prashant:
    What a funny ol' world we live in where discrimination, predjudice and vilification only count only for certain groups.
    eg:
    Sexism is discrimination against females (not often you see it the other way)
    Racism is discrimination against Asians, Indians, Africans, Aborigines and generally anyone who isn't Caucasian
    Sexual Discrimination is only when someone is homeophobic
    etc...

    No wonder I don't enjoy being a married, Christian, white, heterosexual male anymore. People can bag me as much as they like, and as soon as I reply I'm discriminating against them based on some group (generally minority) that they choose to align themselves with.
    Yeah, married, white, Christian, heterosexual males are really at a disadvantage in Western society. I mean, how many political and business leaders can you name that match all of those criteria?


    Okay, I'll bite. Name some.


    Oh, let's agree that we'll accept Catholics, Protestants, and Eastern Orthodox as "Christians".
  • Jay 2012-05-30 13:27
    Nagesh:
    Prashant (unreg):
    No wonder I don't enjoy being a married, Christian, white, heterosexual male anymore. People can bag me as much as they like, and as soon as I reply I'm discriminating against them based on some group (generally minority) that they choose to align themselves with.


    If you are pretend to be white, married, christmas, at least have courtesy to not use Indian name like Prashant, madarchod!


    He's not pretending to be "christmas". He's pretending to be Easter.
  • dogmatic 2012-05-30 13:42
    Prashant:
    Matt Westwood:
    C-Octothorpe:
    Captcha: paratus:
    I'm not an xkcd-hater
    I am, and anybody sadistic enough to perpetuate the shit should die a painful death designed for pederasts and liberals...


    And Christians.
    Couldn't help but wonder the uproar if instead of Christian you'd said Muslims....

    What a funny ol' world we live in where discrimination, predjudice and vilification only count only for certain groups.
    eg:
    Sexism is discrimination against females (not often you see it the other way)
    Racism is discrimination against Asians, Indians, Africans, Aborigines and generally anyone who isn't Caucasian
    Sexual Discrimination is only when someone is homeophobic
    etc...

    No wonder I don't enjoy being a married, Christian, white, heterosexual male anymore. People can bag me as much as they like, and as soon as I reply I'm discriminating against them based on some group (generally minority) that they choose to align themselves with.


    Reminds me of that old chestnut, the white guy says to the black guy "how come you have BET and we don't get a WET?" To which the black guy says "what do you mean?!? Every other fucking channel is WET!" (except for the Spanish channels of course) captcha 'tego' as in 'a mi me tego telemundo.'
  • Cat 2012-05-31 00:52
    big picture thinker:
    I disagree. Too much "soft-coding" (planning for extensibility that will never be useful) is a huge problem. Nobody is going to fiddle with a table like this to change words on a menu. Most likely, the only reason anyone would ever need to edit the menu would be to add a new option or change the way an existing option worked (which would require access to source code in either case).


    It depends on the software. The software I develop has a somewhat similar way of representing menu items (as database records). I will say a few things:

    1. In our area, it IS very common for our customers to edit and change our menus - usually customizing the menu contents for each type of user, but sometimes they alter names, too. For example, while we try to use industry-standard terminology for what our activities do, our customers often have subtle variations in vocabulary so they will want to change the names to reflect their organization's terminology.

    2. You don't necessarily need access to the source code in order to add new functionality, for example providing a plugin API for clients to write their own modules.
  • oheso 2012-05-31 06:09
    Matt Westwood:
    C-Octothorpe:
    pederasts and liberals...


    And Christians.


    Twain: But I repeat myself.
  • oheso 2012-05-31 06:11
    brazzy:
    ... a quagmire of empty layers of indirection and inner platforms where any change needs to be done only once, but there's 25 different places where it could be done, all of which have been used for various changes in the past, and each of which requires hours of research to understand.


    You say that like it's a bad thing ...
  • Lazlo 2012-05-31 08:30
    So I would think that doing things this way would make it fairly simple to fix little typos and spelling errors such as spelling separate as "seperate".

    Or maybe not.
  • senior moron 2012-05-31 13:01
    Nagesh:
    All VB6 programmer give programing a bad name. VB .NET slight better. that like saying central govt slight better then state govt.

    God saves us all in after-life.


    You're a fuckin idiot.
  • Robert B. 2012-06-07 20:15
    Prashant:
    Racism is discrimination against Asians, Indians, Africans, Aborigines and generally anyone who isn't Caucasian


    You _do_ know that Indians (both dots and feathers) are Caucasian, right? Of course not, otherwise you wouldn't have written that. I think you meant "white" instead of Caucasian. But that's even less politically correct.
  • nmn 2012-06-12 09:54
    People who complain about "soft coding" are generally too stupid to recognize the subtle horror of hard coding. Sure you can go too far the other way, but the worst case soft code is far better than the worst case hard code.


    People that argue that "soft coding" is a solution are too stupid to design systems.
    It is trivial to design a factory which can instantiate a class based on a configuration value read from a database. This way the code can be added and removed any time - no hardcoding needed, can be properly compiled and can be included in test cases whitout loosing the flexibility. Not to mention the ability to create different handlers for different platfoms if you need it.