My JavaScript book is out! Don't miss the opportunity to upgrade your beginner or average dev skills.

Wednesday, April 17, 2013

How About KISS vs YAGNI ?

I know this might sound silly but I keep having fun writing stuff here
since I've switched to mark down text :P

### Is This A Natural Conflict ?
If you are wondering what I am talking about I have a very simple example:
the Linux world!  

In the specific case, file system operations!

# copy a file
cp file1.txt fle2.txt

# remove a file
rm file1.txt

### That's A Move File !
Yes, is really that simple! When you move a file you are sure that file has been copied,
it has the new name or the same, if in a different folder, and you can remove the first one.  
OK, OK, if you are a Windows user you might have experienced some lost file in the past
due accidents during the copy such "_not enough space_" I got it, but what if that's because you've been too KISS and not YAGNI?  

### The Software YAGNI Approach
If you can obtain that in a quite simple way, no need to complicate things around.

### The KISS Approach
If everything I need is more than an action, I am not going to like that.  
KISS is also used as concept behind APIs and final, production ready, products.

### The Reality
KISS, however, is probably the most difficult thing ever in programming languages ... 
guess why? There's no such thing as **simple** when it come to programming.  

Actually, the most user-friendly interfaces and interactions, are probably also
the most over engineered so ... you see?

### As Summary
I've no idea if these two approaches, both my favorites, could be confusing and in collision.  
What I know, is that while I was writing this post I've been thinking all the time how to represent
bloody acronyms in Markdown.  

It came out that basing my experience with KISS and YAGNI, the best solution I had in mind
was under everybody nose as **JSON**:
`{"KISS":"Keep It Simple, Stupid"}` and `{"YAGNI":"You Ain't Gonna Need It"}`  

Both have never been mentioned in the [Markdown famous post](, something I'd love to contribute updating it!


alexkunin said...

Your posts became unreadable in Google Reader :( One big blob of text, no newlines.

Unknown said...

This post looks awful in Reeder. Markdown post was better.

Andrea Giammarchi said...

sorry guys, I keep forgetting I need to write that <pre tag at the beginning ... done!

Andrea Giammarchi said...

sorry guys, I keep forgetting I need to write that <pre tag at the beginning ... done!

Unknown said...

And on leave comment page, when you click “show original post” the post is broken formatting too.