HNHacker News
TopNewBestAskShowJobs

almostdeadguy

400 karma · joined May 5, 2018

carls junior developer
submissionscomments
almostdeadguy··on Linear – A fast issue tracker
You're not wrong about incentives, but an org where PMs have fully segregated duties from devs is exactly the organizational context that breeds disconnected engineers juicing their burndown chart. I mean what do you think is the predictable outcome from a PM whose main job is googling his competitors and stuffing high fantasy JIRA tickets in the engineering backlog based on his mystic customer divinations. Neither of these people has made contact with a customer in their lifetime.
almostdeadguy··on Driving engineers to an arbitrary date is a value destroying mistake
If your product development process constantly places you into dilemmas where a development effort requires a commitment to cost and timeline that could damage the company if either is overshot, they either:

A. aren't testing enough / at all or haven't given any consideration to what is the smallest change needed to deliver value

B. have serious organizational problems around coordination

C. are running a company completely unsustainably

almostdeadguy··on Why I Prefer Functional Programming
I assume you're referring to the definition of OOP coming from the Alan Kay quote: “OOP to me means only messaging, local retention and protection and hiding of state-process, and extreme late-binding of all things."

This definition includes nearly every language with modules, polymorphism, and depending what counts as message passing might either dis-include statically typed languages, languages without a defined model of concurrency that disallows shared mutable state, or languages without message passing library support.

If that's what canonically counts as OOP, there's no straw-manning going on here, the discussion is just a comparison against a pretty well-defined category of programming languages with different features that are often described as and understood to be object-oriented.

Whenever people bring this up I often hear that Erlang is supposed to be the canonical object-oriented language, and if that's the case, I'm not sure how we could call this discussion straw-manning, because it's just talking about totally different languages.

almostdeadguy··on TypeScript 3.6
There is no way any of this process takes less time to solve than "I got a red squiggle in my editor and fixed the variable spelling". I don't think typos are really the only things type systems fix (type systems provide powerful ways of preventing screw-ups by allowing you to encode invariants about a piece of data and how it may be used), but if typos are indeed the extent of it, it seems unimaginable to me that the process to fix would be faster by going through code review -> CI pipeline -> deploy and then back again, no matter how fast it is to revert a change in production. Honestly that's just the compile-time safety advantage of types, half the time saved in typescript is just not spending time having to read someone else's source code to figure out how a function may be used because cowboy js devs were too lazy to document them (knex is an especially egregious offender in this regard that I thankfully don't have to use anymore).
almostdeadguy··on TypeScript 3.6
I think “debugging errors in prod” is not generally how I like to spend my working life, with or without excellent logging and tooling for surfacing errors.
almostdeadguy··on [dead]
lol this is one of the most embarrassing attempts at an "I'm not fired, I quit!" letter ever. Not exactly sure what happened here, but the paragraphs of ranting about the left and the incoherent tirade about Jews in Germany that borders on "The Protocols of the Elders of Zion" type stuff makes it clear he was in the wrong.
almostdeadguy··on Pentagon testing mass surveillance balloons across the US
The site guidelines and moderation policies are intended to steer the comments towards as prissy, non-critical, de-politicized conversations as possible. Anger is a perfectly reasonable part of political discourse, and political discourse and thought is an important part of being a person in the world w/ agency. I think most would agree that there's a "beating a dead horse" point in comment sections, but the amount of preemptive moderation of anything mildly heated about politics is goofy, and not actually conducive to the goal of making a place for conversation that's "intellectually curious" or whatever. There is no topic that can be discussed in a political vacuum, and there's no conversation that's politically honest if there's not a little bit of struggle, but the mods on this site treat that like its a 5-alarm emergency.
almostdeadguy··on Many Americans who live paycheck to paycheck blame debt
The first set of numbers are of first-time buyers who managed to buy. That doesn't really speak to housing being affordable, it speaks to what circumstances people must be in before they feel comfortable buying. Median personal income is about half that [1].

[1]: https://fred.stlouisfed.org/series/MEPAINUSA672N

almostdeadguy··on English speakers should learn math instead of a second language
> Opportunity cost is an open-ended economic term, not some obscure math or physics arcana, and it's core is all about preferring one option over another after an assessment (of what you lose by not going with the other, etc).

lol I know its not arcana or hard math, but framing a decision people regularly make in life without any means of holistic assessment or accounting for the options like its a micro-econ problem if you just informally mean "make a judgement call", is the type of terminology abuse that's the hallmark of a pseud.

> but not everybody uses it well. Many waste efforts on multiple things ("jack of all trades"), others chose the thing that makes them worse off professionally or personally over better options open to them, etc.

And this is at the root of my objection to this, what could you possibly mean here by "not everybody uses it well"? To what or whose criteria can you possibly make such an assessment?

> So, that's the point I was making: choosing math over Chinese (as the author suggests) can work out well from a O/C perspective. Understanding math better is more approachable than learning a language like Chinese adequately to make anything of it, and can have a wide impact (especially to a programmer, but also in personal life, business decisions, etc).

You might fall in love with a Chinese national and want to learn your partner's native tongue. You might have your life wholly changed by a work of Chinese literature. This is why this whole framing is utterly insane, there's no way to account for all the ways your life might be bettered by both these pursuits. Why even make some facile pseudo-analytic attempt. It's just dumb STEM dick measuring to pretend like there's a way to assess this.

almostdeadguy··on English speakers should learn math instead of a second language
If we're talking about "opportunity cost" in a very fuzzy "you made an assessment that prefers another option" kind of way that's fine (though its goofy HN pseud-speak, but w/e), but it's also completely unhelpful in a discussion about what to focus on learning. To your point, everybody lives life this way, there's really no other way to live life than to make judgements, so why respond w/ that unless you're actually making some more targeted point about only learning things that provide you the highest utility.
almostdeadguy··on English speakers should learn math instead of a second language
> It's not naive to try and optimize learning to help maximize a fulfilling life. The time in life to learn is finite and therefore choices have to be made.

There's lots of enjoyment to be had in learning things that aren't immediately (or even remotely) useful, and there's often a lot of unanticipated utility in learning things that are pursued for pure enjoyment. There are entire fields in mathematics that were/are pursued for personal enjoyment and later proved to be incredibly useful (or might never be!).

> Not every subject has equal importance. It would also be naive to think every subject or skill has equal relevance to a particular person's life and therefore one can just choose randomly.

I'm not saying you need to choose your pursuits randomly or without account of the time they take, but I think making these choices only for monetary gain or purely on some basis of what utility you think they'll provide is a pretty joyless existence in either case, and w/ the latter consideration is a pretty naive accounting of your ability to meaningful assess an "opportunity cost". Leisure activity, learning for learning's sake, broadening your cultural horizons, etc. are all worthwhile things in my book.

If you're talking about opportunity cost in a fuzzy "there are other things I'd rather learn, or some particular thing seems more useful to me now" kind of way, that's a goofy metaphor and an unhelpful insight in the context of offering advice about what things to learn.

> (I learned that lesson very late in life. In my 20s, I was very careless and carefree about what I learned and I squandered away a lot of valuable years. I wasn't discriminating enough about the topics I spent time on.)

Without any context into what you think was squandered by learning other things, it's impossible for me to appreciate your POV on this, but it seems unlikely to me that you lost all that much.

almostdeadguy··on English speakers should learn math instead of a second language
Okay if you want to treat life like an RPG you need to minmax the right skills in, fine. That's a very strange, naively calculated, and from my perspective, totally unfulfilling way to live life.
almostdeadguy··on Chicago, where rich live 30 years longer than the poor
You're a mod here and you're going to police a snarky reply to a racist comment? Interesting priorities.
almostdeadguy··on Haskell Fan Site
Monadic IO allows you to reliably sequence IO operations, but the results of those operations are not produced until their results are forced. Here's an example of the problems with this: http://dev.stephendiehl.com/hask/#lazy-io . It's not really a language flaw, but more of a design flaw of the functions in base.

Almost nobody uses lazy IO anymore though. Most IO is done w/ strict IO functions from the bytestring library and often with stream processing libraries like conduit or pipes.

almostdeadguy··on Myths about Testosterone
lol and then left this useless comment just to make sure everyone knew your opinion anyways.
almostdeadguy··on Types and Tests
There's nothing wrong w/ polymorphic functions, but there has to be a reasonable rule to apply for what kinds of shapes of data are permitted. Trying to aggressively handle unforeseen cases instead of indicating an error doesn't actually help anyone, it's akin to swallowing exceptions. It's why falsey values and automatic type conversion are some of the most problematic features in javascript.

Your example of how to handle max for array arguments is exactly the kind of thing I would discourage in js code, because it overloads the meaning of "maximum" to data that don't have a natural way of assigning an ordering if heterogeneous arguments are permitted (actually it sounds like you're saying something like max([1], [9]) should return "9", which doesn't correspond to an intuitive understanding of "maximum" at all given it returns something that isn't either of the passed arguments). Whereas the rust code can use the "PartialOrd" trait to ensure we only try to produce a maximum of like elements with a defined ordering relation. That's fine for a limited number of cases where its easy to show type equivalence in js, but I think it's problematic as a general design principle, and because you don't have ways to express the limits of polymorphism I've seen this kind of thing proliferate to unsafe uses of a function very quickly.

almostdeadguy··on Types and Tests
The max value of what? The array in one of the arguments? What if there are two arrays? Or an array and a number? Or a multi-dimensional array of numbers and any of the above?

I think this attempt to come up w/ reasonable interpretations for unanticipated usages of a function is kind of a rabbit hole. Beyond that I think it's also problematic to assume that all usages of a function in a language without a type system are intended usages, i.e. that programmers _mean_ to pass arrays whenever an array appears as one of the arguments.

almostdeadguy··on Types and Tests
You can have types in haskell that represent finite length lists. Here's a blog post giving an overview of several methods of doing so (and several examples of libraries in the wild that provide this): https://blog.jle.im/entry/fixed-length-vector-types-in-haske...

There's a tradeoff here between generality and how important it is to encode all invariants about a piece of data. Many haskell list processing functions are expressed in terms of right folds, which makes infinite lists fairly unproblematic to work with so long as only part of the list is demanded in the end, however for some cases you may want the type system to ensure you can't receive an infinite list.

almostdeadguy··on Why GitHub used Haskell for Semantic
> Do you think it would be dramatically improved if Haskell had a bigger community of people contributing user-friendly libraries and tutorials? That was something that made Ruby the perfect newbie language for me. And something I feel is downplayed in Haskell given it's more advanced user base who is a little too obsessed with it's power and demonstrating their knowledge as such, rather than help make it accessible to others.

Absolutely. I think it's been getting better at that on the tutorial front. For a long time there were very few books I'd actually recommend for haskell, but Haskell Programming from First Principles [1] changed that for me (personally). And I think Stephen Diehl's excellent What I Wish I Knew When Learning Haskell [2] is a fantastic general resource for newbies. But I think the community could stand to have more of this, absolutely.

And I definitely agree about libraries. I'd like to see more haskell libraries with extended tutorials, and written w/ a non-expert audience in mind. I think the community has for so long been dominated by long-time haskell developers and people ensconced in functional programming, much of the documentation is written for those kinds of people.

[1]: http://haskellbook.com/

[2]: http://dev.stephendiehl.com/hask/

almostdeadguy··on Why GitHub used Haskell for Semantic
> I agree. You master monads and IO, but then you want to use a web framework and there a bunch of other category theoretical concepts and/or Haskell advanced features you need to understand to serve up "Hello World". Compare that to expressjs.

I started using haskell at my last job after having done a couple years of functional programming in scala, but I honestly never found it required that much knowledge of category theory. The FAM trio of classes (functor, applicative, monad) are the most common ideas used from category theory in an explicit way, and they're frankly so prevalent at this point in the industry at large that they're in basically every language in extremely common libraries. Most programmers are pretty familiar w/ map and bind (which is also sometimes called flatMap, then, and_then, or chain). Applicative functors might be a little more exotic, but they're easy to pick up if you understand the other two. And I don't think you really need to understand what a morphism is or how to read arrow diagrams to really use any of these things. If you can use arrays in javascript, you can use the IO monad.

Most of the challenge in haskell for me was figuring out stuff like how I should structure my code to enable mocking out effects for testing (there's multiple answers to this w/ different tradeoffs), or how to get good editor support without ghc-mod breaking. I haven't used haskell in industry in about the past two years, but I imagine these are still some of the biggest challenges w/ using it.

almostdeadguy··on Rust Patterns: Enums Instead of Booleans
Switch in C/C++ doesn't enforce mutual exclusivity though. You can forget a "break" statement and fall through multiple cases.
almostdeadguy··on Rust Patterns: Enums Instead of Booleans
This comes up quite a bit in functional languages in the ML family (which all have ADTs like rust). Bob Harper's blog had a post about this called "boolean blindness" (which seems to be locked now?), but you can find a summary of it here: https://shreevatsa.wordpress.com/2015/01/31/boolean-blindnes...
almostdeadguy··on The Treaty That Forced the Cherokee People from Their Homelands Goes on View
I think it's a little telling when people think slavery, imperial conquest, genocide, etc., which are features of a society designed by people who are avowedly in favor of Democracy, does not create a contradiction. You can either acknowledge the contradiction and resolve one end of it, or the word itself is incoherent.
almostdeadguy··on The Treaty That Forced the Cherokee People from Their Homelands Goes on View
We should stop praising and erecting monuments or memorializations to murderers and slaveowners and teach and accept how this nation was founded by them, not pretend like this is a nuanced issue.
almostdeadguy··on JavaScript debuggers are broken
> Like what are you validating that your tests aren't? Why aren't your tests validating it?

Your tests are probing your code on a narrow range of inputs (or if you're using something like property testing, potentially a larger but still finite range) drawn from the valid state space that is almost always too large to actually verify. They're also themselves pieces of code that itself can have bugs. Formal methods can prove properties about code, but usually w/ a much larger investment of time.

> The need for a debugger is a symptom of a sick system. I have never required a debugger on a healthy system.

I think people who say stuff like this are probably a little in denial about how many bugs they've actually written and how difficult it is to get any kind of certainty about the correctness of their code. Programmers write bugs, why are we policing the tools they use to fix them?

almostdeadguy··on Red Hat Satellite to standardize on PostgreSQL backend
That's generally a good practice (though not always, many people do blue-green deployments, for instance), but it's rarely an assumption you want to make. Lots of deployment blunders can happen that render assumptions like that incorrect.

Even if your team executes perfectly and never runs into this, the biggest problem IMO is that you can't really enforce most of your guarantees w/ any degree of confidence w/o a typed schema. Even if you work within a typed language that perfectly validates all the invariants of your application before storing anything, the second you need to perform work that does not strictly funnel data through your application (i.e. an update query), you are effectively gambling on whether or not those invariants will hold. This kind of "read-modify-write" flow of data doesn't really perform well (or even hold validity) for a lot of common use cases, so in reality you need your database to ensure these things for you.

Also the two deployed apps problem is just a special case of two people interacting w/ a database who aren't working under the same assumptions as to what invariants should hold. That can happen in single code bases, even with a lot of care taken.

almostdeadguy··on Red Hat Satellite to standardize on PostgreSQL backend
It's extremely common to validate a piece of data not on its own, but how it relates to other pieces of stored data. Without transactional semantics, an application basically can't enforce these invariants w/ any reliability (or those semantics need to be ensured out of band, or w/ little data modeling tricks that tend not to scale well).

There certainly are invariants that are non-trivial or cumbersome to enforce strictly with a schema, but you can really only enforce them w/ a database that provides serializable transactions.

In many cases, schematization of data in the database is good for other reasons though (for instance, guaranteeing type-normalized data in the presence of multiple deployed versions of an app via accident or otherwise, ensuring your queries and updates are typesafe, etc.)

almostdeadguy··on The impact of homelessness and the opioid crisis on San Francisco streets
lol I think if you try hard enough you can think of other features of these cities that might be to blame.
almostdeadguy··on Go Modules in 2019
Cargo (in the nightly channel, but eventually will become stable) and npm can both use alternative package indexes and vendored dependencies, so they are not tightly coupled. Having a standardized package index as a database is what allows efficient dependency solving, which Go hasn't considered providing up until recently.

> that anyone should be able to publish their code on any server, in contrast to central registries such as Perl’s CPAN, Java’s Maven, or Node’s NPM. Placing domain names at the start of the go get import space reused an existing decentralized system and avoided needing to solve anew the problems of deciding who can use which names. It also allowed companies to import code on private servers alongside code from public servers.

lol statements like this are infuriating. Go is no more decentralized than those languages, unless you consider git hosting something people in standard practice do on their own (survey some of the top Go dependencies and see if that holds true). They simply lack a package index, but the cited language package managers both have those and allow you to host your own.

almostdeadguy··on Go Modules in 2019
The kinds of parametric polymorphism implementations mentioned here do not represent the full set of options. Charitably this represents an ignorance on the part of the Go developers, but really it has felt like an apathy towards the field of programming language design and research. Intensional polymorphism (basically passing the type of a parametric argument as a parameter, and either using a specialized implementation of the function or one that operates over a boxed value) has been known about for years and is used in languages like Haskell: https://www.cs.cmu.edu/~rwh/papers/intensional/popl95.pdf
← PreviousPage 8 of 10Next →