HNHacker News
TopNewBestAskShowJobs

irjustin

7,092 karma · joined May 6, 2019

irjustin.com
submissionscomments
irjustin··on Scaling Rails and Postgres to millions of users at Microsoft
Sorry on the slow reply.

But yea, I can complain at length.

- Model validations aren't run automatically. Need to call full_clean manually.

- EXCEPT when you're in a form! Forms have their own clean, which IS run automatically because is_valid() is run.

- This also happens to run the model's full_clean.

- DRF has its own version of create which is separate and also does not run full_clean.

- Validation errors in DRF's Serializers are a separate class of errors from model validations and thus model Val Errors are not handled automatically.

- Can't monkey patch models.Model.save to run full_clean automatically for because it breaks some models like User AND now it would run twice for Forms+Model[0].

Because of some very old web-forum style design decisions, model validations aren't unified thus the fragmentation makes you need to know whether you're calling .save()/.create() manually, are in a form, or in DRF. And it's been requested to change this behavior but it breaks backwards compat[0].

It's frustrating because in Rails this is a solved problem. Model validations ALWAYS run (and only once) because... I'm validating the model. Model validations == data validations which means it should be true for all areas regardless of caller, except in exceptions, then I should be required to be explicit when skipping (i.e. Rails) where as in Django I need to be explicit in running it - sometimes... depends where I am.

[0] https://stackoverflow.com/questions/4441539/why-doesnt-djang...

irjustin··on Air Con: $1697 for an on/off switch
knowing a lot of these companies. it wouldn't really matter if it fell inside of the warranty. they would simply screw a lot of people over until there's a class action lawsuit (or whatever equivalent is in that country) where they get a slap on the wrist for not honoring warranty claims.
irjustin··on Scaling Rails and Postgres to millions of users at Microsoft
Interestingly I have had almost the exact opposite experience being very frustrated with the Django docs.

To be fair, it could be because I'm frustrated with Django's design decisions having come from Rails.

When learning Django a few years ago, I still carry a deep loathing against polymorphism (generic relations[0]), and model validations (full clean[1]),

You know what - it's design decisions...

[0] https://docs.djangoproject.com/en/5.1/ref/contrib/contenttyp...

[1] https://docs.djangoproject.com/en/5.1/ref/models/instances/#...

irjustin··on A Jenga tower about to collapse: Software erosion is happening all around us
The article actually discredits its own conclusion early on:

> These outages didn’t happen because developers didn’t test software.

The conclusion being:

> How do you get quality code?...Don’t skimp on static code analysis and functional tests, which should be run as new code is written.

But even working from the conclusion backwards, which is "specs+code analysis" will save you from the big scary thing of "software erosion" and "complexity" thusly sparing us all from outages, I disagree.

Specs+analysis are helpful, but they do not magically solve complexity at scale. Crowdstrike sure, would've benefited from testing I agree but so many other large outtages need more than that, which is the disconnect of the article for me.

At some point you need blackbox, chaos monkey level production tests. Bring down your central database, bring down us-east-1. What happens to the business?

I'm not sure if this is valid, but a lot of the savvier tech companies' outtages feel like they're router configurations that lead to cascading traffic issues. But I have no data to back this thought up.

irjustin··on Tesla has taken down 2016 release noting full self driving hardware capability
Yeah this is what I mean by "doing weird stuff" on freeways the phantom breaking is pretty crazy, but it's quite manageable once you expect it/experienced it a few times. Usually like once a week/two-weeks on average usage.

The scarier one is in construction zones where the lanes have been moved. During dry it's pretty easy to tell apart, but combine night and wet, it starts doing weird stuff fast. I don't think Lidar would fix this problem.

irjustin··on Tesla has taken down 2016 release noting full self driving hardware capability
I love the basic autopilot for freeway stuff. It's fanstastic at it and basically NOTHING ELSE. I can't trust it not to do weird stuff any other time. When it does weird stuff on the freeway, it seems way less risky.

I'm just sad Tesla isn't willing to go LIDAR, this is where they're going to lose. They had such a leg up as an early mover and all the advantage is gone. China's starting trials in SF and it's just a matter of time before I buy a Waymo licensed car.

irjustin··on Did you lose your AirPods?
> I feel like you should've been more careful with your question, unlawful people might answer that they lost AirPods although they didn't.

All it helps is remove a bit of spam. As the author writes, they checked pairing, but before that you can simply ask "Where do you think you lost them?"

irjustin··on Batteryless OP-1
> What I've Learned To be honest, I was very disappointed with Teenage Engineering. The OP-1 was an expensive item. It's ok for me if the manufacturer doesn't offer warranty after this long. It's also fine if they don't have spare parts in stock after almost 10 years.

> Still, I wish they had a better solution to offer than just suggesting that I keep using the original battery, even at the risk of swelling (which would ruin the case and be a potential fire hazard). In essence, they were telling me to throw away a machine that was otherwise still good.

I was with the author until here. There is a weird entitlement. The manuf was honest and upfront about what the were capable of doing in terms of support for a discontinued 10 yr old product.

irjustin··on Designing my own watch (2020)
And that comes with a custom watch w/ a design cycle. I guess instead of paying for a store-front, sales people, advertising - this is where the cost would live.
irjustin··on US judge throws out FTC's ban on non-compete agreements
I'm quite naive, isn't the individual mandate being removed the reason why the premiums are going up? i.e. lots of healthy people stopped buying and thusly leaving only the expensive guys?
irjustin··on Ask for Advice, Not Permission (2015)
> They initially told him the design was good as is and required no feedback and change, but once the project was about to be deployed they suddenly became very opinionated and critical of each and every tiny detail, including on the need to rewrite the component

I think this situation would've happened regardless of advice vs permission. So it's not really talking directly towards the article, but yeah, bad actors are terrible to deal with especially when they hold power on like a PR review.

irjustin··on One man's quest to restore the first-ever Air Force One
Separately the website won't load images if you're using an ad block. Sigh...
irjustin··on Go is my hammer, and everything is a nail
ChatGPT accelerates this timeline significantly. As a senior programmer you can largely skip the "junior" phase of the learning, almost like pair programming with a very proficient junior programmer.
irjustin··on Room inspections at Resorts World confuse, annoy DEF CON attendees
Hotels don't care about a laptop left around running. My guess property damage or simply disgusting room.
irjustin··on Room inspections at Resorts World confuse, annoy DEF CON attendees
I wonder what happened in the past to create these policies. Seems like some crazy things.

They outright don't trust this group. Property damage?

irjustin··on Defcon stiffs badge HW vendor, drags FW author offstage during talk
You always trust what someone on the internet tells you?
irjustin··on Puppeteer Support for Firefox
I also wonder the same. Playwright is so good. I simply don't have flaky tests even when dealing with features that are playwrights' fault.

I used to have so many issues with Selenium and so only used it in must have situations defaulting to capybara to run out specs.

irjustin··on Japan cracks down on use of rideable electric suitcases amid tourist boom
Enforcement is not worth the benefit of allowing luggage scooters.

You've got to have "police" everywhere who need to be trained to identify when someone is going too fast. Who does enforcement? Actual police? You need a lot more police than normal. Airport staff? They're not enforcers. They keep the carts in the right location and bathrooms tidy. But, let's say you can have enforcers. So enforcer says slow down, kid says okayyyyyyy and then goes fast again right out of eye sight. But speed limits on the luggage! No way, so add an on/off button to comply because no one wants to buy only a slow luggage, but you've still got that person who "won't airplane mode".

Repeat offenders? Now you've just confiscated their luggage. That's gonna be good.

In this scenario, electric luggage == actual scooter. You don't ride actual scooters through an airport, but I've seen so many electric luggage scooters.

I admit they're cool af and everytime I see someone on one I'm jelly. They're their own advertising. But they're at an airpot and it's crowded for the speed. I'm already stressed enough - I don't need your kid running into me at speed.

irjustin··on Japan cracks down on use of rideable electric suitcases amid tourist boom
> Shouldn't they better just update the law to add an exception?

No, the point is in crowded places like airports you don't want people zipping around on electric scooters, suitcases or otherwise, running into people - esp elderly.

irjustin··on How I Program in 2024
I appreciate the honest answers by the OP. Even if we all think there's fundamental flaws with what was given up.

For me, ChatGPT saved a lot of my mental load. I don't think about individual lines NEARLY as much. Obviously you need to understand what the program is doing and be smart about it, but you can really focus on business problems.

It spits out something like 40% of my code and 70% of tests. I've started dropping whole files into it and tell it how to combine a new code.

irjustin··on AWS Code Commit Ceased Onboarding New Customers
I never did liked CodeCommit after testing it about 2 years ago. Just felt like an afterthought.

They better not touch CodePipeline and CodeDeploy though.

irjustin··on Japan chain uses AI to gauge staff smiles, speech tones in QoS push
> Because I'd rather interact with non-smiling staff than someone who is obviously faking it for the camera.

I've been on the receiving end of both numerous times and I'm not sure which I prefer if I'm honest.

- Door greeting. I prefer a fake smile. I'm not going to interact with you.

- I have a problem. I'm agnostic as long as you can help me.

Having just thought about it - there's different levels of fake and the shallower the interaction the less I care about your fake smile. But if we're at odds over an issue then I definitely don't want you to smile. That's comes across as a sociopath to me.

Interesting discoveries I just learned about myself.

irjustin··on CrowdStrike CEO summoned to explain epic fail to US Homeland Security committee
Running a different OS for each business function is my favorite absurd solution to this problem.
irjustin··on Unconditional Cash Study: first findings available
Ah fair point, I hadn't considered that, but how is that better than welfare?

There is the welfare trap, but I don't really see us in a net positive position vs UBI because I see creating a bunch of inflation only to help the bottom 5%? I imagine there's a better way.

irjustin··on Unconditional Cash Study: first findings available
Serious question, didn't we have a glimpse into UBI w/ all the stimulus packages? I'm very open to discussion here because I'm quite naive.

My current lens is that UBI ultimately inflates prices leaving everyone back where they were before. The problem with openresarchlab's test is it's limited scope. It did increase the spending power of a particular group because the prices around them did not increase.

If everyone has more money the "open market" raises prices to simply meet that. The root problem is non-limited capitalism? The price of basic goods cannot be allowed to rise vs cash on hand.

I do believe UBI's ultimate goal is to increase "spending power", but simply giving money doesn't change the problem long term and thus UBI is doomed to fail in its current form.

irjustin··on I mapped almost every USA traffic death in the 21st century
As it stands, it's hard to draw meaningful insights other than "lots/few people died here".

Things that makes this difficult:

- Roads change overtime. Added stoplights, more lanes, added roundabouts. Dramatically change the rate.

- Volume of traffic. Deaths per cars would be interesting.

irjustin··on NASA Spent $450M on a Moon Rover. Now It's Canceling the Mission
It would need an internal champion to make happen and I don't think anyone wants to attach their name onto this kind of yolo.

If it fails it dooms your career, or at least that's how it would be perceived.

irjustin··on NASA Spent $450M on a Moon Rover. Now It's Canceling the Mission
> NASA understands sunk cost fallacy.

I argue it doesn't in the way you want them to.

They're cancelling it because it couldn't be saved. Projects _always_ that get approved are underestimated in cost with ballooning budgets the expectation. The point is, everyone is hoping the project is important enough AND expensive enough that congress will keep funding it because sunk-cost is almost ignored.

JWST is the poster child of this concept. SLS likely to be next.

I hate that SLS is moving forward in this manner, but I do believe 2 launch providers is better than 1...?

irjustin··on Jailbreaking RabbitOS
> I hate this type of articles, not because of content but because of what authors trying to do. They always try to be morally superior and create controversy by nitpicking issues.

> These types of logs are extremely useful for debugging, just by doing that doesn't mean it's doing it for the purpose of selling your data to evil corp.

Downvoted because you didn't read the article and just commented something based on the word logs.

irjustin··on The golden age of scammers: AI-powered phishing
They'll adapt. You can easily ask chat4 to make it sound "less formal" or "more teenager"
← PreviousPage 12 of 34Next →