HNHacker News
TopNewBestAskShowJobs

darioush

287 karma · joined September 8, 2014

@darioush0 on X
submissionscomments
darioush··on Ask HN: Former employees' RSUs at risk after startup's IPO
Yeahhhhh get lawyers, most IPOs will tank in the short run leaving you footing the tax bill for money you never had (speaking from experience).

At least you get capital loss carryovers for a decade, but it's so shameful that companies dump on their own employees. What a dark world.

darioush··on Reasons Not to Refactor
another reason to not refactor is management will start out supportive of it but some weeks in they will wonder wtf their engineers are doing all day and why aren't they building the new pile of stuff they want built yesterday.
darioush··on Global variables are not the problem
Yes, mixing some concepts in programming is a terrible idea.

Perhaps this is also widely unpopular, but it's the parallelism that needs to be treated with care and the additional caution, as often the parallelism itself is the terrible idea.

Concurrent code often has unpredictable performance due to cache behavior and NUMA, unpredictable lock contention, and the fact that often there is no measure of whether the bottleneck is CPU or I/O.

What most people want from concurrency (like computing the response to independent HTTP requests) can be done by separate processes, and the OS can abstract the issues away. As another reference, the entire go language is designed around avoiding shared memory (and using message passing -- even though it doesn't use processes for separation it encourages coding like you did).

But also sharing memory between processes can be handled with care via mappings and using the OS.

darioush··on Global variables are not the problem
Global variables are a programming construct, which like other programming constructs is neither bad nor good. Except, due to the takeover of workplaces by the best practices cult, instead of reasoning about tradeoffs on a case by case basis (which is the core of coding and software engineering), we ascribe a sort of morality to programming concepts.

For example, global variables have drawbacks, but so does re-writing every function in a call-stack (that perhaps you don't control and get callbacks from).

Or if you are building a prototype, the magic of being able to access "anything from anywhere" (either via globals or context, which is effectively a global that's scoped to a callstack), increases your speed by 10x (since you don't have to change all the code to keep passing its own abstractions to itself as arguments!)

Functions with long signatures are tedious to call, create poor horizontal (which then spills over to vertical) code density. This impacts your ability to look at code and follow the logic at a glance, and perhaps spot major bugs in review. There's also fewer stuff for say copilot to fill in incorrectly, increasing your ability to use AI.

At the end, every program has global state, and use of almost every programming construct from function calls (which may stack overflow) or the modulus operator (which can cause division by zero), or sharing memory between threads (which can cause data races) requires respecting some invariants. Instead, programmers will go to lengths to avoid globals (like singletons or other made up abstractions -- all while claiming the abstractions originate in the problem domain) to represent global state, because someone on the internet said it's bad.

darioush··on California law enforcement misused state databases more than 7k times in 2023
This is not the problem.

The problem is a higher portion of people who just want to power trip apply to these positions, even if they are not the majority of the police force. Basically, it is the dream job for a bully.

It seems there should be severe penalties for "power tripping" (aka misuse of authority and databases for special purposes); slap of the wrist fine, suspended paychecks and internal investigations will not deter this group of people. I don't see how these crimes are considered less than drug dealing.

Specifically the punishment should include mandatory jail time and permanent ban from jobs where they have any form of authority over others including management, teaching, and all government positions.

darioush··on Operator research preview
You can also write a python script to achieve the same goals.

Except it's not python's responsibility to interpret the intent of your script, just as it's not your phone's responsibility to interpret the contents of your conversation.

So our tools are not our morality police. We have a legal system that can operate within the bounds of law and due process. I am well aware of the already applied levels of machine learning policing, I am just not very excited that society has decided that "this is the way now", and also doesn't seem to be bothered by the environmental costs of building and running all these GPUs (which does seem to be the case when they are used for censorship resistant transactions), or the ethical concerns about a non-profit becoming a for-profit etc.

darioush··on Introducing Operator
Yeah I also wonder how come web scraping was so vilified in all ToS's but I guess if you spend a lot of energy on GPUs and pay OpenAI then it's legit.
darioush··on Operator research preview
As the storyline unfolds "AI" seems to be code for "machine learning based censorship".

Soon we will have home appliances and vehicles telling you about how aligned you are, and whether you need to improve your alignment score before you can open your fridge.

It is only a matter of time before this will apply to your financial transactions as well.

darioush··on Short-term rentals are hollowing out communities with loose restrictions
Sure it does since luxury tax can be 10%-25% of property value. Let's see who wants to hold on to property then. And if they do they are paying their dues to society.

When they are "removed" and owned by more people, presumably this is a more efficient allocation of the same amount of houses to more people, which is a solution for the housing problem.

darioush··on Short-term rentals are hollowing out communities with loose restrictions
It obviously matters because then demand for housing speculation will be bounded by population density instead of greed, and corporations will not be able to do things like own double digits of the housing supply in some large metro areas:

https://www.coreysdigs.com/real-estate/who-really-owns-the-u...

These estimates are for entities owning more than 1000 homes.

darioush··on Short-term rentals are hollowing out communities with loose restrictions
Why don't all these long term community people have a talk with the long term owner and have them not rent their place? To be honest, it sounds like there is no community whatsoever to begin with, at least not one that the long term community members get any say in what happens.

I wonder if all the people who were renting their vacation homes out stopped doing it, what would happen to the restaurant traffic in the area and who would shop at the souvenir shop?

In fact I greatly wonder what the source of economic activity would be in such "destination towns" if we cut off tourism.

darioush··on Short-Term Rentals Are Hollowing Out Communities with Loose Restrictions
It doesn't need to be a human right, we just need to regulate housing to be owned by individuals and mandate a limit for how many residences one has.

This is because due to the scarcity of homes and that they cannot be manipulated or printed out of thin air and lent short on a computer, they have become tools of speculation, so the regulation is justified.

darioush··on Short-Term Rentals Are Hollowing Out Communities with Loose Restrictions
Doesn't the income for the jacked up prices also accrue to that community though? IMO it is not respectable to take someones money and give them a visa then act like they are a problem or unwelcome.
darioush··on Short-term rentals are hollowing out communities with loose restrictions
The fix is to require residential properties be owned by individuals and place a limit on how many homes one household can own (3?) without incurring luxury taxation.

Then we can let the short/long term rental market sort itself out and also allow people to invest in real estate at a reasonable rate.

darioush··on Short-Term Rentals Are Hollowing Out Communities with Loose Restrictions
I somehow question these "community vibes", they certainly benefit from the presence of the tourist/nomad economically, but they also want to project a wholesome higher moral ground that's only attainable to "those in it for the long term".

Is it really about a sense of community or just that it's easier to redirect anger at housing affordability to "people who are new or won't stay around long enough" than to address issues like corporations buying up housing supply or unrestricted monetary policy making home ownership impossible for almost everyone.

darioush··on 87.4% of population experienced a decline in freedom from 2020 to 2022
This is true but the government is the biggest borrower, who then immediately spends the funds by "awarding" contracts, obviously they don't have any corruption or favoritism when they do this, nor do they place trades using their insider knowledge of how the funds will be appropriated, which will definitely never impact the average citizen borrower (who is probably in need of borrowing money to buy a house, which is so expensive because... inflation)
darioush··on 87.4% of population experienced a decline in freedom from 2020 to 2022
In actuality fiat currency makes everything a pyramid scheme and allows the government to spend the wealth of the nation in whichever manner it deems fit, since the value of inflation accrues disproportionately to the asset owner (aka people who were there before you, aka pyramid scheme) vs. the earning productive class.
darioush··on 87.4% of population experienced a decline in freedom from 2020 to 2022
Yes like gold, real estate, and also arguably the index fund investment (that everyone buys into via 401k).

All these investments are only worth anything if someone buys them from you at a higher value.

Yes you can generate revenue from these but looking at increases in P/E ratios and real estate prices / income growth tells the story that the increases are primarily fueled by inflation.

For example compare the pre-pandemic and post-pandemic rent for a given apartment and you will see if the "underlying investment" is providing increasing value or if the value is the same or less for an older building but inflation is propping it up.

darioush··on 87.4% of population experienced a decline in freedom from 2020 to 2022
Inflation over the amounts needed to stimulate the economy (2-4%) is unauthorized taxation. Kinda whack how everyone is just "okay" with working hard, paying taxes, then having the value of their work spent without their authorization.

Nice there are alternatives for saving.

darioush··on Does current AI represent a dead end?
Just because something is probabilistic in its response doesn't mean it's not useable.

There are many probabilistic algorithms and data structures that we use daily.

Yes, we don't have developed abstractions to integrate an LLM in a programming language, but it doesn't mean no one will make one.

darioush··on Please stop the coding challenges
Doesn't this approach self-select for people who - value their time less, - don't have other things to do (family, hobbies, side-projects), - unemployed people

It's one thing where companies are applying this to 1000 applicants for an entry level position, but they also use this tactic when they reach out to you and tell you how excited they are about your background and resume.

In reality they didn't evaluate your background or resume and are just cold-calling you to fill some portion of their "funnel", then ignore all their excitement and reasons they reached out to you and have you jump through random hoops.

darioush··on Please stop the coding challenges
Agree, IMO even interviews should be compensated. Most software companies want to schedule 3-4 interviews each 2 hrs long so they should minimally compensate 1 day pay.

If we assume 15 days off that leaves roughly 245 workdays per year and with a salary of $200k that would be close to $800.

A fair amount of compensation to spend half a weekend on a project would be $400.

darioush··on Why that one coworker got fired for no reason
Kind of sad that paperwork is more important than work. In my experience I don't want to be in companies that have this culture, and I take my contributions where I don't have to constantly prove myself.

In other words, if you are not excited to work with me, I am not working for you. Too much feudalism mindset in especially the US workforce is hampering wide-scale productivity.

If your work environment is not win-win and you're managing optics to avoid getting fired, just go where your coding talents are valued & be a happy person instead.

darioush··on Good refactoring vs. bad refactoring
I agree with the sentiment of this article, more recently I have come to think the best refactoring is the one you don't undertake. Hoping to achieve consistency is a very high standard.

Often code structure matters much less than data flow and how it is piped. Since most codebases use a mixture of:

- global state or singletons, - configurations provided externally (config file, env var, cmd option, feature flag, etc.), that are then chopped up and passed around, - wrappers and shims, - mix of push and pull to get input/outputs to functions, - no consistency or code representation of assumptions about handling mutable state,

It may be better to build around existing code using ideas listed here than to try to refactor code to improve its structure: - open/closed principle = compose new code for new functionality (instead of modifying), - building loosely coupled modules (that interface via simple types and a consistent way of passing them) - enforcing an import order dependency via CI (no surprise cyclic dependencies months after an unrelated feature added some import that doesn't "belong")

The code's structure will be simple if the dataflow (input, outputs, state, and configuration) flows consistently through the codebase.

darioush··on The Software Crisis
If only they had unveiled the single unifying abstraction of everything :(
darioush··on Go's old $GOPATH story for development and dependencies
The current go dependency management is lacking:

- If you want to make a change in one of your dependencies, you have to fork the repository, and in the forked repository you have to textually rename the package to the new name. This makes for abysmal maintenance and unneeded merge conflicts if you want to maintain parity with upstream code.

- There is the go replace directive, but this does not transitively apply to dependencies of the module that declares the go replace directive.

- If your patch gets into the upstream repository, now you have to undo the forking (again via a large textual rename).

- If a dependency of your code and your code both depend on the same package, you are forced to take one version per binary that gets compiled. This is just plain absurd and leads to situations where you cannot bump the dependencies independently. If you have a tree of these dependencies, you must update each dependency in the order that respects the dependency tree. This sort of defeats the purpose of specifying and locking the dependency version.

- Overall, go was designed for a mono-repo in a company (Google) that does not version their software (everything runs at tip), and it shows in any type of effort that attempts to re-use software in non-trivial fashion, with distributed development that happens at different rates in different repositories.

darioush··on My favourite Git commit (2019)
In my opinion one of the most important features of a commit message is that it fits in a single line so it can be read in git log.
darioush··on T-Mobile will start charging a $35 fee on all new activations and upgrades
You got lucky. They terminated my data for "being outside the US for too long". It was a crappy experience since the whole advertisement is about the international roaming being the same price as the (overpriced) US data.
darioush··on Luna Cryptocurrency Collapse: How UST Broke
This is not a valid comparison. BTC has a cap and LUNA can be minted. In fact if anything the LUNA collapse is just a demo of what money printing gets you and how people with capital leverage off-market lending to take (steal) assets for a lower price.
darioush··on Ask HN: Are there any tech companies throwing $$ at candidates these days?
You pay 35% taxes so that's like 150, then you max out retirement and you're left with like 130. You spend 50-70k and then save 60k a year which is like 1 year of your pre-retirement expenses (not including any children, just like a couple or single person)

So yeah definitely not retiring in 5 years unless you are already 55.

This also means you didn't do anything flashy or crazy with your money or lose it in markets.

← PreviousPage 2 of 5Next →