The Joys Of Programming

*Legion* wrote:
pandasuit wrote:

The trick is to use them for things that are difficult (or impossible) to do with code but where you can easily verify (unit test) the outputs so you can have high confidence in their reliability.

I'm surprised the Test-Driven Development crowd hasn't jumped all over that idea yet.

"Just write the tests, let the AI write the code!"

Everyone is too busy looking for (and being disappointed by) the magic of GenAI to realize that it's a useful new tool for a less magical set of problems. I've been very successful at using GenAI for production features and lately have been teaching other development teams how I'm doing it.

Spoiler:

At home I use Windows and Linux. My MacBook Pro has NixOS on it, my Steam Deck runs Arch, and my other machines usually run something Debian based.

At work I code on a mix of Linux and Windows machines and all my code runs on Linux containers in k8s.

Programming hot take:

I think fonts like Fira Code, which combine certain multi-character combinations into a single ligature (eg. turning -> and => into single arrow characters) are absolutely repulsive.

I don't mind (and in fact personally use) fonts which add extra glyphs to do more visually appealing things in text mode, because I live in the terminal and nice looking stuff is great. But a font that actually screws with the character rendering of source code is about ten bridges too far.

Have you tried the starship prompt tool with a nerd font?

Mixolyde wrote:

Have you tried the starship prompt tool with a nerd font?

Only every day. It was just recently that I finally gave up my own hand-rolled zsh prompt scripts that I've used for years, and tried some of the prompts out there. Started using Spaceship, and then Starship knocks on my door like, "hey, what if Spaceship but in Rust instead of slow?".

I have to say, it's vindicating seeing a lot of these popular prompts now doing a 3-line format, where the top line is a blank line for separation, then there's the dedicated informational line, then last a clean input line with just the prompt character. My custom prompts were like that, and for years it felt a bit like swimming upstream. Most of the custom prompts I'd see were instead really fat one-liners, with a lot of the informational stuff dumped into $RPS1 so that it comes from the right side, and no leading blank lines. Having line breaks in $PS1 seemed not exactly unheard of, but less than idiomatic.

I've thought about trying out Powerlevel10k, but Starship pretty much filled my need of giving me something good that I don't need to fiddle with, allowing me get back to my more important work of fiddling with Neovim.

The transient prompt in Powerlevel10K is so good.

I tried startship in the git bash shell for Windows and it seems really slow for some reason, but it was fine in normal Powershell. I love it on Linux, of course.

IMAGE(https://i.imgur.com/OaP7IzL_d.webp?maxwidth=760&fidelity=grand)

Half of Reddit's /r/ProgrammingHumor is variations of "I just copy stuff from StackOverflow", and I'm 100% certain those "jokes" are mostly confessions.

I'm not sure if I should be proud of how much of this I understand ;|

related: Esolang, the esoteric programming languages wiki:
https://esolangs.org/

You've probably heard of:
https://esolangs.org/wiki/Brain****

Still...better than Javascript.

https://youtube.com/shorts/H1X-pA55n...

Some funny quick hits from guy that does the programmer interview bits.

While writing this post about how the grammar between spoken languages can vary significantly
(https://www.gamerswithjobs.com/node/1278186?page=831#comment-17488685)
I was reminded me of how odd reverse polish notation (postfix) is until you understand it's advantages:

Pretty sure I first learned about it in University since most programming languages use forward polish notation (prefix) for functions and infix for math and operators. Except Scheme (Lisp and similar) which uses prefix for everything.

Long live the HP48g calculator. Postfix stack-based math!

Man, this person's blog is spot on. I am loving every entry I read so far. https://ludic.mataroa.blog/blog/i-am...

*Legion* wrote:
Mixolyde wrote:

Have you tried the starship prompt tool with a nerd font?

Only every day. It was just recently that I finally gave up my own hand-rolled zsh prompt scripts that I've used for years, and tried some of the prompts out there. Started using Spaceship, and then Starship knocks on my door like, "hey, what if Spaceship but in Rust instead of slow?".

I have to say, it's vindicating seeing a lot of these popular prompts now doing a 3-line format, where the top line is a blank line for separation, then there's the dedicated informational line, then last a clean input line with just the prompt character. My custom prompts were like that, and for years it felt a bit like swimming upstream. Most of the custom prompts I'd see were instead really fat one-liners, with a lot of the informational stuff dumped into $RPS1 so that it comes from the right side, and no leading blank lines. Having line breaks in $PS1 seemed not exactly unheard of, but less than idiomatic.

I've thought about trying out Powerlevel10k, but Starship pretty much filled my need of giving me something good that I don't need to fiddle with, allowing me get back to my more important work of fiddling with Neovim.

Have you tried Zellij yet? One of my coworkers was suggesting it to me as a screen/tmux replacement and it looks really cool and easy to use.

I’m kinda deep into this, with a neovim plugin to manage keybinds when in a neovim instance inside a tmux instant, but I might check out Zellen.

Mixolyde wrote:

https://youtube.com/shorts/H1X-pA55n...

Some funny quick hits from guy that does the programmer interview bits.

The full version:

OK that was great and a few genuinely laugh out loud jokes.

I shared this with some of the PMs at work and we all had a good laugh. It's not a programming one but I'm sure most of you have experienced enough PMs to find this entertaining.

So how do you deal with a coworker who constantly holds up your code review or pull requests for pedantic shit? Like wasted an entire day last sprint and again this sprint?

Like multiple times for the same type of stuff, including something they approved a week ago for the exact same type of code? And when you link to their previous approval they still push back and want you to change for... I don't f*cking know why?

Team lead is aware and has already talked to them once. Team manager as well. Trying not to be confrontational about it but feels like this is not going to survive the full 12 months of my contract.

Everyone else on the team is great. Like 10 of the greatest people I have ever worked with. But this one person... I'm not sure how much more I can take.

Ask a different coworker to approve your PR?

Are you collocated? If so do the review at the same computer so you can discuss instead of going back and forth for a day. If not, schedule a code review meeting.

merphle wrote:

Ask a different coworker to approve your PR?

Today both were on PTO.

Last time this happened, another teammate had already approved and this person still added comments while I was waiting on QA review, and forced me to deal with their crap for hours.

And then after I fixed 3 or 4 things they asked and updated the PR, they added TWO MORE comments that they decided were worth wasting more time.

When I started this a couple months ago the team lead said we can't resolve comments, the person who starts it has to do that. So when they do this they are effectively holding me hostage to change some code that isn't wrong to start with.

kazar wrote:

Are you collocated? If so do the review at the same computer so you can discuss instead of going back and forth for a day. If not, schedule a code review meeting.

Remote. The back and forth does take up more time. But it also allows me to compose my thoughts instead of screaming WTF at them.

The point of a code review isn't to make perfect code, or even to discuss design decisions. Maybe your team needs to narrow down what is allowed in a code review or what should need changes vs just offering a suggestion.

Having rules about who resolves comments seems a bit petty

In my team, discussions like this lead to a rule that reviewers should distinguish whether their comments are suggestions or blockers, and if they have no blocking issues they should approve the PR even if comments are open. And it's worked pretty well, if the comments are good people often address them, even if they're non-blocking and the PR was mergeable.

OTOH we have no process with comments; we resolve them sometimes to manage clutter, but with no particular significance to it.

Stele wrote:

So how do you deal with a coworker who constantly holds up your code review or pull requests for pedantic shit? Like wasted an entire day last sprint and again this sprint?

IMAGE(https://i.imgur.com/RDig2bm.png)

I guess the question is “are their suggestions ever useful?”. I have one pedantic co-worker who also annoyingly works a 4 day week, remotely, time offset. When he ends up reviewing a patch it often turns into a multi week code review process. The problem is that once you get all the way through the process he’s generally right and the code is better for it.

If it’s useful, then great. If it’s not then you need to review your teams’ code review policy. I have a strong feeling that most simple/pedant things can be caught by linters/static analysers. Have those linters are part of your pre-merge workflow. Then the rule is don’t bother looking for those things. Code review should be about making sure the patch and commit message match. It does what it says, the logic looks reasonable and testing is in place. Everything else is a matter of personal taste and not relevant.

Is the code functional? Does it seem satisfy the Jira's acceptance criteria? Is it free from obvious bugs or security issues? If so:

IMAGE(https://i.imgur.com/kHEQurJ.png)