yagni

When to violate YAGNI? [closed]

不想你离开。 提交于 2020-01-01 02:35:25
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 5 years ago . The YAGNI "principle" states that you shouldn't focus on providing functionality before you needed as "you ain't gonna need it" anyway. I usually tend to use common sense above any rule, no matter what but there are some times when I feel it is useful to over design or future

When to violate YAGNI? [closed]

余生长醉 提交于 2020-01-01 02:35:07
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 5 years ago . The YAGNI "principle" states that you shouldn't focus on providing functionality before you needed as "you ain't gonna need it" anyway. I usually tend to use common sense above any rule, no matter what but there are some times when I feel it is useful to over design or future

What's the difference between principles YAGNI and KISS?

不想你离开。 提交于 2019-12-23 08:36:02
问题 Obviously there are syntactical differences between YAGNI and KISS but I can't see any semantic differences between them. Are they really in essence just the same thing? 回答1: YAGNI (You aint gona need it) refers to over analyzing and implementing things that may or may not be needed. Sure algorithmic elegance is nice and all but most situation you dont need it. In general engineering terms you should be carefull not to include your own requirements so that you dont taint your customer needs

What's the difference between principles YAGNI and KISS?

旧巷老猫 提交于 2019-12-23 08:35:15
问题 Obviously there are syntactical differences between YAGNI and KISS but I can't see any semantic differences between them. Are they really in essence just the same thing? 回答1: YAGNI (You aint gona need it) refers to over analyzing and implementing things that may or may not be needed. Sure algorithmic elegance is nice and all but most situation you dont need it. In general engineering terms you should be carefull not to include your own requirements so that you dont taint your customer needs

Decoupling vs YAGNI

你。 提交于 2019-12-21 04:42:46
问题 Do they contradict? Decoupling is something great and quite hard to achieve. However in most of the applications we don't really need it, so I can design highly coupled applications and it almost will not change anything other than obvious side effects such as "you can not separate components", "unit testing is pain in the arse" etc. What do you think? Do you always try to decouple and deal with the overhead? 回答1: It seems to me decoupling and YAGNI are very much complementary virtues. (I

Is removing unused functionality a bad thing?

允我心安 提交于 2019-12-11 01:08:17
问题 Is it possible for YAGNI to apply in the past tense? You created some functionality, it was used a little bit a while ago, but you aren't using it any more, and you don't want to maintain it, so you'd rather delete it. Is getting rid of unused or rarely-used functionality neccessarily a bad thing? Background : I use source control, so if I need the functionality again, I can get it. I'm the only user of my software (I'm a bioinformatician analyzing a data set). One scenario where I came

Does YAGNI also apply when writing tests?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-10 01:08:44
问题 When I write code I only write the functions I need as I need them. Does this approach also apply to writing tests? Should I write a test in advance for every use-case I can think of just to play it safe or should I only write tests for a use-case as I come upon it? 回答1: I think that when you write a method you should test both expected and potential error paths. This doesn't mean that you should expand your design to encompass every potential use -- leave that for when it's needed, but you

Should you create an interface when there (currently) is only going to be one class that implements it?

本秂侑毒 提交于 2019-12-04 23:32:20
问题 Should you always create an interface if there's a possibility that there might be something else that could use it, or wait until there's an actual need for it then refactor to use an interface? Programming to an interface generally seems like sound advice, but then there's YAGNI... I guess maybe it depends on the situation. Right now I have an object representing a folder that can contain recipes or other folders. Instead of using Folder directly, should I worry about implementing something

Write programs that do one thing and do it well

依然范特西╮ 提交于 2019-12-04 19:17:59
问题 I can grasp the part "do one thing" via encapsulation, Dependency Injection, Principle of Least Knowledge, and You Ain't Gonna Need It; but how do I understand the second part "do it well?" An example given was the notion of completeness , given in the same YAGNI article: for example, among features which allow adding items, deleting items, or modifying items, completeness could be used to also recommend "renaming items". However, I found reasoning like that could easily be abused into

When to violate YAGNI? [closed]

你说的曾经没有我的故事 提交于 2019-12-03 06:11:39
Closed . This question is opinion-based. It is not currently accepting answers. Learn more . Want to improve this question? Update the question so it can be answered with facts and citations by editing this post . The YAGNI "principle" states that you shouldn't focus on providing functionality before you needed as "you ain't gonna need it" anyway. I usually tend to use common sense above any rule, no matter what but there are some times when I feel it is useful to over design or future proof something if you have good reasons, even if it's possible you'll never use it. The actual case I have