Weeknotes 24
12th December, 2021
“Force pushing Rust”
-
As someone who can’t hold a lot in my head at once, of course, I strongly agree with this.
“I’ve stopped admiring very talented engineers who can hold a lot of complexity in their head and started admiring very talented engineers who have moved a lot of complexity outside their head and into tools, and I like it much much better this way.” https://twitter.com/fasterthanlime/status/1468739998505656327
-
I managed to snag a Warp invite code, which I’ve been keen to try out for a while. I’m not sure how I feel about yet. It doesn’t yet support my shell of choice, Fish, so it’s hard to give it a proper try. It sure looks slick.
-
I was writing quite a few Cypress tests this week and picked up a couple of tips.
Find an element based on the text it contains:
cy.get('some > selector').invoke('text') .then((text)=>{ expect(text).to.contain('I am text'); })
Run only the current
describe
orit
block using.only
.describe.only('a group of tests', function () { // test body })
it.only('does a thing', function () { // test body })
-
Another tip that I use all the time, this time for Git. Force pushing is necessary if you rebase your branches a lot like I do. However, you can overwrite someone else’s commits if they have also pushed to the same branch.
The generally accepted rule is to only force push to a branch that you alone use, but life sometimes isn’t that straight forward, so in those cases where someone else could’ve pushed to your branch you can use
--force-with-lease
instead of--force
and it will refuse to force push if someone else has already pushed to it. -
Rust is back on the agenda! I’ve been looking at Rust for a few years now, maybe more. I pick it up, get stuck, put it down. Anyway, I’m trying again. This time starting with the Rust Book. It’s a really good book.
Rust is a complicated language for someone like me who’s mostly programmed in dynamic languages. It’s full of concepts and ideas that I’ve never heard of. And that’s part of what I like about it - it’s different. But that makes it challenging.
Rust stands alone as a language that could be really useful for me (The idea of writing a cli program in Ruby doesn’t appeal to me, but writing one in Rust certainly does). However it also seems like it would be an good choice for writing “extensions” to other languages. Ruby gems and Elixir NIFs can both be written in Rust.
-
I’m looking forward to some time off over Christmas! 🎄🎅