Hacker News new | past | comments | ask | show | jobs | submit | hugocbp's comments login

I test a lot of them, online and with Ollama, and Sonnet 3.5 is in a league of its own for practical coding purposes.

Still makes a lot of mistakes, but it gets things "more right" than any of the others in a much more consistent basis.

I've now cancelled my ChatGPT subscription to Claude and also mostly stopped using the APIs (I use Msty to compare most models, you can give the same prompt to multiple models at once and compare the results).

Sonnet 3.5 is amazing.


I created a personalized finance app based on a Google Sheet that I used to track my registered account contributions and performance.

Basically I enter the transactions and it shows a dashboard of my contribution rooms, how much is left, how much I have already contributed, etc.

Nothing fancy, but it just just a Remix frontend with MantineUI backed by an SQLite db inside Dropbox. Took me about 6 hours, and I only made it after I botched some changes I made into the Google Sheet that broke a bunch of formulas.

I thought about making it into a public app, but it is so tuned to what I want that it is probably not really that valuable to others.

I use it every time I save. Used to be weekly but lately monthly.


Amazing article!

It is actually amazing how fast and thorough the connection attempts happen as soon as you put anything online.

I've been playing around Hetzner and Coolify recently, and notice that, as soon as port 22 is opened, it is bombarded by those attempts. Several per second. It might be due to Hetzner IPs being reused, but happened to me every single time. Same with Postgres default port (those were the ones I've seen).

I have defaulted to use Terraform and bash to only open those ports in the Hetzner firewall (and more common ones like 3000 or 8000) to my own current ip. It does mean I'll get drift and need to reapply the Terraform code if I change ips, but seems to be at least one way to defend.

I fear that a lot of devs jumping into the "you only need a VPS" crowd on Twitter will end up with a huge attack surface on their apps and machines and most won't even know they are being targeted like that most of the time.

To this day I still find it hard to find a comprehensive security guide for those newer Linux fresh boxes (and the ones you find are all so very different with different suggestions). If anyone knows of a good one, please share with me!


You just need to turn off password authentication so it's keys only. They can attempt logins all they want and never get in.

Also if you run ssh on a nonstandard port you get many fewer attempts. There are several groups that constantly scan all of ipv4 for open ports, if you use ipv6 they cannot scan that space anymore.

Optionally you can set up fail2ban but I find it's not a big deal.


I changed my SSH configuration to only listen on an IPv6 address 6 months ago and since then the number of SSH attacks has fallen from 1000+/day to less than 10/week.


Thanks!

That is usually what I already do. Good to know I'm on the right path.

When possible I disable root login as well (though Coolify seems to need it on, even if without password).


I would recommend just using a VPN, like tailscale, for all non-public resources - rather than IP whitelisting.

Ed: including private web services like self-hosted gitlab not used for publishing public projects.


It's on my list to try. Haven't sat down to actually try using Tailscale with servers yet but seems like a good option. Thanks!


This looks like more of an "ad" (or a very directed study by a competing methodology), but excess pragmatism can ruin even the most sensible ideas.

Agile, testing, design patterns, best practices can all tank and bury a project if applied excessively "by the books" without consideration of the actual problem to solve.

I've worked in teams that had about 10 people actual doing dev work that implemented the full suite of Agile "principles" as rules. Daily standups, grooming, retros, pointing as "poker", 1:1s every week. The result was that we had barely time to actual work since the week had 10-20 hours of meetings. Most retros and standups were literally just us saying "same as yesterday, only had a few minutes to work on this" the whole week.

Testing is the same. If applied without consideration for the actual problems, reaching that 90%+ code coverage is easy if nobody cares about how hard and time consuming it will be to change code later. Specially when a feature is in very early development.

I think all those things are good, but what I see sometimes is that they are applied as absolute rules that cannot be deviated from, which inevitably leads to poor results.

I'm now working in a "light Agile" environment with just 2-3 meetings a week, barely 1 hour total, and much less strict PR/testing requirements (we focus on testing the important functionality, not line coverage count) and it is so much better. Some of the same co-workers that were under the more strict rules are now twice or more more productive then before.


For me, a very simple "breakdown tasks into a queue and store in a DB" solution has help tremendously with most requests.

Instead of trying to do everything into a single chat or chain, add steps to ask the LLM to break down the next tasks, with context, and store that into SQLite or something. Then start new chats/chains on each of those tasks.

Then just loop them back into LLM.

I find that long chats or chains just confuse most models and we start seeing gibberish.

Right now I'm favoring something like:

"We're going to do task {task}. The current situation and context is {context}.

Break down what individual steps we need to perform to achieve {goal} and output these steps with their necessary context as {standard_task_json}. If the output is already enough to satisfy {goal}, just output the result as text."

I find that leaving everything to LLM in a sequence is not as effective as using LLM to break things down and having a DB and code logic to support the development of more complex outcomes.


Indeed! If I'm met with several misunderstandings in a row, asking it to explain what I'm trying to do is a pretty surefire way to move forward.

Also mentioning what to "forget" or not focus on anymore seems to remove some noise from the responses if they are large.


Sad to see. When I started my journey into programming, PluralSight was one of the main resources I used, together with Lynda.com and Team Treehouse.

All 3, sadly, have seen the quality nosedive in recent years.

Today I mostly rely on Udemy. I know it has a bad rep and tons of garbage, but there are a handful of instructor that deliver really high quality content there. For example, see Fred Baptiste Python courses.

Even with AI taking charge, I still believe there is a place for a high quality, guided course like PluralSight used to offer back in the day.


Amazing!

I don't trust Google with barely anything these days anymore (except Gmail just because it has been so long, and Maps), but Google Meet is the one thing that I prefer Google's solution over anyone else's.

Meet is just so much better than Zoom, Teams, FaceTime, WhatsApp Video, etc.

I'm so glad they are tackling this specific issue. Pretty amazing feat if it works well.


> Meet is just so much better than Zoom, Teams, FaceTime, WhatsApp Video, etc.

So much better? Does Meet have instruments for whiteboarding or on-screen annotation?


Yes it does. Whiteboarding requires a free add-on (e.g. FigJam, Miro) but you can add that in-call


As others have said, I find it very useful for smaller and simpler cases. Focused, small functions. A lot of times both Copilot and ChatGPT (and also Llama 3 via Ollama) are great at sometimes writing tests for edge cases that I might have forgotten.

But anything more complex and it is very hit or miss. I'm trying now to use GPT-4 Turbo to write some integration tests for some Go code that talks to the database and it is mostly a disaster.

It will constantly mock things that I want tested, and write useless tests that do basically nothing because either everything is mocked or the setup is not complete.

I'm settling in using it for tests for those small, pure functions, and more using it as a guide to find possible bugs / edge cases in more complex cases, then writing the tests myself and asking it in another prompt if they would cover those cases.

As most people that actually use AI heavily these days, I think the usefulness of AI for coding increases a lot if you already have a pretty good grasp of the subject and the problem space you are working on. If you already know roughly what you want and how to ask, they can be a huge time saver on the smaller and simpler things.


The most value i have ever gotten out of AI for coding was when i refactored about 20 thousand lines of gomega assertions into the more robust complex object matcher pattern. It did a good chunk of the grunt work quickly. was probably 85% accurate.


It’s nice for doing refactors.

I like having it translate config formats too. A series of env vars to a yaml or toml or something


It can work for more complex tests, but you have to give it an initial test that already sets everything up and utilizes mocks correctly. From there it will generate mostly correct tests.


In Brazil this is likely the most common scam nowadays. Almost every month one of the 4 members of my family gets a message in WhatsApp, usually from a cloned profiled, with the same script:

"Hi <brother|sister|dad>! I'm trying to buy something in store X but my card is getting declined, can you make a PIX (Brazil's real time rail payment) for <random person> for YYYYY (4, 5 digits amount) reais for me? I'll pay you tomorrow"

Or the out of fashion "This is X and I have your daughter, pay X so we can release her".

I have never understood how those people can do this for that long with the amount of tracing and spying the government has. Specially using payments from the Real Time Reail (PIX) that is tied to a CPF (equivalent to SIN/SSN).

Even in the current state of streaming, with sports spread between several providers, you can get, in good faith, in YouTube watching a pirated live stream of a major competition where the broadcaster fakes a famous bank or financial institution pretending to make lottery and faking draws on screen. It is so rudimentary you can see the person literally typing random names.

This is probably one of the easiest crimes to automate enforcement against in the age of AI, and yet, it happens for months, every day.

Good for Spain for actually doing something about it. I wish Brazil would start doing the same.


My mother recently got scammed with that first script during a hectic day at her workplace. As stupid and out of character as those messages were, somehow in between her these guys managed to clean out most of her bank accounts in PIX transactions. They're so easy nowadays you can transfer thousands with very few swipes.


Those payments are for a good operation routed through stolen identities and funneled out using the internet (e.g. gift cards, traditionally). It's easy to trace until the money goes out of the country and gets transformed from a gift card back into money in some place the country has a hard time touching.


I honestly never understood why, if I opened a beer in English Bay in Vancouver, I'd get approached in a matter of minutes to stop/throw away the beer and yet, sometimes a few meters from me, we could see people openly using drugs and doing all the things you can imagine in open air without any repercussions. People completely out of their minds, screaming, walking in the middle of traffic...

I've come to Canada from Brazil, so I know a thing or two about violence, so it saddens me to no end that here I have to tell my wife not to go on certain streets in the middle of downtown due to rampage drug usage by users. And not even bad downtown, fancy Vancouver downtown close to Yaletown and West End.

It is about time that this is addressed. These people need help but the way to way to help them is not to just let them use drugs and stay on the streets every single day.

There are some establishments in downtown Vancouver that I don't even go to anymore simply because of the normalization of open drug usage in Vancouver.

Something needs to change and I thing this is a good start, at least to get this people somewhere where we can then start working on getting them treated or properly helped.


As someone who doesn't live in an area with a similar liberal law regarding drug use the article was very confusing to me. Perhaps you can help me understand.

The article keeps talking about "problematic" drug use, but I don't understand what that means. When is drug use problematic and when is it unproblematic? They claim that from now on they'll be able to arrest people who disturb the peace, but then aren't there laws already that already make it illegal to disturb the peace, irrespective of drug use? Is there a special kind of problematic behaviour that is not OK when consuming drugs, but is OK otherwise?? Having no experience with the situation, this all feels quite strange.

Same thing with hospitals: can't they just restrict the unmonitored use of drugs within medical facilities rather than some ambiguous notion of problematic use?

Overall, reading the article makes me feel that some people don't like seeing crackheads consume in public (which I understand), and since these people vote, a law is passed that had no head nor tail. I don't see how the law addresses the root of any issue.


Problematic: it causes problems not just for you, who are choosing to take the drugs, but also for others. Perhaps that's because you've been on meth for 5 days and are now raving mad in the streets. Perhaps you've taken fentanyl in a public park and are leaning like a zombie on the playground. Perhaps you've fried your brain and are unable to work, only able to aggressively panhandle to feed your addiction.


But then why not make the problematic behaviour itself what is illegal? Aggressive panhandling should be illegal, regardless of whether the perpetrators were on drugs. It makes people, particularly those that are vulnerable to violent crime, unsafe. Make being raving mad in the streets illegal too. I am surprised that there isn't already a law in BC that does. With regards to being a zombie on public benches, it's hard for me to assess why that is problematic. On the other hand making drug use on children playground illegal seems like an elementary rule to me.

What I mean is that none of these issues seem to be really well addressed by the broad sweep of a "don't be problematic" law.


Prosecuting the negative behavior that comes from drug use is seen as being as bad as prosecuting the drug use itself. Yes, shoplifting should be a crime with consequences if you are rich, housed, unhoused, clean, or an addict, but the moment the city police crackdown on shoplifting they are accused by some people of going after homeless drug addicts.

They just put a new playground in at the Ballard Commons here in Seattle for the very reason you mention. It is publicly more acceptable to ban and actually prosecute anti social behavior near a playground with kids, than other places. This is the same commons that turned into a drug encampment for a couple of years during the pandemic, and the main reason they decided to put the playground in…


I see. Thanks for the explanation, it makes sense how the law on playgrounds would backfire.

It's still confusing to me that to prevent being accused of targeting homeless addicts they'd make homeless drug use illegal so to speak.

As a complete outsider, it's an interesting situation to try to understand. I appreciate the patience of people in this thread replying to my naive questions.


Drug use is already mostly decriminalized here, and there has been lots of problems as a result, the same ones they have in Vancouver and Portland. Instead, we are trying to prosecute the other stuff, like shoplifting, running around naked and threatening people with knives, etc…the playground helps with that, in that even drug addicts don’t want to freak out kids.


The issue isn't that there's no laws covering these transgressions. It's the lack of prosecution that's the main issue. Even if you arrest someone for aggressively panhandling they'll be released without bail that same day. This eliminates the incentive for police to do anything since the core issue is unresolved and they still have to process the arrest.


Right. So creating a new law won't change anything then? They should rather work on making sure the existing laws are being enforced.


How do you compel a prosecutor to bring a case forward, if they know the judge is likely to dismiss the case. It's a weird situation honestly where the laws exist, and police can enforce the law, but the judicial system turns a blind eye. It's a systemic issue starting at the federal level.

https://www.cbc.ca/news/canada/british-columbia/bc-bail-refo...


The article you link doesn't seem to be about the thing you're talking about. It's about whether the suspect is detained pending trial, not about whether they're ultimately convicted or acquitted.

Now of course, you could make the argument that detention pending trial is important because the actual sentence from conviction is too temporally remote from the criminal act to serve as an effective deterrent, but you didn't make that argument. If that's what you mean, you should state it explicitly!

Or, the article seems to also imply people aren't being found guilty or sentenced harshly when it talks about people "cycling in and out" of the justice system, but it doesn't seem to say this explicitly, as the focus of the article is on pre-trial detention. If what you're saying is in fact true, it would have been better to find an article that directly supports it.

(Although, wow, the numbers in there are ridiculous. 77% released on violent offense + breach of conditions??)


I would classify unproblematic drug use like the majority of people who get high at home, house parties, or ravers rolling on X. Basically not being a nuisance to the public during/after they consume. Very subjective opinion though, so it’s hard to draw a line.


I am also from Brazil and have been in Vancouver for 10 years. This is a big exaggeration, both on the beer and the "areas to not go" (unless you mean some parts of East Hastings).

Vancouver is one of the safest cities in the world, and beers are now legal in many parks. I never saw a police ticketing or complaining someone having a beer on a park.

I do support this change in policy.


Just go to English Bay on a sunny day and open a beer in the sand and see. Alcohol is prohibited there again since several months ago and being actively enforced.

Or check this https://vancouver.ca/files/cov/05-31-2021-update-regarding-t... and https://vancouversun.com/news/local-news/new-lawsuit-targets...


I lived on Chilco & Nelson for many years... people simply have Starbucks cups with beer inside or other equivalent methodology of "wink wink". As long as you aren't being an ass there's zero problem..


You must not get out often. The police roll down kits beach on ATVs looking to give out tickets for open alcohol throughout the summer.


The real reason is that you drinking a beer is easy to deal with at every level of escalation.

The homeless using drugs in the street are not.


Same reason normal, middle class people in decent vehicles get pulled over for expired tags or burnt out brake lights, yet the shit boxes with 3 tires and a plastic bag for a windshield keep on rolling.


One is likely to provide revenue to the local government. The other isn't.


Revenue? I thought the goal was public safety...


Ha! I actually let out a huge laugh when I read that. Good one.


If this wasn’t a cynical joke, I sincerely beg you to cover your eyes, plug your ears, and never again ask how the sausage is made.

The older I get, the more I can empathize with Cypher from the first Matrix movie. Sometimes, ignorance is bliss.


LOL. We actually have strong evidence that vehicle safety inspections do absolutely nothing to reduce accident rates and that's why 13 US states don't do them.


Why did you think that?


And yet, my level of danger to society is also close to zero.

This happened with me right after they reverted the pandemic decision to allow alcohol there and I didn't know. I was drinking in good faith like I did for several months when they allowed it during lockdown.

Still, it is very frustrating that the beer would warrant a couple of park rangers to approach and enforce, while just a few meters away someone was doing hard drugs visibly completely out of their minds and screaming at passer byes.


I've often wondered what would happen if I plopped down on the steps of SF City Hall with a 6 pack and started downing them... ought to test it sometime.


> I honestly never understood why [...]

I can think of an explanation. Your addiction levels are likely to be very different. And therefore your body's ability to avoid your substance is likely to be very different from theirs. It doesn't seem unreasonable to receive more punishment when you have more control over your negative behavior.


> It doesn't seem unreasonable to receive more punishment when you have more control over your negative behavior.

This sort of thing never ends well


> It doesn't seem unreasonable to receive more punishment when you have more control over your negative behavior

I think it should be the opposite. Because I am superior, I should receive less punishment. Inferior people should receive more punishment so they are incentivized to become superior or disappear.


I can't tell what you're going for here (is this serious or sarcastic?) but I was just trying to explain a potential reason, not endorse or reject it.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: