Do all the things like ++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatarSign Up
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple APILearn More
Search - "ruby"
Tried to install an existing web dev project in Windows 10:
- Install Atom IDE and trying to clone git repo
- Git missing, installing Git for Windows
- Installing Node (so far so good!)
- npm install
- Python missing (???), installing Python
- Ruby (????????) missing, installing Ruby
- .NET Libraries missing, installing .NET 4.0 for the 100th time
- Visual Studio Libraries for C++ 2008 missing (now you're just messing with me mate), installing 4GB of Visual Studio Libraries
- [drumroll sound]
- npm install breaks with fatal error
- Git for Windows can't be found anymore
Switched to Ubuntu out of frustration:
- Installing Atom IDE
- Installing NodeJS
- Cloning git repo
- npm install
- project is running
Trash, trash, trash.
Who the fuck writes this shit?
Who the fuck lets these trash should-be-junior devs roll their own crypto? and then approves it?
The garbage heap of a feature (signing for all apis) doesn't follow Ruby standards, doesn't follow codebase conventions, has `// this is bridge` style comments (and no documentation), and it requires consumer devs to do unnecessary work to integrate it, and on top of all this: it leaks end-user data. on all apis. in plaintext.
I tried finding a gem that would give me a nice, simple diff between two hashes, and also report any missing keys between them. (In an effort to reduce the ridiculous number of update api calls sent out at work.)
I found a few gems that give way too complicated diffs, and they're all several hundred lines long. One of them even writes the diff out in freaking html with colors and everything. it's crazy. Several of the simpler ones don't even support nesting, and another only diffs strings. I found a few possibly-okay choices, but their output is crazy long, and they are none too short, either.
Also, only a few of them support missing keys (since hashes in Ruby return `nil` by default for non-defined keys), which would lead to false negatives.
So... I wrote my own.
It supports diffing anything with anything else, and recurses into anything enumerable. It also supports missing keys/indexes, mixed n-level nesting, missing branches, nil vs "nil" with obvious output, comparing mixed types, empty objects, etc. Returns a simple [a,b] diff array for simple objects, or for nested objects: a flat hash with full paths (like "[key][subkey][sub-subkey]") as top-level keys and the diff arrays as values. Tiny output. Took 36 lines and a little over an hour.
I'm pretty happy with myself. 😁6
DEAR CTOs, PLEASE ASK THE DEVELOPER OF THE SOFTWARE WHICH YOU ARE PLANNING TO BUY IN WHAT LANGUAGE AND WHAT VERSION THEY ARE WRITTEN IN.
Background: I worked a LONG time for a software company which developed a BIG crm software suite for a very niche sector. The softwary company was quite successfull and got many customers, even big companies bought our software. The thing is: The software is written in Ruby 1.8.7 and Rails 2. Even some customer servers are running debian squeeze... Yes, this setup is still in production use in 2022. (Rails 7 is the current version). I really don't get it why no one asked for the specific setup, they just bought it. We always told our boss, that we need time to upgrade. But he told every time, no one pays for an tech upgrade... So there it is, many TBs of customer data are in systems which are totally old, not updated and with possibly security issues.9
Building my own accounting software because everything else is overly complicated and is trying to compete with enterprise accounting tools. All I want is some budgeting, some bill tracking, and categorization.
Writing in Ruby because I'm a masochist. Using built-in minitest because again 😈.
I have currently around 62 assertions. As soon as I add ANY new test that's literally asserting true, everything comes unglued and 20+ failures pop up. Take it out, 62 passes.
I feel like I'm going crazy at this point. The errors also don't make ANY sense. Shit like, "that record doesn't exist" when it's clearly a part of fixtures and is only used in ONE test(the one that's breaking).
Installed minitest bisect, and it's like 🤷♀️"lol get fucked bro!"
So I came here to rant about this before my battery dies and I go drink myself to sleep.
Thank you for coming to my dev-talk.11
They call Python, C, Java, Ruby, and stuff like that programming 'LANGUAGES' for a reason. I just wrote a Python dictionary literal in my C# code and was clueless as to why it was failing to compile for five minutes straight. Maybe that was because I was working with Python like 30 minutes ago.
It's like I have to have one 'brain' per one language and need to switch between such 'brains' to write code in another language. And such switches take time.5
Fuck apple, and fuck xcode.
Making and running android app was a breeze.
Making and running ios app was hell.
Expectation : I should have gotten everything I need just by installing xcode and flutter.
Reality : I need to install these from the terminal : xcode command line tools, homebrew, ruby, cocoapods, firebase-cli. Also I need to manually add many stuffs, such as google login url into xcode project settings. Also we can simply test run our app or install to our device, and iphone we owned, we need to register in apple developer program, fill a full form, blah blah blah.
When it comes to android, I only need to register an account much much later, when I want to publish it to the playstore.5
Today, I randomly remembered a guy who was doing an internship at my college's tech lab. From what I gathered (I wasn't really part of that group) all they had to do was familiarize themselves with one of the many systems available and... I suppose maintain it or improve it.
.... Poor guy spent the first 2 to 3 weeks just trying to get Ruby on Rails to work. The work he was doing was not (and would never be) critical so there was not much of a sense of urgency.
Someone should have told him to use a fresh VM. Guy was trying to get it to work in his private laptop running windows. A doomed endeavor.3
Just found out that Ruby does not have any formal langauge specification. Instead, they just use the ruby-spec test suite. If your compiler can pass those, then it's probably a ruby compiler.
This is a pure duck typing at a compiler level. LMFAO.4
!rant but kinda
Rails 7 got rid of webpack and Node as a requirement, and for this I am super happy. I heavily disliked having to depend on Node for what is in fact a Ruby framework. I understood the need for it, and I always applaud Rails for being at the forefront of the web dev world and all of the trends that it contains. But maintaining both the node modules required, plus the gemfiles etc was just a big hassle for the simple projects I ever worked on.
This is coming from someone that actually likes JS and Node, but I am thankful this was decoupled.6
Situation: I have a love hate relationship with python due to the lack of types as I have in more established languages such as C#, Java and shit even TypeScript
Situation (cont): A rather large codebase that i have developed for multiple processes at work run on Python.
I don't hate it, I just don't absolutely love it, there is a lot of things to like about Python, but man I do have some conflicts with it, I have been facing out to use other solutions that feel scripty, such as the newer versions of C# with .net, but I would say that about 80% of our codebase runs on Python, the rest is PHP.
My codebase running on Python is huge, and they do a lot from automation scripts, to data gathering and database management, never had I been bitten with the "oh noes is so slow" bug since my code is not Google level big, for everything else Python seems rather fast imho
I dunno, big time love hate relationship9
> be me
> " It's Sunday, time for some battlestation housekeeping"
> " Oh easy, every git repo should do 'git clean -dfx'"
> Goes to ~/.rbenv
> Executes 'git clean -dfx'
> A whole 15 minutes long my drives go in overdrive...
> Removed 37 ruby versions and their gems, 104GB space freed up
I should do this more often
And I should now pull in all new versions and other things...3
Coming from a pure sysadmin environment and profession, I feel a great sense of accomplishment when I've successfully managed to use a ruby library properly instead if shelling out to use it's cli interface, with optparse, proper rake task in the lib folders and proper exit code handling.
It's never too late to learn how to program in any language for your personal project.1
I wanted a ruby gem and needed an older version of ruby to run it. Fine, what's the best way to get multiple ruby versions on one system, apparently rvm.
Now I want rvm.
I can't have rvm without getting gnupg first though.
Before I can get gnupg I need brew.
Now I have brew setting my computer on fire compiling god knows what so it can get gnupg so I can get rvm so I can get the ruby version I want to get the gem I want!
It's been running for quite a while...
This isn't the first or last time that the convenience of packages and versions leads to a maze like trail of prerequisites you need to follow.
I'm sure there's some tool that would've helped with my problem, but the problem shouldn't be this bad to begin with!
I understand why it happens but it still sucks and it's a lot of wasted time.
Frankly I'm expecting some people will have gotten so used to this kind of insanity that they won't get why I'm renting about it, oh well, it made me feel better and gave me something to do while brew is melting my machine.3
Intern spent about a week trying to set up a local ruby on rails environment. Yeah, this is not really on topic, it wasn't that bad, but it's what comes to mind.
I don't know who modelled the databases I've had to work with these past months but god damn it no fucking normalization anywhere. Inconsistent data just cost me my morning.1
First of all... What I really like is computing. Wearing a language T-shirt and defending a framework as a New World Order activist is not me. What matters is to make the computer perform the task that I programmed, in a way that it is easy to maintain and that it executes quickly. User needs to like and operate fast. And the computer should be respected and not make it work its ass off just because it needs to load my fancy libraries. Whether the task will be done in C, C++, Go, PHP, Java, Ruby, VB, or whatever the fuck it is doesn't matter.
Fed up with people shipping a simple 2kb utility with 2GB of runtime dependencies.
IT is the only profession that advocates branding and specializes in a single tool. I've never seen an electrician who only uses a single brand screwdriver.
Fuck you fan boys.1
How do you pick a new language to learn?
I am a C# developer and at work I work on desktop apps and legacy web services etc.
I fancy learning something else so I can have a bit of variety when working on personal projects etc.
I am doing a distance learning degree which has used Java and Python so far, with some PHP and JS etc to come later.
I’m drawn to Ruby as I already have experience there, but I was also thinking about looking at Node as that covers back end and front end all using JS which is definitely useful in general as I look at moving to a more web based role.10
I feel like the world, and my life has been so crazy lately that I needed something reassuring.
assert_equal true, true
IntelliJ, CLion, Pycharm and Rider are awesome. But Ruby Mine is the most bugged software ever made.
Didn’t think I would run into issue because I was using Apple Silicon macs - something borked my ruby gems installation, and reinstalling made matter worse by Bundler installing gems that apparently linked to whatever arch they liked. Now if I run bundle exec there was that one f*<king gem that died of mismatching arch until I intervened.
Whatever happened to that cute tutorial Ruby used to have? The one with a repl and lots of cats?
Do you know any similar ones? Not necessarily for Ruby.2
I dislike how many frameworks there are in the Node.js ecosystem. I feel there are too many for the same purpose. It is daunting. One time you see X framework catching attention, then after you study it, learn it, and seek to use in your daily professional life, suddenly a wild Y framework appears, supposedly doing a better job than what X could in certain aspects. Then Z, then back to A. And what's more, majority is not opinionated, allowing one to write in any way he or she likes. Soon, what you've learned has become irrelevant or simply discontinued.
It's like Linux. Any Joe makes something, either because he or she doesn't like one aspect of something, or just wants to be part of the mob who creates stuff and reinvent the wheel.
I don't like this. What I like is how Spring and .NET are. I feel their opinionated characteristic is great, allowing for easy code reading when studying, understanding others code in a new job, etc. You do it like this, this, and this, and maybe, like this if you'd like, but that's all, mate. To me, it is important to become excellent at one or two technologies/languages, things that do not get replaced so easily as it is in JS.
I had studied .NET for the backend development for a year, but I never found any opportunity, until I was laid off and is when I decided to focus again on React. After some time, I learned about NestJS, liked it for being inspired on Angular and for being opinionated. I checked on how demanded it is right now, almost nothing. It was all pure Node.js, seemingly, which made me reflect on the point of this rant: Node.js is vast, a land of no one. What is going on at the moment?
NestJS seems to be the real deal. It is how I like things to be. Perhaps over time it will become The Framework for Node.js backend development, like Java/Kotlin is Spring, C# is .NET, python is Django or Flask, Ruby is RoR, we have Go, and Rust, too. The majority have years upon years of existence and still widely used and relevant. But given how things happen in this universe of Node, I cannot but wonder if in 4 years or so another Joe will decide to make something of his own, something totally different and yet again throwing away a big part of what has been previously learned, and then turning Nest irrelevant. Maybe the name will be NxxtJS, you know, because we have Next, Nest, Nuxt...
Duck whoever thought using jruby was a good idea! fuck this codebase, outdated dependencies hell and fuck most of the ruby gems documentation
TIL RVM and I are on different assumptions. I'm talking about RVM allowing unbound variables in its scripts.
I don't because I literally have run "rm -rf /" on my Mac because of an unbound variable in the past. So, when I write a shell script, the second line is always "set -eu."
And because RVM allows unbound variables, this line crashes RVM.
Then for some stupidity on my part, I looked into GitHub for its codebase first to get even more clueless about the issue before finally googling to see if anyone had experienced the same problem 🤦1
What is ruby and why should i learn it. also whats the next step after learning fundamentals in Python?13