Better HN
topnewbestaskshowjobs
Log inSign up

rvr_

163 karma · joined Feb 3, 2016 (10y ago) · 84 submissions

Submissions

comment 1y ago · link · parent

Article's premise: - software development practices are invariable to company size and stage

Reality: - team size dominates methodology and user base size dominates architectural decisions

comment 2y ago · link · parent

In my experience most apps designed around relational databases will benefit from: - one-to-many and many-to-many mappings - soft delete - log tables / append-only tables - entity-attribute-value - meta columns (creator_id, timestamp, version, etc)

Beginning with them is way easier than patching afterwards

comment 3y ago · link · parent

For the "play chess" example a state machine is the perfect place to begin modeling. Games, as a rule, are event-driven and are commonly coupled to a event-loop that triggers the transitions of the state machine. I think top-down decomposition has it's place, but the examples used to describe it should be given a little more thought.

comment 3y ago · link · parent

https://www.w3schools.com/jsref/event_onbeforeunload.asp

comment 4y ago · link · parent

Pointing out that the solution is not perfect is fine. It helps future maintainers, even if self. The worst offenders don't even realize the badness of their implementations, intriguing further adventurers of their code's true intentions.

comment 4y ago · link · parent

My unpopular opinion is that you only forget what you have not learned and that you only learn what you do. The vast majority studies only to pass exams. So your situation is pretty normal.

comment 4y ago · link · parent

This should be a crime, like selling spoiled food.

comment 4y ago · link · parent

TFA is nonsense. Hard deletes should almost never be used, period. The application credentials should not even have permission to issue delete statements, thus reducing potential damage from bad actors. Things like ON CASCADE DELETE should not even exist. Anyone using them must stop and rethink their life decisions.

comment 4y ago · link · parent

Truth is, our lizard brains are always forgetting the good stuff that happened but remembering every detail of some random shameful event nobody, except you, cares about.

comment 4y ago · link · parent

School shooting is a memetic behavior, on the classical sense disseminated by R. Dawkins, not Internet's one.

Can we rephrase the problem as: how do a society gets rid of a bad meme?

comment 4y ago · link · parent

Please don't use this project as it makes no attempt to avoid the database file from being directly downloaded. Any sane PHP project (of witch WP is not one of) has it's index.php (and any user-facing stuff) inside a 'public/' folder, never exposing the entire project and relying on the webserver to secure things with .htaccess rules.

comment 4y ago · link · parent

It's also becoming harder to buy dumb refrigerators above a certain size.

comment 4y ago · link · parent

Me too. But they have FB accounts, IG accounts, TikTok accounts and so on. The share of people without any kind of social media presence or consumption is shrinking everyday.

comment 4y ago · link · parent

One way to approach crime is to make the risk too big. What about punishing with death those who do identity theft and impersonation? Our society tolerates too much crime.

comment 4y ago · link · parent

Next time you need to take a look at PHP, those two problems can be solved by php-apcu for caching and proxysql running side-by-side with php-fpm on each server.

comment 4y ago · link · parent

The pervasive use of ORMs with lazy-loaded relationships works like a bunch of left joins, even if they are done as separated queries.

comment 4y ago · link · parent

"Realize that every code has a life cycle and will die. Sometimes it dies in its infancy before seeing the light of production. Be OK with letting go."

I cannot disagree more. Code lingers. I work on an 13 years old code base that is considered new by internal standards and it's not uncommon to see lines that haven't been touched for 10+ years.

comment 4y ago · link · parent

I don't test private methods and I like to use them a lot. When refactoring, if a private method is unused, both IDE's and linters will warn you, easing the process of deleting dead code. If you extract private methods into separated classes and expose them as public methods, deleting unused code becomes hard (and harder with multiple repositories).

comment 4y ago · link · parent

Bolivia is also a huge market for cars stolen in Brazil.

comment 4y ago · link · parent

20 years without meaningful improvements on memory access ?

comment 4y ago · link · parent

I am mostly on the SPA-hating camp. There are two issues that annoy me the most. They are not a framework's fault but some kind of "mental model" fault:

First. When doing SPAs, APIs tend to leak a lot more info than needed, opening the door to attacks not commonly seen on server-rendered pages.

Second. Applications' bundle tend to have way more than users needs, even UI's they should not have access due to security/permissions. Most developers are not even aware of this problem and don't know that sensible info/features/endpoints are leaking.

As I said before, those are not faults at the framework level, but the development style that I seed used when making SPAs always led to them.

comment 4y ago · link · parent

I think you Ryzen CPU is being throttled. It is not able to sustain it's burst speed. You should keep an eye on CPU temp and clock.

My benchmarks on hardware that have less single thread power than yours:

Intel(R) Xeon(R) Gold 6240R CPU @ 2.40GHz - Linux - Java 8

0 - Passes: 3200, count: 78498, Valid: true 1 - Passes: 3197, count: 78498, Valid: true 2 - Passes: 3200, count: 78498, Valid: true 3 - Passes: 3202, count: 78498, Valid: true 4 - Passes: 3207, count: 78498, Valid: true 5 - Passes: 3207, count: 78498, Valid: true 6 - Passes: 3202, count: 78498, Valid: true 7 - Passes: 3205, count: 78498, Valid: true 8 - Passes: 3209, count: 78498, Valid: true 9 - Passes: 3178, count: 78498, Valid: true

Intel(R) Core(TM) i5-8250U CPU @ 1.60GHz - Linux - Java 18

0 - Passes: 3445, count: 78498, Valid: true 1 - Passes: 3443, count: 78498, Valid: true 2 - Passes: 3408, count: 78498, Valid: true 3 - Passes: 3449, count: 78498, Valid: true 4 - Passes: 3439, count: 78498, Valid: true 5 - Passes: 3442, count: 78498, Valid: true 6 - Passes: 3450, count: 78498, Valid: true 7 - Passes: 3445, count: 78498, Valid: true 8 - Passes: 3438, count: 78498, Valid: true 9 - Passes: 3447, count: 78498, Valid: true

comment 4y ago · link · parent

Things got cheaper because they are being made where wages are cheaper. At the end of the day, everything that is a expense to me is a source of income to somebody else. Only robots don't get paid.

comment 4y ago · link · parent

Software is hard, but unlike many other professions, you can do useful work at almost any level of the learning curve. Even for those of us with many years of experience, there's always something new. You can use an argument within these lines. Remember them it's a journey. One can start with bare resources. It's not capital intensive and there's no need to put themselves in debt.

comment 4y ago · link · parent

And there's still people who don't believe in 10x programmers...

comment 4y ago · link · parent

I think you almost got the answer to your own question. For me, quality software is made by very small teams of very competent people improving the software for a long time. We don't know much about the vast amount of closed software, but, for opensource, the state-of-the-art follow these rules.

comment 4y ago · link · parent

This must be some form of late April 1st joke. The samples are even SQL-injection!

We need to stop modifying basic protocols like HTTP. We should've stop at 1.1.

comment 4y ago · link · parent

PHP's null coalescing operator:

firstWorking() ?? getItFromTheCache() ?? getItFromTheDataBase() ?? getItFromAnExternalApi() ?? computeItTheSlowWay() ?? defaultValue;

Perl OR short-circuit:

firstWorking() or getItFromTheCache() or getItFromTheDataBase() or getItFromAnExternalApi() or computeItTheSlowWay() or defaultValue;

comment 4y ago · link · parent

If self moderation is not working, plain old avoidance/abstinence is the way to go.

I am not capable of moderate game playing, so I have no games installed on any device of mine.

123