 Today I'm here to tell you to read more. My name is Grzegorz, but nobody can pronounce it, so people just randomly delete half of the letters and call me Greg. I work for a company called Caligo Travel Solutions, we build travel technologies, and I'm personally a huge fan of books. I basically read all the time, and whenever I talk to people who don't read so often, they tell me, oh I would like to read more, but, and but is a real word, like a killer word. Imagine that you go for a job interview, and they tell you, we really like you, but, you don't care what they say before, but. You know what's going on. It's the same everywhere. You go for a date, and your partner says, I really like you. You're a really nice girl, boy, but, and you don't care, because you know what's going on later. So nothing that people say before the word bad actually matters. It's just after that there will be some excuse. So the first one is, I have no time to read, and that's my answer. Because you have time for all this crap. Singaporeans in their 20s and 30s, commonly called millennials, somehow I have allergic to these words, so I don't use it. Spent more than three hours a day on social media, and watching YouTube, watching Netflix, reading Facebook, but they don't have time for books. Now, the second excuse is that reading while you're commuting, because everyone commutes around half an hour to an hour a day, sometimes more, that it's not convenient to read while you're commuting. And one second that's my answer. And this is because you don't have to read. You can read on your phone, you can read on your tablet, but you can also listen to audiobooks. So you can use your phone in exactly the same way as you use it to watch videos or listen to some podcasts, to read or listen to books. Then the third thing is that I don't know what you read. And obviously then you're not a liar, you're just a slugger. Because there's tons of places when you can get recommendations. You can just check the list of New York Times bestsellers. You can check Goodreads. There is literally a website called WhatShouldIReadNext.com, and it tells you what you should read next when you put the book that you've read recently and you enjoyed. Now, the last excuse is that books are expensive. And this is a combo because it makes you both liar and a slugger. Because if you Google for free books, it throws you with more titles than you can ever read in your life. If you Google for free programming e-books, it gives you a link to GitHub repository that has more than 1,000 free e-books. If you read one book a week, it's 50 books a year. And you live for 80 years. It gives you what? Like 400 books? 4,000? Never. That GitHub repository has more. Literally, just in five seconds, you can go to a list of more books that you can ever read. And you say that they are free e-books, more free e-books than you can ever read. And you say that they are too expensive. Not reading makes you stupid. I believe that people who do not read books just lag behind the rest. Seriously, if you're not reading, then you lose your vocabulary, then you don't train your brain. And reading books not only makes you smarter, it also makes you more tolerant, it makes you more empathic and open-minded. You should read less Facebook because Facebook is not a book. It's not really Facebook, no. You should read less LinkedIn. This is even worse than Facebook. That's because on Facebook, everyone knows that it's a crap. But on LinkedIn, people think that this is actually something valuable, something worth reading. So you go there thinking that you will read something smart and it's worse than Facebook. Now, you should read less news because half of them is crap and half of them is false. You should read less life coaching crap. I'm not talking about all the self-development books because some of them are really good. But if you read to a book like How to Wake Up Your Inner Giant or You Can Do Everything, you read one of these books, you read all of them. I know what I'm saying because I've read like five and only then I realize that it's the same. Basically, read less shit. But you should read more good journalism. There are lots of websites where you have trials, you have limited articles per month with really good journalism. You should read more novels because they teach you a lot of new vocabulary and they are just fun. You should read more history and more biographies because they tell you about the stuff that happened and other people learned and you could learn from them. Of course, you can learn from your own mistakes but how much more pleasant is to see other people failing and learning from that? You should read things that you disagree with because if you only read what you agree with, you're never ready to change your mind. You only make your opinion stronger but that doesn't mean that you're more right. You just believe more in what you read. You should read things that you don't understand. There is a book, there is a first cyberpunk book called Neuromancer and it was written 30 years ago. So right now all of the stuff that happens doesn't seem so futuristic but back then it was really something. I tried to read this book five times and I read it this year on my fifth try. That's because the author uses such a complicated vocabulary that my English was never good enough to read it and I really wanted to read it in English. Now I read it this year, I still didn't understand half of it but it was fun. I'm going to do it again in one, two years. I'll see if I get more of it. You should read a few books at once because then you do not have the excuse that oh, I don't feel like reading this book today because then you have two more or three more and there is always something that you could read depending on your mood. And why I'm talking today about books is because what I really want is to convince you to read something way more difficult and time-consuming. Basically I want to tell you to read more code. And with reading code all of these excuses that I showed earlier, at least some of them are real. So when I tell someone to read more code, people tell me that they don't know what to read. And of course you do not have the, what should I read next for code, right? You do not have the recommendations, like github does and you give your recommendation, oh, if you like this code you should read this repository next, right? So this is a real struggle. What you should start with is open your gem file and see the library that you used today. You should check, you should find some method that you used today in your code and you should go to the definition of that method and you should learn how it works. You should read open source Rails apps. There are some applications, not only libraries, there are some applications written in Ruby on Rails that are open source, that are big repositories that you can learn a lot from. One of them is diaspora which used to be like a Facebook alternative that never really picked up, but it's still there, the repository is still active and you can find some good code there. There is RedMind that is extremely complicated repository and maybe you will not learn what to do, but you will learn what not to do in your app. RedMind is the tool for project managers to track time, to track tasks, etc. I don't think it's active anymore, but there is still so much code there to see and to learn from. There is CoderWall which you might know because this is quite a popular website among developers. They have two repositories, the old version and the new version, both are written in Ruby on Rails. You can compare what they change between the versions. Once again, you can learn a lot. You can read any open source code and we take it for granted as developers that we have access to the code, that we can read what other people wrote, but this is extremely unusual. Scientists don't have this because to read the scientific journal you have to pay really a lot of money. I know architects and military, everything is secret there. You do not share your knowledge unless other people pay you and with open source development this is unbelievable. The smartest developers, the smartest guys that ever wrote some code, publish it for free and you can just open it and it's like reading their mind, it's like seeing how they think. You can see open source code, there is a source code of Quake or Doom, the game written by John Karnak in the 90s. You will understand nothing from that because it's assembler, but if you're interested in assembler then you can start learning and you can see how this guy that built one of the most important and most popular games ever how did he write his code? You should read your co-workers' code, not only the one that you are reviewing, not only the one that you are going to actively develop, but you can just go through the changes of what your co-workers write because every day you can learn something new from them. Okay, reading code while comedic is inconvenient. Yes. It is difficult, yes. And this is also true. You will probably not get half of it. If you try to read the code of Ruby language, today I checked with my colleagues at work there is one file in Ruby language which is responsible for parsing the program. This code is written in C and one file is 11,000 lines of code. Of course this is very discouraging if you try to read this. So yes, it is time consuming to read this and you won't understand most of it because if you're Ruby developer, of course you will not understand lots of C code in which Ruby is written. You will not understand a lot of Rails code because there's so much meta-programming there. So yes, it's all true but it doesn't matter because it's still valuable to read the code of other people. So why should bother? First because it teaches your new techniques. If you read code of other people, you find the methods that you never used in your code and you never really bothered to check because you didn't know that they exist, right? So how do you learn about existence of methods other than seeing them being used somewhere? Nobody goes to documentation and reads it's like, you know, it's like encyclopedia, you do not go from letter A and see what methods I can use, no. You want to see things being used in real life. It teaches you how other people think and this is extremely valuable to me because if you are only writing code, you never change the way you think, you never change the way you express yourself and this is what code is. You just express your thoughts in some strict, in some formal grammar. It's like a writer or a poet reading the work of other people. It's like a painter seeing the masterpieces of other painters. You just see how other people work but here in the code, not only you see the final effect, you also have the Git history. So you can see step by step how they got to this code, how they refactored it, how they made some bugs and later fixed it. It shows you the work of the best coders. Open Source really took off in the recent years and big companies, Facebook, Google, Microsoft, they all released Open Source. You can read the code of living programming legends. This is really amazing and once again, you can see how this code was created. You can see comets, how they did it one by one, how they did it step by step. You can read descriptions of comets. Very often this is something that people miss but very often in the description of a comet people put why they did it this way. So you don't only see the final effect, you see the way other people, the really great and smart people think. It shows you that no code is perfect. This is especially helpful if you are a beginner or a middle level coder because you often see that your code looks like a kind of crap and then you open the book and you're learning more and in the book everything is so beautiful but that's because the books have code that was crafted especially for the book. It's not the real life code. So if you open some library or some open source application then you see that there is so many edge cases that no code is perfect, that it's very hard to catch plenty of bugs, that it's very hard to write such a simple and beautiful code as you see in the books. You will see some really good code when you read open source applications. You will see some really bad code and seriously some very popular code when it comes to the quality. Well, the best what you can say about it is that it works, right? So really there is some really bad code. You will see some very simple code. Sometimes we see something and we say, wow, it's magic. For example, the fact that Rails has the table names, generates table names with the plural form and the models in singular and it's like, wow, it's magic and in reality they just keep an array of the words that are irregular and the rest they just add s. That's it. You will see some code that is really complicated and of course because there's plenty of cases, there's plenty of things that are just not simple so you cannot express them in a very simple way in code because these things are not simple themselves. It shows you real code. I already mentioned this is not code that is crafted for the purpose of a book. This is the code that someone wrote because there was a real life case that this code was needed and it simply makes you a better programmer. If you read code of other people you can later apply it in your old code. It's that simple. It will just make you a better programmer. This is, once again, it's a real struggle. You don't know how to start because it's difficult to just open a random file in a random repository and just start reading it because you kind of get it on the micro level but you do not see how this thing fits into the library or the application as a whole. But of course you can just open any repository that you use in your application. If you've got Rails Jam in your application, if you've got any Jam in your application you can just type bundle open and the name of the Jam and it opens your editor with this directory. You can use software like RubyMind that allows you to simply jump to the definition of a method. If you use a method that comes from any Jam that you're using, RubyMind indexes it and you can just jump to the definition and then you see how this method works internally. If you're not using RubyMind you're using just some text editor. You can use software called CTAX. There are plenty of plugins for that. I think every major editor has plugins for CTAX. So CTAX just generates this list of definitions of methods and you can just simply jump between methods from your application and from all the libraries that you're using. So just pick a method that you use in your code and jump to the definition and see how it works. This is the start. Then find this method in the library. See what option has this method. Maybe you can add something that you didn't know about. Maybe there is something in this method that is not really documented. Documentation and code I'm sure you know that it's not the same. Everyone writes code not everyone writes documentation. Open source applications. Very often developers just add some new feature and they just don't document it. There's plenty of hidden gems there. You can read the test as long as the repository has the test. Major open source repositories have tests. Not always perfect, not always good. Not always easy to read but tests will help you to understand why this code is written this way. Also tests, whenever there is some bug found in a test that later makes sure that this bug will not repeat. So you can see what edge cases were caught in that code. You can go in any Ruby gem, you can go to lib directory and then the file that is named after the library and you can see what happens when you include that file. What files are required there? What is the code that initializes the way the library works? This is usually the best way to start working with the code of the library. Or you can just go to the documentation and you can find the most basic methods. The documentation has the getting started section and it tells you, oh, just include this module. Just go to this module and see what happens when you include it. Now, a few months ago we did a few meetings of Ruby Code Reading Group in Singapore. We tried it three times so far. It's a smaller meta and you need to read some part of the code and later we just meet and try to help each other to understand how it works, show some use cases that are not very obvious, et cetera. So far we covered prokets, rack and concurrent Ruby. We plan to come back again in January, so stay tuned. We will be announcing it on Meetup.com. To sum up my presentation, read more good stuff. Facebook is like fast food for your brain. Fast food is very tasty but it's not necessarily good for your brain. Books are sometimes difficult and not really so tasty. They are like vegetables, but also they are like supplements. They are just training your muscle. Once again I work for a company called Kaligo Travel Solutions. We are producing the software for airlines and banks that's used all over the world and of course we're hiring. My name is Greg but not really. I'm Gregorz. And this presentation was called Read More. Thanks for coming. I've got books to give for questions. Okay, perfect. Can I ask what are the tools you recommend for beginners? Technical books. For beginners. If you want to learn Ruby, the Pickaxe book, this one. Learning Rails. Yes. Go on. So how long do you spend on average open reading technical books? That depends. I always read at least three or four books at the same time. One of them is technical, one is a novel and two are just some others. So that depends on my mood. Sometimes it's like, I don't know, five hours a week on a technical book. Sometimes it's just one, two hours. Yes. I don't think I read so many technical books anymore. Now I read more of the code than technical books. Hey, cool. Can we give this book? It's perfect for beginners. True story. Everything away. So one thing I did when I first started was basically figure out how Rails work. Let's say you call active record user.find. Figure out how .find actually works. Or figure out how Rails actually serve a real request. Like how does Rails control the middleware and stuff. So you go through the process, you actually get a better understanding of Rails. And the practice of how you basically, it can be Rails, it can be any other person like a library of Rails. That's true, yes. Or maybe not Ruby. It's like 11,000 lines of code in one file. More questions? I've got four more books. What are some examples of sites or websites that are busy with good journalism that you enjoy? I read one really good blog that is called Wait But Why. I see that lots of people know it. It's extremely good. Then I read Atlantic, I read New Yorker, I read Nautilus and I read some other but it's mostly in Polish language. You get Ruby pocket reference. Can we give it? So you mentioned that computing is a good thing, right? Yeah. And you suggested for those of us that write Mozart? Sorry. Yes, I listen to audiobooks. I use audible.com and just every month I just subscribe there. Every month I get one book and one book is around 10 to 20 hours many on that. So if you commute one hour a day, 20 days a month, perfect. You get a book and you get another credit from your subscription. It's wonderful. Yes. One more book. Sinatra? How about this one? No. Okay. We still have three more. Michael, which book do you want? Yes. Okay. Thanks everyone.