HNHacker News
TopNewBestAskShowJobs

danparsonson

4,546 karma · joined October 27, 2009

submissionscomments
danparsonson··on Ask HN: Do you also "hoard" notes/links but struggle to turn them into actions?
Sure I'll try to take a look
danparsonson··on Show HN: I trained a 9M speech model to fix my Mandarin tones
Wholeheartedly (or maybe downheartedly?) agree with this - sometimes I try to say the simplest things and people just stare at me like I'm speaking Martian. Which I suppose I might as well be! One of my big problems is implicit use of tones for things like expressing uncertainty; that's a very difficult habit to get out of.
danparsonson··on Ask HN: Do you also "hoard" notes/links but struggle to turn them into actions?
That is an interesting film/TV watch list, I might have to harvest that for my own!
danparsonson··on Ask HN: Do you also "hoard" notes/links but struggle to turn them into actions?
+1 for this - I have a ton of links saved up and a system that stored them in a searchable list, saved a copy of each site (PDF would be good enough), and then fed it all to an LLM that could give me relevant info when I needed it, would be ideal. I'm planning to try something like linkding for the first two, if I can find the time.
danparsonson··on Iran's internet blackout may become permanent, with access for elites only
They certainly wouldn't be the first regime to violently suppress millions of its own people.
danparsonson··on How I estimate work
It's a next-word-prediction-machine, not a calculator. It's not aware of the passage of time, or how long things take, and doesn't reason about anything. It's just very good at putting words together in combinations that look like answers to your inputs.

That's really useful for some tasks, like regurgitating code to perform a specific function, but it's basically useless for jobs like estimating schedules.

danparsonson··on Why some clothes shrink in the wash and how to unshrink them
That's happening to me too! My trousers are selectively shrinking around the waistband, it's weird...
danparsonson··on Don't fall into the anti-AI hype
Agreed - as I see it, it's akin to the transitions from machine code -> assembly language -> C -> Javascript. As time went by, knowing the deep internals of the machine became less and less necessary, even though having that knowledge still gives an engineer a useful insight into their work and often makes them better at their job. The goal remains the same - make the computer do the thing; only the mechanism changes as the tools evolve.

"-> AI" is just the next step along that journey. Maybe it will end at "-> AGI" and then humans will engage in programming mostly for the craft and the pleasure of it, like other crafts that were automated away over the ages.

danparsonson··on How will the miracle happen today?
I'm gonna diverge a bit from the overall mood here a bit, and say that I think the premise of this is trash.

His thesis seems broadly to be that by accepting gifts whenever they're offered, he is making the world a better place - opening himself up to kindness somehow encourages kindness in others. This is nonsense and totally backwards. What he's doing is just soaking up a whole world of goodwill and generosity, and giving basically nothing in return. "Paying it forward" is a chain - people do nice things for each other in the hope that the recipients of that goodwill will provide similar generosity to others in the future and together we make the world better for all of us. It's socialised good will - creating a rising tide that lifts all of our boats. The author of this piece has instead acted as a kind of capitalist, moving into a space with abundant resources (i.e. the generosity of others), and harvesting as much as he can, wondering at how much resource there is available for him to take, marvelling that others leave it there for him when he would likely not do the same, and patting himself on the back for taking it so that more can flow into the space.

It's somewhat akin to high frequency traders claiming that they benefit markets by providing liquidity.

Maybe we should all just follow his example, and then none of us would have anything left to give each other. Narcissistic nonsense.

danparsonson··on The Vietnam government has banned rooted phones from using any banking app
It's Pixels only at the moment; the GOS team are apparently working with another hardware vendor to produce a suitable device, but that's still a long way off.
danparsonson··on The Vietnam government has banned rooted phones from using any banking app
Nothing useful to add except, god I miss my Bold 9700. Every time I slip on this stupid touchscreen keyboard and make a stupid typo on this stupid phone I howl inwardly and wish pain and endless torment upon everyone who took us down this path away from light and goodness. Grumble grumble
danparsonson··on GOG Patrons- Join gamers keeping classics alive
Speaking personally I'd rather pay a few dollars than risk my PC getting Good Old Virusy, which may or may not be a real risk, but is certainly an idea that puts me off pirating software.
danparsonson··on I rebooted my social life
Counterpoint: if more people would think more carefully today about whether or not having kids was right for them, there will be less troubled adults in tomorrow's world. Having children is not the be-all and end-all, and not everyone rises to the challenge of being a good parent.
danparsonson··on Stepping down as Mockito maintainer after ten years
> Either the code works either way or I'm glad to know I broke things when the seemingly unrelated tests breaks

...or, you tested each thing individually, so only related tests break and you can quickly zero in on the problem. Isn't that easier?

danparsonson··on Stepping down as Mockito maintainer after ten years
I'm sorry I don't really understand your argument; unit tests are bad because code changes? Surely if you're only testing small pieces then that works better when you make a change? You only need to update the tests for the part of code that changed, not everything that touches it. That's another great thing about mocks - your interfaces should be stable over time, so the mocks don't need to change that often, and when you're changing MyCalculator, all the dependencies to MyCalculator remain the same so you only have to update MyCalculatorTests.

This is what I mean about a well-factored code base; separate things are separate, and can be tested independently.

> Unit tests have proven more harmful than helpful

Why? I find them very useful. If I change a method and inadvertently break it somehow, I have a battery of tests testing that method, and some of them fail. Nothing else fails because I didn't change anything else, so I don't need to dive into working out why those other tests are failing. It's separation of concerns.

danparsonson··on Stepping down as Mockito maintainer after ten years
You can make your own definition of unit if you like, but the usual definition is the smallest whole piece of something - a unit of currency, a unit of measure, etc.

If your unit is thousands of functions wide then you have a monolith, and there are widely discussed reasons why we try to avoid those.

danparsonson··on Stepping down as Mockito maintainer after ten years
> in scientific studies, you are trying to understand some phenomena, and isolating variables can help with very complex things.

Not to labour the point here, but no, the primary reason you isolate variables in a scientific experiment is that you want to ensure you're only testing the thing you intend to test. A medical study is a good example - you want to be sure that the effect you observed was due to the drug you're testing, and not some unrelated lifestyle factor.

Thanks for sharing your views on the rest; there was just one thing I wanted to expand on:

> Now let’s say you mock something in your function. Let’s say you make a change to that but the input and output are the exact same. Now you have to update your test.

I think the scenario you're describing here is: a function's dependencies have changed, but the inputs and outputs of that function have not; therefore even though the behaviour is the same, the tests still need to be updated. Is that right? In which case I would say: of course you need to update the tests - the dependencies have changed and therefore the behaviour of the function depends on different things and you need to model the behaviour of those new things in order to properly test the original function. To me this objection only holds if you are mainly focussed on code coverage; however, to me, good testing exercises the same code paths in multiple different ways to stress the code and ensure that the results are correct given all possible inputs. The dependencies of a function are also inputs of a kind.

danparsonson··on Stepping down as Mockito maintainer after ten years
Yeah I think that's a question of using the right tool for the job. Some projects are of a size that it's not really necessary to be more fine-grained, but as the number of moving parts increases, so too in my experience does the need to ensure those parts are individually working to spec, and not just the whole thing. A classic example might be something like a calculator that enshrines a complex piece of logic, and a piece of code that uses it. I would test both of those in isolation, and mock out the calculator in the second case so that I could generate a whole range of different return values and errors and prove that the calling code is also robust and behaves correctly. Separating them like this also potentially reduces the number of tests you need to write to ensure that you hit all possible combinations of inputs and outputs.
danparsonson··on Stepping down as Mockito maintainer after ten years
I'm sorry, I don't understand what you mean.

You seem to say it's not worth writing a lot of tests, but then you talk about tests breaking due to bad changes - if you don't write those tests in the first place, then how do you get into that situation?

I didn't word my earlier comment very well - I don't mean to advocate for 100% coverage, which I personally think is a waste of time at best, and a false comfort at worst. Is this what you're talking about? What I wanted to say is that unit tests should be written for every part of the code that you're testing, i.e. break it into bits rather than test the whole thing in one lump, or better, do both - unit tests and integration tests.

danparsonson··on Stepping down as Mockito maintainer after ten years
Aw don't say that, you'll make me sad! There's nothing worse than a sad clown.
danparsonson··on Stepping down as Mockito maintainer after ten years
Well of course it was a figure of speech - if you meant it literally then I would not by prodding you about your medical condition. I was posting in response to your story that a colleague proposed a way of working or technical solution to something, and that this in some way enraged or otherwise upset you. And then you thought that made a good story to share online. That is, as I said, an immature response to a disagreement.

Unless that whole paragraph was a figure of speech, in which case what I said doesn't apply, and we can both go about our days.

danparsonson··on Stepping down as Mockito maintainer after ten years
That's not a counter-argument. Why don't you need to mock out the interfaces that you're not testing?
danparsonson··on Stepping down as Mockito maintainer after ten years
> I don’t think it’s worth doing that

OK; it's your choice to do what you think is right.

> and comparing it to scientific experiments doesn’t really apply.

Why not? I think it's a fairly apt comparison; you have a theory ("this piece of code does the following things"), and write tests to prove it.

> You can do all that without mocks as well.

OK, but mocks make it easier and cleaner - so why wouldn't I do that?

> Making the tests run faster at the expense of better tests seems counterproductive.

Smaller, more focused, cleaner tests are better in my opinion; speed is a beneficial side effect.

> Now you should think of reasons why you should not isolate.

Why? That's your argument - it's not on me to prove it for you. If you can give me some good reason why mocking out the interfaces you are not testing is a bad idea, and some better alternative, then we can have a discussion about it.

danparsonson··on Stepping down as Mockito maintainer after ten years
> I almost lost my shit.

Hopefully one day you'll back at that, and realise what an immature attitude that was.

danparsonson··on Stepping down as Mockito maintainer after ten years
For the same reason you isolate variables in a scientific experiment; to ensure you're controlling the test that you're running, and not accidentally testing something else.

To easily simulate failure cases, a range of possible inputs, bad data etc.

To make the testing process faster when you have hundreds or thousands of tests, running on multiple builds simultaneously across an organisation.

Off the top of my head :-)

danparsonson··on Stepping down as Mockito maintainer after ten years
Well, no - you don't.

What you're describing is a very limited subset of testing, which presumably is fine for the projects you work on, but that experience does not generalise well.

Integration testing is of course useful, but generally one would want to create unit tests for every part of the code, and by definition it's not a unit test if hits multiple parts of the code simultaneously.

Apart from that, databases and file access may be fast but they still take resources and time to spin up; beyond a certain project and team size, it's far cheaper to mock those things. With a mock you can also easily simulate failure cases, bad data, etc. - how do you test for file access issues, or the database server being offline?

Using mocks properly is a sign of a well-factored codebase.

danparsonson··on Stepping down as Mockito maintainer after ten years
How do you substitute for dependencies that you're not testing, or that you want to deliberately break?
danparsonson··on Go ahead, self-host Postgres
Can you get away without exposing it to the internet? Firewall it off altogether, or just open the address of a specific machine that needs access to it?
danparsonson··on I wrote a code editor in C and now I'm a changed man
Or, with a little more empathy: he was suffering from schizophrenia.
danparsonson··on A terminal emulator that runs in your terminal. Powered by Turbo Vision
Yeah what a joyful blast from the past! I love that whole aesthetic; the best of the DOS days IMO.
← PreviousPage 8 of 34Next →