Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
prom candy
Dec 16, 2005

Only I may dance
I just want to chime in and say that it's awesome that you're getting a start with coding and that you have I think the right-size problem for a new developer, but you would probably benefit greatly at this point from taking a day or two to step back and do some beginner Ruby stuff in order to learn key concepts. That way when you run into a problem you can go "oh okay this reminds me of that other example, where they used a <loop/array/conditional/whatever> to solve the problem."

I like why's poignant guide to ruby (http://poignant.guide/book/chapter-1.html) but there's also CodeAcademy (https://www.codecademy.com/learn/ruby) if you want something less artsy.

Adbot
ADBOT LOVES YOU

prom candy
Dec 16, 2005

Only I may dance

xtal posted:

Ruby is cool for ad-hoc tasks but if you're investing enough in this to learn a language don't make it Ruby. You might as well start with PHP.

What language would you learn first?

prom candy
Dec 16, 2005

Only I may dance

xtal posted:

A well-rounded programmer should IMHO know something like C, something like Lisp and something like Haskell. So there are lots of good options and lots of ways to get there. None of the options are untyped dynamic scripting languages. Starting with one of those serves to hamstring your understanding of computer science when it comes time to learn something with the performance, concurrency or type-safety that Ruby is unable to provide.

I don't think this is great advice for someone who just wants to learn enough code to automate parts of their job. If you want to do serious programming as a career then yeah sure but this is way overkill for most.

prom candy
Dec 16, 2005

Only I may dance
Don't be, seeing action in the Rails thread makes me feel relevant again!

prom candy
Dec 16, 2005

Only I may dance

Waroduce posted:

So the VP really likes my script and wants to build it out and make it a standard part of our implementation process. He doesn't know dick about coding, but he wants to add features like having it rip form names out of the baseline and generate a csv/excel file, embed hyperlinks of the forms into the name and some other poo poo.

He wants me to write a scope of work for our implementation process which is a whole can of worms and do one for my script. Like where does it fit and what should it accomplish.

So this may be a bit beyond the scope of the thread but you guys have helped me so far, what are some resources or tips for writing a scope of work for this script/software thing before the vp dumps this on development and tells them to make it happen.

I like user stories as a way to define the scope of a software project.

prom candy
Dec 16, 2005

Only I may dance
Anyone out there still using Rails? I can't decide if I want to double down on my almost 20 years of experience with it and just ride out the rest of my career as a Rails expert or if I should delete it from my resume. It seems like there's lots of lucrative opportunities working on and modernizing legacy Rails apps but at the same time working on legacy Rails apps can be hell.

prom candy
Dec 16, 2005

Only I may dance

Sivart13 posted:

I don't think it merits deleting from your resume though?

the problem with having it on my resume is i keep ending up in rails jobs. at my last job i joined as a frontend React dev but then it turned out i knew more about Rails than the backend team.

after getting into typescript i was kinda like "gently caress this i'm sick of all the indirection of rails I don't want to do this anymore" but i ran `rails new` for the first time in a long time last weekend and it is still an unbelievably fast way to build out ideas. where it choked for me was when i needed some stuff that React is good at, like a combobox. I've been doing Rails backend + React frontend for a long time but the call of the full on monolith is still quite appealing, especially with the growth of HTMX and everything talking about HATEOS and so on.

prom candy
Dec 16, 2005

Only I may dance

KoRMaK posted:

what was the deficiency regarding the combo box?

Stimulus is worse than react or other state based js tools basically, and the smaller community means you're not as likely to find premade stuff. But I think maybe mounting react components for that stuff inside a mostly server-driven frontend could work.

The other thing that sucks but is maybe solvable is some of the tooling. Like with a react component when I hit save it fires off prettier, and if prettier doesn't do its thing I know my markup is invalid. Couldn't get that working for erb templates. Maybe slim or haml is the answer there. I've basically been out of the loop on frontend rails for the last 6 years or so.

prom candy
Dec 16, 2005

Only I may dance

Gmaz posted:

Funny, that's how I feel about our current React (TS) setup at work and not Rails. Between auto generated types from BE to FE, all the libraries for tables/forms, our own hacks built over the top of those libraries and the interdependence between different libraries it's really complex and counter intuitive to figure out a flow of data. Like something as simple as a table, I have to go to through 5 files to figure where the data is coming from and how it's setup. You want do something that would be trivial in plain old HTML? gently caress you! Type checker is nice, but often times it just gets in the way with indecipherable errors that are usually about simple and inconsequential things.

Comparing that and when I work on the Rails part off the app is night and day in terms of ease work and productivity in general. Now I thought it's just due to me being more experienced with Rails, but internal polls in the company (100+ devs) say pretty much the same. People are in general happy with the BE part, but frustrated with FE. Of course it could be due to our setup and React could be a joy to work with in other circumstances but it sure doesn't feel that way to me. From what I heard of Node projects it's not much better. A bunch glued on libraries, that end up looking like a frankenstein Rails anyway but without the standards to quickly figure out a way around.

The thing I like about TS is the way everything is explicitly imported, meaning you can always easily follow the thread of "where is this defined?" It's still absolutely possible to build layers upon layers of bullshit like you describe, but at least there's a thread to follow. Meanwhile even when running the Ruby LSP in VSCode because of inheritance and mixins and so many global contexts you can occasionally command click on a symbol and it just goes :shrug:

This is especially annoying if you wind up on a project where people decided to solve the fat model problem by just splitting the model's methods into various concerns (one of Rails' absolute biggest mistakes imo) meaning the actual implementation of the class is now broken up into a bunch of different files and because there are no actual hard boundaries they're probably all reliant on one another.

There's no avoiding playing code detective when you're working on established systems but in Rails I find it can be a lot more frustrating than TS.

prom candy
Dec 16, 2005

Only I may dance
I played with Stimulus a little bit and I really didn't like it. I think I'd probably go for something like Alpine if I needed the "JS sprinkles" approach but I'd honestly rather just use React.

prom candy
Dec 16, 2005

Only I may dance

enki42 posted:

Yeah, it's definitely one part of Hotwire that you can take or leave, it doesn't really tie into the other stuff much at all.

I can't imagine heavy use of React and Turbo playing nice together though. React generally wants to control the DOM of anything it's mounted on and have JS fully control what the user sees, and Turbo is built around the server generating HTML and adding that to the DOM so they're pretty fundamentally different approaches.

I think if I was going all in on Rails I would maybe use React just for specifically complex UIs and turbo for other stuff. Last month I was posting about coming home to Rails but after spending more time with it I think I'm just going to be starting new full-stack projects with Remix. The nice parts of Rails are really nice but ultimately I just like working in TypeScript that much better.

Edit: All that said I'm working on a legacy Rails project with jQuery today and I can see why people who skipped out on going full JS find Stimulus pretty nice to work with. It's a big jump over this nonsense.

prom candy fucked around with this message at 23:06 on Nov 20, 2023

prom candy
Dec 16, 2005

Only I may dance

Steely Dad posted:

I want to obfuscate IDs in my URLs without having to either change my primary key types or add slug attributes to my models and use those. In the past, I've used the hashid gem for this and it worked well, but I see it hasn't been maintained in 4 years. Anybody else know of an actively maintained gem they like for this purpose?

https://github.com/excid3/prefixed_ids

Adbot
ADBOT LOVES YOU

prom candy
Dec 16, 2005

Only I may dance

Steely Dad posted:

Perfect, and I'm already using Jumpstart. Thanks!

Nice! Haven't used this, I just happened to see it on twitter or something recently and thought it looked good.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply