Better HN
topnewbestaskshowjobs
Log inSign up

ReflectedImage

476 karma · joined May 12, 2020 (6y ago) · 570 submissions

Submissions

comment 3y ago · link · parent

That will teach you to do infrastructure as code!

comment 3y ago · link · parent

Might as well be using MongoDB if you are going to use SQLite in prod.

https://youtube.com/watch?v=b2F-DItXtZs

comment 3y ago · link · parent

You can't sell the same tech product forever. Do you think the original iPhone if being sold today would make any revenue for Apple?

comment 3y ago · link · parent

I've seen branded empty boxes being shipped before. There were good financial reasons for it.

comment 3y ago · link · parent

If they used text inside Google Docs for training AI models, they would leak confidential customer information in an incredibility obvious way. So I'm guessing no.

comment 3y ago · link · parent

That's not a "WTF". All front end developers trash their predecessors work and rewrite in the last framework. That just what they do.

comment 3y ago · link · parent

It depends on the company. Some places are very social others not so much.

comment 3y ago · link · parent

Nice I'm working on a project that needs tiles.

comment 3y ago · link · parent

After 7 months of writing a database, you probably learned what your early bad decisions were, so in the rewrite you got to fix them.

comment 3y ago · link · parent

Most attacks are Phishing whether it's from hackers in basements or hackers in secret government bunkers.

At the moment, it's the easiest way into a network. So everyone is doing it.

comment 3y ago · link · parent

The source code output from ChatGPT looks right but that shouldn't be confused with is right.

Maybe the next generation of text AI models will do it :p

comment 3y ago · link · parent

So the tactic is stock market manipulation and PR?

You can't do it, but you can fool idiots on the internet that you can!

comment 3y ago · link · parent

Rust is quicker to learn, does concurrency really really well and sits in the exact same space as C++.

C might survive Rust?, but I think C++ is toast.

comment 3y ago · link · parent

You are not suppose to spamming Rc<RefCell> :p

It's called Single Ownership.

comment 3y ago · link · parent

It's 692 pages, I did it in 5 days, 12 hours per day.

comment 3y ago · link · parent

"Managers are an organisational necessity past a certain scale." That sounds like a dubious claim, I'm sure there are exotic ways to run an organisation that doesn't need managers.

For example, Pirate ships ran with a Battle Commander, Accountant and Crew.

comment 3y ago · link · parent

That's basically impossible since Rust is on a different paradigm of single ownership.

comment 3y ago · link · parent

Rust is Polygolt friendly and fills the same space as C++. I would say things are not looking good for C++ right now.

comment 3y ago · link · parent

Well according to most of that research I'm correct.

See: "Work In Progress: an Empirical Study of Static Typing in Ruby; Daly, M; Sazawal, V; Foster, J."

See: "Haskell vs. Ada vs. C++ vs. Awk vs. ... An Experiment in Software Prototyping Productivity; Hudak, P; Jones, M."

Lisp - A dynamically typed language had the lowest development time by a factor of 2.5x. Seems to be the same figure I'm giving, fancy that!

"He also misses the biggest add of typing your code which is that other people can understand it better."

Nope.

See: "How Do API Documentation and Static Typing Affect API Usability? Endrikat, S.; Hanenberg, S.; Robbes, Romain; Stefik, A."

You need documentation and whilst Java students may study with dynamic typing since they haven't been taught it, it's pretty clear that on it's own static typing provides almost no useful documentation.

"This is often lost on junior programmers..." I'm far more experience than you, which is why I'm calling out the BS.

I think you will find that the research suggests that static typing and dynamic typing have a similar bug rate per line of code.

See: "A Large Scale Study of Programming Languages and Code Quality in Github; Ray, B; Posnett, D; Filkov, V; Devanbu, P"

Once you combine that knowledge with the knowledge that dynamically typed programs have less lines per feature.

Relational Lisp 274 compared to Ada 767 or C++ 1105.

Dynamic typing wins out because the programs are smaller, making them faster to write and contain less bugs per software feature.

The link you posted confirms it.

Do you understand that you are wrong?

comment 3y ago · link · parent

So Generics, Traits, Abstract subclasses, etc... don't exist in static typing?

As soon as the types get complicated, the code bloat begins.

comment 3y ago · link · parent

JavaScript is a badly designed language. It was created on the fly over several decades by browser makers. People prefer to code in absolutely anything else.

WASM will probably kill TypeScript shortly.

comment 3y ago · link · parent

"a proper type checker goes far beyond that"

But if it can't catch 60% of all errors and it can't. Then it's worse than dynamic typing.

This isn't complicated. If you are excluding performance, then static typing is inferior to dynamic typing. It's that simple. No ifs, no buts.

I do write statically typed code but that's for performance critical code. Since I've got good experience of both, I understand the differences very well.

I assure you that using static typing in a scripting language like Python is a mindnumbingly stupid thing to do.

comment 3y ago · link · parent

There is more than one study on the topic. But you can just take a look at the graphs.

Take a look at the "Programming effort" graph and the "Program length" graph.

comment 3y ago · link · parent

You can't get a NaN from a None value in Python. (Duck typing still has rules)

The error you have posted isn't a Python error.

Looking a bit deeper, the error occurs in C++ code. C++ is a statically typed language, last time I checked.

comment 3y ago · link · parent

And yet I eventually provided evidence for what I'm saying and the other party provided nothing at all.

It's not bad faith because you don't like the arguments conclusions.

comment 3y ago · link · parent

The article says that dynamically typed code and statically typed code has a similar number of bugs per line.

It also says that a software feature only needs 1/2.5 lines if you are using dynamic typing.

That means dynamic typing reduces bugs by 2.5x compared to static typing per software feature.

comment 3y ago · link · parent

3% is the right order of magnitude and if it is +10% more than that that wouldn't make any difference. Static typing would still be twice as bad as dynamic typing when it comes to code correctness.

"What if you already know the majority of your bugs, as logged today, could be prevented by a type checker?"

You would be a very bad programmer, since the vast majority of bugs are logic bugs.

"why does C do static typing" Code performance. It needs them to effective map types to registers avaliable on the machine it's been compiled for.

Rust lifetimes are about getting C like performance without the bugs introduced by using the techniques required for C like performance. You could remove Rust lifetimes and get all the same safety, it's just the programs would run slower due to garbage collection.

"So then TypeScript. Let's assume " TypeScript is an obvious bad example since JavaScript is a very bad language since it was hacked together by browser makers over several decades. You could make a dynamic typed equivalent of TypeScript and it would have the same advantages.

"The argument for static type checking is strong" It's incredibily weak it prevents a class of bugs that only occur very rarely in dynamically typed languages (3%). By both increasing your development time by 2.5x and increasing the total number of bugs in your program by 2.5x.

You wanting to believe in static typing doesn't stop it sucking in the context of scripting languages.

comment 3y ago · link · parent

That not a bug that static typing would catch as it is not a type bug.

comment 3y ago · link · parent

Well I'm showing evidence for my position and no one else is. My mind could be changed with evidence. But there isn't any as I'm correct.

comment 3y ago · link · parent

That not even an error, it's an usability improvement.
1
91011
19