Categories
Programming

Books I read in 2020

Last year I (re)started investing in myself. Investing in my knowledge and my skills. It is not an easy thing to do always to motivate yourself to learn or relearn new things, improve your skills beside family life and this lock-down / Covid time.

Despite this I have read 3 Computing programming books last year.

Clean Architecture

Back in 2013, I had already read the book from Robert C.Martin called “Clean Code”. I remember reading it in the H.E.V (fast train in Hungary) and I loved it so much. I fell myself inspired by the concepts and the topics that Uncle Bob was writing in the book. As soon as I finished it, I wanted to check my code and see how far I was from the original concepts. I was discussing with colleagues and discussing around all these details in the book.

I felt pretty much the same reading this one. I read it only in a couple of days, and felt in “love” with the SOLID principles. Several of these concepts were kind of known already, but no necessarily with all details and the right names on it. I even made a presentation in the office and tried to promote them around me. I read some people dislike the principle, saying they are “bullshit” and do not bring anything to your code. I tend to disagree and I am now trying the best I can to apply them on a daily basis, in small and professional projects.

Swift, protocol-oriented Programming

I started developing iOS only in 2015, which is not so long ago and I was learning Objective C at first. I was doing a bit of swift as well in my free time, but it was still pretty limited compared to Objective C which I had to learn at work every day. Most of our projects were still in Objective c as we had to maintain code bases older than swift, and Swift wasn’t mature enough to be introduced for a production application:.

Therefore I became a bit behind the standard with Swift and it was important to catch back the train. In the beginning I didn’t like various things about the language when coming from Objective C. I found it annoying and strange to some extend. I found some optimisations useless as I didn’t mind writing a bit more code to achieve the same thing.

I admit I was wrong! Swift is absolutely great, and all the new features and things you can achieve with the language and the compiler helping you to prevent mistakes are absolutely great. The things I like the most about swift right now:

  • Optional. Making sure an object has a value is key, and avoid a lot of unnecessary nil checks we had on Objective C or Java. Compiler is a bit helpful!
  • Enum with Associated Value. Enum exist in lot of languages, but having the possibility to add to parameters to each values is extremely useful
  • Generic and Associated types. I was using the “template” a lot in C++ back 15years ago, but I was missing this in Objective C. This is extremely useful in some cases
  • Protocol extension. That’s a reason it’s called protocol oriented programming. You can now write code for an extension, so all objects implementing this extension will get your code extension for free.
  • Value Type vs. Reference Type: Representation of an object which avoids accessing and modifying objects by mistake.

Dependency Injection in .Net

The best book I read in a long time.

Very well written book about what is dependency inject and all the variation of it. They are using concrete examples with real code, as well concept which can be apply in the everyday life.

  • Constructor injection
  • Method injection
  • Property Injection
  • Dependency Injection framework
  • Design patterns explained with DI (for example Swinject)

All of the various parts are detailed with code examples (in .net, but close enough to Swift) This is a book you can buy and use as a reference, to go back and read some parts once in a while upon requests and needs.

Thank you for reading until here…  👊 Have a good week end…  🍺