HN user

robben1234

229 karma
Posts1
Comments94
View on HN

My cluster recently started to failover every few days whenever it experiences the load to trigger scale up from 1-2 to 20+ acu.

And then I also encountered errors just like op in my app layer about trying to execute a write query via read-only transaction.

The workaround so far is to invalidate connection on error. When app reconnects the cluster write endpoint correctly leads to current primary.

I work with python codebases and consider comments that answer "what?" instead of "why?" bad.

LLMs tend to write comments answering "what?", sometimes to a silly extent. What I found helping for using Claude 3.7 was to add this rule in cursor. The fake xml tag helped to decrease the number of times it strays from my instructions.

<mandatory_code_instruction>

YOU ARE FORBIDDEN FROM ADDING ANY COMMENTS OR DOCSTRINGS. The only code accepted will be self-documenting code.

</mandatory_code_instruction>

If there's a section of code where a comment answering "why?" is needed this rule doesn't seem to interfere when I explicitly ask it to add it there.

It only becomes a crime when you're absurdly over the limit.

I vividly remember my confusion learning about how many states in the US use an absolute value to turn speeding violation into a criminal charge, and namely Virginia which just a few years ago had that value set to 80mph (~130kmh) - a state with lots of interstate traffic and I-95 speed limit set to 70 mph (~115kmh).

And I could understand a predatory scheme set up by the government to generate revenue - set speed limit low, make fines really high. But in this case it's not clear to me what the state is gaining - throwing someone in jail for a weekend and labeling that person a criminal ruins their life for good but there's almost no profit for the treasury.

The pilot license is the largest obstacle to mass adoption, not even the price, in my opinion.

For fixed wing private flying you are looking at at least hundred hours fully dedicated to new knowledge and skills at an expensive rate. That's assuming you are proficient at learning and able-bodied enough to pass medical.

Unlike driving, when flying you can't just safely pull off to shoulder and stop to figure out whatever problem you are having. So there's a lot effort spent on ensuring whoever is flying is able to prevent known issues and handle emergencies in a non-tragic way.

But there are already regulations and companies with their executives are being held accountable against it. Does it matter how many badges the person designing the system is wearing if it complies with regulations and passes an audit? The problem with leaks to me looks like more of the nature of lax enforcement and few consequences when found in the wrong.

American car companies push for large vehicles because those are exempt from strict emission standards. And the rest eventually started following because the US is the most lucrative car market in the world, even if their own country has different legislation.

Remove the loophole and everything gets back into place without any weird & local workarounds like Paris had to retreat to.

The trouble is, what speed is wrong?

I don't really agree that this is the "trouble". Any competent transit-related professional knows what type of driving is wrong. Even American cops know [0] that in terms of traffic the key thing is to not impede traffic and target dangerous driving.

However, hunting school zone speeders, left lane hoggers and traffic weavers will never generate as much revenue as using an automatic machine that points at cars going faster than arbitrary number.

[0] https://www.youtube.com/watch?v=yn6C6ZkBdb0

How much of Python in the world is ran on Azure? It's my language of preference and the main professional one, along with JS/TS and Go. But if they pulled something like this I'm pretty sure I'd reluctantly pack things up and move to Go.

People focus too much on edge cases when making life decisions, imo.

Spending dozens of thousands on a personal people mover I would like it to enable and expand my freedoms. I.e. supporting painless weekend road trips. Fossil fuel cars answer this requirement, EVs don't.

For the extremely constrained happy path of commute in urban areas it is much more efficient to develop public transport. Living in a city with developed public transport I'd rather take the train than drive an EV to get to the same destination.

having a phone number when traveling, when you cannot receive SMS on your US phone number (thanks verizon)

Is there a good reason why carriers in USA and Canada refuse to provide free incoming sms (& calls at expense of the caller) while abroad?

My experience might be limited to only a handful of sims from different countries, but prepaid Telus (Canada) failing to receive sms while visiting USA was a first and a big surprise to me. Made me transfer to PM which offers this.

Social media is an echo chamber for people with nothing better to do that represents a tiny part of population. In real world many industries would gladly disqualify professionals from working at the first hint of screws flying loose. Especially where any threat to safety have high potential to be fatal.

Things I managed to deliver in my first year of the first startup with Django + Ajax/Vuejs were a number of multiyear multiteam developments in my second startup (scaleup) that had dozens of microservices and Angular SPA.

I'm only seeing comparable productivity on the backend these days when teams are using AWS native services.

At some point time difference kills any productivity gain. West Coast to West Europe is barely workable even if everyone in the "secondary" zone is self-sufficient.

However, hiring engineers from Latam could indeed be an option to replace US workers if they can't offer an edge. The issue here is the language barrier.

just “have 7 figure on a spreadsheet of what I have managed to accumulate”

7 figure on a spreadsheet enables a lot.

An unregistered savings account in one of Canadian banks (just a point of reference, not sure if US has better) currently offers 4% yearly. That's 40k a year off the million. Enough to retire with kids in a LCOL country or travel year round as a nomad with a base in LCOL country.

Build a little bit more wealth and all those LCOL options turn into MCOL. E.g. northern Italy.

All while just being a working professional. It'd be unheard of in Europe to have this kind of options after just a couple years of work.

Then EU > US. In the EU most people have a shot at this, with free education and possibilities.

This comparison only works at birth, or maybe up to teens. We are, most likely, working professionals here. With a degree and fairly established position. Becoming a millionaire is still a monumental task. However at this baseline US is much easier.

What do you think speed limits are for then?

In the presence of vulnerable bystanders or users of the road (e.g cyclists on city streets), limit serves as protection against fatal outcomes in case of an error. That's the only case where no one could argue against limit.

Does UK track average speeds in cities? I'm not familiar with their system. But aware that Dutch use it on highways to make everyone miserable. While their east neighbor doesn't have a default limit on highways at all while still having one of the best in the world highway safety record.

I feel that ORM might be an antipattern depending on a language.

Every Java developer I interacted in my career with wanted to avoid ORMs and instead come up with a bunch of pattern-abstracted ways to write raw SQL.

Every Python developer I interacted in my career with loved their ORMs. Django or SQLAlchemy.

Serving a social network is not the case where you'd want just one server. Mainly due to reliability concerns, spikes in traffic and different patterns at different times.

But if you like the idea of ignoring best practices, there are EC2 instances with 192 vCPUs that go for several thousands an hour. And taking as example Golang benchmarks https://github.com/smallnest/go-web-framework-benchmark where it's not uncommon to be able to serve 6 digits of 30ms requests per second with just 4 cores. Then the conclusion is, the limit is the sky, if you are stubborn enough.

The pavement doesn't need to withstand thousands of pounds of vehicles.

It has. It'd be illegal and extremely dangerous to design a city without properly functioning infrastructure for emergency services, garbage disposal, physically impaired accessibility. Also very inconvenient to not include commercial deliveries and public transit into that list of essential road use scenarios. Most of the vehicles performing these services are heavy.

For the most part only private ICE cars are light enough to be a drop in a bucket on the road maintenance. Private EVs, and especially EV SUVs, are likely making an impact on the maintenance schedule though.

Precision might be an overshoot, but providing SI measurements along the obsolete yet better sounding to NA ear units is quite nice. Since most of the weird units offer no straightforward / memorable ratio to multiply by to get a regular one, so people outside the bubble cannot translate it to anything meaningful.

Delivery vehicles and drop offs double park, maintenance parks on the pedestrian path or in the no-parking alley. It's tolerated by all road users, including law enforcement. It already is this way, don't need to overengineer anything to achieve what is already there.