Live data from Hacker News

Rails for everything

literallythevoid.com

231–240 of 250 posts

Re: Rails for everything

#231
post #188

Earlier quoted context omitted.

The Kubernetes API is one of my least favourite Go packages - largely generated, boilerplate all over the show and hasn’t even adapted to use things like log/slog without some wrapper. A much nicer library for dealing with Kubernetes is the kube crate [1] for Rust. The worst aspect of it is the dependency discipline, though that is no worse than the official Go client. [1]: https://github.com/kube-rs/kube

Go’s k8s package is the OG. Everything else spawned off of it, so it’s packed with legacy artifacts. But yeah, I wouldn’t use it as an example of a good Go package.

Sure, it's the canonical example of a Kubernetes client, but it's still not very good - even for modern Go.

Re: Rails for everything

#232

Earlier quoted context omitted.

It does have validations but the integration of then in Rails goes much further. In Rails you associate the form with the model and the validation errors somatically show up on the form.

I'm amazed that some people think that coupling your forms to your database models is a good practice.

It goes further than that. The form gets passed the model and it's name and based on that also drivers the URL and http action to take.

IMO this is good coupling since it's very loose, trivially changed and eliminated boilerplate code that's just noise. Of course, as always, it depends on a number of circumstances what trade-off is best for you, your team, the specific problem, etc

Re: Rails for everything

#233

Earlier quoted context omitted.

I've had to do some maintenance on Rails apps in the past, coming from my Java background, and it was painful as hell. It's just what you're familiar with. I can take my Java and Spring Boot, both of which I'm very familiar with, and write an article like that to wonder why Ruby has not something awesome like Spring Boot. But I don't do that, because it'd be equally embarrassing. Spring Boot for me is super productiv…

No, it is absolutely not “what you’re familiar with”. Is there a “spring” command that generates controller + view + test for you? That does migrations? Can you say “install spring” and get everything you need to start without stitching dozens of scattered spring artifacts? I’m not even going to talk about one of the most verbose languages out there locked into OOP, made dynamic with thousands of annotations and held…

You're embarrassing yourself as much as the article I was responding to by speaking in these absolutes. I have no doubt you worked on a ("huge") team that made all the wrong choices around Spring, or something like that, and by no means will I claim that OO is the best paradigm, though Java has adopted enough from other paradigms to give you at least some alternatives ways todo things. And I have worked in my share of dysfunctional projects, but I'm currently working on a small team that is highly productive with Spring Boot, and we wouldn't want it any other way.

Re: Rails for everything

#234

Earlier quoted context omitted.

No, it is absolutely not “what you’re familiar with”. Is there a “spring” command that generates controller + view + test for you? That does migrations? Can you say “install spring” and get everything you need to start without stitching dozens of scattered spring artifacts? I’m not even going to talk about one of the most verbose languages out there locked into OOP, made dynamic with thousands of annotations and held…

You're embarrassing yourself as much as the article I was responding to by speaking in these absolutes. I have no doubt you worked on a ("huge") team that made all the wrong choices around Spring, or something like that, and by no means will I claim that OO is the best paradigm, though Java has adopted enough from other paradigms to give you at least some alternatives ways todo things. And I have worked in my share o…

I’ve literally pointed out real issues that you have to slog through when you start with Spring.

Re: Rails for everything

#235
post #213
post #142

Earlier quoted context omitted.

I am really struggling to get hotwire running to be honest. I now just postponed implementing it till after the launch. Any good ways of getting up to speed on hotwire and debugging it?

this is a nice tutorial too - https://www.hotrails.dev/turbo-rails . then this series on youtube - https://www.youtube.com/watch?v=b7dx1Yt3FzU&list=PLm8ctt9NhM... some things have changed a bit - so you just have to work through the kinks. one other thing though - since railsword conf - there was an announcement that certain things have simplified but I haven't found the docs or the new simplified api's.

other great resource - https://github.com/thoughtbot/hotwire-example-template

Re: Rails for everything

#236
post #211

Earlier quoted context omitted.

Ruby doesn't really have a learning curve... Maybe block syntax but that's super easy. Rails gives you way more structure than Django.

If you are coming from a standard C family language like Java(script), Python, or anything really, Ruby looks weird AF. It for sure has a learning curve. No parens around function arguments? WTF is that?

Interesting. When I first learned programming in the 90s as a kid, it was Visual Basic (no braces). A good friend of mine was super into Lisp. My dad (who was a programmer) also had loads of Delphi (Pascal) books, apparently it was the language to use in the 90's for quickly building apps. Again, no braces. So definitely not something I really cared about when I started learning Ruby (among other things) in the 00's.

When they taught us programming in school, Scratch was the first thing they taught. Then Python. I was in Econ as opposed to CS so then it shifted to Stata and R (for those who didn't want to pay for Stata and were more into current trends). For dropping down to low level, Fortran.

I guess where I'm getting at is maybe I just learned at a particular time when there were lots of programming languages that didn't have braces and were popular? Dunno. C was seen as low level sorcery, C++ was for games, Java I guess did become popular by the time I was in university but only the CS kids destined to become enterprise programmers used it.

All the "learning" languages I encountered didn't have braces. Nodejs didn't exist yet. So yes, Ruby was very intuitive. It read almost like plain English, had very consistent syntax and was very accessible on Linux systems (which were becoming more common and already very good by this time). Being able to just "blah install Ruby", then open a REPL, have an interactive environment and run things immediately was very easy.

Re: Rails for everything

#237

Earlier quoted context omitted.

You're embarrassing yourself as much as the article I was responding to by speaking in these absolutes. I have no doubt you worked on a ("huge") team that made all the wrong choices around Spring, or something like that, and by no means will I claim that OO is the best paradigm, though Java has adopted enough from other paradigms to give you at least some alternatives ways todo things. And I have worked in my share o…

I’ve literally pointed out real issues that you have to slog through when you start with Spring.

There are plenty of Spring Boot starter dependencies that you can pull in to do some of the things you're mentioning. Can you say "install spring"? Yeah, I think so, there's the Initializer that comes in different modalities. Migrations, you ask? Not sure what kind, but Flyway or Liquibase are some popular dependencies, which are natively supported by Spring Boot. Again, it's all a breeze, as I'm sure Rails is too.

I get that there are poor workplaces making Spring applications a hellscape, and some of those folks escape to go do (let's say) Rails. Others may decide that Java and Spring are fundamentally fine, but need to be used in better ways and then they do so, we're not all idiots (not suggesting that you said so).

Re: Rails for everything

#238
post #22

I’m curious on others thoughts on whether or not to use Devise? With the recent Rails updates, even in Rails 7, Devise didn’t seem that useful and seemed to over complicate the user authentication, registration, lost password experience and also seemed like I had to do a lot of work overriding their views to fit with my application. It seemed easier to not use Devise? It had its usefulness in earlier versions of Rail…

I figure if it's good enough for login.gov [1], it's good enough for my sites as well. I also find devise pretty simple to get setup and use. It's so easy to mess up some small thing while writing your own auth. I've always pretty much trusted myself to at least get devise setup properly. [1] https://github.com/18F/identity-idp/blob/main/Gemfile#L30

The Treasury's systems were just hacked, in some capacity, last week.

If you put the money the government steals from your paycheck for "Social Security" into your own private investment account and invest it in the S&P 500, after a 40 year career you would have about 4x the income that Social Security will pay you for the same malinvestment in their broken system. That's now. In the future, we will probably have to net pay Social Security when we retire.

The FDA put candy on the food pyramid, as a part of our daily diet.

The F-35 Lightning project was managed by the government, and, as a result, the United States will likely lose the next major nation state war we enter. But, because of that selfsame government's other skills, the United States will likely be bankrupt and gone before that happens.

Everything the government does is worse; no, the worst. If the government does something, that's a really good reason to look at alternatives.

Re: Rails for everything

#239

Earlier quoted context omitted.

Have you ever had to actually hire?

Multiple times; both in the US and Western Europe. Hiring Juniors for C# was harder than finding Python and Ruby people.

They're juniors. You just teach them. They probably already know Java anyway.

Re: Rails for everything

#240

Earlier quoted context omitted.

Types and editor tooling IMO. Both places they're making investments, but both areas where I feel like I'm giving up a lot of power, even though it's admittedly to GET a lot of power.

Agreed on the tooling, I won't be adopting Elixir until the IntelliJ tooling is there. It's just too crippling switching to another IDE.

what exactly is present in intellij that isn't available in vscode / neovim with lsp / newer emacs? I ask because, I use(d) intellij for java and maybe i'm not using most of its capabilities or they're hidden away in plain sight, but i haven't noticed anything special aside from the slow ui.
Post reply on HN