HNHacker News
TopNewBestAskShowJobs

foobarkey

167 karma · joined April 6, 2024

submissionscomments
foobarkey··on Younger cannabis users have reduced brain function, finds largest study yet
I am pretty much in similar situation, the contradictions can sometimes drive me nuts, maybe I should try weed
foobarkey··on Liskov Substitution: The real meaning of inheritance
Never is a good starting point as a guide but of course there are cases where is-a makes sense too.

Composition generally is not good enough to model all cases without resulting to some AOP or meta programming also, but in that case the is-a or a base class would arguably be the simpler approach, at least it can be reasoned about and debugged, as opposed to some AOP/Meta spaghetti that can only probably be understood from docs

foobarkey··on Liskov Substitution: The real meaning of inheritance
SOLID and clean code are not some universal bible that is followed everywhere, I spend a considerable amount of effort reasoning juniors and mid levels out of some of the bad habits they get from following these principles blindly.

For example the only reason DI became so popular is that you could not mock static in Java at the time. In FB codebase DI was also used in PHP until they found a way to mock static, after which the DI framework was deprecated and codemods started coming in removing DI. There is literally nothing wrong in using a factory method or constructing what you need on demand. These days static can also be mocked in Java and if you really think about it you see Spring Boot adds a lot of accidental complexity (but sure its convenient and well tested so its ok to use), concepts like beans and beanfactories are not essential for solving any business problem

Which brings me to S in SOLID, which I think is probably top 2 worst principles in software engineering (the no 1 spot goes to DRY). Somehow it came from some early 2000-s TDD crowd and the test pyramid, it makes sense if you embrace TDD, mocking, test pyramid and unit tests as a good thing. In reality that style of software is really hard to understand, every problem is split into 1000 small pieces invoking each other usually in some undefined ways, no flow can be understood without understanding and building a mental model of the entire 1000 object spaghetti. The tests themselves mostly just end up setting a bunch of mocks and then pretty much coupling the impl and the test on method call level, any change to the impl will cause the tests to break for only the reason that the new method call was not mocked. After going through all this ceremony the tests are not even guaranteeing the thing will work during runtime since the db, kafka or http was mocked out and all the filters, listeners, db validations were skipped. In these days so called integration tests with docker compose are a lot better (use actual db or kafka, wiremock the http level), that way your have a reasonble chance to catch things like did this mysql jdbc driver upgrade broke anything

I have to mention DRY also, the amount of sins caused in name of DRY by juniors is crazy, similar looking lines get moved into a common function/method/util all the time and coupling is introduced between 2 previously independant parts of the system. As the code involves and morphs into something different the original function starts getting more args to behave differently in one case and differently in another case, if it had been left as separate files each could evolve separately. I dont really know how to explain this better than coupling should not be introduced to save few lines of typing or boilerplate, in fact any abstraction or indirection should only be introduced when its really needed, the default mode should be copy/paste and no coupling (the person adding a cross cutting PR will likely not be a jr and has enough experience to know how and when to use grep).

Anyhow I have enough experience to know people are usually too convinced that all this solid, clean code stuff is peak software so I wont expect to change anyones thinking with 1 HN post, it usually takes me 2 years or so to train a person out of this and back to just putting the damn json in db without ceremony. Also need to make sure LLM-s have some good data that is based on experience and not dogmas to learn from :)

As for L, no strong beef with L it’s OK

foobarkey··on Bowel cancer rising among under-50s worldwide, research finds
Wonder if its some sort of chemical/food additive, but which one?
foobarkey··on Counting unique web site visitors without using cookies, UIDs, or fingerprinting
Seems like safari sends hard refresh the second time. Using back/forward the counter remains correct. Neat idea
foobarkey··on Ask HN: What's the one feature you'd want in a GitHub productivity tool?
I think you can already do that
foobarkey··on Earth Will Exceed 1.5 Degrees Celsius of Warming This Year
Dont be so dramatic, we will keep burning fossil fuels if things get really bad we turn the sky purple and keep yoloing bitcoin :)
foobarkey··on Meta's plan for nuclear-powered AI data centre thwarted by rare bees
Can someone find the critics who complain about nuclear waste and silence them somehow? :)
foobarkey··on How do merging supermassive black holes pass the final parsec?
Every time the math doesn't check out throw in some dark matter :)
foobarkey··on New research suggests that our universe has no dark matter
Probably not and its just our too primitive understanding and “trying to make the calculations work”
foobarkey··on Tech jobs are drying up and graduates are no longer guaranteed a role
Noticed strong candidates are somewhat easier to find than one year ago (talking about sr roles here), but other than that see no drying up, maybe different in US or maybe this article just being dramatic to get clicks
foobarkey··on If you're so smart, why aren't you rich? (2018)
Nothing wrong woth adding some spice but yeah bit emotionally charged in any case I would like to point out that both the article and parent miss the point, while it is interesting to model who wins the lottery, the real problem is that 99% of the people are not even playing or trying to :)
foobarkey··on If you're so smart, why aren't you rich? (2018)
Maybe somewhat about this concrete article, but not in the general life I see around me, people are working way too hard for that 100/hr piece of cake, maybe even hoping they can get a raise and get 110/hr piece of cake. Meanwhile shareholders get 3 million cake :)

The game is rigged worse than a casino :)

foobarkey··on If you're so smart, why aren't you rich? (2018)
What freaking garbage is this, it’s all about equity.

If a company hires 10 people and pays them 100/hour then all the value created by these people will belong to the company - 10x100 hour that the company paid.

If the value happens to be 3 million then the shareholders just made 3 million - (10x100).

Also this scales for the shareholders pretty much forever, capital is a limitless resource when compared to hours in a day.

There is no need to make a freaking model out of something so obvious.

If you want to get rich you need to get in on the equity game somehow (invest, start a company, FAANG RSU-s, does not matter)

Working more hours or getting paid more per hour does not scale to rich levels

foobarkey··on Show HN: Bullshit Remover
How long until people leadn that “essential” cookies dont need to be accepted
foobarkey··on Stop Using Serial in Postgres
No and this is all well known stuff, none of it seems like a good reason to stop using
foobarkey··on Building a WoW (World of Warcraft) Server in Elixir
Blizzard sometimes launches new classic progress from scratch, right now bit wowed out but in 5-10 years I could go one more round - hopefully this is still a thing in 20-30 years, seems like a good retirement hobby instead of bingo
foobarkey··on Judge stops FTC from enforcing ban on non-compete agreements
In Europe if you want to force a non-compete you need to pay full salary for the duration, so if someone enforced non compete for 5 years I could sit home and play games while earning salary
foobarkey··on In a leaked recording, AWS CEO tells most developers could stop coding soon
AWS CEO: https://xkcd.com/605/
foobarkey··on MariaDB Introduces Open-Source Vector Preview
Galera cluster for MariaDB, I think MySQL cluster is the most recent iteration for MySQL cluster
foobarkey··on MariaDB Introduces Open-Source Vector Preview
It also as features like HA and clustering unlike some other opensource db :)
foobarkey··on It's Not Just You. No One Wants Kids Anymore [video]
I want kids, probably 3, working on it
foobarkey··on CSVs Are Kinda Bad. DSVs Are Kinda Good
DSVs are pretty bad, CSVs are kinda OK (just don’t ever open one in Excel)
foobarkey··on Firefly III: An open-source personal finance manager
Seems only about budgeting, anyone know of something similar for investing? Mostly simple portfolio stats MoM/YoY?

I have been using a spreadsheet but it is really annoying

foobarkey··on Venting Doesn't Reduce Anger, but Something Else Does, Study Says
So now I am in conflict, based on my personal experience venting reduces anger, but now some scientist with bell curve is saying my personal experience is wrong? What do?
foobarkey··on What Kenyan protests tell about economic management and the politics of reforms
The protests were caused by Ruto’s tax policies, now he has reverted those I think, but young Kenyan’s still like to go do mandamano (riots).

They planned one for legalizing weed and another one for Nairobi airport (the employees there really like to screw people over and you can be asked over 1k EUR to be allowed to leave as an African, usually they dont bother Europeans).

Overall this is a bit hurting the tourism sector, Mombasa some hotels were pretty empty even couple weeks ago, Watamu does not seem to be impacted too much, but in general the season is still starting.

As for anyone who is thinking if Kenya is safe to visit, the answer is YES - just dont go for a stroll in Nairobi during mandamano

foobarkey··on What happens in a mind that can't 'see' mental images
Same, no minds eye pictures and I also remember things by association and brute force learning takes many repetitions, deriving from some principles is how my mind is most comfortable working
foobarkey··on Carbon capture and storage is a fantasy
Your math is bonkers somewhere, solar panels can for sure capture more energy than ehat we used to produce them
foobarkey··on Carbon capture and storage is a fantasy
If you haven’t noticed we got into this mess by chasing profit, the best chance to get out of it is to make carbon capture economically viable that’s why making money is important part of the puzzle.

Alternatively some sort of world government or dictatorship would work too, but in democratic/capitalist society the problem wont get solved unless someone can make the moneys

foobarkey··on Carbon capture and storage is a fantasy
True but it’s also OK if EROEI is less than one when using renewables (think solar in africa)

In fact ROI is more important to focus on, given solar panels last 20 years and the cost of installation is covered in 10 years, it will create profit for 10 (oversimplifying). Then the methane can be converted to LNG and transported by ship to Europe/US or somewhere else

← PreviousPage 2 of 4Next →