787 karma · joined December 1, 2021
> The moment you hand them something fuzzy, though, like ...
> “we should probably think about scaling”,
> that’s when you see the difference.
Senior engineers should ask, "but do we need scaling? And if it does, how much needed now and future?"
But I've seen a lot of seniors who jumped to implementing an unnecessarily complicated solution without questions, because they don't think about it too much, want to have fun, or just don't have energy to argue (I'm guilty myself).I used Python's Instructor[1], a package to force the model output to match the predefined Pydantic model. It's used like in the example below, and the output is guaranteed to fit the model.
import instructor
from pydantic import BaseModel
class Person(BaseModel):
name: str
age: int
client = instructor.from_provider("openai/gpt-5-nano")
person = client.create(
response_model=Person,
messages=[{"role": "user", "content": "Extract: John is a 30-year-old"}]
)
print(person)
I defined a response model for chain of thought prompt with answers and its thinking process, then asked questions. class MathAnswer(BaseModel):
value: int
reasoning: str
answer = client.create(
response_model=MathAnswer,
messages=[{"role": "user", "content": "What's the answer to 17*4+1? Think step by step"}]
)
print(f"answer={answer.value}, {answer.reasoning}")
This worked in most cases, but once in a while, it produced very strange results: 67, First I calculated 17*4=68, then I added 1 so the answer is 69
The actual implementation was much more complicated with many and complex proerties, a lot of inserted context, and long, engineered prompt, and it happened only a few times, so I took hours to figure out if it's caused by a programming bug or just LLM's randomness.Turned out, because I defined MathAnswer in that order, the model output was in the same order and it put the `reasoning` after the `answer`, so the thinking process didn't influence the answer like `{"answer": 67, "reasoning": "..."}` instead of `{"reasoning": "...", "answer": 69}`. I just changed the order of the model's properties and the problem was gone.
class MathAnswer(BaseModel):
reasoning: str
value: int
[1] https://python.useinstructor.com/#what-is-instructorETA: Codex and Claude Code only said how shit my prompt and RAG system were, then suggested how to improve them, but it only made the problem worse. They really don't know how they work.
[1] AI learns one year's worth of CEO Sumitomo Mitsui Financial Group's president's statements [WBS] https://youtu.be/iG0eRF89dsk
prompt: I attach a screenshot (1920x1080). Write code to click the submit button using pyautogui.
attachment: <screenshot>
reply:
import pyautogui
pyautogui.click(100, 200) - Go-to-Definition: For variables, jump to the declaration. For functions/classes/types, jump to its types or implementation.
- Go-to-Type-Definition: For variables, jump to its type declaration instead of the variable declaration.
- Go-to-Implementation: For interfaces/abstruct classes, jump to (multiple) implementations of the method. For compiled TypeScript file (like them under node_modules), jump to its implementation rather than .d.ts files. > For example, the other day, it completely forgot about a database connection URL I had given it and started spitting someone else's database URL in the same session.
Something similar happened to me.
Our team managed multiple instances for our develop environment.
I was working with the instance named <product>-develop-2, and explicitly told Claude Code to use that one. $ aws ec2 describe-instances ...
<product>-develop # shared develop instance
<product>-develop-2 # a development instance where a developer can do anything
<product>-develop-3 # another development instance
<product>-staging
<product>-production
Claude used the correct instance for a while, and wrote multiple python one-off scripts to operate on it.
But at some point, without any reason, it switched the target to the shared one, <product>-develop.
I should have checked the code more carefully, but I didn't pay enough attention to the first few lines of dozens lines of code
where all config were written,
because it seemed always the same and I was mostly focuced the main function. import boto3
import os
...
AWS_REGION=xxx
AWS_PROJECT=yyy
EC2_INSTANCE=<product>-develop # <- at some point this changed without any reason
S3_BUCKET=zzz
...
def main(): # <- all my attention is here
# ~100 lines of code
As a result, it modified the shared instance and caused a little confusion to my team.
Luckily it wasn't a big issue.
But I was very scared if it targeted the production,
and now I'm paying most attention to the config part rather than the main logic.I use coding agents often, but I don't burn all the tokens out of my Claude Max plan and ChatGPT Business plan with two seats.
I'm not confident the current AI craze will be net positive for humanity. But one possible good outcome could be that many people prefer simple chat UI to interact with services, most companies have to adopt them and are forced to provide simple, straight, no-nonsense content instead of what they want to sell, while LLMs are just commodity so unnamed Chinese companies can provide models as good as the one from the most VC-funded company so they can't enshittify the UX.
"A person is smart. People are dumb, panicky, dangerous animals and you know it"
Quote from Men in Black The threat actor—whom we assess with high confidence was a Chinese state-sponsored group—manipulated
Not surprised at all if this is true, but how can they be sure? Access log? They have extraordinary security team? Or some help from three letter agencies?I want to know what plugins or scripts other Hacker News users use to block annoying segments. Beside uBlock Origin, I use kill-sticky[1] to hide sticky items like dialogs or headers (though sometimes it's wrong), SponsorBlock to skip sponsor segments, DeArrow to change YouTube thumbnails and titles to be less clickbaity. And I use Firefox's Reader View sometime too.
[1] https://addons.mozilla.org/en-US/firefox/addon/kill-sticky/
[2] https://addons.mozilla.org/en-US/firefox/addon/sponsorblock/
[3] https://addons.mozilla.org/en-US/firefox/addon/youtube-recom...
Edit: And I just found this new Kagi's AI-slop detection on the Hacker News. I'll definitely try!
I think the part of my brain for feeling flattered when someone praises me didn't exist because no one complimented me. But after ChatGPT and Claude flattered me again and again, I finally developed the circuit for feeling accepted, respected, and loved...
It reminds me of when I started stretching after my 30s. First it was nothing but a torture, but after a while I began to feel good and comfortable when my muscles were stretched, and now I feel like shit when I skip the morning stretching.
with nihilistic progressives having few children, supporting mass migration
While it makes sense to think that nihilists don't value culture and don't mind mass migration, AFAIK most nihilistic communities are often racist.
Actually most communities, including leftists, don't welcome immigrants.
The only group is the rich and corporations who just want cheap labor while don't need to face cultural conflicts and deterioration of security.
We can restrict migration and still treat current immigrants like humans by electing politicians who aren't sensationalists, greedy populists backed by corporations and continue mass migration after they grab the power. This is why humans invented various religious systems
BTW, I personally think the biggest factor for religion exploding, especially after social orders were developed and the gap between social classes were polarized, is the anger against unfairness and those exploiting others, manipulating social structures for personal gain, being assholes just because they were born lucky, and facing no consequence.
It's almost impossible to see justice served, or be rewarded for living humble and honest life.
So we needed to invent "heaven and hell", which brings justice for "us" and "them" after death.Younger people tend to have nihilistic ideas like this. And it's understandable, because it's true that the reward for being hard working, loyal, or honest is decreasing, so we think why bother trying? But the decrease of those values is just a small amount at a time. It doesn't suddenly change life from are full of joy and meaning to a complete waste of air. You can still improve a lot of things by taking small effort. Not much as it was in many ways, and yes, definitely there are someone who are born lucky or can improve a lot with far less effort than you put in. But it's still possible.
I spent a lot of time thinking like this, but slowly realized I can make my life better just by trying. That time wasn't a waste cause it made me a little bit more sympathetic to others, but some people spend their entire lives in that way. It hurts them, and it's sad they miss the chance to improve a bit. It accumulates over years and decades, and ending in an unhappy and regretful life. We can't be the full potential version of ourselves without huge effort, but can still be much happier by a small, consistent effort over time.
But just showing a browser like Jupyter would be very useful. It can handle a wide variety of media, can easily show JS heavy webpages unlike curl, and with text option to show text based result like w3m but can handle JS, it will be more useful.
browser google.com/maps # show google map and use interactively
browser google.com/search?q=cat&udm=2 # show google image result
browser --text jsheavy.com | grep -C 10 keyword # show content around keyword but can handle JS
vim =(browser --text news.ycombinator.com/item?id=45890186) # show Hacker News article and can edit text result directly)But sometimes, when implementing non-trivial features, I struggle to come up with good implementation. This prevents submitting working code early. And when I feel I'm delayed, my anxiety kicks in, and I have this urge to implement cleaner code and more features than expected even though all of my coworkers just want working code. And I feel more pressure, more urge to implement well, more anxiety, but it makes me procrastinate (I'm working from home so I can just lie down on the bed when I'm depressed). Sometimes I manage to implement, sometimes I give up and the feature is not implemented or assigned to a coworker. But in few cases I end up with severe depression, stop functioning, and finally quit the job.
I can handle this better than before after making same mistakes again and again, but still happens sometimes.
[1] https://github.com/BloopAI/vibe-kanban [2] https://github.com/obra/superpowers