Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
kingdomcome50
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
11 ms
·
31.
▲
by
kingdomcome50
5y ago
Eh... Literally every generation thinks the world is going to shit. And yet here we are! In school, my father had to operate his class's Geiger counter while practicing huddling under his desk in fear of a nuclear attack. Then after
32.
▲
by
kingdomcome50
5y ago
Wouldn't it be more accurate to ask how many people, who have had children, regret it because of the climate crisis? Most people are afraid to have kids (even those who ultimately decide to take the leap) - it's a big decision
33.
▲
by
kingdomcome50
5y ago
> an environment that's on the brink of collapse This is such a skewed PoV of the world today. In so many ways the world is the best it's ever been: Poverty, violent crime, etc. (the list really does go on and on). This is es
34.
▲
by
kingdomcome50
5y ago
I wonder if there is any research into the phenomenon (if it even exists!) where people skew attribution of their decisions towards a factor[1] that could be an influence, but actually is not relevant in their decision-making process? I
35.
▲
by
kingdomcome50
5y ago
I agree that 10k hours is often severely underestimated. Maybe if we all collectively phrased it as "2 hours a day for 14 years " the pedagogy surrounding the above might take a different tone.
36.
▲
by
kingdomcome50
5y ago
You are only imagining the case when you have already opened/identified all of the files you intend to work on. Actual workflows diverge significantly from the above. It's a matter of cohesion. Yes, co-locating each of the files (
37.
▲
by
kingdomcome50
5y ago
> The post is showing how using more expressive types can simplify your code This is called "using a type system" and has nothing to do with parsing or validation. You just don't "get it" I suppose. I feel like w
38.
▲
by
kingdomcome50
5y ago
I don’t see any added value of separating pieces of a component into different files. The CSS, JS, and HTML are all logically coupled no matter how you organize them. At best you will achieved a few smaller files. At worst you make workin
39.
▲
by
kingdomcome50
5y ago
> The requirement[0] from the post is for a non-empty list of file paths I'm sure you could imagine my example record containing more keys no? The requirements from the post are arbitrary and could ( should ) be anything that best-i
40.
▲
by
kingdomcome50
5y ago
I understand the purpose of `Maybe`. > In your post the argument to restOfProgram has type [FilePath] but in the post it is (NonEmpty FilePath) so you need to handle the potential non-emptiness of the list everywhere you try to acc
41.
▲
by
kingdomcome50
5y ago
> I'm saying you would always prefer to be handed an instance of an `a` instead of a (Maybe a) since it's more precise. I disagree with this. `Maybe a` is more precise because it more closely represents the actual s
42.
▲
by
kingdomcome50
5y ago
You have the signature for `useCache` wrong. I defined it above (`Cache -> a`). Notice the concrete type... I cannot stress this enough. You do not need to remove the possibility of a value not existing in order to compose a simple, co
43.
▲
by
kingdomcome50
5y ago
No no no. This is right. Inserting layers of indirection doesn't change the inherent coupling that exists between components. Sure you may be able to call it "looser" coupling, but you may also be able to call it a rats nes
44.
▲
by
kingdomcome50
5y ago
I think you are confusing implementation with behavior. That is, I am achieving that same result through different means. I am mostly uninterested in specifically how the configuration string is parsed. It's not really important. Wha
45.
▲
by
kingdomcome50
5y ago
> but avoiding Maybe is more preferable still You can't avoid `Maybe` in this system. It is in the nature of the problem (as it is designed) that the input might not exist (and therefore a list might be empty). The question isn&#x
46.
▲
by
kingdomcome50
5y ago
I understand what the author is doing. I said this earlier but it bears repeating, the author seems to be more concerned with having a concrete type than simpler code. A reference to `Maybe Cache` is good enough (and preferred). The top-lev
47.
▲
by
kingdomcome50
5y ago
You are misunderstanding the system. You can organize the logic into whatever containers you want, but the essence of the system cannot be changed. You are already handling a `Maybe` type because it's possible for your input to not e
48.
▲
by
kingdomcome50
5y ago
> your entire program doesn't live in `Maybe` Well... if your entire program is dependent on some input that may or may not exist at runtime... then it kind of does live in `Maybe`. I have no issue with unwrapping a `Maybe` to thr
49.
▲
by
kingdomcome50
5y ago
There are numerous ways to redesign the function signatures, but I would imagine the simplest would be (again, idk Haskell syntax): getConfigurationDirectories: unit -> Maybe [FilePath] nonEmpty: [a] -> Maybe [a] head: [
50.
▲
by
kingdomcome50
5y ago
But `Maybe` is specifically designed to remove redundant checks for a value that may (or may not) be present! That's the whole point of the monad! It seems rather unfortunate this isn't highlighted (or at least illustrated) doesn&
51.
▲
by
kingdomcome50
5y ago
I understand. But what is purpose of `Maybe`? The reason one would reach to the above construct is precisely to offload (pushing to later) the handling of a value that may (or may not) be present at runtime such that a developer can write
52.
▲
by
kingdomcome50
5y ago
My point is that if you are not chaining `Maybe` then the utility of employing the construct is unobserved. The entire purpose of using `Maybe` is to relieve the client from the need to make checks at every call for a value that may (or m
53.
▲
by
kingdomcome50
5y ago
This is the second time I've seen the link above. And while I agree with the premise, the author clearly does not understand how to properly use the `Maybe` monad (a term that does not make an appearance!). There is little use in wra
54.
▲
by
kingdomcome50
5y ago
> we should be helping developing nations to better manage their plastic waste so that it doesn’t end up in waterways >>I don't know why you say that like it's easy Are they saying that like it's easy? How should it
55.
▲
by
kingdomcome50
5y ago
I find it to be pedantic as well. Sure, all of the code exists in the application layer. But that doesn't really tell you anything about it's relationship to the system as a whole does it? How about we look at vectors of change?
56.
▲
by
kingdomcome50
5y ago
Hard truth coming in: The reason it doesn't work for your company is simply poor management (don't take it personally). What you actually measured is the ability of yourself and the rest of your managers to lead your teams in a
57.
▲
by
kingdomcome50
5y ago
I would expect, given you have described an operation on 3 different data structures using different words, that it would also demand 3 different kinds of syntax/denotation no? Your own language requires as much. Why not JS?
58.
▲
by
kingdomcome50
5y ago
It’s mind boggling to me that an adult human being (who was once 14!) can hold such a ridiculous point of view. You must have simply forgotten what it was like... The behavior of this young child warrants (at most!) a sit down with an autho
59.
▲
by
kingdomcome50
6y ago
I work in the fantasy sports domain with my primary focus building league management/draft software. I am both the "designer" and the developer of the tools I make. And I honestly wouldn't describe myself as someone who
60.
▲
by
kingdomcome50
6y ago
It sounds to me like you are just not the target for something like tailwind. My impression is that you are likely building displays that only require a few different UI components (and probably the ones we all see regurgitated over and ove
More ›