Sometimes in source codes I see something like:

// TODO: Do we assume searchChar is usually relatively small;
//       If so then calling toString() on it is better than reverting to
//       the **green implementation** in the else block

(from here)

My guess is that green implementation refers to quickly written code that works correctly, but is capable for further optimization and refactoring. Am I right?

closed as unclear what you're asking by user22815, Jörg W Mittag, gnat, user40980, Doc Brown Feb 18 '16 at 13:54

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • @DocBrown this example is from apache commons lib source code; the same term I heard a few times from other developers outside our organization. If it was so specific, I couldn't hear/read it in several sources, if it was common, I could just google an answer, without need of asking here. – Alex Salauyou Feb 18 '16 at 14:01
  • 2
    Well, you could have written that into your question first hand, without any context such a question is very unclear. That is why it got closed. You can even try this now, maybe you can clarify enough to find five people voting to open your question again. Nevertheless I guess if you contact someone of the original devs of the code you are referring to, chances are much higher you will get an answer. – Doc Brown Feb 18 '16 at 14:13
  • 1
    @DocBrown thank you, but I believe there is no need for this. If it was a common term, one of experienced programmers here answer this question quickly. Now I see it is unknown to most. – Alex Salauyou Feb 18 '16 at 14:24
up vote 1 down vote accepted

The only time I've heard this is for green to refer to new or naive or inexperience (eg Green troops). So I would assume that the 'green implementation' refers to a very simplistic and potentially poor solution.

However, that's an assumption based on a couple of words that I don't see in common usage, so it could mean anything. maybe there was a "green project" that implemented solutions once and this refers to the output from that old project. Maybe it was written by a guy whose nickname was green.

Not the answer you're looking for? Browse other questions tagged or ask your own question.