Earlier quoted context omitted.
I am curious for why people say this as in my experience when writing a function in a dynamic language that takes a variable as a parameter: The function will generally only work on a subset of types for given variable. If I don't check the type of the variable in the function, the function will not behave as you might expect, e.g. silently fail or crash. If I do check for every possible type for a given variable: I…
> The function will generally only work on a subset of types for given variable. This is true for many functions defined in statically typed languages too. Just because your function says it works with an integer, doesn't mean it's necessarily going to work with _any_ integer (think `1/n`). Very often the type used isn't narrow enough. Modern dynamic languages understand this, see for example Clojure's spec[1]. [1] h…
Cold Showers
151–160 of 363 posts
Re: Cold Showers
#152> Hype: "Identifiers should be self-documenting! Use full names, not abbreviations." Most names aren't particularly good - especially when someone tries to make them sound like a full sentence. My experience is that at around four words they start getting less accurate. At seven I would probably read more from an interpretive dance about the function in question.
Re: Cold Showers
#153Earlier quoted context omitted.
Are you sure all statically typed languages are slower to develop in than comparable dynamic ones? I used to be thoroughly convinced this was true, but 3 things are now making me doubt it: 1) Statically typed languages with inference don’t require time spent writing signatures. 2) I know I’ve spent time chasing down bugs in dynamically typed software that would have been caught by a type checker. 3) I also know I’ve…
> 1) Statically typed languages with inference What are some strong examples of this? Haskell does an amazing job with it. Java technically supports some amount of inference, but it doesn’t reduce verbosity by all that much. Apart from those I haven’t run into it.
Re: Cold Showers
#154Earlier quoted context omitted.
Are you sure all statically typed languages are slower to develop in than comparable dynamic ones? I used to be thoroughly convinced this was true, but 3 things are now making me doubt it: 1) Statically typed languages with inference don’t require time spent writing signatures. 2) I know I’ve spent time chasing down bugs in dynamically typed software that would have been caught by a type checker. 3) I also know I’ve…
> 1) Statically typed languages with inference What are some strong examples of this? Haskell does an amazing job with it. Java technically supports some amount of inference, but it doesn’t reduce verbosity by all that much. Apart from those I haven’t run into it.
Re: Cold Showers
#155> Benchmarking cutting-edge graph-processing algorithms running on 128-core clusters against a single-threaded 2014 Macbook Pro. The laptop consistently wins, sometimes by an order of magnitude. LOL, this hits close to home. My company had a modeling specific VM set up to run our predictive modeling pipelines. Typical pipeline is about 50,000 to 5 million rows of training data. At best, using an expensive VM, we mana…
There are some data sets where you really do need big-data tools, but it's for when you have petabyte-scale data, not megabyte/gigabyte-scale data.
Re: Cold Showers
#156Earlier quoted context omitted.
Hard disagree. Dynamic typing only increases development speed for the first few thousands lines of a solo programmer project. After that it is, in my personal experience, a significant drag on development speed. Furthermore, dynamic typing makes modifications and new features significantly harder to write. Turning compile-time bugs into runtime bugs is a catastrophic decrease in development speed. That’s my personal…
taps temple That's why you keep code encapsulated as much as possible in separate files/classes up to like a thousand lines. Any more will be unreadable anyway. > dynamic typing makes modifications and new features significantly harder to write Depends on what you're doing I suppose. Adding a parameter to an object? With dynamic typing you just add it to the object in literally any location, no issues. With static ty…
Re: Cold Showers
#157For me the biggest advantage of static typing is that it allows to safely refactor code. Without it even with extensive unit test coverage refactoring often is just not an option.
So many people in the thread saying this. But in my experience refactoring large code bases in both Java and Javascript, it's roughly the same. Ultimately the real answer will have to come from a peer reviewed study, because as the post suggests, these sorts of things are not as intuitive as people think
Granted this is personal experience and I may be simply not careful enough to do untyped refactoring, but few people I talked about that shared the experience.
Re: Cold Showers
#158Hype: Cold showers are good for you (good stress) Shower: keybored, your shower is not cold enough to induce stress and you are too lazy to modify the showering experience in any way Caveats: Other people may be anti-lazy enough to modify the showering experience Notes: Check yourself
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?
Edit: looked it up. 30min-2hr for hypothermia at that range. Typically I take a 15-20 minute shower, so only flirting with hypothermia.
I love a hot, hot shower. Best advancement in technology in the last thousand years
Re: Cold Showers
#159Earlier quoted context omitted.
So many people in the thread saying this. But in my experience refactoring large code bases in both Java and Javascript, it's roughly the same. Ultimately the real answer will have to come from a peer reviewed study, because as the post suggests, these sorts of things are not as intuitive as people think
Does your JavaScript require higher test coverage to achieve the same level of safety?
Re: Cold Showers
#160Earlier quoted context omitted.
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.
So in short, jump into a pool instead?