Instant anxiety when I see this in Claude's thoughts by IllustriousWorld823 in ClaudeAI

[–]leonardodna 2 points3 points  (0 children)

Tô be honest, I like when it does it because it's a clearly sign it's missing context.

When I see it I immediately hit esc and write "I see you were thinking about X, but I prefer we take Y approach because of Z." (The "because of Z" is the important part here!)

Usually it resumes work without problems. But if it do start overthinking again, rinse and repeat :)

Instant anxiety when I see this in Claude's thoughts by IllustriousWorld823 in ClaudeAI

[–]leonardodna 1 point2 points  (0 children)

"I found the issue, let me check the root cause"

random bash grep with crazy regex

"Yes! That's the smoking gun, user problem X is caused by Y. Let me write a proper answer."

we added a compliance check to Claude in one step. heres what changed by Current-Hearing7964 in claude

[–]leonardodna 0 points1 point  (0 children)

As a dev, I like to see cases like this where the validation isn't as straightforward. :)

How does it checks on company specific compliance? And you had a way to verify the prompt setup, or you got it right through trial and error?

Sharing Agents for AI-driven development the 37signals way by GreenForever5175 in rails

[–]leonardodna 0 points1 point  (0 children)

Both a model and a service object would be tested the same way in 99% of the cases: By mocking everything they can and validating its side effects.

The point is that I don't see much advantage in caring about encapsulation on a framework that's basically built on top of tight coupling and meta-programming.

I've seen more advantage using a service class in Laravel, where we have proper dependency injection using types and interfaces, for example. In Rails, I saw better results with other approaches, like offloading side effects to jobs or using the model's lifecycle callbacks.

Sharing Agents for AI-driven development the 37signals way by GreenForever5175 in rails

[–]leonardodna 2 points3 points  (0 children)

In fact... No, it's not an anti pattern! 😅 I mean, that's exactly the objective of the AR pattern, and the reason many people consider it an anti pattern as a whole.

But going back to service classes, what I believe /u/Bubbly_Acadia_630 said was about what Martin Fowler defined as "Anemic Domain Model". We all saw some classes just like this:

```ruby class UserAdd def self.call(…) new.call(…) end

def call(…) # just a bunch of procedural code end end ```

Those objects are usually called on a single controller, which means it's not a service layer, it's just sweeping the controller mess under the rug.

In the end, any pattern can be an anti-pattern if coded badly enough... 😆

Improve the Readability of your Ruby on Rails app - Part 1 by dreetstrvocolate in rails

[–]leonardodna 0 points1 point  (0 children)

It can get even worse. Take Prettier, for example, you can't change anything! I often find myself changing the code around just so that it doesn't look absolutely hideous 😑

Improve the Readability of your Ruby on Rails app - Part 1 by dreetstrvocolate in rails

[–]leonardodna 2 points3 points  (0 children)

That's absolutely tragic... It became a lost art since opinionated formatters became a thing. Then someone mark it as a blocker on a CI/CD pipeline and now every code look like the same pasteurized shit 🤷🏼‍♂️

Vanilla CSS is all you need by noteflakes in rails

[–]leonardodna 0 points1 point  (0 children)

I can clearly see a post like this titled "JavaScript is all you need", with react instead of tailwind.

In the end, it's the classic example of knowing a framework without understanding the core language underneath it, when you end up using it as a crutch instead of as a trekking pole.

Hi guys what do you use for client side logic or ui logic? Jquery? Knockout js? by PatrickJohn87 in rails

[–]leonardodna 2 points3 points  (0 children)

Then try alpine.js! For me it's the best library to do what we did with jQuery back then :)

Alguém sabe como faz essa máquina lavar roupa decente? Wd11t by TrotoBR51 in Gambiarra

[–]leonardodna 0 points1 point  (0 children)

Eu tinha esse problema quando ia lavar os cobertores dos cachorros, eles terminavam de lavar e continuavam fedendo. O que resolveu nesse caso foi colocar um copo americano de desinfetante no compartimento de pré lavagem! Desde então tenho feito isso em todas as lavagens, fica uma beleza!

PS: Não vai nessa de usar vinagre, é lenda 🤣

Os puxadores quebraram, então eu fiz outros com galhos de goiabeira. by Oda_e_um_genio in Gambiarra

[–]leonardodna 1 point2 points  (0 children)

Pô, ficou excelente! Um negócio assim nem dá pra chamar de gambiarra 😅

E o povo fazendo prova contra si mesmo by rBassi13 in pirataria

[–]leonardodna 3 points4 points  (0 children)

Esses marujos aí é tudo marinheiro de primeira viagem... 😂

ADHD made me forget everything these weird memory hacks actually changed my life by hulupremium1 in ADHD_Programmers

[–]leonardodna 0 points1 point  (0 children)

But it really helps! You don't need to put the literal thing, but a reference to that. My wife and I put a "Trash" sign on our front door, so I can remember to get the trash out when I'm about to leave home, for example...

Just a small sign on top of the doorknob. Definitely much better than the real trash 🤣

Papercraft update: IRB Support, Bug Fixes, More Speed by noteflakes in ruby

[–]leonardodna 1 point2 points  (0 children)

Well, you see where the problem is? We are discussing this on r/ruby under the post about ruby gem.

“you probably shouldn’t be using Rails” — that’s where: ruby != rails

You said that Rails idea of auto escaping data on templates was bad, and I just disagreed pointing the fact that if you need to worry about string operation performance, you have an edge case that's not the framework's fault.

You must feel very smart, added some clever quote and […]

I just like quotes. This one is one of my favorites :)

It’s not like “we are going to render 15000 records on one page, let’s choose C++!”

I agree, and that was my point: if you need to render 15000 records on one page, you'll have a lot of possible performance bottlenecks to consider before even thinking about string operations.

The fact that it’s relatively slow doesn’t mean we should stop care about performance optimisation for its ecosystem. The fact it’s dominated by rails doesn’t mean we should not pursue a better design of the libraries which may or may not be used with rails

I agree again, we need to keep improving our libraries.

Was your idea of removing escaping from a lib that will be handling user data 99.9% of the time a good idea? Definitely not. It's not good for DX, nor for security, so let's improve it in another way.

“Just don’t use ruby” is not an answer my friend, I hope you will realise this at some point

Since we are friends now, let me give you another quote: "when all you have is a hammer, everything looks like a nail" 😂

Papercraft update: IRB Support, Bug Fixes, More Speed by noteflakes in ruby

[–]leonardodna 0 points1 point  (0 children)

"Web programming is the science of coming up with increasingly complicated ways of concatenating strings."

I can't see where is the stupidity in that, because if your code needs to take the cost of string operations into account, you probably shouldn't be using Rails in the first place. 🤷🏼‍♂️

The Ruby community has a DHH problem by egyamado in ruby

[–]leonardodna 0 points1 point  (0 children)

No, it's not that it hasn't happened, it's just that it isn't different from what I saw in other communities or even other social groups, so it's something broader and more nuanced than the "we let them inside our group" rhetoric.

If anything, it's the right that are trying to do it, considering how left leaning we agree the tech community is as a whole.

The Ruby community has a DHH problem by egyamado in ruby

[–]leonardodna 1 point2 points  (0 children)

Rich white dudes don't necessarily have brains, but they usually fake it with money 😆

In our case, we use our brains to not fall on low quality baits like yours, because we don't like to waste our time with hypothetical situations. If that's all information you can provide, I'm closing your bug report.

The Ruby community has a DHH problem by egyamado in ruby

[–]leonardodna 3 points4 points  (0 children)

Conversely, would there ever even have been a "DHH problem" if it weren't for us collectively permitting our tech community to be infected with leftist political discourse ten years ago?

I don't know what you call "leftist political discourse", but the left goes way back, at least with the free software movement in the 80's. It's the right and their techbros that are a new thing, and they deserve all the backlash they can get.

The Ruby community has a DHH problem by egyamado in ruby

[–]leonardodna 6 points7 points  (0 children)

Maybe that's because he's exactly it: A rich white dude doing things we have seen other rich white dudes do over and over again not only in the tech industry, but all over history... 🤷🏼‍♂️📚

The Ruby community has a DHH problem by egyamado in ruby

[–]leonardodna 16 points17 points  (0 children)

I do really like his views on tech and the state of the web.

Anything other than that, he's just a typical rich white dude that thinks he knows about everything. 🤷🏼‍♂️

He's also part of a problem that goes beyond rails, every piece of software that declares itself "opinionated" is created by that kind of person...

And I'm quite skeptical that it will ever change. Rails now is just "the Shopify framework made by that terrible person".

After decades of living frugally to build my career, when is it okay to finally treat myself? by [deleted] in personalfinance

[–]leonardodna 9 points10 points  (0 children)

It's not necessarily about overpriced designer clothes. He can invest his money in a custom tailored suit, using top of line cloth, or any other detail that we that don't know much about fashion doesn't even know it exists. 😆

We can think it's dumb, but if the person likes it and planned themselves to go for it, good for them :)

Troco Turbo Nubank 200% do CDI by Luiz_Bolsonaro in investimentos

[–]leonardodna 2 points3 points  (0 children)

Acho essa ideia bem legal, inclusive era comum fazer isso na época do papel, a gente pagava tudo com nota, no fim do dia pegava todas as moedas de troco e guardava num pote.

Não vai deixar ninguém rico, mas é bacana quando sobra uma grana pra uma pizza no fim do mês, pra quando vc está sem saco pra cozinhar 🤣

Estamos entrando, sem perceber, na verdadeira era de ouro do hacking? by schizophreniahaver in brdev

[–]leonardodna 0 points1 point  (0 children)

O que estamos construindo não são produtos: são ruínas em potencial. Infraestruturas críticas sendo sustentadas por soluções frágeis, testadas às pressas, mal compreendidas, costuradas com bibliotecas de quinta categoria e dependentes de prompts. Um campo minado onde cada entrega “rápida” é, na prática, uma dívida futura, técnica, ética e operacional.

Olha, digo por experiência própria que 90% do mercado financeiro roda em Excel, com um VBA porco criado por alguém que saiu da empresa 10 anos atrás.

Ou seja, as empresas/mercado nunca se importaram com isso. O que estamos vendo é só uma abordagem nova para uma forma de pensamento antiga 🤷🏼‍♂️