💸🚨 New member special! 🚨💸

ATP Dev: Nuggets of Wisdom
https://atp.fm/atp-dev-nuggets-of-wisdom

Lessons of various sizes that we’ve learned as software developers.

Join now to listen! https://atp.fm/join

Accidental Tech Podcast: ATP Dev: Nuggets of Wisdom

Three nerds discussing tech, Apple, programming, and loosely related matters.

@atpfm this should be a good one :)
@atpfm @siracusa “Unit testing!”

@atpfm @marcoarment oh, there's a famous one.

"The good thing about reinventing the wheel is that you can get a round one."

https://scripting.wordpress.com/2006/12/20/scripting-news-for-12202006/#comment-26383

@atpfm @siracusa @caseyliss you're missing the fully YOLO mode here. You can have Dropbox sync the git repo, so it doesn't matter if you forget to check things in.
@sayrer I have two underscore-separated words for you: node_modules

@siracusa it works! I learned to do this from working at big companies and getting pulled into meetings or incidents or whatever. In my case, it would be Rust Cargo things, but I've done it on Node stuff too.

Then, the question becomes: why not do that?

@sayrer I’ve done it, and I couldn’t stand the constant syncing activity.

@siracusa hmm, never had the problem. The work stuff is always at least 1GB ethernet, and home has only been half as fast. That blows through a Node project pretty quickly.

I think another thing is having a tough build system (Bazel, Buck, etc) so I don't actually need the compiled stuff.

But I'm not sure this recipe holds true. My macOS desktop is iCloud synced now.

@siracusa I meant to say this but missed it: it's like those guys that wear the same sweatshirt every day.

You do that kind of irresponsible Dropbox thing, and then your mind is free from fastidious GitHub check-ins.

@atpfm

1.
BEGIN;
ROLLBACK;

2.
WHERE clause

3.
UPDATE/DELETE etc.

4.
Connect to the database

🗣️

@atpfm @siracusa rather than typing the where clause first, I always misspell the verb on purpose. E.g. “delote” or “updote”. Occasionally I forget to correct when the statement is complete but then it just tells me off and I fix it and run.
@zkarj I’d be worried about typo-ing it into correctness!
@siracusa fair, but it takes a deliberate effort to spell it wrong so less likely. I suppose you could also just type junk on the verb. Updatezxccxz.
@atpfm Hmm… Hasn’t appeared in Overcast for me yet. Darn!
@HowAboutStefan @atpfm Same here. It’s been almost a full day, but it hasn’t shown up yet.
@atpfm @siracusa I know you said you found that it wasn’t the performance bottleneck, but sounds like the feature looking for to hand off non sendable types is the “sending” keyword. Assuming you don’t use the value after you return it.
@david That’s close, but not exactly what I want. And I did find a way to do it even without using “sending”, but it would require quite a bit of rejiggering. I may still do it someday, but since it turned out not to be a performance problem, I’m not in any hurry.

@atpfm the “write good error messages” resonates. We have a system at work that talks to ours (let’s call it ABC) *a lot*. They have error messages that say “Failed to connect to ABC.” so we get sent them with “please explain what’s wrong at your end.”

What the error message SHOULD say is “Failed to call an API which connects to another component which requests yet another component to use a connection pool to actually talk to ABC.”

Guess where 95% of the problems lie.

@zkarj The worst is when a connection error doesn’t mention stuff like the IP address or port. So you spend time trying to debug what turns out to be a config issue.
@atpfm hearing Marco talk about people blaming his streaming feature instead of their poor connection - it probably feels unfair that youtube doesn't get this feedback, because we can see video and therefore expect it to take time and bandwidth to load, but audio must be magic.

@atpfm Regarding copy/pasting process ids, I heavily reduced my use of that decades ago, since it’s much too easy to copy the wrong id, especially from ps output.

This reason typing became an acceptable strategy is the introduction of random process ids, which means that the probability for a mistyped id to exist is low.

@atpfm That was a lot of fun. I hope you consider keeping something along those lines as a regular format.

I disagree with @siracusa that some topics might be too narrow, though. That’s what we tune in for :)

@atpfm AFS has write-on-close semantics, so all the file content is written to the server after the close call, which also notifies the other clients that data is updated.

This is how you get some sort of performance out of a networked file system that has global reach.

This also means that network failures are discovered during close(2).

@atpfm Instead of writing the WHERE clause first, always write a SELECT statement first including the WHERE clause. Then execute the SELECT statement to visually verify that your WHERE clause is correct. Then change it to whatever statement you were planning on doing. If you are doing a complex update or insert, write it into your SELECT query so you can validate your inputs as well.
@eugenekim I do that as well, but the draw of expedience often leads to just immediately writing the UPDATE or DELETE when filtering based on primary key or similar. And in that case, the "WHERE first" habit can still be a lifesaver.