Better HN
topnewbestaskshowjobs
Log inSign up

ReflectedImage

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

Submissions

comment 3y ago · link · parent

Static type checking takes a long longer developer time wise and does a much worse job than unit tests.

comment 3y ago · link · parent

So I think you are running on a false premise here efarrer.

The false premises is that anyone ships bug free code. It can be done but it's stupidly expensive. Formal methods Z proofs, etc.

Unit testing and static typing are 2 different techniques which eliminate bugs.

The question that needs to be answered is which of the 2 techniques is the most effective per developer hour spent.

Unit tests do not caught all the bugs that static typing would catch nor does static typing catch all the bugs unit tests would catch. That's not an useful observation.

Nor is there a moral here that you should be doing both, doing both is expensive and costs $$$.

comment 3y ago · link · parent

If you spent a day writing unit tests you will eliminate more bugs than if you spent a day writing types.

And that's all that matters. Unit tests are the more effective technique.

Yes obviously static typing doesn't catch all the bugs caught by unit tests or vice versa. But it's a meaningless thing to say.

comment 3y ago · link · parent

Actually, you can just have a public version of a struct and a private version of a struct with more fields.

You can give callers the public version and then cast it to the private version for internal usage.

comment 3y ago · link · parent

That's hardly relevant. The bureaucracy will increase until the company goes bankrupt.

comment 3y ago · link · parent

It's really simple, the fake review bots only operate at certain times.

Just look when the review was made and if the day it was posted on contains an "a" then it's fake.

comment 3y ago · link · parent

In a startup, time to market is everything.

comment 3y ago · link · parent

Yes but "Did it work?" can be discovered faster than "Should it work?". This means companies that ask "Did it work?" are more commerically competitive than companies that ask "Should it work?". The companies that ask "Should it work?" will eventually be eliminated by the market place.

comment 3y ago · link · parent

Most Kernel devs are Python devs.

You ship C code which is extensively tested by Python code.

Python is simple to use, got good C interop and the performance of your test frameworks hardly matters.

comment 3y ago · link · parent

It was known that Trump would win before the primaries started. Therefore how could it have been fair?

Mate the odds at that time were ridiculous. Don't think people in the betting industry don't know this stuff.

comment 3y ago · link · parent

"all the classes"

Write simpler code, let go of the complex Java class hierarchies.

No one can understand them, it's hard to reasonable them and they are mostly a mess.

The point of Python duck typing is you do more by writing less code.

comment 3y ago · link · parent

"Others take 30 minutes"

If you knew what you were doing with Python, you wouldn't have this problem. Obvious solutions include unit tests and pickle.

comment 3y ago · link · parent

It's better in the context of a programming language designed to use it.

comment 3y ago · link · parent

From that statement, I'm not convinced you know Python nor Rust.

I'm going to suggest you read the following: https://docs.pytest.org/en/7.3.x/ https://doc.rust-lang.org/rust-by-example/testing/unit_testi...

comment 3y ago · link · parent

This may shock you but there is effort involved in learning how to use Python effectively.

comment 3y ago · link · parent

When you couple that with an interpreted language with no compile time, finding the answer to did it work is often faster than should it work.

Using Duck typing in a scripting language is the correct choice.

comment 3y ago · link · parent

Please don't.

This is about people trying to use the wrong typing system "static typing" in a language that already has a better typing system "dynamic typing".

This is about bad programmers who have come from Java and want all other programming languages to look like Java.

comment 3y ago · link · parent

Python scales fine as long as you know microservices.

The issue is people assuming that they don't need to learn anything new to use Python.

You got people stating that using static typing in a dynamically typed language like Python is a good or reasonable idea. It's not.

But people don't want to put in the effort to learn things like dynamic typing and microservices.

comment 3y ago · link · parent

Iterating in Python is always faster than iterating in Rust. If you do indeed find what you are saying then you simply speaking aren't able to write Python code.

comment 3y ago · link · parent

Of course, statically typed code is usually around 3 times the number of lines of code as it's dynamically typed equivalent.

This is due to lots of boilerplate, complex types, usage of abstract base classes, adding code for testing purposes into the production codebase due to disregarding language features such as mocking, etc...

The development time and bugs in a program are directly proportional to the total number of lines written.

You write 3x the number of lines of code using a verbouse code style then you have 3x the number of bugs. Static type checking only catches around 5% of bugs. It's not a significant debugging tool.

If instead of writing static types and all the involed boilerplate required to make it work, you instead invested that type in unit tests and proper qa, you will always come out ahead.

comment 3y ago · link · parent

Using static typing in Python will generally speaking significantly increase the number of bugs in the codebase.

comment 3y ago · link · parent

I worked at a betting company, someone attempted to place a $100,000 bet on Trump winning before the start of the primaries.

How exactly wasn't it rigged?

comment 3y ago · link · parent

It's old tech that lowers local air quality, gives kids asthma, etc, etc.

Not exactly sure what the problem with cooking with electricity is.

comment 3y ago · link · parent

I think you do a Skill Based CV instead.

comment 3y ago · link · parent

nicenewtemp84 believes that large companies layoff engineers based on skill.

The truth: Eenie meenie miny moe

comment 3y ago · link · parent

Cloud

comment 3y ago · link · parent

The limit is £16,000 and it's reduced after £10,000

comment 3y ago · link · parent

I'm just trying to point you in the right direction.

Dynamically typed microservices is where it is at.

comment 3y ago · link · parent

Untyped code bases with microservices are the best code bases out there by far.

They are exceptionally easy to refactor, add-in new parts, etc.

The keyword is microservices, you need to know how to do proper microservices if you are using untyped code.

comment 3y ago · link · parent

Well no since unit tests run faster than build time.
1
789
19