awkwardturtle

joined 2 weeks ago
[–] awkwardturtle@lemmy.dbzer0.com 0 points 5 days ago (1 children)

Yeah, I don't think I ever got the best intro to ruby... which may attribute to my dislike for it.

When I was in college rails was the big thing at the time and in the software engineering class I had in 2014, they basically gave us preconfigured vms and a quick "here's how to ruby" before introducing us to rails and the convention over configuration mindset. That was a nightmare experience for me because there were all these magic functions and I had to name my variables certain ways that I didn't understand the reasoning behind at that point, and it made it much more difficult to differentiate between actual ruby vs. rails'isms.

My only non-rails ruby experience was well after I had graduated and at my first job. Even though that was an experience in and of itself, it was refreshing not having magic classes and just seeing it work like a regular language. I would have preferred that to rails in any world.

[–] awkwardturtle@lemmy.dbzer0.com 1 points 1 week ago* (last edited 6 days ago) (4 children)

I always get thrown off by ruby, mainly because of rails magic though whenever I look at it. Convention over configuration hurts my brain some days. My only experience with testing there was rspec and cucumber. Wasn't great at either of those, but loved pytest a lot

For testing I end up putting things in a docker container and running pytest through it for sanity checks. May have to update my testing approach soon though to cover more low-level validation. My memory error looks to be from closing a channel before a child goroutine could write to it. My working theory solution I'm trying out tomorrow is just wait for a second write to the channel from the other child routine before letting the function end. Seems a little hacky to me but it should hopefully work

~~It also had the added benefit of teaching me that goroutines will hold memory from fmt.Sprintf calls in cases where they were used only as a function argument in a logger~~.

Edit: removing a bad understanding of pprof on my part, I didn't know until today that the allocs profiler shows lifetime data by default instead of inuse....

I ended up doing that. They said they would refund me when it got returned back to their warehouse when I talked to support.

 

Found myself trying to debug an issue with memory not being garbage collected in a program. It turns out go comes with a tool that shows you the different memory allocations and resource hogs between different goroutines. Super useful so far from what I've found on some basic debugging, but still trying to understand how the flamegraph, the visualizations when writing to a png, and some other utilities in there work.

Overall was happy to learn that there was included tooling for that purpose within go itself.

 

Ordered something that was gonna take a week to get here, and today it was supposed to arrive.

My package wasn't here though; it turns out I forgot to put in the last number of my address on the shipping info and now it's been sent back because it was a non-existent address :'( I also have to figure out what company I need to contact next week to update the delivery address for since USPS didn't directly handle the package entirely. Sad day and mild inconveniences all around