Here is a talk Uncle Bob gave in 2011 at Ruby Midwest 2011. Honestly, I come back to this talk every two months or so. I must also add that I’m a great fan of Uncle Bob (@unclebobmartin). It also contains some notes about MVC - what the true purpose of MVC is, why it was created and so on. Here it is (you need to click on Read more to load the embedded YouTube video):
To be honest, I don’t remember when I actually started thinking about writing down most of the solutions I found on the internet or implemented myself.
I realized that from time to time I go back to solutions, code snippets or config files I created or modified to fulfill some specific requirements. It’s good if I wrote it down somewhere, put it on Gist or Pastebin, but what if I did not?
Let’s say I just configured Nginx as a load balancer and, for example, after a year or so I need to make something exactly the same or at least similar. What then? I need to go through the Nginx documentation again or start searching on Google. Sure, in some cases I remember exactly how I solved a specific problem, but when it was some time ago then…
This is the reason why I decided to create this simple blog. I hope it won’t evolve in any unpredictable way. You can think about this blog as my notebook. If somebody else finds my notes useful/helpful - even better. Let’s make this World better.
Have a great day.
P.S. As you probably noticed, I’m not a native speaker, so in case you find some mistakes in my posts (probably more than one), please let me know ASAP.
packageinterfacesimport("fmt""io""os")// Copy data from std in to std outfuncCopy(inio.ReadSeeker,outio.Writer)error{w:=io.MultiWriter(out,os.Stdout)if_,err:=io.Copy(w,in);err!=nil{returnerr}in.Seek(0,0)buf:=make([]byte,64)if_,err:=io.CopyBuffer(w,in,buf);err!=nil{returnerr}fmt.Println()returnnil}