skysight-inc/HackerNews huggingface dataset:
Ask HN: Am I using AI wrong for code?
I have a nagging feeling that I'm missing out on productivity gains by under utilizing AI for code. I've used copilot and a few other tools but for the most part they didn't click with my workflow, or ended up leading me down paths that wasted time.

The only thing I do now is chat with Claude via the web chat to brainstorm architecture, tool recommendations, and to get small well defined code snippets or boilerplate to copy into my projects. Don't get me wrong, I think this has massively improved my productivity, and made me less scared of driving into projets with unfamiliar languages or stacks. My most useful interactions have been when I use my own experience to point out flaws with the AIs suggestions and ask questions. Its helpful but I feel like I'm missing out.

Given how powerful LLMs are plus options like RAGs and fine tuning, I feel like they should be more capable of accomplishing large chunks of work with supervision. I've certainly seen reports of entire reafactors, features, or language migrations being done with the help of AI.

My question is: what tools are people using?

What I have in my mind is a tool that can suggest and, crutially, iterate on edits to multiple files at once, include context based on chosen docs or codebases, and be able to branch conversations so that I can clarify and learn without derailing the main thread. I started working on a CLI that can do this but I'd rather use something off the shelf.
If Node.js can run TypeScript files directly, then the TypeScript compiler won't need to strip types and convert to JavaScript - it could be used solely as a type checker. This would be similar to the situation in Python, where type checkers check types and leave them intact, and the Python interpreter just ignores them.

It's interesting, though, that this approach in Python has led to several (4?) different popular type checkers, which AFAIK all use the same type hint syntax but apply different semantics. However for JavaScript, TypeScript seems to have become the one-and-only popular type checker.

In Python, I've even heard of people writing types in source code but never checking them, essentially using type hints as a more convenient syntax for comments. Support for ignoring types in Node.js would make that approach possible in JavaScript as well.
> The whole reason it was labeled a "crisis" was because it made the path to war incredibly short.

Yes, but the reason the Ukraine war isn't called the "Ukraine crisis" is because the crisis point came, went and then a war began. That is why tensions are higher - we're further up the escalation ladder. The Russian army has partly mobilised and people are shooting at them. The situation is a lot more fraught than a relatively civil argument over where missile emplacements were going to be put and nobody had any actual intentions of killing any Russians.

I put my challenge to you again - what warnings are you expecting to see months before a nuclear war starts? Your last answer was that you'd discover those signs 40 years post-hoc when the Russians told you and I don't think you can defend that as a rational position. If you want an explicit reason, 40 years hindsight is not a warning sign. Warning signs come before the event.
I believe it's a bit more nuanced than that. Short ubiquitous words like "and" or "the" we instantly recognize at a glance, but long unfamiliar or rarer words we read from the beginning, one syllable or letter at a time, until pattern recognition from memory kicks in. All unconsciously, unless the word is so odd, out of place, mispelled, or unknown that it comes to conscious awareness and interrupts our reading.
> If the code doesn't match the documentation, then there is a bug in the system.

Then I'd say the vast majority of Ruby libraries are buggy.

> Not having documentation just removes the ability to determine if what the code _does_ is what the code is _intended to do_.

But usually there isn't any intent when it comes to async-or-not. Library authors usually just write a method that results in the right value; whether that method can yield or not isn't even something they thought about, much less had a specific design in mind for.
Because 'line go up' is the only globally shared value left in modern society
Cool but offence is only half the story! Any plans to add defensive stats or stuff like turnovers / steals etc?

Also any plans to make it work from camera footage e.g. A 360 camera that can capture the whole court at once instead of syncing?
Flow (by Facebook) used to be fairly significant in the JavaScript several years ago, but right now it's somewhat clear that TypeScript has won rather handily.
I would rather let Typescript evolve a few more years before freezing its development via standardization
You either obey the AI or be replaced by them.
aside: I think it's questionable to say that forking isn't a git concept. it's just a branch on a different upstream. Those two upstreams could simply be two different folders on your machine, or shared server.

I supposed the branding and UI for it could be a counter argument, but then again Github allows regular branch creation / committing / merging in their UI. Their main value add (not downplaying it—it's huge) on top of git (besides ancillary things like CI / linters) is the ability to comment on a branch's diff, i.e. a PR Review.
Glad you liked it.

How could you go wrong with a paper that starts with

> Language has been a thorn in humanity’s side since we evolved a complex enough audio and graphics processing unit to grunt, let alone write cryptocurrency whitepapers or opinion columns.
That's an excellent way to encourage no one to do anything ever.
Interesting that glasses seem to help for you differentiating colours?

I guess without glasses everything is a bit worse in general, but they don't really help me see colours better. (But if I got the holds right for my hands, my memory is generally good enough to avoid 'cheating' with the feet not a problem.)

I keep meaning to try giving my climbing partner a later pointer, so they can point out the next coloured hold more easily than with vague descriptions.
Yes please try it out, I'd love to know what you think! My email is mike@hooper.gg if you want to chat more about basketball and tech. I would be curious to learn what you have tried so far and what was important to you as a coach
Related discussion: https://news.ycombinator.com/item?id=41062348
I wonder how good it is at defecting fake smiles and attitudes. Because I'd rather interact with non-smiling staff than someone who is obviously faking it for the camera.

Reminds me the "Welcome to costco, I love you" scene from Idiocracy: https://youtu.be/ZIFCWpn4qQ4?si=nJpGjA33-sf5QE_Z
I can see legitimate pushback in physical workplaces. But for low-value off-premises work, particularly at the low end, the battle is lost. The tech might rank staff in the interim. But the point is to use the constant feed of telemetry to train a replacement.
and the legend that is provided isn't that helpful:

> Legend: [posix] <lsb> (development) {toolbox} =klibc= #sash# @sbase@ *beastiebox* $tizen$ -fhs- .yocto. %shell% +request+
In my experience as a 13 years freelancer dev with a design background, the main issue I’ve experienced is that most designers don’t have a lick of dev knowledge and they don’t understand how easy or how complex is gonna be to code what they design. Or if it’s doable at all. Or how hard is gonna be to maintain a site designed the way they designed it. So it’s a matter of not having appropriate knowledge on the subject.
Wonderful Life by Stephen Jay Gould is a lovely book about many strange organisms from this same time period. It's wild that these alien creatures were just wandering around living out their lives for millions and millions of years before we or most forms of life we would really recognize came on the scene.
IMO Alexa is just a bad product, which Amazon thought scale scale scale instead of finding value and product market fit. So many things that it does is better than predecessors, but overall is subpar and didn't get better over time.

Ex. Music. Bread and butter for Alexa. Conversion opportunity to Amazon Music. Conversion opportunity for podcasts, news, so much... Try asking Alexa to play new music, something different, slow jazz, I didn't like that song, play something like blah, etc... Most of these queries do not work. It's such a POS.

Ex. Proactive notifications. Alexa routinely informs me that diapers or something else from my routine purchases is likely running out and I should refill them. I've used this feature 100s of times in the 7+ years I've owned Alexa. I'm sure the LTV I've given Amazon is hell a lot more than most Alexa users. That being said, I can get so many more recommendations than just the 1-2 things in my routine purchase history.

I could go on and on. Ultimately, like many products by large companies, Amazon had a product that received early success because of novelties like hands-free music, alarms, timers - but never found more utility beyond that. Instead of doubling down on discovery, they worked on scaling out the platform and opening it up to 3P developers. The platform they exposed was limited in frustrating ways, and ultimately did not help them discover any hidden gem skills.

IMO the smart home virtual assistant is ripe for easy disruption. Throw out Amazon's model and use ChatGPT / Anthropic instead. Keep the 3P plugins. This fusion would be a sufficiently better product than what's in the market today.
> A government is a legitimate monopoly of violence and I'm all for it.

It is based in violent use of force. I'm glad to hear that this suits you, I hope your opinions and convictions remain in line with the government's.

> Because I know that the alternatives are much worse (warlords and such)

Hmm. This is not something you know; it might be something you believe. Unless you have personal experience of warlords.

When you say 'government' I think you are talking about the overt state apparatus - eg politicians, government buildings, courts, police, etc. But I think of a 'governance system', which includes schooling and media and both political parties. We are presented with an illusion of debate, reasoning, etc whilst being guided towards preordained goals.

> At the end of the day, I cannot verify everything, everywhere, all the time. That's why smart people use the same "web of trust" principle that computer security does, where you trust people close to you and then other less and less.

Yes, you cannot verify everything. But do you actually verify anything? Eg, what climate change bits have you personally verified? I have tried btw, but the beaches I knew decades ago are still at the same height, plastic bags do not last for 100s of years - ie my personal verification leads me to the opposite conclusions of those that are commonly made.

> And I'm mature enough to understand we can't persuade 100% of the people, especially in the age of internet and nutjobs being able to congregate and convince themselves that up is down and the sky is red and gravity doesn't exist and the Earth is flat and...

You say we... Which group is this that you speak for? Which group has the real handle on truth that it can force everyone else to abide by it? Does truth really need to be forced on others - I would have hoped it it was true, it would demonstrable. If it is not demonstrable, perhaps it is not truth, despite all the books, shows on TV, etc.

> So I'm fine with dragging some people along for the ride against their will. Societal progress always works this way, especially since some of those opposed are malicious actors.

So say, lots of group who are convinced of their position, environmental folk, religious, political, etc. They can't all be right though? It is it that the mightiest are the rightest?

For me, all that ideology is a recipe for confrontation. We all have to live here .. can we not do so with conversation, cooperating on those things we care about, and yet not forcing others to go against their conscience? I try not to force others, it seems a viable way to go. And it's not like I know the truth and have never been wrong. I would hate to force something on another, only to realise my force was in error later on, even if I was well meaning at the time. There's really no need to force others to act as you think is right, even if you have read a lot of books.

> Then nothing will get done.

It's really pretty good already. I don't need to force my "improvements" on the world.
My new queue has better capabilities and performance, and I want the user migration to be smoother. Therefore, I hope to use a better ecosystem.
Thanks for the clarification. I guess I'll have to find a few friends to run an ACME service together with. Unfortunately, in most cases the certificate store is global across applications, so presumably we'll hit a brick wall with browser requirements.

(The services are all TLS based. They are just not HTTP based, and CRLs are generally delivered via HTTP. And I'm not going to wrangle a HTTP client into my mail server, or worse, postgres instance. The latter could also work with a local CA, it's primarily SMTP that doesn't.)

(...or I just ignore revocation and cross my fingers it'll never come up...)
I’m an expert poker player.

What I said was 100% correct and didn’t need a bunch of extra unrelated stuff.

I’m making a fundamental point about randomness and poker which you are failing to understand. Stop and try to understand for a second instead of launching into mansplaining.
What broken tooling are you talking about? tsc is broken?

IE failed because it was a horrible browser that didn’t evolve for years and was incompatible with major web standard developments. Nothing to do with typescript, an open source, best in class type system and type checker.
> OpenAI ran it into the ground with whatever they’re doing to save on inference costs, otherwise scale, align it, or add dumb product features.

They googlified it. (Yandex isn't better at google because it improved. It's better because it stayed mostly the same.)

My recommendation to disrupting industry leaders now is becoming good enough and then simply wait until the leader self-implodes.
> In Python, I've even heard of people writing types in source code but never checking them

This is my main approach. Type hints are wonderful for keeping code legible/sane without going into full static type enforcement which can become cumbersome for rapid development.
Would want a capsule filling tray. The opening of the large portions of the capsules are positioned at the same level as the flat surface so you can just pile up a bunch of sugar or starch or whatever and use a scraper to level it all off, then assemble the tops of each capsule.

https://www.pennherb.com/cap-m-quik-capsule-filler-F7B
This is exactly how Cortana and Google Assistant have been built as well.
Could be called some kind of https://en.wikipedia.org/wiki/Bait-and-switch , or BAS = B(ullshit)A(ssisted)S(ales)?
1. We can do one for web.
2. Would love to chat about it.
We support both push and pull models (it seems both RabbitMQ and Kafka support both). Our implementation is actually more like Kafka (for example, it supports replay), but implementing RabbitMQ's routing isn't very complicated either. However, I'm concerned about the Kafka protocol, as it seems to have been revised many times historically, which could lead to client compatibility issues. My users typically want to decouple processing logic (not for large-scale data scenarios like logging, more like RabbitMQ use cases), so I'm quite conflicted.
This isn't Japan-specific, and retail jobs basically anywhere in the world are similarly soul-crushing. Don't tell me you think the job of a walmart cashier in america values individuality and freedom in some uniquely american way.

Support staff in the US, and anywhere, for ages have had all their customer interactions recorded, and sentiment analysis run to automatically gauge them as being nice enough or not.

Amazon tracks warehouse worker's work-speed, and even has little tablets with games to try and make people work faster. You get fake virtual points and level up for fulfilling orders faster.

The company behind this also says it's trying to gamify a job requirement. These retail workers are required to smile and greet customers, and now it seems like they have an app that's giving them fake virtual points for doing a "good job".
Credit cards let you externalize the cost, since merchants raise their prices to account for credit card fees, but raise their prices for everyone, not just credit card users. In other words, the cost of better consumer protections from credit cards is subsidised by those not using credit cards (and those who carry a CC balance and pay interest, but that's another matter).

Alternatively, maybe practically everyone uses credit cards, so the "subsidy" is negligible, and everyone loses slightly on average. But then you'd lose even more if you didn't use a credit card and subsidised everyone else.

It's basically a big version of the Prisoner's Dilemma.
Are they still selling however? It seems like everyone had a Google home or Alexa ~5 years ago (including myself) and now no one does.
Yeah! We are planning to add blocks, steals, and rebounds in the coming months. I think fouls is still a reach goal right now (hard even for humans) but maybe one day.

Re: capturing the whole court, I think we are considering supporting panning of the camera (in addition to syncing). We focus pretty heavily on making sure things work with just a normal phone so it's more accessible to everyone. We are definitely starting bottom up but maybe one day we will get to more high tech hardware.
Lego Modular Streetscaper
With how long you have to stay on hold these days, I'm honestly not sure it is. You can file small claims completely online with a simple text form (at least in my country) and any response will always be in writing.
The app can do speech-to-text, and text-to-speech using their whisper model, and it's integrated with chatgpt.

On May 13th, they demoed GPT-4o's multi-modal voice capabilities, and it's much better than a text/speech model.

Converting speech to text, and vice versa, is quite lossy, all the tone and emotion of the speech is lost in translation, the model they demoed in May was capable of much more than whisper is.
You’ll be able to one day!

https://www.w3.org/TR/mediaqueries-5/#at-ruledef-custom-medi...
Malaysia asks Microsoft, CrowdStrike to consider covering losses from outage
It's not like individualist cultures are immune to being horrible to service workers.

I was at lunch today watching a guy complain to some random employee at a Fuddrucker's that they'd put the mushrooms on top of the melted cheese rather than put the mushrooms on first and then melted the cheese on top of them. He was berating this poor girl for long enough that it was still ongoing when my food - which had been ordered only a minute before his had been up to the counter - was ready.

This wasn't in Japan or Korea. It was a middle-aged, apparently-decently-well-off white guy at a medium-upscale mall in suburban California.
> This proposal aims to enable developers to add type annotations to their JavaScript code, allowing those annotations to be checked by a type checker that is external to JavaScript. At runtime, a JavaScript engine ignores them, treating the types as comments.
I think some people's brains just don't grok what LLMs are good for. They either ask complex gotcha questions, which get mostly wrong answers or use them as search engine replacements.

I just happen to have a real world example of what I used Gemini (free version) for just yesterday open in a tab.

Me: "I want to write a Go program that connects to a running Plex instance and gets a list of unwatched episodes from a show called 'After Midnight'"

Gemini: gives me source code for what I want to do

Me: checks that the Github url for the main library works, it doesn't -> "Library <url> doesn't exist" (Gemini has a habit of suggesting old or defunct Go libraries, or hallucinating them)

Gemini: another attempt with a different library

Me: checks that the Github url for the main library works, it doesn't -> "Library <url2> doesn't exist"

Gemini: Admits that it doesn't have any more official Go Plex libraries it can suggest, it suggest considering either using an unofficial one or a different language like Python, that has more options

Me: "Let's go with Python then instead of Go"

Gemini: Gives me 100% working code using the 'plexapi' library

At this point I had to spend more time getting my personal X-Plex-Token from the Plex server sources (personal project, no need to bring web auth into this), bootstrapping the project with Poetry etc. than it took me to get working code out of Gemini. After that I can start iterating towards what I want (a CLI tool to copy unwatched episodes from my Plex server locally for offline use).

All this would've taken me hours longer if I had to start the project from scratch and do the boring bits myself, manually digging through the API docs to find out how to connect to Plex and how the data is structured.

I've went through a similar process using ChatGPT and Gemini multiple times. There's a simple-ish thing I want to do, I use an LLM to get me to a point where I can start iterating towards a solution instead of having to start from scratch. Sometimes the first attempt Just Works, sometimes it's 90-95% complete, because the LLM has used a wrong property or function at one point.
Is that how stonks work? It sounds quite close to throwing good money after bad.
There's a funny anecdote about Walmart trying to open stores here in Germany, and when the business eventually failed, apparently one of the reasons was that German customers were routinely freaked out by the completely fake smiling staff and the weird company motivational chants in the morning.

When you see the sort of pearly white stereotypical American diner smile almost everyone would associate it with insincerity and fakeness or gullibility.

Also as a side note, that may be a pretty good benchmark for how clever AIs are. How many systems can figure out how the "hide the pain Harold" type of image is actually perceived by people?
Figma is alright, if you use it right. The issue is that people are trying to create pixel perfect graphics designs in it, which is very fiddly and then has to be replicated in code.

So, you end up doing double work. An additional problem is that especially responsive applications with e.g. dark mode support, animations and css transitions, etc. can only be partially modeled in a pixel perfect way in Figma. You can do it but it's just very fiddly to do in Figma. And besides Figma's code export is useless for this; aligning design and implementation is mostly still manual work. And of course users only ever use the code version.

The proper way to use Figma is to focus less on the look and feel and instead use it to prototype UX flows. This is tedious and slow to prototype in code and this is where Figma can shine. Having a good component design system in Figma means that you just reuse the same components and don't have to waste brain cycles on their look and feel when designing a UX flow. It will roughly look like the real thing and you can click together a few new screens in minutes and compare a few alternatives. I work with good UX people and I see them use Figma effectively. Our designs aren't pixel perfect; generally. Though we do use it for e.g. icon design in svg form as well. But design and UX are two separate skills at this point with separate tool sets as well. Figma is alright for icon design but probably not the best tool.

This is of course not a new problem. People were designing web applications in Photoshop at the beginning of the century. UX was not a consideration and the people doing the design were graphics designers. Figma is arguably better but not necessarily aimed at graphics designers. It's a UX tool.