Go: Slice of Values vs. Slice of Pointers
Have you ever wonder when to use *[]struct
and when to use []*struct
when developing in Go? Look no further! I’ll explain everything you need to know about this topic in this post.
Welcome to my blog! This is where I collect my random thoughts.
This site is generated with Hugo and a modified Fuji theme. Learn how to do it here.
Have you ever wonder when to use *[]struct
and when to use []*struct
when developing in Go? Look no further! I’ll explain everything you need to know about this topic in this post.
In my sophomore year, I took the Judo course because the names of the waza (techniques) sounded really badass, like 大外割 (Osoto Gari), 小內割 (Kouchi Gari) etc.
Continue ...Artists with less than 500k monthly listeners on Spotify yet have I scrobbled for hundreds or even thousands of times.
Continue ...Before I started my 3rd internship, I have no idea what unit test is, and why is it relevant. But after I’m forced to write unit tests for half a year, I realize how important it is. Apart from making sure your functions do exactly what they’re intended to do, unit tests also provide the following benefits:
Continue ...Author: Ursula K. Le Guin
Continue ...As a Wuxia novel fan and someone who is generally good at sports, I’ve always wanted to try out Taekwondo. However, due to the myth (or fact? idk) that stretching your legs too much as a kid will damage the growth in terms of height, my mom never let me learn it.
When I first got to college, since my body growth had already become stagnant, I went to a training of the Taekwondo club in my school to get a taste of it, and boy was I impressed. The staggering physique of the black belters hitting a pad at high speed with their foot and the loud and crisp sound accompanying it is just so damn shocking, and I immediately fell in love with it.
Continue ...An anthology from Ken Liu, a Hugo award winner as both a writer and a translator. His first anthology, The Paper Menagerie and Other Stories, has some interesting stories, and for some reason the library in my University has the English version of this book, plus short stories are pretty easy to read even for non-native speakers. so I just picked it up.
Continue ...Author: N. K. Jemisin
Continue ...Author: N. K. Jemisin
I’ve heard this book for a very long time. It pretty much appears on every single book recommendation thread on Reddit, and the 3-Hugo-in-a-row phenomenon is also very intriguing. However, there is no Chinese translation, and after the misery of Oathbringer, I just lost all of my faith in reading long novels in English (I still read novellas and short stories from time to time tho).
Continue ...Bought it on Steam sale after 5 years of its initial launch and 2.5 years after its pc port came out. I had to say it’s a bit underwhelming.
Continue ...