back

Another small gift

2022-11-25

2 minute read

Yesterday I did very little, but that's okay. Still in birthday mode. Portuguese went well! We talked about reflexive pronouns. They exist in spanish too, but its good to cover it just in case. Reflexive pronouns function as "to oneself", eg. I washed myself, he helps himself, the truth itself. We talked about facial hair and verbs around it, we talked about the futebol, we talked about dentist appointments, and we talked about turning 30.

My room is still teetering on the edge of full untidyness, I've got a day at home now though so I'm not too concerned.

I'm hoping to get some reading done, do some cartoons, and do some chores. I can't get it all done, but cutting off the screen early on in the evening will open up space for reading no doubt.

a prayer you can say with your hands

I was talking about this with my friend last night: A prayer that falls apart in your hands

It was a project that went completely wrong, and was barely salvageable. But the idea I reckon is still good, and I want to try again. I could make a silicone mould for the text, and I reckon if I'm careful I can get the letters out soundly.

the words aren't coming today

I'm still distracted, a running theme this week. I've got my sourdough starter on the landing, freshly fed and hopefully getting active. Soon I can make the dough, then let it rise for a long time, then bring on the fridge proof, and finally have it ready for pizza tomorrow. Life is filled with big and little undertakings, all part of the tapestry.

The weather is better today

another small gift

listening to

Reptant x Tombolo - Radio Relativa

questions

oh I wanted to put this in too

in Cassidoo's dev newsletter this week she had a test interview question:

Write a function that takes a string of slashes (\ and /) and returns all of those slashes drawn downwards in a line connecting them.

Here's my result and solution:

$ node slashes.js \\//\\\\\\//\\\\/////
   \
   /
  /
  \
   \
    \
    /
   /
   \
    \
    /
   /
  /
 /
/
const str = process.argv[2] ? process.argv[2].split("") : []
let indents = []

let a = "\\";
let b = "/";
let filler = " ";

str.forEach((c,i) => {
    let ii = 0;

    if(i > 0){
        ii = indents[i-1]
        if(str[i-1] == a && c == a) { ii ++ }
        if(str[i-1] == b && c == b) { ii -- }
    }

    if(indents[i-1] == 0 && str[i-1] == b && c == b){
        ii = 0;
        indents = indents.map(iii => {
            return iii + 1
        })
    }
    indents.push(ii)
})

str.forEach((c,i) => {
    console.log(Array(indents[i]).fill(filler).join("") + c)
})

Not the cleanest, but not the worst either.