Live data from Hacker News

Cold Showers

github.com

341–350 of 363 posts

Re: Cold Showers

#341
post #264
post #120

Earlier quoted context omitted.

> If you did it would immediately be caught when a test runs anyway. That's the point though. With dynamic typing you would only (hopefully) catch this with manually written tests. With static typing you get that feedback for free at build time.

With static types, every function signature implicitly comes with built-in tests for free.

Not true because anyone can implement just part of an interface and throw "method undefined" for the methods they can't figure out how to implement. This happens all the time.

Re: Cold Showers

#342
post #274

Earlier quoted context omitted.

Yes - in every case it is calling a method on a null reference. And no commonly used statically typed language helps here because they all allow null references. And languages that disallow nulls, if you are one of the 10 programmers on earth working in one of those languages, don't help you because you are dealing with real world data where inputs to your system can be null or not so you end up using some type syste…

> no commonly used statically typed language helps here because they all allow null references This is false. TypeScript, Swift, and Rust are commonly used and support non-nullable references. > those languages, don't help you because you are dealing with real world data where inputs to your system can be null or not so you end up using some type system escape hatch anyway. You don't need escape hatches to deal with…

Typescript, swift, and certainly rust are not common languages by any stretch of the imagination. https://www.tiobe.com/tiobe-index/

Re: Cold Showers

#343
post #274

Earlier quoted context omitted.

> no commonly used statically typed language helps here because they all allow null references This is false. TypeScript, Swift, and Rust are commonly used and support non-nullable references. > those languages, don't help you because you are dealing with real world data where inputs to your system can be null or not so you end up using some type system escape hatch anyway. You don't need escape hatches to deal with…

Typescript, swift, and certainly rust are not common languages by any stretch of the imagination. https://www.tiobe.com/tiobe-index/

If you really think TIOBE is a reasonable way to gauge dev mindshare, fine.

1. Python with mypy has `strict_optional`. On by default.

2. C, being “portable assembler” is not really statically typed.

3. Java has had Optional for years, although it’s not the most pleasant to work with it does exist. And JVM languages like Kotlin go well beyond this.

4. C++ has `not_null`.

5. C# supports type-system enforced non-nullable types since 8.0.

You said:

> languages that disallow nulls, if you are one of the 10 programmers on earth working in one of those languages

I hope it’s clear that you are simply incorrect. There are plenty of tools to eliminate nullable references in modern mainstream languages.

Re: Cold Showers

#344

Earlier quoted context omitted.

I built this decision tree (LightGBM) compiler last summer: https://github.com/siboehm/lleaves It get's you ~10x speedups for batch predictions, more if your model is big. It's not complicated, it ended up being <1K lines of Python code. I heard a couple of stories like yours, where people had multi-node spark clusters running LightGBM, and it always amused me because by if you compiled the trees instead you could ge…

Wow, very interesting, thanks for this. Daily batch predictions is all we do. I’m the maintainer of miceforest[1], do you think this would integrate well into the package at a brief glance? I’m always looking for ways to make this package faster. [1] https://github.com/AnotherSamWilson/miceforest

I had a brief look at your package, and my impression was that it's only changing model training. If this is correct then the format of the model.txt (calling `lgbm.save(model, "model.txt")`) is the same as regular lightgbm. This would mean you can use my library for inference.

Re: Cold Showers

#345
post #8

Earlier quoted context omitted.

Most Times I can't bring myself to get into a cold shower. If I start warm I can cool down from there. Is there a way to start cold and go even colder?

The way to start cold is to stick your head/face directly in to start the shower. That gives you the strongest mammalian dive response. Not sure if that offsets any of the cold shower benefit though. https://en.m.wikipedia.org/wiki/Diving_reflex Edit: This is also the time of year to do this, while the tap water is probably warmer and your house is warmer. I wouldn't try to acclimate in winter.

This works great. Just tried it on two occasions. The shower doesn't even feel as cold.

Re: Cold Showers

#346

Earlier quoted context omitted.

no idea of $ but say they'd get 5000€ a month (quite OK for most places europe), the company would need to pay out a bit more here (for some tax/social benefit things), 7000€ would be pretty realistic, so 4 developers could be hired. This then means that while op wouldn't immediately add 1M ARR, the original dev and the new devs could soon add 5M ARR (stupid extrapolation, it won't be as much in practice, at least no…

I think you underestimate European taxes as an employer. In general it costs 2x to employ people in my experience. Taxes and social security contributions are massive

No I don't, I'm employed in Europe in a leadership role and thus talk with the CEO about salaries and general money flow, and I'm also able to read my pay slip, which is quite detailed and also lists all "Lohnnebenkosten" (side/extra costs for employer on top of my brutto money), iow. what the employer really pays.

Re: Cold Showers

#347

Earlier quoted context omitted.

no idea of $ but say they'd get 5000€ a month (quite OK for most places europe), the company would need to pay out a bit more here (for some tax/social benefit things), 7000€ would be pretty realistic, so 4 developers could be hired. This then means that while op wouldn't immediately add 1M ARR, the original dev and the new devs could soon add 5M ARR (stupid extrapolation, it won't be as much in practice, at least no…

Please note that in many places 5k€/month is a huge sum of money for a salary. Even in western Europe, and in France more specifically, many devs i know are payed 1-2x minimum wage (i don't know a single IT person earning 5k€/month although i'm aware they exist). In France, minimum wage is about 1500€/month (before taxes), to which you add about as much professional taxes and contributions from the employer. Accordin…

I'm working currently in Vienna, and 5k is a wonderful salary for Vienna living standards, don't get me wrong, but it's also really not unheard of if you're good and/or working in a senior role.

In Austria, the "IT Kollektivvertrag" [0][1] (think contract for the whole IT collective/unions) demands a minimum of €2503 brutto (before taxes) per month for developers (those are normally falling under ST1 category), and that 14 times a year, and that's for entry level (as in, not first job but starting at a company). Note also the 14 times a year, where the last two extra salaries (Christmas pay for December and vacation pay for June) is taxed much less (note, we can get bonuses on top of that too).

[0]: https://www.wko.at/service/kollektivvertrag/kv-abschluss-inf...

Note for above PDF (only the short money table the full one can be easily found via searching "Austria IT Kollektivvertrag 2022"):

- The ST1 is for devs, and LT1 for leadership roles.

- "Einstiegsstufe" is Junior, "Regelstufe" is "normal" and "Erfahrungsstufe" is Senior

So if you get hired as senior in a leadership role you'd be entitled to €5521 Brutto salary, 14 times a year, or more depending on your experience/knowledge and your negotiation skills.

Re: Cold Showers

#348
post #120

Earlier quoted context omitted.

It is not evident to me. Having used both statically typed and dynamically typed languages my experience is that I can't remember ever seeing a bug in our fairly large rails app that a type system would catch. Nobody's passing strings where hashes are expected, or Widget instances where User instances are expected. The thing to pass to the function is nearly always self evident. If you did it would immediately be cau…

> If you did it would immediately be caught when a test runs anyway. That's the point though. With dynamic typing you would only (hopefully) catch this with manually written tests. With static typing you get that feedback for free at build time.

Even faster, at "type time" if you use any decent IDE.

Re: Cold Showers

#349
post #264

Earlier quoted context omitted.

With static types, every function signature implicitly comes with built-in tests for free.

Not true because anyone can implement just part of an interface and throw "method undefined" for the methods they can't figure out how to implement. This happens all the time.

> Not true because anyone can implement just part of an interface and throw "method undefined" for the methods they can't figure out how to implement. This happens all the time.

How would that pass any code review, regardless of static or dynamic typing?

Re: Cold Showers

#350
post #296

Earlier quoted context omitted.

Maybe I’m not understanding where you’re coming from because as far as I can tell a ‘lfdkjsj’ and a ‘skfjwb’ which are both an IItem, or both a IWhcjwp, is easier to work with than the dynamic alternative. Regardless of how poorly named a variable is, in a static ruling system what you see is what you get, where as in a dynamic typing system what you see could be anything at runtime. The only citation I have is the t…

> in a static ruling system what you see is what you get, where as in a dynamic typing system what you see could be anything at runtime. What you see in a statically typed language: IBlaha blah. What could blah be? An IBlaha. What could IBlaha be? Anything! The type has not gained you anything. > The only citation I have is the tenuous grip I have on my own sanity That's an argument from authority where you are the a…

>What could IBlaha be? Anything! The type has not gained you anything.

You're confusing Java-type extreme (and also mostly strawmanned) application of OOP with static typing.

Not every type in your program has to be AbstractFactoryProxyBeanInterface, and if you don't write code like that it's either obvious or some kind of extension interface for non-core code.

Post reply on HN