Hacker Newsnew | past | comments | ask | show | jobs | submit | idrios's commentslogin

Regulations are like lines of code in a software project. They're good if well written, bad if not, and what matters more is how well they fit into the entire solution


A major difference with regulations is there’s no guaranteed executor of those metaphorical lines of code. If the law gets enforced, then yes, but if nobody enforces it, it loses meaning.


The worst possibility is selective enforcement.


There's a reason we call them judges. Selective enforcement is there for a reason. Lawmakers can't anticipated everything. Just look at how bad of an idea zero tolerance policies in schools have been with thinks like getting expelled for biting a sandwich into the shape of a gun.

The world isn't black and white. Flexibility, including selective enforcement, is necessary in a just system.


The reason that selective enforcement exists is that it is very hard to avoid having rules selectively enforced.

But the history of selective enforcement strongly suggests that it does not usually lead to just results. It is often instead something that unaccountable officials find themselves easily able to exploit for questionable purposes.

For a notable example, witness how selective enforcement during the War on Drugs was used to justify mass incarceration of blacks, even though actual rates of drug usage were similar in black and white communities.


You’re arguing that the mass incarceration of more people would have been better?


Yes, I would argue that it would be better for more to have been incarcerated, for that would bring greater focus to injustice and the law would be changed. Selective enforcement interferes with the feedback mechanism that would otherwise make the law work better.


If a law were to mass incarcerate people from affluent white neighborhoods it would be quickly repealed


Actually it would have never been passed. Nixon started it as a way to put blacks in their place.


Any instance of selective enforcement being necessary is ipso facto evidence of a bad law. This is completely orthogonal to the matter of the world not being black and white - you're right, it's not, but a good law recognizes that fact, and laws can also be amended as needed.


> Any instance of selective enforcement being necessary is ipso facto evidence of a bad law.

All laws are in some degree bad; perfect laws do not exist.

Some laws are useful and produce more good than harm in the concrete situation in which they exist.

Should laws be improved where possible? Yes. Does the need for selective enforcement indicate a problem? Yes. Does it provide sufficient information to determine the precise form of a better law to replace the one it shows a problem with? Very rarely.


> Any instance of selective enforcement being necessary is ipso facto evidence of a bad law.

By that measure every law is a bad law.


Legislation is much worse than organically derived common law, for the common law comprises decisions that apply to particular conditions with all their details while the former are mere idealizations.


> Any instance of selective enforcement being necessary is ipso facto evidence of a bad law.

Yep, and while we fix that bad law we need judges to be able to say "I won't apply that" or "I won't sentence you to jail for this". That's kinda the point.


That's what jury nullification is for, in principle.

Allowing judges to not enforce bad laws turns them into unelected legislators. It's also worse from a corruption perspective because a single bought judge in the right place is much more cost effective than having to buy a new randomly selected jury at every trial.


If the law is code, then law enforcement is a JITter

(joke)


Optimised compiler makes sense though.

Unenforceable laws go unenforced, undefined behaviour is undefined and varies based on compiler (law enforcement agency or officer).


A jitter is like a lawyer on retainer. Law enforcement is more like the OS that segfaults you when you fail to follow the lawyers advice.


Law enforcement is more like a toddler holding a glass of water over your CPU and saying "stop transistoring!"


Not only in the executive/enforcement, but in the actual impact of the regulation in practice as applied by millions in a distributed system. Regulations influence decision paths as opposed to encoding deterministic code paths.


The problem with laws that both the enforcer and the subject (enforcee?) agree are bad, is that enforcement is variable. And that leads to corruption. Every damn time.


The fix for corruption is vote the bums out of office. It is not to go whole hog into blind application of the law.

Think about how hard it is to write code that has no bugs. Now imagine you're using English and working with a system with so many parameters and side effects that you can't possibly anticipate all eventualities.

And now you want to rigidly apply your operators to this parameter space?

Selective enforcement is necessary for justice, because no law is perfectly just, and selective enforcement helps move toward justice.

It unfortunately also means there is the eventuality of corruption. So you just have to keep vigilant. Because a rigid system with no selective enforcement has no fix for injustice other than "live with it."


> The fix for corruption is vote the bums out of office.

That doesn’t seem to be working.

I argue there’s an acceptable level of corruption, only the particular flavours change from time to time.

Come out of government better off than when you when in. Fine, good on ya. No need to tells us about how you’re going about it while you’re going about it.

Learn to be at least a little bit discreet, and at least do something occasionally that comes across as good for the average person.


Bad law enforced perfectly is also undesirable.


I'm not convinced. Perfect enforcement would be a great signal exposing bad law much more clearly, so it can be rewritten/scrapped.


Sure, but what about those who got hit by that bad law in the meantime?


Usually laws are created because of the people being harmed because the law doesn't exist. So it could go either way.


Until a bad law takes your friends and family out of the gene pool.


And lines of code is like the mass of an airplane.


Just put all code on one line then. Statements (or tokens) is what matters.


In general you want as few as possible of both.


You could also optimize everything for future updates that optimize things even further for even more updates...

Humm.. that was supposed to be a joke but our law making dev team isn't all that productive to put it mildly. Perhaps some of that bloat would be a good thing until we are brave enough to do the full rewrite.


this is wrong for the same reason using single letter variable names to keep things concise is usually wrong.

i’d rather something a bit more verbose and clear than cryptic and confusing. there are many actors in the world with different brains.


that's right. This is the reason all my code looks like an entry to PerlGolf. /s

The world's complicated. "Every complex problem has a solution which is simple, direct, and wrong"

Simplicity is a laudable goal, but it's not always the one thing to optimize for.


Ah, but "simplicity" is not necessarily "fewest lines of code".

Code is first and foremost for human consumption. The compiler's job is to worry about appeasing the machine.

(Of course, that's the normative ideal. In practice, the limits of compilers sometimes requires us to appease the architectural peculiarities of the machine, but this should be seen as an unfortunate deviation and should be documented for human readers when it occurs.)


This is just a belief about code, and one of many. Another belief is that code and computer systems are inseparable, and the most straightforward and simple code is code that leverages and makes sense for it's hardware.

As in, you can pretend hardware doesn't exist but that doesn't actually change anything about the hardware. So, you are then forced to design around the hardware without knowing that's necessarily what you're doing.

Exhibit A: distributed systems. Why do people keep building distributed systems? Monoliths running on one big machine are much simpler to handle.

People keep building distributed systems because they don't understand, and don't want to understand, hardware. They want to abstract everything, have everything in it's own little world. A nice goal.

But in actuality, abstracting everything is very hard. And the hardware doesn't just poof disappear. You still need network calls. And now everything is a network call. And now you're coordinating 101 dalmatians. And coordination is hard. And caching is hard. And source of truth is hard. And recovery is hard. All these problems are hard, and you're choosing to do them, because computer hardware is scary and we'd rather program for some container somewhere and string, like, 50 containers together.


As soon as you start developing web sites/applications, you are entering distributed systems.


> code and computer systems are inseparable and the most straightforward and simple code is code that leverages and makes sense for it's hardware

You're missing the point. Code is separable from hardware per se, even if practically they typically co-occur and practical concerns about the latter leak into the former. The hardware is in the service of our code, not our code in service of the hardware. Targeting hardware is not, in fact, the most straightforward option, because you're destroying portability and obscuring the code's meaning with tangential architectural minutiae and concerns that are distracting.

> you can pretend hardware doesn't exist but that doesn't actually change anything about the hardware

You're mischaracterizing my claim. I didn't say hardware doesn't matter. Tools matter - and their particular limitations are sometimes felt by devs acutely - but they're not the primary focus.

My claim was that code is PRIMARILY for human consumption, and it is. It is written to be read by a person first and foremost. Unreadable, but functioning code is worthless. Otherwise, why have programming languages at all? Even C is preposterously high-level if code isn't for human consumption. Heck, even assembly semantics is full of concepts that have no objective reality in the hardware, or concepts with no direct counterpart in hardware. Hardware concerns only enter the picture secondarily, because the code must be run on it. Hardware concerns are a practical concession to the instrument.

So, in practice, you may need to be concerned with the performance/memory characteristics of your compiled code on a particular architecture (which is actually knowledge of the compiler and how well it targets the hardware in question with respect to your implementation). Compilers generally outperform human optimizations, of course, and at best, you will only be using a general knowledge of your architecture when deciding how to structure your implementation. And you will be doing this indirectly via the operational semantics of the language you're using, as that is as much control as you will have over how the hardware is used in that language.

> Exhibit A: distributed systems. Why do people keep building distributed systems? Monoliths running on one big machine are much simpler to handle.

In principle, you can write your code as a monolith, and your language's compiler can handle the details of distributing computation. This is up to the language's semantics. Think of Erlang for inspiration.

> People keep building distributed systems because they don't understand, and don't want to understand, hardware.

Unless you're talking about people who misuse "Big Data" tech when all they need is a reasonably fast bash script, that's not why good developers build distributed systems. Even then, it's not some special ignorance of hardware that leads to use of distributed systems when they're not necessary, but some kind of ignorance of their complexity and an ignorance of the domain the dev is operating in and whether it benefits from a distributed design.

> But in actuality, abstracting everything is very hard. And the hardware doesn't just poof disappear. You still need network calls. And now everything is a network call. And now you're coordinating 101 dalmatians. And coordination is hard. And caching is hard. And source of truth is hard. And recovery is hard. All these problems are hard, and you're choosing to do them, because computer hardware is scary and we'd rather program for some container somewhere and string, like, 50 containers together.

This is neither here nor there. Not only are "network calls" and "caching" and so on abstractions, they're not hardware concerns. Hardware allows us to simulate these abstractions, but whatever limits the hardware imposes are - you guessed it - reflected in the abstractions of your language and your libraries. And more importantly, none of this has any relevance to my claim.


> Code is first and foremost for human consumption. The compiler's job is to worry about appeasing the machine.

Tangentially, it continues to frustrate me that C code organization directly impacts performance. Want to factorize that code? Pay the cost of a new stack frame and potentially non-local jump (bye, ICache!). Want it to not do that? Add more keywords ('inline') and hope the compiler applies them.

(I kind of understand the reason for this. Code Bloat is a thing, and if everything was inlined the resulting binary would be 100x bigger)


`inline` in C has very little to do with inlining these days. You most certainly don't need to actually use it to have functions in the same translation units inlined, and LTO will inline across units as well. The heuristics for either generally don't care if the function is marked as `inline` or not, only how complex it is. If you actually want to reliably control inlining, you use stuff like `__forceinline` or `[[gnu:always_inline]]`.

Regarding code size, it's not just that binary becomes larger, it's that overly aggressive inlining can actually have a detrimental effect on performance for a number of reasons.


Modern cpus are optimized for calling functions. Spaghetti code with gotos is actually slower.


Which brings it full circle to engineers saying no to product releases after being burned too harshly by being scapegoated


Sometimes the employee is in a low-revenue generating area where their department head is asked to cut headcount by 40%


Now we just need Rigtoy, Animtoy and Rendertoy and we'll be able to make beautiful 3D animations in the browser


Have you heard about cables.gl or tooll3? Those have quite impressive end to end motion graphics capabilities.


You mean we can't now?

https://holtsetio.com/lab/chromeBallet/

https://holtsetio.com/lab/flow/

https://threejs-journey.com/ (click the up arrow next to "Level 1" at the bottom center)


If you want to make them oldschool, there's turtleSpaces Logo:

https://turtlespaces.org/weblogo

We're in the midst of upgrading to three.js with all that it offers (materials, shadows, etc.)


I already built rendertoy a rendering engine to make hd videos from the browser.

https://www.youtube.com/@rendertoy4656


Congressmen should be required to complete the Factorio tutorial before taking office


Not sure what polish you're looking for but it's been great for me. Smart autocomplete algorithm and good chatbot that acts like a personalized Google / stack overflow. It's not good enough to vibe code full products or debug hard issues, but that's just limitations of AI.

Also it's all Microsoft, they made both the AI and the editor. I appreciate that they don't do anything extra in the editor to favor their own extensions.


The wealthy do use public schools. They pay huge amounts to live in upper class neighborhoods with wealthy peers, where a lot of tax money goes into the schooling system so the kids can take all sorts of extracurriculars and AP classes. It gets the same results as private school but the cost comes from living in that neighborhood rather than paying the school directly


California actually has a pretty solid school tax-redistribition system that more or less solves this problem (of course districts still can and do fundraise for direct donations to the PTA/music fund and bond measures to upgrade facilities, but it's still vastly more fair).

In a completely unrelated phenomenon, private schools are incredibly popular among Californians of means.


Most wealthy people in CA don't send their kid to private school. That's a rarity even among the wealthy.

There are plenty of good public schools in CA. There are only a handful of good private ones.


I am dating someone that has a child in private school. First grade costs $4k+ a month, maybe even 6k I forget. Nothing in the parking lot or talking even screams wealthy. Every person I've met in the social circle, also send their kids to private school in the SF bay area. I haven't even met another adult that sends their kids to public school. These are people that make $250k-$600k probably. But that's not "wealthy" in the SF bay area.


That's very believable; the kind of people who unnecessarily send their kids to an expensive private school when some of the best public schools in the country are nearby are the kind of people who would generally socialize together.

And $250k is wealthy. That's literally top 1.5 percentile in the U.S. They don't have to blow half of their income sending their kids to an expensive school. They choose to do so and that is the hallmark of wealth.


It doesn't matter what percentile in the US it is, when a 2 bedroom apartment is $3k+ and the average small house is $6k to rent.

Also. If you haven't been to a public school in California recently you really don't know what has changed. I went to public school all my life and then ended up in Berkeley. I'm 40. It was borderline negligent for my parents to send me there in my opinion as a kid knowing what I know now. But we were pretty hard up for money.

But if you told me, should someone lease two luxury cars or send their kid to private school.... You'd have to be nuts to think you'd gain more from the cars than the school.


After taxes (assuming single income, CA residence), $250k is $150k of spendable income. $6k on a house is $72,000 a year, leaving $78k to spend on food, utilities, etc. Assuming for some reason you spend $1000 on utilities each month (presumably you run a cryptofarm in your closest and a weed farm in your backyard), you still have $68k to spend on food. Assuming you spend an average of $20/meal/person on 3 meals/day every day of the year that's still leaves $2000 for other stuff.

Or in other words, even with profligate spending you still have money leftover. Which brings us back to this: techies apparently are good at code but very bad at basic finance.

If you haven't been to a public school in California recently you really don't know what has changed. I went to public school all my life and then ended up in Berkeley.

Berkeley is considered one of the best universities in the world. If you don't think it's a good school, the problem is you, not the schools.

If you haven't been to a public school in California recently you really don't know what has changed.

I volunteer coach to various local schools (changes every season). My alma mater is (now) considered one of the best public schools in state and occasionally makes the national list; it sends a higher % of students to the prestigious colleges (Ivy League, Berkeley, Stanfurd) than the famous local private schools (Troy and Harvard-Westlake).

But if you told me, should someone lease two luxury cars or send their kid to private school.... You'd have to be nuts to think you'd gain more from the cars than the school.

This is a nonsensical strawman...which supports my first point.The choice is not to lease two luxury cars or send their kids to private school. Both choices are the wrong choice. The correct choice for someone making $250k who claims that they are living paycheck-to-paycheck is to send their kid to public school, and address any deficiencies with tutoring or extracurricular activities (both of which are more likely to benefit college admissions and academic performance than private school and cost a fraction of private school tuition).

TLDR: if you are in the top 1.5 percentile you are not, nor will you ever be considered living paycheck to paycheck. If you tell someone that, they'll smile at you politely and assume you have a severe mental defect.


I told you I went to public schools and made it into cal...while talking about people spending $4k a month of 1st grade.. And you decide to talk about the quality of UC Berkeley instead of the average 1st grade school in the SF Bay Area. But yes, I have the mental defect.


> These are people that make $250k-$600k probably. But that's not "wealthy" in the SF bay area.

This is absolutely batshit to someone living in the midwest. I could save enough to retire in 5-7 years if I were making that much.


It's all relative. Someone making $250k with a family in the SF Bay Area could be basically living paycheck to paycheck if they just try to appear casually financially well-off. Nice house, nice car, electricity is 4x more than Idaho for example so add bills, eat out a few times, and send one child to a $4k a month 1st grade and you're living paycheck to paycheck.


No, that's just bad financial management. Spending $48000 to send your kid to a private school is a choice that parents can make when they're wealthy enough to do so.

"Living paycheck to paycheck" means that you just barely make enough to pay for food and rent, and don't have any spare money to cover unplanned costs like medical care. Spending a ton of money on vacation and private school is by definition not living paycheck to paycheck.


No it doesn't. Living paycheck to paycheck means you don't have any left over each paycheck, and the worse version of it is that you don't even have emergency savings left over in case unforseen costs come up.


I assume you forgot /s on the unrelated part


The underlying issue too is "Sorry Timmy, cause we're not rich and live in a poorer district, your schooling is worse and you have access to less choice."

And that goes back to how taxes for public schools are driven. The problem seems too engrained and too massive to fix. And since schools are state controlled, you'd need 50 solutions, not 1.


This really isn't true anywhere in the US. The highest spending per pupil will be the city school district. The people who live there may be relatively poor but there's a lot more commercial real estate to tax.


It's not at a point yet where I can recommend it to non-technical people but it's getting close.

I can play almost any steam game that I can find on it, but usually need to manually enable proton-experimental. Some Unity games have weird bugs and there are some other games I still can't figure out how to run at all.

I've run into weird errors due to incompatibility between Nvidia GPUs & their drivers with my OS. Haven't encountered the issue in 4 years but having your graphics driver break means you need to fix your crazy issue with only a terminal (hope you have another computer for googling).

My dad was becoming more pro-privacy so I got him Linux Mint, and something broke that put him in GRUB and it frustrated him so he asked me to change it back.

But Linux seems to be getting better as fast as Windows is getting worse so I still recommend trying it to anyone remotely interested


> My dad was becoming more pro-privacy so I got him Linux Mint, and something broke that put him in GRUB and it frustrated him so he asked me to change it back.

This is exactly why I don't recommend Mint or any Ubuntu-based, or even any normal (ie, mutable) Linux distros, for newbies. I learnt this the hard way thanks to my mum, who experienced the same breakage twice - once on Xubuntu, and again on Zorin. Since then, I switched her to an immutable distro (Aurora) over an year ago, and it's been flawless so far. Updates are automatic and never interrupt her, and she's been thru two major OS upgrades with no issues (for image-based atomic distros, a major OS upgrade is treated like just another update and makes little difference to the end user). And unlike regular distros, image-based atomic distros don't have to worry about any potential dependency issues or package conflicts occurring - the update will either apply or won't, there's no partial/failed state.

Therefore for non-technical newbies, I would highly recommend an immutable distro such as Aurora[1] or Bazzite (for gamers)[2], because you never again have to worry about updates. And in the rare event that an update breaks something, rollback is as simple as choosing the previous image from the boot menu, and that's it - no technical steps or knowledge required. This sort of stability and ease-of-restore is far beyond what Windows or macOS offers, which makes Linux a no-brainier.

[1] https://getaurora.dev/en

[2] https://bazzite.gg/


> My dad was becoming more pro-privacy so I got him Linux Mint, and something broke that put him in GRUB and it frustrated him so he asked me to change it back.

I think Windows actually has issues like blue screens that prevent entering the operating system. Why do people have a higher tolerance for Windows? What are your thoughts on this? Could you please share some?


Did a Windows update clobber GRUB? My dad had that problem a couple of times. Since he switched to having Linux and Windows on different drives and using the BIOS boot order to switch between them, there have been no more issues.


Anecdotally, a friend of mine works for a state department of transportation and has been trying to get a developer and a DBA to replace some people who've recently left.

He's been having an insanely hard time finding anyone for the role, and not because of salary requirements. He's required to vet candidates through approved sources and so his department uses a recruitment firm that keeps sending him resumes from people who are substantially lying about their experience and maybe also their identity. I tried recommending someone I knew who I knew had a lot of db experience and was job searching, and he said he wouldn't be able to interview the guy because he wasn't from an approved source.

His best recent hire was a woman who understood the system well enough to create her own firm, get it govt approved, and then get herself hired as a consultant.

Bear in mind I'm just recounting what my friend told me so I may have inaccuracies in this story.


Getting onto the allowed vendor list for the US Government is a dire process even for the largest of global service companies, by design by the folks already on the list.

I was able to work as an individual as a subcontractor for a subcontractor for a company on the list. Rates aren't as high, but with federal regulations (for now) mandating that subcontractors be paid as soon as the primary contract holder was paid meant that there was 0 chasing after invoices which is actually very nice.


> a woman who understood the system well enough to create her own firm,

Your friend could go through her firm then.


he should just hire some high school script kiddies, they already have access to the highest level of government!


Put in that persons first name as 'Big' last name 'Balls'. No one will question the hire, change the persons name later to their actual name.


I didn't know create-react-app was abandoned. What was wrong with it?


Nothing, it just required resources to maintain, which Facebook doesn't want to dedicate.


That's the naive answer. I don't think the promotion of Vercel in React docs and the discontinuation of create-react-app are unrelated.


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

Search: