Readit News logoReadit News
janee commented on Claude Sonnet 4.5   anthropic.com/news/claude... · Posted by u/adocomplete
grncdr · 4 months ago
> rails 1 codebase to rails 8

A bit off topic, but Rails *1* ? I hope this was an internal app and not on the public internet somewhere …

janee · 4 months ago
haha no it's an old (15years old) abandoned enterprise app running on-prem that hasn't seen updates in more than a decade.
janee commented on Claude Sonnet 4.5   anthropic.com/news/claude... · Posted by u/adocomplete
Philpax · 4 months ago
Well, yes, that's Claude Code. And OpenAI Codex. And Google Gemini CLI.

Your average dev can just use those.

janee · 4 months ago
Yes but you need to setup quite a bit of tooling to provide feedback loops.

It's one thing to get an llm to do something unattended for long durations, it's a other to give it the means of verification.

For example I'm busy upgrading a 500k LoC rails 1 codebase to rails 8 and built several DSLs that give it proper authorised sessions in a headless browser with basic html parsing tooling so it can "see" what affect it's fixes have. Then you somehow need to also give it a reliable way to keep track of the past and it's own learnings, which sound simple but I have yet to see any tool or model solve it on this scale...will give sonnet 4.5 a try this weekend, but yeah none of the models I tried are able to produce meaningful results over long periods on this upgrade task without good tooling and strong feedback loops

Btw I have upgraded the app and taking it to alpha testing now so it is possible

janee commented on Why Ruby on Rails still matters   contraption.co/rails-vers... · Posted by u/philip1209
dceddia · a year ago
Interesting! What sort of stuff goes in the scaffold repo? Like examples of common patterns?

Definitely agree I think Ruby's closeness to natural language is a big win, especially with the culture of naming methods in self-explanatory ways. Maybe even moreso than in most other languages. Swift and Objective C come to mind as maybe also being very good for LLMs, with their very long method names.

janee · a year ago
it's fairly bespoke, but some examples:

ETL pipelines, we catalogue and link our custom transformers to bodies of text that describes business cases for it with some examples, you can then describe your ETL problem in text and it will scaffold out a pipeline for you.

Fullstack scaffolds that go from models to UI screen, we have like a set of standard components and how they interact and communicate through GraphQL to our monolith (e.g. server side pagination, miller column grouping, sorting, filtering, PDF export, etc. etc.). So if you make a new model it will scaffold the CRUD fully for you all the way to the UI (it get's some stuff wrong but it's still a massive time save for us).

Patterns for various admin controls (we use active admin, so this thing will scaffold AA resources how we want).

Refactor recipes for certain things we've deprecated or improved. We generally don't migrate everything at once to a new pattern, instead we make "recipes" that describe the new pattern and point it to an example, then run it as we get to that module or lib for new work.

There are more, but these are some off the top of my head.

I think a really big aspect of this though is the integration of our scaffolds and recipes in Cursor. We keep these scaffold documents in markdown files that are loaded as cursor notepads which reference to real source code.

So we sort of rely heavily on the source code describing itself, the recipe or pattern or scaffold just provides a bit of extra context on different usage patterns and links the different pieces or example together.

You can think of it as giving an LLM "pro tips" around how things are done in each team and repo which allows for rapid scaffold creation. A lof of this you can do with code generators and good documentation, but we've found this usage of Cursor notepads for scaffolds and architecture is less labour intensive way to keep it up to date and to evolve a big code base in a consistent manner.

---

Edit: something to add, this isn't a crutch, we require our devs to fully understand these patterns. We use it as a tool for consistency, for rapid scaffold creation and of course for speeding up things we haven't gotten around to streamlining (like repetitive bloat)

janee commented on Why Ruby on Rails still matters   contraption.co/rails-vers... · Posted by u/philip1209
dceddia · a year ago
> lacks strong typing for AI coding tools

I've heard this criticism a few times – the fear that LLMs will be bad at Rails because there's no types – and I don't think it's accurate.

At least in my experience (using the Windsurf IDE with Claude 3.5 Sonnet) LLMs do a very good job in a Rails codebase for stuff like "I want to create a new page for listing Widgets, and a Create page for those Widgets. And then add pagination.". I've been able to spin up whole new entities with a model/view/controller and database migration and tests, styled with tailwind.

I think the reason strong types don't matter as much as we might assume is because Rails has very strong conventions. Routing lives in routes.rb, controllers go under app/controllers, most controllers or models will look very similar to other ones, etc.

Type information is something that has to be presented to the LLM at runtime for it to be accurate, but convention-over-configuration is stuff that it will have picked up in training data across thousands of Rails apps that look very similar.

On top of that, the core Rails stuff hasn't drastically changed over time, so there's lots of still-accurate StackOverflow questions to train on. (as opposed to something like Next.js which had a huge upheaval over app router vs pages router, and the confusion that would cause in training data).

In my opinion the future of LLM-aided Rails development seems pretty bright.

janee · a year ago
So we have an LLM code scaffold repo we use in a large (2m loc) production Rails codebase and it works amazingly well.

Rails and especially Ruby lends itself to describing business logic as part of source code closer to natural language than a lot of typed languages imo and that synergizes really well with a lot of different models and neat LLM uses for code creation and maintenance.

janee commented on Ask HN: For those who can choose to go to the office, and go, why do you go?    · Posted by u/jedberg
janee · a year ago
I go in because it helps separate work life from home life, which I find benefits both positively in different ways.

I prefer a hybrid work area with three zones

1. Open plan chaos, lots of people talking and going bonkers

2. Smaller office 3~4 people, maybe your team or people you like more than others

3. Solo office, or hot desk in quiet zone. For deep focus. This one has a great view of the mountains in the area, which I find helps me think.

I bounce around these at my office depending on mood and task at hand. That variety is the main thing I like about our office setup

janee commented on MPPP – The first 'designer drug' disaster (2023)   chm.bris.ac.uk/motm/mppp/... · Posted by u/aragonite
janee · 2 years ago
Heard about MPTP a while ago, it was no 3 of 6 on this list. Some crazy stuff out there

https://youtu.be/5G1eaNkzERE?si=ic71KlAtdVE7Mwey

janee commented on Car dealerships revert to pens and paper after cyberattacks on software provider   apnews.com/article/car-de... · Posted by u/achristmascarl
xyst · 2 years ago
I worked at one of these companies catering to a large network of dealerships. Quit after 1 month. The one company I worked at was outsourcing all or most of the development work with an onshore mostly as management and a couple of devs in the US.

It was a massive shit show.

- Tests? Useless and garbage. Only used to pump their code coverage reports to show to management

- Design? Non existent and a hacked together code base across a half dozen low bid contractors, probably junior engineers at best

- CI? Dedicated test environments? Nah, costs too much money. Just “use docker to test on local and deploy directly to prod”

- Documentation? Besides very basic instructions on how to deploy locally … good luck

- backup and recovery? Nah who has time for that. Just work on the features that {big client} wants

- code quality? I wish there was a “god” class, but in this code base they managed to create a universal class or “macro service”

Management was a mess. Just a mouthpiece for sales or executives. No backbone. No vision. Just “alright we just need to get through the quarter” mentality.

janee · 2 years ago
"macro service" hilarious, will most certainly use this in some future conversation at work, thanks.
janee commented on Avoiding the soft delete anti-pattern   cultured.systems/2024/04/... · Posted by u/culturedsystems
Reefersleep · 2 years ago
How about a separate, schema-wise identical "deleted_x" table that you "move" deleted entities to? Can't get much more explicit than that, and still enables whatever joins you'd like on historical deleted data.
janee · 2 years ago
There is the downside of having to maintain both schemas now.

Unless you automate it devs will have to remember to migrate both when making a change which adds some overhead, not a lot, but it's just something to consider here imo as some migrations (schema and/or data) can become nasty and complex

janee commented on Advice for new software devs who've read all those other advice essays   buttondown.email/hillelwa... · Posted by u/BerislavLopac
janee · 2 years ago
"what advice would you give to xxx"

Other than a means to gain advice, I've found this question a good gauge for collaboration compatibility.

I often ask it in interviews on both sides to give me insight into what someone currently values.

It's sort of like asking someone to define "better" be that in skill, or happiness or avoidance of pain.

My main interpretation of the post would be a high value placed on pragmatism, gained via a journey of experimentation. Put crudely there is no silver bullet but try a few for a while

I think point 10 is highly underrated in my opinion

janee commented on EmacsConf Live Now   emacsconf.org... · Posted by u/xenodium
janee · 2 years ago
No hate on Emacs, just came across this on Friday and it cracked me up...thought I'd share

https://youtu.be/urcL86UpqZc

u/janee

KarmaCake day257February 26, 2014View Original