News for hackers. Stuff that matters.

avg_dev

Re:Delete Tests on Friday August 29, 2025 @09:28PM (#45071144)
idk, i never thought

> “it is blasphemy to delete a test”,

was ever a thing. i still don't.

if a test is flaky, but it covers something useful, it should be made not flaky somehow. if tests are slow, but they are useful, then they should be optimized so they run faster. if tests cover some bit of functionality that the software no longer needs to provide, the functionality should be deleted from the code and the tests. if updating a small bit of code causes many tests to need to be adjusted, and that's a pain, and it happens frequently, then the tests should be refactored or adjusted.

> Confidence is the point of writing tests.

yes, agreed. but tests are code, too. just maintain the tests with the code in a sensible way. if there is something worth deleting, delete it; there is no gospel that says you can't. but tests provide value just like the author describes in the "fix after revert after fix after revert" counterexample. just remember they're code like anything else is all and treat them accordingly.

Re:nullable but not null on Friday July 25, 2025 @05:03PM (#44688449)
Thanks for the info. One minor point:

> But `timeofday()` is not volatile, so `DEFAULT timeofday()` is going to lock the table for a long time.

Perhaps the “not” was a typo?

Re:nullable but not null on Friday July 25, 2025 @02:32PM (#44686585)
I believe PostgreSQL does this since v11, which was released in 2018: (current is v17)

> Many other useful performance improvements, including the ability to avoid a table rewrite for ALTER TABLE ... ADD COLUMN with a non-null column default

https://www.postgresql.org/docs/release/11.0/

I think there is some restriction there, like the default can't be "volatile" - I can't remember the precise definition here but I think current_timestamp would be volatile, but any static value would not.

Re:Humans have nasal respiratory fingerprints on Tuesday June 17, 2025 @12:09PM (#44300746)
you can get a link to the paper if you click "Article" at the bottom.
Re:Why not use DNS over HTTPS (DoH)? on Sunday June 08, 2025 @10:56AM (#44217394)
I wonder if using a large number of DNS servers and picking one from the list or rotating through them would help.
Re:Consider Knitting on Wednesday June 04, 2025 @01:38PM (#44183380)
I really enjoyed this article. I liked what the person had to say about “care” especially, and the sort of crappy scarf that his mother-in-law still loved.
Re:Consider Knitting on Wednesday June 04, 2025 @12:47PM (#44182712)
I’m both an amateur musician and a professional coder.

Definitely IMO code is a real physical thing that produces tangible results. (I personally think that code operationally is a physical thing, down to basics like logic gates and stuff. We abstract far away from that with high level languages but even making a pixel change colors is inherently, to me, altering physical reality)

But the experience of writing code and making music with your body is such a different one. You will feel and think about the code in a more imaginary and thoughtful way (you could write all your code in a notebook or a text editor and you would just be writing or typing on a keyboard) whereas the music (I play a wind instrument) is a tactile experience in the sense that it will physically be something you hear and you can actually feel the vibrations in your body; I might be wrong but I think that is what hearing is. And there is a real bio-feedback thing going on because you use your body to physically make it happen and you get immediate or very near immediate feedback (auditory, etc. You may even hear or see feedback from other musicians or even listeners). It’s just a viscerally different experience.

There’s nothing fake about seeing metrics on a dashboard or tests going from red to green or money or bits of data flowing around, at all. But it is experientially much different from the feeling of playing an instrument.

That’s my take anyway.

Re:Don't just check errors, handle them gracefully (2016) on Tuesday June 03, 2025 @03:28PM (#44173693)
https://go.dev/blog/go1.13-errors

I wouldn't use the advice in this article. It's quite old and the stdlib now has support for new stuff via error wrapping.

tbh i don't feel like the people who scheduled a 10 min meeting did anything wrong. the room is marked as free during that time; they know they will be done in 10 mins; it's a shared resource... what's the point of a schedule for a shared resource if people don't respect it?
Re:Leaving Google on Sunday May 11, 2025 @08:49PM (#43958615)
just a quick response, i have asked a few Go questions that he (ILT) has answered on public forums. i don't work at google and never have. but he was clear and thoughtful with me. most of all, he was helpful.
hmm, what is a serverless Pg? I don't quite understand. I thought you needed a database server if you wanted to run Pg.
Re:The Gang Has a Mid-Life Crisis on Thursday May 01, 2025 @02:06PM (#43861244)
I didn't agree with everything, but I did with a lot; in particular this:

> As Julie says when someone repeats that Amazon was started in a garage: Ain't no garages in the trailer park.

Not sure who Julie is, but I think she's spot on.

Re:The highest-ranking personal blogs of Hacker News on Tuesday March 25, 2025 @04:26PM (#43475555)
hmmm, prog21.dadgum.com is James Hague, not John Carmack.

interesting site.

Re:Tech terms I was pronouncing wrong on Friday March 21, 2025 @04:42PM (#43440588)
love it

especially the sense of humor... like on gif

Re:Statistical Formulas for Programmers (2013) on Thursday March 13, 2025 @02:16PM (#43355911)
yes, and informative. i was looking at the article and i thought everything made sense but i could tell i was missing something about this line...
Re:My Wife's Enemies Are Now My Enemies, Too (2019) on Tuesday February 11, 2025 @09:29AM (#43013064)
i thought it was funny
Re:I Switched to Firefox and Never Looked Back on Tuesday January 14, 2025 @01:09PM (#42701274)
how is the webauthn story for FF? I recall that some hardware tokens could sometimes play weird with FF on Mac, I am not sure if Windows had the same thing. that was one practical advantage Chrome had.
Re:All Garmin Connect services are down on Wednesday January 08, 2025 @01:18PM (#42636889)
thanks!
Re:All Garmin Connect services are down on Wednesday January 08, 2025 @08:48AM (#42634153)
Tangent: is it possible to use a Garmin watch without turning Bluetooth on on my phone and still get the data synced somehow?
Re:You Wouldn't Download an AI on Sunday January 05, 2025 @11:54AM (#42603051)
pretty cool; that frida tool seems really nice. https://frida.re/docs/home/

(and a bunch of people seem to be interested in the "IP" note, but I took as, just trying to not get run into legal trouble for advertising "here's how you can 'steal' models!")

i don't think so (that it is a terrible name); it's a pretty common term https://www.urbandictionary.com/define.php?term=reveng
Re:Software Design Is Knowledge Building on Wednesday January 01, 2025 @03:24PM (#42568993)
Where I live, most software developers are not legally allowed to call themselves software engineers (engineering is licensed by regulatory body). Still, many do call themselves that and so do their employers. But in my view, "I don't really care until we can start coding" is not actually engineering at all.
Re:Software Design Is Knowledge Building on Wednesday January 01, 2025 @03:21PM (#42568962)
Yes, artifacts (PRs, tickets, commit messages) should have good context (documentation) associated with them, and yes, simplicity is very important, and yes, some tech debt is always going to be incurred, but most importantly, not understanding a "legacy" system that is already running in production, and then modifying it significantly, is not going to lead to good results. I think it's as simple as that.
Re:Database mocks are just not worth it on Tuesday December 31, 2024 @10:30AM (#42559260)
How much of a commission do I make? ;)
Re:Database mocks are just not worth it on Monday December 30, 2024 @04:05PM (#42553513)
Don't know what language you use, but check this out: https://github.com/peterldowns/pgtestdb
Re:Cognitive load is what matters on Monday December 30, 2024 @09:29AM (#42549543)
Maybe a code gen layer that generates rust types from a db schema. I don’t know rust but have seen those in other languages. I could see a DB enum type corresponding to a language specific enum type and then the language rules applying.

I do think this is a level of indirection myself; if the generated code was perfect and always in sync, that would be one thing, but by definition it is not the case.

Re:Complain and Propose on Friday December 27, 2024 @01:31PM (#42524663)
one of the things i like about working at very small companies is that i don't have to immediately have a solution to everything. i can file an issue and/or mention a bug or issue that i see or foresee when we talk. i can then let it marinate until it either becomes necessary to act on it or i think of a solution and have time to work on it, whichever comes first.

i often think of software as a series of problems. i don't have to worry about solutions initially. when we have polished off solutions to all of the truly immediately important problems - within some reasonable/useful level of engineering tolerances - the software can be thought of as done, for a time. just my opinion.

Re:Cognitive load is what matters on Wednesday December 25, 2024 @10:10PM (#42512869)
That sounds like a very difficult situation. Would you be willing to elaborate on what kinds of bugs lay in the pre-existing functions? Was some sort of operation that was supposed to be idempotent (“if you call it with these unique parameters over and over, it will be the same as if you only called it once”) not so? I am trying to imagine what went wrong here. A tough situation, must have been quite painful. How serious were the consequences? If you don’t feel comfortable answering that is okay.
Re:Feed readers which don't take "no" for an answer on Sunday December 22, 2024 @10:43AM (#42487009)
While it might be nice if the article spelled out the header, I do believe that there is more than implication present.

> 00:04:51 GET /w/atom.xml, unconditional.

> Fulfilled with 200, 502 KB.

> [...]

> A 20 minute retry rate with unconditional requests is wasteful. [...]

And If-Modified-Since makes a request conditional. https://developer.mozilla.org/en-US/docs/Web/HTTP/Conditiona...

Re:The Rules of Programming on Sunday December 08, 2024 @04:25PM (#42360633)
The list of rules covered can be found in the book description on the purchase links, like: https://bookshop.org/p/books/the-rules-of-programming-how-to...

Older »