4 ms·
I just use a UUID for every variable name to make sure the codebase never has any ambiguity. No one is going to confuse e7693160-b5cf-4761-9202-de019cfd0fc9 wi
by ineedasername 6y ago
I just use a UUID for every variable name to make sure the codebase never has any ambiguity.
No one is going to confuse e7693160-b5cf-4761-9202-de019cfd0fc9 with c3d8b9ac-d0da-4bbc-912b-025ce4e47f62
- whatshisface 6y agoA good name has maximal information density. If the string is compressible, you're wasting your reader's time. That's why I use all utf-8 glyphs to render my uniformly random and highly informative (from an information theory standpoint) variable names.
- uyt 6y agoYou joke but symbolic programming languages like APL are kinda neat. https://en.wikipedia.org/wiki/APL_syntax_and_symbols https://en.wikipedia.org/wiki/APL_syntax_and_symbols
- calvinmorrison 6y agoI do see this more often in UTF8 native platforms. arr1 and arr2 might use subscripts for 1 and 2 with no side effect on plan9. Why use "delta" when writing a delta symbol is so easy?
- dTal 6y agoJulia not only supports Unicode, but embraces it culturally. You indeed very often see Δ in Julia code.
- 174SIGSEGV 6y agoA good name is also memorable, consistent, easily decipherable, and works around namespace conflicts. Might be a best 2.7 out of 4 situation, I guess. Why 2.7/4 and not 3/4? Because the remainder was lost in translation to the ASCII gods.
- keanebean86 6y agoThis implies your code has fewer than 2¹²² variables. A real coder should have more than that in each method. Sounds like you're basically a glorified VB "dev."
- ineedasername 6y agoyou're basically a glorified VB "dev." How did you know?! Actually it's probably not far from the truth... most of the code I write is more like scripts in R & Python and small utilities than fully-fledged applications. And lots of SQL. I glue a bunch of stuff together, and after that is where my real job begins. I used to have a bit more fun writing C code to work around the limitations of an ancient ERP: that system's foundations literally extended back to before the moon landing and long before I was born.
- 1vuio0pswjnm7 6y agoYou could rename the functions to match their symbols, after compiling. The output of nm for the function originally named "write" from musl libc might look like 000000000006ee20 T 000000000006ee20
- stevebmark 6y agoThere's some usefulness in this idea, which is the core idea behind Unison https://www.unisonweb.org/docs/tour https://www.unisonweb.org/docs/tour
- jnwatson 6y agoI once ported a 3rd party telecommunication middleware stack to a new OS. Every single function was 12 characters long, 4 fields of 3 characters each. Each field had meaning, but I wasn't given the decoder ring. That was not fun.
- ornxka 6y agoActually, you'd be really surprised about that: https://twitter.com/Foone/status/1229641258370355200 https://twitter.com/Foone/status/1229641258370355200
- mro_name 6y agolol