Better HN
topnewbestaskshowjobs
Log inSign up

usrbinbash

4,687 karma · joined Dec 4, 2021 (4y ago) · 1,693 submissions

Submissions

comment 4y ago · link · parent

Javascript is experiencing the same problem as C++ and (albeit to a lesser degree) Python.

Instead of locking down the language and saying "this is it", we just pile on new features, because "what? language Y has x, and ours doesn't?! Outrageous! We need to implement x right away". Bonus points if the only reason for the "feature" is to support some paradigm-du-jour or to make up for a fundamental flaw in the language itself. async is the perfect example: The only reason this rehash of cooperative multitasking ressurected from the 90s was ever taken seriously, is because JS-on-backend was suddenly a thing and the language is single-threaded only.

Put enough languages into this mix of mutually-reinforcing feature creep, and it becomes clear where this is going: A language that devs have to re-learn every 2 years.

comment 4y ago · link · parent

Problem is, there is not a lot of incentive for people looking for a job to use LC and similar to understand algorithms and data structures, and with good reason;

Many interviewers do not ask the questions to check for thought process or problem solving ability, they treat it like some TV quiz: Ask question, get answer, compare answer to note in hand, applaud if its the same answer, next question. Why? Because its a lot easier to sit there watching the candidate squirm at the whiteboard, while thinking about what's for lunch, than engaging the candidate and gasp talking to him/her.

This creates incentive for people taking these BS interviews to learn-for-the-test: Get a list of the current top50 questions asked regularly at interviews (there are resources for that) and memorize them.

Why? Two reasons:

1. It is alot easier than understanding the concepts and purpose of different algos and data structures.

2. Trying to solve them by applying actual understanding, runs the risk of getting stuck on an unfamiliar problem, or producing a slightly sub-par solution instead of the "correct" answer, and getting booted out despite demonstrating the exakt thing aka."problem solving ability" the interviewers allegedly look for

And, unsurprising, because there is money involved, an industry has sprung up around this: Pay-For-Tech-Interview-Training is a thing, including regular updates on popular questions.

The result of course: Companies running the risk of hiring people who are great at answering LC questions but fail when they actually have to solve a problem where they cannot copypaste the solution from SO.

comment 4y ago · link · parent

https://en.wikipedia.org/wiki/2021_United_States_Capitol_att...

comment 4y ago · link · parent

All these attack vectors work regardless of the Authentication system used.

comment 4y ago · link · parent

> There must be multiple ways of storing relational data without including SQL

SQL makes no assumptions how relational data is stored exactly. It is just a language to talk to a RDBMS.

comment 4y ago · link · parent

> There is no equivalent on web1.

Of course there is. If the service offered is not just access to some data, but things like computational power, access to a game server, food delivered, etc. I put up a payment system, and unless its used there is no access to the asset.

What form that payment system has, and what tokens it accepts USD, EUR, BTC, Seashells or Sliced Bread, is completely irrelevant.

comment 4y ago · link · parent

Regardless of what relationship a piece of data has to some blockchain technology: As soon as it is publicly accessible, even once, it's scarcity can no longer be guaranteed, because by their very nature, digital assets are infinitely reproducible.

comment 4y ago · link · parent

>NoSQL doesn't mean non-relational

https://en.wikipedia.org/wiki/NoSQL

A NoSQL (originally referring to "non-SQL" or "non-relational")[1] database provides a mechanism for storage and retrieval of data that is modeled in means other than the tabular relations used in relational databases.

comment 4y ago · link · parent

In 2021, between 300-400 thousand BTC transactions took place every day...worldwide.

In 2019, more than 108.6 million credit card transactions were processed every day...in the US alone. Worldwide, about 1 billion card transactions are processed every day. And this is just credit cards.

Need I say more?

Sources:

https://www.statista.com/statistics/730806/daily-number-of-b...

https://www.cardrates.com/advice/number-of-credit-card-trans...

comment 4y ago · link · parent

> or I could revoke it in the future

Unless whatever service accessed the tweet/image/text/whatever made a local copy and is displaying that once the "blockchain service" no longer allows access.

An NFT doesn't confer access control. Its a certificate of ownership, the asset itself is infinitely reproducible.

comment 4y ago · link · parent

> Digital self-custody of scarce assets is a new thing.

How so?

This is how "web1" operated all the time: People have a cool idea and fire up a webserver to host it. Self-Custody in its purest form.

Sure, others could copy it, but they can also do that with whatever someone generates an NFT for "digital assets" (the certificate cannot be copied, the thing it certifies ownership for can).

As for "scarcity": Digital assets are either shared or scarce, there is no in-between. Distributed Ledgers allowing NFTs make the certificate of ownership scarce, not the asset itself.

comment 4y ago · link · parent

> username/password can get harvested in lots of ways,

BasicAuth isn't more at risk of this than other methods however. Unless a website doesn't use HTTPS, but if that's the case, all talk about security is out the window anyway.

> The way I've seen browsers implement password auth generally blocks interacting with the rest of the page.

BasicAuth Challenge -> Wrong Password -> Server replies with 200 + "Did you forget your password klick here ..." page instead of 401. There, pwd recovery system implemented using BasicAuth.

comment 4y ago · link · parent

Nothing prevents me from using BaseAuth for the login, and then issuing a session cookie to the user.

comment 4y ago · link · parent

1. You could do the same in a BasicAuth system.

2. How is validating the session-cookie validity different from validating the username/password?

comment 4y ago · link · parent

>This has many flaws that make it impractical

Just because something is simple doesn't make it impractical. Not every application requires a complex auth-flow.

>As every request is a login request, effectively

This is the case with basically every single Authentication flow in existence...at the end of the day, no matter how and where credentials are verified, there is a token that has to be sent with every request and verified server side.

>hard to easily build account recovery flows

Why?

> UX of logging in/out is browser-dependent and confusing for users

Its a display with username/password and one or 2 buttons, one of which says "Login", the other of which says "Cancel" or something similar. How is this confusing?

> it can't integrate well with other auth systems

Why?

comment 4y ago · link · parent

The metal atoms do not have free will, and they cannot obtain, integrate or act on information.

I am lucky enough to live in a country where I have the opportunity and freedom to vote as I see fit. And because of that, me, and no one else, is responsible for how I vote.

With great power comes great responsibility.

comment 4y ago · link · parent

> I'm amazed that there's no widespread feeling of anger with the government and the people who brought us into this.

Thing is, "The people who brought the UK into this" are, at the end of the day, not the politicians, but the voters.

comment 4y ago · link · parent

It looks a lot cooler than light mode, especially when the room is dark.

No other reason required ;-)

comment 4y ago · link · parent

> So how is it relevant to this conversation

It shows that mandatory vaccination works in fighting infectious diseases. Whether that results in the eradication of the disease, or getting it under control to a degree that we no longer have to have lockdowns, and/or masks in public transports, is irrelevant.

comment 4y ago · link · parent

I absolutely believe you and agree, there is no downside. My comment was about an existing (in my opinion wrong) perception in popular culture, were many aspirants get their ideas from, that being a good typist is somehow a requirement to being a good coder.

comment 4y ago · link · parent

> Vaccination isn't going to eradicate SARS

Did I say it it would? Pretty sure I was talking about smallpox, as a general example how mandatory vaccinations helped in the past.

Also, COVID and SARS are two different diseases, caused by different Coronaviridae.

Vaccination makes COVID less likely to spread through the population, and can prevent a severe course of the illness.

comment 4y ago · link · parent

I am European, so yeah, European public health care systems have been taking care of me pretty much all my life, including the months my Mom was pregnant with me.

And I have NEVER had anything to complain about. Neither has my family, or anyone I know. The quality is top notch, and getting an appointment is as easy for me as picking up the phone.

And btw. if anyone is unhappy with what public health care provides, its easy to get private insurance ON TOP OF it. Public health care doesn't replace private insurance, it sets a baseline of quality people receive no matter what.

And speaking of quality: https://www.healthsystemtracker.org/chart-collection/quality...

comment 4y ago · link · parent

Mandatory vaccinations helped to eradicate smallpox.

And yes, social media providers have to get their act together if they want to do business in Europe.

comment 4y ago · link · parent

This seems like something that shouldn't be handled by the "free market" at all, because human health is at stake. And because of that, it isn't left to "the free market" in most of europe.

comment 4y ago · link · parent

And what can we learn from this story?

Middle-Left coalitions are actually a pretty good idea.

comment 4y ago · link · parent

If I may just say thank you for this section:

> The denunciation of the mouse usually involves invoking concepts such as the “home row”, or the cumbersome migration of the hand between keyboard and mouse. These might all be well and good, if I were a typist and as such all I did was to type. But this isn’t the case, I ponder and perceive, more than I write.

This resonated so much with me :-) I still cannot believe how many people seem to think that the ability to type really fast is important to be a good coder, when we spend the vast majority of our time reading, re-reading and podering code instead of writing it.

comment 4y ago · link · parent

For starters, how likely is a data loss? SQLite may lose a transaction if the server shuts down or the application crashes, but this doesn't mean the db gets corrupted.

Secondly, even if that happens, the fact that the database is a simple file on the production server, makes it easy to back up and restore.

Thirdly, a "traditional" db is no proof against loss either...sure, the production server with the SQLite can go down...so can the container running Postgre.

And lastly, actually most services are doing perfectly fine when a data loss occurs. Take a message board for example. Worst case scenario: A post isn't written and someone has to type a few lines and emojis again.

comment 4y ago · link · parent

This video is just gold.

asyncio is probably one of the worst things that happened to programming in the last 2 decades. It's essentially a step backwards, to the technology of the 90s (cooperative multitasking), when a badly written text editor could cause an entire OS to freeze.

comment 4y ago · link · parent

>Typically you'd have all accesses as root in SQLite.

So? It's the backend talking to the db.

comment 4y ago · link · parent

Using https://github.com/mattn/go-sqlite3 for a pet project right now. So far not a single issue with it, I never had to think about any CGO specifics.
1
505152
57