VinyLimaZ

developing bugs 🐞 ~ fixing some of its

21 February 2021

crystal learning-a-new-language.cr

by Vinicius 'VinyLimaZ' Lima

Hello everyone!

I started to mess with IT when I was 15, so now with 31 I already spent 1/2 of my life with IT and I don't regret it lol

But my life as a developer is fresh, I'm having 4 years (2021) working as a developer using Ruby and Rails.

In this midtime I learned A LOT of concepts, best practices, software architectures; I learned Javascript (It was my PITA and with the Origamid course I started to love JS <3), learned CSS and HTML, lots and lots of things, learned soft skills, I was hired and I was fired, but I was always a little afraid to go out of ruby ecosystem.

Ruby has something hard to not love it. It isn't the most famous language, it isn't the best payable language, but the language itself, the community, the events, make all the difference between its and other languages ecosystem. But that love could interfere when you need to level up, it's great to code in Ruby, but it's great to refresh your mind with a new challenge, and with that in mind I started to code with Crystal language.

I'm working as a freelancer to NextGen Prospect and I was invited to work in the development of their MVP, using Ruby and Rails, it was all perfect until I received a message: We gonna migrate Rails to Lucky (A framework like Rails, but for Crystal). Suddenly my fear came and I had Chave's flipped out, what I'm gonna do now? And if I didn't learn and become fired? OMG...

My first task in Crystal was writing Lucky flow tests, for a Ruby/Rails developer that's the same as our integration test using Capybara to click in some elements in a headless browser to test a feature as the user and was the worse way to start learning Crystal... At the time we don't have too many assertions and ways to interact with the browser, and I had a lot of difficulties accomplishing my task, the discord lucky community helped me a lot, but the community it's still new, so we don't have too many people that really know how to deal with some problems, it was very frustrating and with the obligation to learn it become worse...

I went back to Rails and I had relief, but some time later I hear that I had to go back to crystal...

With a lot of thoughts in my mind, I changed the dir to the crystal one but now Celso (The guy who invited me to NGP) tried a different approach that time: REFACTOR! He made the best action. I started refactoring some classes that he created in a hurry to be more OOP and I started to understand how Crystal works. It was very funny, Crystal has an undeniable inspiration in Ruby, the syntax is very similar and very easy to understand for a Ruby developer, but it still has a lot of differences that make it so powerful!

With that approach, all my work was very pleasant, and I started to connect the points, in no time I was: EUREKA! And I was able to code in crystal with some difficulties but without the fear of it, I was cured!

With all that I learned a very important thing: It's not what you're studying that is hard to learn, but you may need to change the way you're using to study it! Think about it: how many times you started to study something and thought that it wasn't for you but some time later learned it with a different way to think about it?

I think that I'll try to create some posts about Crystal and Lucky, I think it's hard to find articles about it, and I believe that Lucky it's so powerful as Rails, but that's a subject for another post. As Bilu's ET said one time: Seek for knowledge!

tags: work - crystal - lucky - it - study - dev