36 ms·
Shopify seems to love Ruby. Ruby doesn't seem to be all too popular now, if I'm a beginner would Ruby be a good language to look into? (Please don't recommend
by _chu1 3y ago
Shopify seems to love Ruby. Ruby doesn't seem to be all too popular now, if I'm a beginner would Ruby be a good language to look into?
(Please don't recommend Python/JS, I dislike them for personal reasons)
- sesm 3y agoIf you have time budget for several programming languages, then Ruby is a good one to learn OOP. For getting a job - probably no, but depends on your local job market.
- whalesalad 3y agoRuby is not a bad language, but I would not invest in it unless: 1. I am Shopify or another huge Ruby shop with a lot of existing engineering knowledge, libraries, team members etc. 2. I am interested in building something with Rails Otherwise I cannot think of a compelling reason to choose Ruby. The red flag here is that you dislike Python and JS for personal reasons which makes me think that any reasonable advice will not be important to you.
- jasonjmcghee 3y agoNot sure it's a red flag- I bet they're just young. I'm sure they'll grow out of it. We all had unreasonably strong opinions about arbitrary things at one time or another. If you really hated the way pencils smelled and you're trying to get into sketching, and everyone always says "use pencils", could get frustrating. It's the best tool for the job, but you can probably also get pretty far with a pen. You can certainly be a successful engineer while never learning specific languages. That being said, a specific language can be the best tool for the job, and there are many things for which python and js are the best tools.
- whalesalad 3y agoI hear you there. I actually used to be an out of control Ruby hater - until I read Eloquent Ruby (fantastic book, my all time fav programming book) and started to understand it from first principles and all the beauty of message passing. I was Ruby-only for a few solid years of my career. The quicker a young engineer can table that kind of unsubstantiated bias the better. Then again that could go for all aspects of life!
- beeburrt 3y agoThat's how I felt about Python for the longest time, hated it. I am currently learning Python.
- nobleach 3y agoI haven't been a Ruby programmer for 10 years but I totally agree on Eloquent Ruby. I sure did love that book. I still pick it up sometimes and thumb through it. I did a reading group for Getting Clojure (another book by Russ Olsen) just because I knew he wrote it. I totally agree. I have to remind myself often, I may not like the tool, but if I allow myself to get competent with it, I can complete any job. The more I sit around and hate it, the less effective I am.
- whalesalad 3y agowow TIL there is a book by the same author for clojure - gonna pick that up!
- danielvaughn 3y agoYeah. I avoided Typescript for the longest time because years prior, I'd had a hell of a time converting a bunch of Coffeescript back into JS. When that project was done I thought "never again will I use a language that tries to 'fix' JS." It was unreasonable and emotional, but also understandable.
- kccqzy 3y agoCompletely agreed. Personally I hated JavaScript too a long time ago, until one afternoon I decided to read JavaScript the Good Parts by Douglas Crockford. That one book alone was able to completely change my mind.
- mediumsmart 3y agoSame here, and also well worth the effort of getting gpt4 to only produce js that passes jslint.com without a single warning.
- wenc 3y agoI’ve written Python for 18 years now and I’m certainly not unaware of its warts but its sheer usefulness and productivity makes it worth it. I see languages as a means to an end — some means fit people’s brains better — but at the end of the day you gotta get the work done. Python is definitely a tool that I’ve treasured. I used to be infatuated with Lisp and Haskell and their sheer elegance. But now that I’m more experienced I’ve learned that picking a language comes down to practicality and maintainability as well as interoperability with other humans (library ecosystem, labor pool, stack overflow solution searchability).
- vidarh 3y agoMy text editor is written in Ruby. My terminal is written in Ruby, including the truetype renderer and X library, and the syntax highlighting uses the Rouge Ruby-based highlighter, extended with some more Ruby to read GtkSourceView themes. My desktop manager is written in Ruby. For me the compelling reason to choose Ruby is that I could hack those things together quickly on my own in a few thousand lines of code and have an enjoyable experience both writing those tools and using them (I've done all my editing in my own editor for the last 6+ years, including editing the editor itself). The rest is newer. (The whole "stack" above takes up fewer lines of code than the "st" terminal emulator and less than 10% the size of xterm; the truetype renderer was a 1 day conversion from a small C renderer, and weighs in at about 500 lines of code - that is why I love Ruby) I'm 48. I've been writing code for 43 of those. I have no intention of spending time on Python more than absolutely necessary, because where Ruby is enjoyable to me, Python is absolutely not. I frankly find the notion of talking about people "growing out of this" quite condescending. There's nothing unreasonable about having preferences and being prepared to prioritise happiness. For my part I've easily been able to make my living in a mix of (mostly) Ruby and JS for the last 18 years without making any sacrifices for it (I've not avoided looking for jobs that requires other languages, including Python - I have experience with more than a dozen different languages so I'm not afraid of using far worse things than Python when I've had to). I've been in my field long enough to have seen many languages vax and vane in popularity, and I stopped caring about whether a language was popular 20+ years ago. My happiness is far more important. I'd say as a young developer being willing to at least pick up the basics may be worth putting aside the distaste. But soon enough you get to a career stage where it doesn't matter and where you have the flexibility to pick jobs where you can pick your tools.
- cactusplant7374 3y agoYou started writing code when you were five years old?
- simianpirate 3y agoI was 6 years old when I started with Apple Basic.
- phaedryx 3y agoMaybe a python killed their dad.
- whalesalad 3y agongl that is pretty metal
- abhinavk 3y agoIn the island of Java?
- juanse 3y agoI use ruby for System scripts along SystemD. You can insert direct linux command inside `` and they are executed inside. For me this simplicity and power is hard to beat.
- sebastianconcpt 3y agoIt could be more positive than despise for another language. The preference for a language might be out of emotional attachment at the specific workflows in which that toolchain allowed creativity to flow. And if you have an AI coder LLM that gave you good output with one training and performed poorly with another, would you say that the one with good output is worthless because was good at {{insertYourLeastFavouriteTechHere}}?
- jwells89 3y ago> It could be more positive than despise for another language. The preference for a language might be out of emotional attachment at the specific workflows in which that toolchain allowed creativity to flow. For sure. Ruby gives me warm fuzzies a lot more than Python simply because I first started "seriously" programming in the era when Ruby, Rails, and TextMate dominated back end web development and was on board the RoR train. Preference of this sort can also be driven by little things that some might consider inconsequential… those bits and pieces can be what makes the difference for someone in determining if a language is enjoyable to write or not.
- sebastianconcpt 3y agoAnd out of curiosity what are you using more these days that isn't Ruby?
- jwells89 3y agoWell I moved away from web development to native mobile, so these days Swift and Kotlin. If I were to pick web dev back up though, there's a good chance it'd be with Ruby+Rails or Elixir+Phoenix.
- sebastianconcpt 3y agoI saw a Phoenix demo recently and yeah, looks productive.
- unstruktured 3y agoYou don't need personal reasons to dislike JS.
- deleted 3y ago[deleted]
- qsort 3y agoIf you're a beginner, Ruby is as good a language as any. Fundamentals are what you should focus on. Pick anything reasonable that appeals to you. Ruby is well inside the boundary of reasonable choices, regardless of popularity metrics.
- jasonjmcghee 3y agoIf you're just starting with programming, start with a high level language and work on something interesting to you. Doesn't really matter what language it is. What matters is working on something that will keep you interested. I like to recommend https://natureofcode.com/book/introduction/ https://natureofcode.com/book/introduction/ The author also has a YouTube channel, but the book is quite fantastic.
- shralpmeister 3y agoRuby is the perfect language to learn if you are a Rails dev or want to be one. There are plenty of Rails shops out there.
- phaedryx 3y agoIt's interesting to see "there are no Ruby jobs" comments while working at a company that hires from outside the country because we can't find enough developers locally.
- m00x 3y agoRails is definitely the most productive framework for the web out there. TS/Node is gaining my favour, but a good rails dev will out-ship a TS dev any day of the week. It's an amazing startup language.
- graypegg 3y agoDon't worry so much about languages. If you specifically like web apps and Rails' ideals [0] then it's an obvious choice to look into. A lot of Ruby is Rails. But it's also worth looking into if you just like how it looks. Most of the knowledge is transferrable, you don't have to be a "${language} developer", you'll learn whatever is most useful to you as you explore. [0] https://rubyonrails.org/doctrine https://rubyonrails.org/doctrine Edit: I think you're pretty young, good for you for just wanting to dive into making stuff! Welcome to an amazingly fulfilling passion + career in engineering should you want to keep with it :)
- phaedryx 3y agoRuby was heavily influenced by Lisp and Smalltalk, so I think is great if you want learn object-oriented principles or something Lisp-y.
- javier_e06 3y agoRuby IMHO is a good language to use to familiarize with abstract data types attributes and methods: 10.times do puts 'Hello, World!' end What does the code Ruby code above do? Pretty Obvious. Is very readable.
- streakfix 3y agoRuby is even more dynamic than js and python.
- m00x 3y agoI've done a lot of both, and JS is definitely more dynamic than Ruby.
- beeburrt 3y agoI love Ruby. As the saying goes, It was developed with programmer happiness with mind. Once you learn more than hello world, you start to see there is actual joy to be had in programming in Ruby.
- shermantanktop 3y agoIt was developed with the happiness of a particular type of programmer in mind. No matter how much Ruby I learned, my experience had more irritation than joy. I had many experiences where a Ruby fan would condescendingly explain why a friction point that I was experiencing was actually a good thing, with the implication that I was apparently too stupid to see the light. Now I never write Ruby unless I can't avoid it. But I know people who love it, as you seem to, which is great...but not a universal sentiment.
- the_sleaze9 3y agoI'm curious - can you give an example of a pain point?
- tenacious_tuna 3y agoI've come to really loathe how there's ! and not-! versions of otherwise similarly named methods. It's such a sneaky, small difference and it's caused several bugs in the codebase I work on. Also the "last statement evaluated is what's returned" behavior leads to super not obvious data flows sometimes which is similarly frustrating. A lot of ruby's philosophy seems rooted around doing away with what looks like redundant code at a severe cost to readability / adding significant cognitive load, in the name of "elegance," and that drives a LOT of my frustrations with my org's ruby codebase.
- kayodelycaon 3y agoThere’s a method to the madness. Which I’ll explain a little for others. :) If you see ! on a method it means one of two things: 1. The method modifies the object in place in and may return nil if no change is made. This is what the Ruby standard library does. 2. The method throws an exception when there’s an error. Usually there’s a non-! version that returns nil or false instead. Rails made this a popular option. Ruby likes to provide everything so there are methods that return new objects and there are methods that modify objects in place. And there are a lot of methods to do almost everything you can think. Which tends to make Ruby code more compact. But you have to keep the documentation handy until you’ve learned them because the method names are odd. The designer of the language it’s not a native English speaker. The if keyword returning a value takes some getting used to. You never see a for loop because you pass code blocks to iteration methods. This kind of thing is all over the language. You don’t need parentheses on method calls, which means you need to know if you’re dealing with a local variable or an instance method. Another thing is Ruby allows code to be far more compact. Doing the same thing in python may require two to ten times the amount of lines. But if you can’t read Ruby code quickly and follow what happening, any advantage compactness might have becomes an exercise in frustration. All in all Ruby a bit of an odd language. I personally find it an absolute joy to work with, but a lot of people very justifiably do not have the same opinion. :)
- msie 3y agoRuby's a great language. It wouldn't hurt to spend a month on using it. But the key is some motivation for using it. For many tasks it will get the job done.
- brink 3y agoLearn it for Rails, otherwise don't bother. I've done a decade of it, but am moving on to other tech.
- shepherdjerred 3y ago> if I'm a beginner would Ruby be a good language to look into? Any language is fine for a beginner. Anything you can accomplish in one language you can accomplish in any other language. The concepts you learn as a beginner in one language will transfer over to other languages. There are a lot of caveats to the above, but the exceptions don't apply until you're very experienced or working on advanced projects. > (Please don't recommend Python/JS, I dislike them for personal reasons) There's absolutely nothing wrong with either of these languages. Python and JS are _very_ widely used. You might want to consider why you're avoiding these languages. JavaScript (and to a much lesser extent, Python) are disliked, but they aren't "bad" languages. JavaScript has quite a few very interesting ideas, and is very easy to build interesting things with. Python is very popular for a large range of tasks from scripting to data analysis to building entire applications.
- catlover76 3y ago> (Please don't recommend Python/JS, I dislike them for personal reasons) What makes you think you wouldn't also dislike Ruby? I don't deny there are probably things Ruby does better than either Python or JS, but they aren't so dissimilar that if you have some sort of semi-rational "personal reason" for disliking Python and JS, that you wouldn't also dislike Ruby. And if you're a beginner who wants to be employable, why be so picky and turn up your nose at two of the most popular languages?
- vidarh 3y agoThey're dissimilar enough that there are plenty of people who love one but dislike one or both of the other. I don't see any reason why they'd be certain they'll feel differently, but they're not going to find that out without giving it a try.
- petercooper 3y agoShopify seems to love Ruby. The founder, Tobi, is a Rubyist and was around the Rails world in its earliest days, so there's a sense of personal preference (plus a huge amount of existing code) at play beyond the technical merits.
- the_sleaze9 3y agoOnce you choose a path, the cost of switching compounds. And truthfully language makes much less of a difference than we engineers feel it does. Can't say it better than Mr Jobs himself on this subject. [0] https://www.youtube.com/watch?v=oeqPrUmVz-o https://www.youtube.com/watch?v=oeqPrUmVz-o
- cpursley 3y agoMakes sense as they have big codebase already in Ruby. These days, Elixir just makes just so much more sense.
- ilrwbwrkhv 3y agoIf you are building for the web, use the web first language PHP. It has improved in leaps and bounds.
- thibaut_barrere 3y agoI am a long-time rubyist (since 2004 and still using it) but I do not think it is a safe bet of your time. I really need to prepare an article on that, but although it is a bit weird and different initially (functional roots are less classic for most developers), I find that the « usage surface » of Elixir is much wider than Ruby’s, today. You can do pretty much everything you can do with Ruby (web apps, API, scripting…) but more trivially scalable (including things like real-time chats), and more: machine learning, computer vision, embedded, and soon mobile apps… Its interop story with Rust is fairly good and this allows interesting extensions (see Explorer, with integration with the fast Polars data frame library). Maintenance is overall good as well (for multiple reasons including core design), the churn is lower than Javascript, and the developer experience is improving on a regular basis. I am starting to meet with CS schools to see how to put this in the good hands of students :-)
- vidarh 3y ago> I find that the « usage surface » of Elixir is much wider than Ruby’s, today. Conversely, I hardly never see Elixir advertised from anywhere I pay attention to, including in several years working at a VC evaluating the technology of potential investments. I suspect we're both stuck in bubbles.
- thibaut_barrere 3y agoI meant it in the sense of « what can I do with it today », rather than the volume of uses seen in companies! I agree that it remains a niche language at the moment, something I am trying to change at my level.
- vidarh 3y agoThen I find it an even stranger claim. I've done everything from statistics amd financial modelling, via web apps, image and sound processing to desktop apps in Ruby. For a few things people are best off using ffi to wrap compiled libraries, but there's never been anything I've wanted to do that I haven't been able to.
- tboyd47 3y agoLearn the programming language of your mentor.
- lr4444lr 3y agoJust get into _something_. Time spend writing code is way more important than the language you use.
- jimbokun 3y agoIt's my favorite language for writing scripts and automating tasks.
- mrinterweb 3y agoRuby is a great language. It is very expressive and often quite readable. Ruby has a strong standard library, and the ruby gem ecosystem is great. Ruby is a highly productive language for devs to use as it makes prototyping easy. In terms of benchmark performance, I would say it is probably closest to python. One thing I stress when comparing CPU performance of languages is to not get hung up on that too much. Most web apps I work on get hung up on IO and database interactions and not CPU. I've been working with ruby for 17 years and the number of times ruby's performance has got in my way are too few for me to mention. Finding a job with ruby isn't too bad. Keep in mind that just because there aren't as many ruby jobs that also means competition may be less because fewer people know ruby. 9/10 (probably higher) jobs will be rails jobs. Rails is an outstanding web framework. There is a reason rails is still one of the most popular web frameworks after 20 years. For learning to program, choose something you enjoy. If you pick a tech that doesn't agree with you, learning is going to be an uphill battle. I don't love JS, and I don't find python enjoyable either. Pick something that clicks for you. Once you learn one, other languages will be easier to pick up. Disclaimer, ruby is my favorite language.
- tenacious_tuna 3y agoRuby might be readable, but I've really come to hate working in a Rails codebase. So much of what happens is 'magick' that's not obvious, and I constantly hate not having typechecking backing me up. Blocks are cool, and Ruby makes them so easy to use which is neat, but global namespacing, lack of types, and a general "I'll do it for you" attitude has made it frustrating for me to learn. Not having a reliable go-to-definition in my IDE is driving me insane as well. I'm less than a year into a new job at a Rails shop though, so obviously a grain of salt with the above, but I've had several peers of mine echo the same frustrations I've had so I don't feel TOTALLY nuts.
- mrinterweb 3y agoI've been working with rails for a long time, so it doesn't feel like magic to me, but I can understand that concern. I highly discourage metaprogramming unless there is an obvious win. Rails/Ruby, especially in the beginning really leaned in hard on metaprogramming, but I've seen that be less of a trend with ruby. From my perspective, the metaprogramming trend has been going down. Ruby makes writing DSLs easy, and that can appear as magical too. In general, if a rails project follows convention it is easy to find what you're looking for. I don't understand what you mean the global namespacing. Ruby has namespacing, and adding to the global namespace should be avoided except for adding new class definitions. Maybe you're referring to inheritance, and how much stuff can sneak into the current scope from class inheritance.
- Turing_Machine 3y agoIt may not be as employment-friendly as it once was, but it sure is pleasant to use. I like it better than anything except Scheme, personally. I agree with you about Python, but I've come to appreciate JS much more than I once did (it helps that some of the major pain points have gone away in recent versions).
- lbrito 3y agoYes. Read the other comments: people who work with ruby usually love it. In every HN ruby related post, there's always some post like "ruby is dead". I've been hearing that since I started my career 10 years ago.
- zelly 3y agoNo. It’s dead, Jim. (That said, it’s better than Python by miles, but it suffers from the same curse as Lisp.)