Questions tagged [yagni]

"You Aren't Gonna Need It": An [tag:extreme-programming] principal, which advocates only introducing new features to an application when they are actually needed (as opposed to a need being foreseen).

An principal, which advocates only introducing new features to an application when they are needed.

27 questions
4
votes
1 answer

Reconciling the paradox of YAGNI vs foresight

I've taken some courses and read about the purposes of YAGNI. But, this principle as a whole has never sat well with me. It introduces a logical paradox. As a hypothetical, you're designing a framework that you intend to scale forward. YAGNI (and…
jwarner112
  • 1,492
  • 2
  • 14
  • 29
4
votes
9 answers

Are KISS and YAGNI at odds with the trends towards increasingly more sophisticated patterns and practices like SOA, DDD, IoC, MVC, POCO, MVVM?

It seems to me that Agile methodologies encourage us to keep things simple, and lean, and not add complexity and sophistication until its needed. But the pace and volume of technology change encourages the use of increasingly abstract, complex and…
JNappi
  • 1,495
  • 1
  • 14
  • 24
3
votes
1 answer

Approach on API/System design

I was watching a video on "Design Uber api mock interview". for most of the APIs, the candidate just used "userId" and left on the system to resolve "rideId" Example - cancelRide(userId: string) For this api, user is just passing userId to…
user10712989
3
votes
3 answers

Is there any hard data on the value of Inversion of Control or dependency injection?

I've read a lot about IoC and DI, but I'm not really convinced that you gain a lot by using them in most situations. If you are writing code that needs pluggable components, then yes, I see the value. But if you are not, then I question whether…
Erik Funkenbusch
  • 92,674
  • 28
  • 195
  • 291
3
votes
2 answers

YAGNI and database creation scripts

Right now, I have code which creates the database (just a few CREATE queries on a SQLite database) in my main database access class. This seems unnecessary as I have no intention of ever using the code. I would just need it if something went wrong…
Instance Hunter
  • 7,837
  • 5
  • 44
  • 56
3
votes
5 answers

How to avoid debugger-only variables?

I commonly place into variables values that are only used once after assignment. I do this to make debugging more convenient later, as I'm able to hover the value on the one line where it's later used. For example, this code doesn't let you hover…
lance
  • 16,092
  • 19
  • 77
  • 136
3
votes
7 answers

YAGNI and junior developers

When writing code for a new system I don't want to introduce unnecessary complexity in the design that I might never have any need for. So I'm following YAGNI here, and rather refactoring as I see the need for more flexibility or as responsibilities…
2
votes
4 answers

Language Wizards considered harmful?

Wizards can kick-start features. They can also obfuscate your code, and are anti-YAGNI. On balance, do you think Wizards are more useful or more harmful?
dkretz
  • 37,399
  • 13
  • 80
  • 138
2
votes
2 answers

KISS & design patterns

I'm presented with a need to rewrite an old legacy desktop application. It is a smallish non-Java desktop program that still supports the daily tasks of several internal user communities. The language in which the application is both antiquated…
user1549195
1
vote
2 answers

Zend_Validate good strategy to avoid repetition of code

I'm am currently building two custom validators that extends Zend_Validate_Abstract which are named respectively Lib_Validate_TimeAfter and Lib_Validate_TimeBetween. The names a pretty straight forward, the first one is used to test if a…
JF Dion
  • 4,014
  • 2
  • 24
  • 34
1
vote
3 answers

Substitute Enum switch with design pattern (IOC)

I've got an event handler which receives an eventargs object inside which is an enumerated value that further refines the information inside. It looks something like public enum StatusCallbackType { Status1, Status2, Status3, Status4 } public class…
Jorge Córdoba
  • 51,063
  • 11
  • 80
  • 130
1
vote
2 answers

What is the point of YAGNI principle applied to design patterns?

I recently read "Head First Design Patterns". The book is well-written and worth reading. It often starts each chapter by first introducing a problem and a very 'naive' solution to the problem. In next pages more requirements & constraints are…
duong_dajgja
  • 4,196
  • 1
  • 38
  • 65
1
2