Life Lessons with Ruby on Rails
Tips to be a better human
Ruby on Rails is a lexically sound, zen language. It binds RESTful web requests with an object oriented language. Rails teaches you to create minimally, iterate your code in stages, validate your assumptions, and most importantly, to fail early and often.
Waste not, want not. (proverb)
If you use a commodity or resource carefully and without extravagance, you will never be in need.
When I was first learning how to program, about a year ago, I would write all my code and then run it. With no error or debugging techniques, I was basically programming in the dark.
In Ruby on Rails, you create things as you need them.
I asked my Full-Stack instructor about this, he responded with, “Time is precious. Why would I potentially create a model or controller I don’t need?”
When starting out, your app doesn’t have to have prettiest style guide or complete architecture, but instead, try to think of how the user will interact with it.
When my teacher pulled up Bootstrap and said, “Use it, and style it later!” The designer and perfectionist inside of me cringed. But, it really does save time. Remember, in rapid development, Bootstrap helps you ship code early and often. In fact, most sites follow Bootstrap’s design pattern, which could give some insight on user interaction best practices.
Fail early and often. (silicon valley proverb)
When I first entered into programming, I felt guilty for running into errors. I thought there was something inherently wrong with my ability. We adjust, we learn to love debugging. If you’re stuck on something the best thing to do is to ask why and how? And if you’re still stuck, it’s time to ask someone else. And yet, we still try to avoid as many error messages as possible.
One day, my Full-Stack Web teacher got up in the front of the class to demo a project. He ran the localhost server, and we all knew he would hit an error.
We protested and asked him why he didn’t setup the routes first, but he said, “If I hit an error, I know what I need to fix. If I hit a new error, that’s progress!”
And with that, I leave you with this: