• Samuel Marcik

What is Ruby programming language used for?

Updated: Aug 21, 2019

SearchTeam asked Senior Ruby Engineer Andrej Antas what is Ruby programming language used for?


STANDARD DISCLAIMER… These are brutally subjective answers… read on and you will get what I meant...


1. What is your way to programming language Ruby?


This one is kinda unclear to me, but when somebody asks something similar I would say with a nice hot cup of coffee and really aggressive music on, that gets me going… But probably you meant how I got to it which is kinda funny story since it was not really my choice at the time. It was actually my friends choice, who found a client and was looking at the execution of the whole job. So that is not that interesting, but needless to say I got on board and happened to really love the language…


2. Why did you choose Ruby as your primary programming language?


So I kinda mentioned, that I did not really choose the language, is more than the language chose me kinda thing. But that would be a really silly and unproductive answer… So to be clear, I did not choose the language itself, but I chose to stick with it for many years. It is mainly for how easy it was to pick up the language without any prior programming knowledge at the time (I just started university back then). Then what got me also was the ease it brings to web development with a lovely framework like Ruby on Rails. It is really built for developer happiness, at least I am happy about it… Prototypes and even production applications are done in no time at all and that keeps you productive at all times… Also, I cannot forget to mention convention over configuration, simply if you worked on one project, all of them are going to be really similar and if conventions are kept as they were meant to be, they are going to be identical… This means that once you are coding, you will be a valuable asset to any company since accepting specific logic to the project you will be familiar with most of the things there…. These things tend not to happen with languages that are more popular nowadays (yes I mean javascript…) And last but not least worth mentioning is a lovely community of people out there on forums and Stackoverflow that pretty much solved all the situations you can bump into before you so you don’t have to bother with much more than reading their solution… I could go on and on for the whole day mentioning a load of libraries and how gems (libraries) work and all that, but I think you got the gist by now...


3. How can somebody become a Ruby Developer?


There is nothing easier than that… Get a computer, does not have to be Mac, but please don’t go through with Windows, if you use that, just keep playing games and skip this answer right away... once you got the computer sits in front of it and start reading through online resources. Please bear in mind, that there is no money necessary for learning, you can get good without paying for any boot camps and online courses… have a look down at the last answer just to get you started a bit and you see where you go from there.


4. What are the advantages of using Ruby?


As I mentioned previously, the language is a lovely expressive one that holds your hand everywhere you might want to go and also tries to keep you happy at all times. It has an extensive amount of libraries for almost anything you can imagine you will be using in it. Mostly I guess with popularity of the web and all you will be doing Ruby on Rails projects and Rails is a lovely framework full of features that are mean to keep you productive and not writing code that could easily be part of it and so on… Oh and the community is full of people that are really trying to help you or themselves, no RTFM guys that are better than you and they have to tell you and such...


5. What are the disadvantages of using Ruby?


I am not going to go in-depth here, but it must be concurrency… Once you meet it you will get it, there is a massive number of articles online to help you understand and so…

Also when you start talking about the speed of Ruby it is really ok in most of the applications you can imagine…. unless you start doing huge statistic DBs with an unfathomable amount of data in them needing to do complicated calculations… slowly you will think about replacing Ruby since you will have to wait…

But I saw a countless number of cases where nothing stops you from happily using Ruby on Rails and never complaining, so if you are not really planning any of the above, I would not really pay that much attention to your javascript friends hating on Ruby...


6. Can you describe what is Ruby used for?


As Wikipedia says: "Ruby is an interpreted, high-level, general-purpose programming language.” So there you have it, general-purpose, and from my experience, it is general-purpose indeed…

As it is really built for your productivity most of the time I found not writing kinda complicated shell scripts, but I use ruby script instead and it gets the job done… If I want a small presentation website, it is really unnecessary to go with Ruby on Rails, I use Sinatra instead and like that, in couple hours (of fiddling with CSS) I got myself nice small presentation website… If it is a more complicated website, I go armed to the teeth with Ruby on Rails and spend countless hours developing something bigger and nicer…

So this way I should probably just say what I don’t think ruby should be used for…. and those are desktop apps… I know there is libraries to help you develop them and it is completely possible and all that… but be honest with yourself, don’t you want a nice shiny native app on whatever platform you are looking at?


7. Can you describe cases when we should use Ruby than another programming language?


Ok so this is a bit tricky one since I also have background with Python, PHP and couple others, so sometimes I even find myself using another language because I used the library in that language before and I don’t know, I am probably just lazy guy with a real load of snippets ready to use…. Nonetheless, I came up with the ideal answer here…

I mentioned it once before, but it is the small website… I am aware of SaaS services that provide you with the possibility to pick a template and shove some products on the page and present them neatly without programming…. but if somebody comes to you and they want custom one from you this is the case…. not once in my life, I used anything else than ruby here… I took ruby and lovely Sinatra framework and like that, in couple hours we were looking at a small presentation website that gets your point across neatly…

This is not the only one use for Ruby to be clear, but its a really enjoyable one that makes you and your buddy that wanted the website happy quick.


8. Are there any programming languages that are close to Ruby?


Oh yes, there are and it’s a load of them. We can start from interpreted languages family, where mainly in Europe we love our PHP. Also interpreted and a bit older than Ruby with an extensive number of great libraries in Python. But I would take this opportunity to mention languages that scratch that itch of slowness that is usually mentioned when talking about ruby. These are languages that took some inspiration from Ruby, but are different and in ways better… Crystal is a language that would be on top of the list here, they say “Fast as C, slick as Ruby”… I am hooked, aren’t you? I will probably also throw in here little thing by the name of Goby, Language written in Golang inspired by Ruby syntax which looks it could work out, but is very early in the process, so we will see… Otherwise, that is actually my list, small, but the reality of it is that most my work is done in Ruby nowadays and also I started with Golang recently, but that is kinda enough for what I do and I never needed to look elsewhere...


9. What is your opinion about a future of Ruby?


Ok, you got me here a little since I haven’t had time to watch Euruko 2019 conference keynotes just yet and I know Matz (as in the author of Ruby Matz) had a keynote talking about future… So really just my opinion here, nothing objective about this… I recently started with Golang and really embraced the static typing… I know that Golang is compiled and really different, but I kinda envy the type system there… I make fewer mistakes and use the language more efficiently and at all times know what I can expect to get in any function… That I kinda miss, but also in an interpreted language I get why is it not there. And as always I think guys are moving with new JIT compiler that will introduce performance improvements and what not…


10. Are there any good online Ruby courses for beginners?


There is, of course, a ton of those… As I remember from every new member of team starting with Ruby/Ruby on Rails, we put them through Michael Hartl: Ruby on Rails Tutorial. It is a book, but also you can read it online for free and it is regularly updated to be up to date with rails version and is just a great starting point I think. Otherwise, I remember we used screencasts a lot back in the day, railcasts was dominant and probably only one back then. Nowadays I know that there is gorails and drifting ruby series of screencasts that are still alive, but you have to pay for those quite a bit. But always remember many times when you see something that helped you it is really worth supporting the author of whatever helped you because he went and learned something so you can just copy-paste it later. Once in doubt is really worth looking into official guides for Ruby on Rails. Thoughtbot company made a great website Upcase where you can go, learn and get your questions answered. Off course when talking about questions answered, there is Stackowerflow, get used to it, you are going to be spending a load of time there at least from the beginning. But not to make this thousand lines, I think you have a nice gist of bookmarks where to look here:

https://github.com/dreikanter/ruby-bookmarks


Don’t take these answers way too seriously, the main point of being a programmer for me is having fun creating stuff that makes sense (at least in my head) and Ruby is a great companion on that journey… So have fun :)

53 views
LINKS
CONTACTS
SOCIAL
  • Black LinkedIn Icon

SEARCHTEAM PRAGUE

Vaclavske namesti 1

110 00 Prague 1

Czech Republic

SEARCHTEAM LONDON

20-22 Wenlock Road

N1 7GU London

United Kingdom

© 2018 by SearchTeam