Ruby on Rails Tutorial Michael Hartl

Review to one of the most popular Ruby on Rails tutorial
22 June
Ruby

A dynamic, open source programming language with a focus on simplicity and productivity.
 

Ruby on Rails

Ruby on Rails (RoR) - a framework written in the Ruby programming language.

When you will start to learn RoR, one of the first book that will be recommended to you is a Ruby on Rails Tutorial by Michael Hartl. This is one of the most popular newbie’s Ruby guide. At the moment, it has 6 editions and translated to many languages. It consists of 14 chapters and 744 pages. Thru these pages, Michael will teach you how to develop custom web applications, using the popular Ruby on Rails framework. It will also focus on the general principles of web development.

Ruby on Rails Tutorial by Michael Hartl
Ruby on Rails Tutorial by Michael Hartl

Author

Michael Hartl is former Y Combinator alumni, he has a Ph.D. degree in theoretical physics and he was teaching at Caltech. His book guides you through building a Twitter clone in Rails. This is the only Rails book that does test-driven development the whole time. This approach is highly recommended by the experts.

Michael Hartl
Michael Hartl

By including Git, GitHub, and Heroku in the demo examples, the author really gives you a feel for what it’s like to do a real-life project. The tutorial code examples are not isolated.

Book targeting

The book is targeted to a Rails newcomer, not a pro web developer, but general programming skills are needed. Author assume that you are a beginner, so, he will introduce whole Rails ecosystem to you. So, some time will be spent to install version control system called Git and text editors for coding.

What's inside

Inside Ruby on Rails Tutorial
Inside Ruby on Rails Tutorial

Building a Twitter clone by this book will be in a “hard way”, without a gem for user authentication. So, you will be involved in building different models (user, micropost and session), creating partials, passing information between different classes and handling errors.

A micro-blogging app is used to slowly, step-by-step walk through the different Rails features. The tutorial also explains some of the “magic” that goes on under the covers that Rails provides for you.  

Whole book is like a perfectly written program, modular, without any bugs or “empty code”. Author specify the exact versions of every gem, Rails and databases that are used. The book has zero errors, so, every time you will have a bug, it is an issue on your end.

True coder's habits

Usage of GitHub, Heroku, branching makes you feel like you are working on a real-life project, being a “real coder”. Number of gems, used in a test project is not very big, only the most common were used. Most of the things are made by hands.

Book is focused on testing. It starts from RSpec unit tests, then integration tests. TDD approach is followed for a long time where the tests come before the code, a practice that is commonly used by the coders. It will help you to create a good coder habits like running tests before and after merging a branch and refactor your code to reduce duplicates and increase application’s stability.  

Here is a good quote from the book:

If you ask five Rails developers how to test any given piece of code, you’ll get about fifteen different answers—but they’ll all agree that you should definitely be writing tests.
 

Michael Hartl
Ruby on Rails Tutorial

Also, Tutorial teaches you how to use Terminal properly. You will learn how to set up a sublime text shortcut, how to navigate file structures, create files and other shortcuts that will help you. Terminal will be your program associated with programming and technical expertise.

Conclusion

Ruby on Rails tutorial is a long course and it needs assiduity and diligence. But you can learn a lot from it.

It covers everything someone new to developing Ruby on Rails applications could need. It’s a good fit for people new to web development and new to Rails.

Ready to master Rails? Get this book. 

A. Davidov: "I like when my work is helpful for people"

Software developer. Open source enthusiast, Hanami core, Ruby Hero 2016, speaker at RailsClub 2017
18 October

Anton Davidov
Anton Davidov at RailsClub 2017

Software developer. Open source enthusiast, Hanami core, Ruby Hero, speaker at RailsClub 2017

On the RailsClub 2017, we’ve managed to talk with Anton about his report, his job and future of programming.

What's your name? Where do you work, what do you do?

My name is Anton, I work at the American start-up. We are developing a healthcare application to help people in America buy and receive the right medicines. There are some issues with it in US. Unfortunately, we are not yet released, so I can not name the place where I work. But if you ask me about this in a month or two, I'll say. At work, we use full dry stack (dry web and rom), also we have several services on hanami.

How do you like RailsClub?

This is my fourth RailsClub. I am very happy to come every year, see many new faces, communicate with old friends, learn something new, discuss problems, and have fun.

Tell me about your report.

In my report I will motivate people not afraid to code in open source, because I believe that there are some problems in the community and by my report I want to try to solve them. This is absolutely not a technical report. Its main goal is motivation. I will be very happy if after today, at least one or two people will stop being afraid to make a mistake and do something. I will tell you about my mistakes and problems, about other people's mistakes. It is important for me to convey that the errors is normal.

What do you think are the most popular technologies?

If to speak in general - machine learning is still in hype, and people are trying to do something on it, at least in Russia. A lot of people talk about the blockchain, trying to mine Ether, buying farms for millions. And if we talk about programming and about Ruby in particular, this is an interesting question. We can say that the functional languages ​​are in hype, but it seems to me that this is far from being the case. There is a cult around functional languages, and people are just trying to be involved in it. Also, now it is a trend (like 10 years ago) the problem solutions. I mean - people have a problem that they are trying to solve it. That's the way dry, rom, hanami, trailblazer appeared; that's the way other programming languages like Crystal appeared.

How do you see the programming world in 10 and 50 years and is there a place for Rail and Ruby?

The world of programming in 10 years I see as my place of work in 10 years - I mean, I can't see it. But if I fantasize, I'd like to see something like cyberpunk from the novels "Neuromantic" when people directly connected to the computer through a neural interface with full immersion. I would like to see that people will go somewhere in this direction.

What advice would you give to an average programmer in order to stand out the crowd? 

The first advice - do not be afraid to talk about problems. People everywhere face problems, and in IT too. If a person tells about his problem and how he solved it, other people can get benefit from it. The second advice is to solve problems not only at work, but also in the community - to engage in open source, to do conferences, to speak and write good articles.

People in other spheres, for example, in aircraft building, feel great joy and enthusiasm after the end of the big project. What in your job brings such feelings?

This is a funny question for me, not even in terms of the question itself. While studying at the institute, I was practicing at an aircraft plant in the department of indestructible control. I've seen that atmosphere and people are not always happy when they make big planes. They usually have problems like that the spare part for a million rubles came with micro cracks and somehow it needs to be used, so as a result the aircraft does not fall apart.
I really like it when I get a good feedback. When my work was useful for someone. Then I feel the excitement. Speaking more broadly - all my work is aimed at getting a good feedback and solving people's problems.

Do you have nightmares related to work?

I have one nightmare related to my work - I start Rails coding again. Seriously, for almost a year I have not touched the Rails at all. And I grew a big beard and hair on my head, I began to sleep better.

Do you have plans for writing books?

Fortunately, no. I have dyslexia, it is difficult for me to write texts sometimes. The biggest thing that I have is a channel in a telegram where I write large messages by the standards of telegram channels. I had an idea to try to collect this all in a heap and make a huge collection or a reference book, there are many related topics. But in general, I do not see myself as a writer. At school, I had an assessment between 1 and 2 in Russian, so for me it's really difficult.

As far as I know, your report was last at Rails Club for few times already. Why is it so and how do you feel about it?

I was the last in 2015 and 2017. In 2015, I had a lightning talk, it just turned out to be the last of 3. This year I specifically asked to put me in the end. I will not have a technical report and I will be able to motivate someone. The idea is that people will get tired of listening to some complicated technical things and think with their heads for 8 hours in a row, it's like a working day. At the end of the day, people want some kind of show, and just my report will be that show. And, secondly, I would be pleased if people leave the conference with a feeling of excitement.