Programmer in NYC

  • 0 Posts
  • 20 Comments
Joined 1Y ago
cake
Cake day: May 07, 2023

help-circle
rss

It scrolls smoothly, it doesn’t snap line by line. Although once the scroll animation is complete the final positions of lines and columns do end up aligned to a grid.

Neovim (as opposed to Vim) is not limited to terminal rendering. It’s designed to be a UI-agnostic backend. It happens that the default frontend runs in a terminal.


I don’t know if it’s your cup of tea, but Neovide provides smooth scrolling at arbitrary refresh rates. (It’s a graphical frontend for Neovim, my IDE of choice.)



And there is also Nushell and similar projects. Nushell has a concept with the same purpose as jc where you can install Nushell frontend functions for familiar commands such that the frontends parse output into a structured format, and you also get Nushell auto-completions as part of the package. Some of those frontends are included by default.

As an example if you run ps you get output as a Nushell table where you can select columns, filter rows, etc. Or you can run ^ps to bypass the Nushell frontend and get the old output format.

Of course the trade-off is that Nushell wants to be your whole shell while jc drops into an existing shell.


I’m a fan! I don’t necessarily learn more than I would watching and reading at home. The main value for me is socializing and networking. Also I usually learn about some things I wouldn’t have sought out myself, but which are often interesting.


That’s a very nice one! I also enjoy programming ligatures.

I use Cartograph CF. I like to use the handwriting style for built-in keywords. Those are common enough that I identify them by shape. The loopy handwriting helps me to skim over the keywords to focus on the words that are specific to each piece of code.

sample Haskell code with a handwriting font variant for the words "let", "in", and "where"

I wish more monospace fonts would use the “m” style from Ubuntu Mono. The middle leg is shortened which makes the glyph look less crowded.


git rebase --onto is great for stacked branches when you are merging each branch using squash & merge or rebase & merge.

By “stacked branches” I mean creating a branch off of another branch, as opposed to starting all branches from main.

For example imagine you create branch A with multiple commits, and submit a pull request for it. While you are waiting for reviews and CI checks you get onto the next piece of work - but the next task builds on changes from branch A so you create branch B off of A. Eventually branch A is merged to main via squash and merge. Now main has the changes from A, but from git’s perspective main has diverged from B. The squash & merge created a new commit so git doesn’t see it as the same history as the original commits from A that you still have in B’s branch history. You want to bring B up to date with main so you can open a PR for B.

The simplest option is to git merge main into B. But you might end up resolving merge conflicts that you don’t have to. (Edit: This happens if B changes some of the same lines that were previously changed in A.)

Since the files in main are now in the same as state as they were at the start of B’s history you can replay only the commits from B onto main, and get a conflict-free rebase (assuming there are no conflicting changes in main from some other merge). Like this:

$ git rebase --onto main A B

The range A B specifies which commits to replay: not everything after the common ancestor between B and main, only the commits in B that come after A.



It looks like it’s made by the same team that made Journey


No, but I’ve now heard it recommended enough times that I think I’ll check it out. It looks like it’s a free download for the Switch. Are there micro transactions, or subscriptions, or some such thing?


I’m finding this mess interesting: the MAGAs vote and debate like a third party, which kinda gives us a House with no majority party which is something we usually don’t get to see in America. And we’re getting the deadlocks that come from a chamber that isn’t willing to form a coalition - or at least not a reliable one.

I just hope the next speaker candidate doesn’t try for the same Republican-MAGA coalition. Although I’m prepared to be disappointed. Do you think there’s any chance a Republican would offer to sideline the MAGAs to get support from Democrats?

Under this analysis the Democrats have a plurality. How does that tend to work out in governments with more than two parties?


My main game continues to be Overwatch.

I’ve also been playing some Diablo IV. I’ve been taking my time - there is a lot to enjoy in that game. I just teamed up with my brother to finish the last act of the main story.


For what I see it’d be just like saying “using a password” vs “using a user and a password”.

As long as API keys have more entropy than typical username & password combinations they can be more secure. Imagine if you had a system where you make a token by concatenating username and password - the security properties don’t change just because you’re exchanging one string instead of two separate ones.


No problem! I thought there was a good chance you already know the concept, just not in the exact, unfortunately-overloaded words of your post title.


That advice does not literally refer to interface the programming language feature. It means to test the observable behavior of a component, not internal implementation details.

In your example, write tests for both Rectangle and Triangle that call area, and assert the result is correct. But do not test, for example, the order of mathematical operations that were run to calculate the result. The details of the math are an internal detail, not part of the “interface”.


I totally agree.

Right now I’m on a new project with a teammate who likes to rebase PR branches, and merge with merge commits to “record a clean history of development”. It’s not quite compatible with the atomic-change philosophy of conventional commits. I’m thinking about making a case to change style, but I’ve already failed to argue the problem of disruption when rebasing PR branches.


Lol this is what I was thinking too. The junior dev is also a black box. AI automation seems more like delegating than programming to me.


I get fatigued too! At the end of an especially busy day of coding I have trouble forming sentences for a bit until I take some time to rest. Programming is complicated, and all that mental work literally uses up calories, and fatigues brain cells. Have you heard of the waterfall illusion? The short version is if you watch stuff moving down for a while your downward-motion-detecting cells get tired, and become less active which which messes with your ability to perceive not-moving-upward things for a minute. Your other brain cells get tired too - but it doesn’t take long to recover if you take a break.



You’ll get conflicts if you pull changes from the original repo any time the deleted files have upstream changes. After you record a merge resolution (presumably by deleting them again) you won’t get conflicts until the next time those files change upstream.

If you submit a pull request part of its changes will be deleting the files from the original repo.

OTOH if you delete the files you can always undo that later with git restore --source upstream/main <deleted file paths>. You can restore them in a branch only if you do want to submit a pull request, but leave the files deleted in your own main branch.