Readit News logoReadit News
kukkeliskuu commented on GPT-5   openai.com/gpt-5/... · Posted by u/rd
shesstillamodel · 18 days ago
The PID controller.

(Which was considered AI not too long ago.)

kukkeliskuu · 18 days ago
Coincidentally, I have been implementing an ad pacing system recently, with the help of Anthropic Opus and Sonnet, based on PID controller

Opus recommended that I should use a PID controller -- I have no prior experience with PID controllers. I wrote a spec based on those recommendations, and asked Claude Code to verify and modify the spec, create the implementation and also substantial amount of unit and integration tests.

I was initially impressed.

Then I iterated on ihe implementation, deploying it to production and later giving Claude Code access to log of production measurements as JSON when showing some test ads, and some guidance of the issues I was seeing.

The basic PID controller implementation was fine, but there were several problems with the solution:

- The PID controller state was not persisted, as it was adjusted using a management command, adjustments were not actually applied

- The implementation was assuming that the data collected was for each impression, whereas the data was collected using counters

- It was calculating rate of impressions partly using hard-coded values, instead of using a provided function that was calculating the rate using timestamps

- There was a single PID controller for each ad, instead of ad+slot combination, and this was causing the values to fluctuate

- The code was mixing the setpoint/measured value (viewing rate) and output value (weight), meaning it did not really "understand" what the PID controller was used for

- One requirement was to show a default ad to take extra capacity, but it was never able to calculate the required capacity properly, causing the default ad to take too much of the capacity.

None of these were identified by tests nor Claude Code when it was told to inspect the implementation and tests why they did not catch the production issues. It never proposed using different default PID controller parameters.

All fixes Claude Code proposed on the production issues were outside the PID controller, mostly by limiting output values, normalizing values, smoothing them, recognizing "runaway ads" etc.

These solved each production issue with the test ads, but did not really address the underlying problems.

There is lots of literature on tuning PID controllers, and there are also autotuning algorithms with their own limitations. But tuning still seems to be more an art form than exact science.

I don't know what I was expecting from this experiment, and how much could have been improved by better prompting. But to me this is indicative of the limitations of the "intelligence" of Claude Code. It does not appear to really "understand" the implementation.

Solving each issue above required some kind of innovative step. This is typical for me when exploring something I am not too familar with.

I learned a lot about ad pacing though.

kukkeliskuu commented on I launched 17 side projects. Result? I'm rich in expired domains    · Posted by u/cesargstn
donatj · a month ago
I created a rule almost ten years ago that I won't buy the domain until I actually have something to host, and it's done me reasonably well.

I however have a similar but more expensive problem, I develop side projects to an MVP and leave them up for literal decades with no one but myself using them, paying for the domain and hosting. I can't let things go.

I rewrote a number of things in Go recently so they could scale down to zero on Fly.io and save me some money.

For example though I have been developing a note keeping SaaS for fifteen years. It fits my own needs perfectly and I use it every day, but everyone I have ever had try it has bounced in a couple minutes. I literally removed the sign up after GDPR scared me in 2018 and never put it back. I should put it back, everything is client side encrypted and I don't keep any PII.

I have an ad free emojipedia-esq tool, a tool for making API controlled README badges, a tool for converting MIDIs into print outs of colored sheet music for children's keyboards, a joke API, so much more.

I did accidentally let the domain expire for my Wordle knockoff where you guess the soup based on the ingredients. It never worked very well anyway.

kukkeliskuu · a month ago
I have similar problem, but even more expensive. I have developed products that have lots of users so I cannot (and don't want to) abandon it, but monetization will require lots of investment -- actually setting up a different business altogether because the monetization I would like to buy as a service does not exist.
kukkeliskuu commented on I launched 17 side projects. Result? I'm rich in expired domains    · Posted by u/cesargstn
fourneau · a month ago
We should start a club with the amount of us in the same boat... what should our domain be?
kukkeliskuu · a month ago
projectgraveyard.org seems to be available
kukkeliskuu commented on I launched 17 side projects. Result? I'm rich in expired domains    · Posted by u/cesargstn
kukkeliskuu · a month ago
Somebody should do a website for the graveyard of incomplete projects, so that if somebody wants to work on a certain idea, they can find a potential partner.
kukkeliskuu commented on How I build software quickly   evanhahn.com/how-i-build-... · Posted by u/kiyanwang
pdimitar · a month ago
A lot of stuff is quite commoditized already, and I never found the size of a user base a convincing metric to judge by (not to mention the chicken-and-egg problem that you just demonstrated).

People are doing genuinely hugely impressive production-grade work there, and I am currently looking at a SigNoz dashboard while >200 users are frantically clicking on dozens of places in our UI (contains many reactive bits); our code is nowhere near optimal and we very rarely get >150ms response times, most are 20-50ms, and we're talking some quite tame machines (2 of them) with 8GB RAM and 2 CPU cores... and even then 90% - 99% of the time is spent waiting on the database.

kukkeliskuu · a month ago
The context of the discussion is how to create apps extremely fast. If I would optimize for something else, it would be a different story.
kukkeliskuu commented on How I build software quickly   evanhahn.com/how-i-build-... · Posted by u/kiyanwang
pdimitar · a month ago
To me it sounds like it's time for you to get to know Elixir's (Phoenix's) LiveView. It does this even better and you barely write any JS at all.
kukkeliskuu · a month ago
That is on my list of things to learn. It is not high priority, though, because I don't think Phoenix LiveView is extremely boring technology at the moment. The user base is not large enough.
kukkeliskuu commented on How I build software quickly   evanhahn.com/how-i-build-... · Posted by u/kiyanwang
lmm · a month ago
> Backend is needed in any case

Well, sort of. Much as I hate the idea, maybe Next.js for everything is the way to go, bashing out a CRUD app there is very quick.

> create partial forms and return HTML fragments, instead of full pages

I loved that approach with Wicket and made systems that way for many years, but it just isn't good enough these days, at least for a website that's going to be used in more than one location. When it takes a network roundtrip to update your UI it's always going to be noticeable.

kukkeliskuu · a month ago
I assume you are talking about geographical distribution of the user base. I don't have experience implementing apps that require heavy geographical distribution, but why does REST/JSON work better for this?

I don't have experience with Wicket, but with HTMX, I have tried to make components very small. For example one switch button is one component. Loading that is very fast in my experience, as compared to reloading and rerendering all data with React etc.

kukkeliskuu commented on How I build software quickly   evanhahn.com/how-i-build-... · Posted by u/kiyanwang
whizzter · a month ago
I think HTMX as "simple" solutions comes into the same class as you mention "django being too heavy".

Sure, Django,Rails,Asp MVC,etc with static pages could be fully functional for something that is 99% CRUD.

But I myself foolishly tried using static view+HTMX for something that should have been built with something more dynamic like Vue/React(perhaps Alpine?) from the start due to actual client-side complexity.

In general imho one should classify what your main interaction points are and use the correct tools for each.

- Is it static pages for masses of consumers with little to no interaction? (Ie a news-site,etc) then fast SEO-friendly pages is your nr 1 priority.

- Is it mainly massive CRUD updates that needs persistence, go with server built pages with Django, Rails, etc.

- Is it an actual client/data heavy UI (games but also scenarios where you want fast client data slicing or processes/sources that complete at different paces), use an SPA.

Ie, right tool for the right job.

kukkeliskuu · a month ago
Who could argue with the "right tool for the job"? I am not saying that there are no use cases for other approaches.

But when you say you had a "static view" (in singular, not plural) with HTMX, what do you mean? I am very interested in hearing what kind of complex interaction you had where that approach failed?

With HTMX, I have found the most useful approach is to build your pages from lots of very small components. Initially, I don't worry about reuse of those components, it is more about decomposition than reuse.

Of course, if you want to do "fast client data slicing", then HTMX makes no sense, because it pushes logic to the backend and by definition your solution wants to process data in the fronted. So if you start from that premise, HTMX is obviously the wrong tool.

If you want to use HTMX, you need to rethink your solution, i.e. question whether you really need "fast client data slicing". So why bring all the data to the frontend, and not just the slice you want to visualize?

One reasonable use case is reducing server load. I have one app where data is loaded from static generated pages (periodically updated, for performance, stability and reduced server load), and sorting is done on the frontend using Javascript, based on data attributes on the DOM.

kukkeliskuu commented on How I build software quickly   evanhahn.com/how-i-build-... · Posted by u/kiyanwang
gl-prod · a month ago
In Django, how do you create components well and handle user interactions?
kukkeliskuu · a month ago
I use django-components.
kukkeliskuu commented on How I build software quickly   evanhahn.com/how-i-build-... · Posted by u/kiyanwang
benterix · a month ago
There are a couple of points I'd disagree here.

1. I don't believe tenfold difference in pricing PostgreSQL vs Redis at fly.io is due to complexity, Postgres is much more complex. If I had to guess at why they priced it that way, I'd say it's because they choose more RAM-beefy machines to host their Redis instances. Other providers may have the pricing completely different.

2. It's been a decade that Lucene-based search engines are no longer the default choice. If for some reason PostresQL's FTS is not the right choice, there are many excellent alternatives like Meilisearch or Typesense.

kukkeliskuu · a month ago
1. fly.io sells redis hosted by upstash. But you are correct in the sense that default fly.io PostgreSQL was unmanaged and probably subsidized, and recent PostgreSQL is probably more expensive. But while I think you cannot directly say that tenfold increase in price means tenfold increase in complexity, I am just saying that it is complex.

2. It is surprisingly common to see people preferring Lucene-based search engines over Postgres. I don't know about your alternatives and not saying anything about them.

u/kukkeliskuu

KarmaCake day659October 23, 2019View Original