3 ms·
You know, that's surprisingly an elegant hack. I'm sure it's obvious to some folks, but for some reason I never came up with it during my old C programming days
by bane 4y ago
You know, that's surprisingly an elegant hack. I'm sure it's obvious to some folks, but for some reason I never came up with it during my old C programming days.
- ww520 4y agoOh I was desperate. I was the most junior guy in the team on my first job after school whom got thrown with a hard problem. Luckily I remembered __FILE__ and __LINE__ in C, and it was a matter of working backward to link those to malloc and free somehow. My Unix command-fu (sort, uniq -c) learned back in school came through in dealing with the huge log file. It was a huge boost to my confidence on my job and earned my cred with the team.
- bee_rider 4y agoThe eternal curse of the C programmer is knowing that macros are Right There, just waiting for you to take them up and craft the most elegant… footgun.