Menu
Floppy disks: The save icon's origin story.
Home
Hot
Random
Search
Browse
AI
AWS
Agile
Algorithms
Android
Apple
Azure
Backend
Bash
C++
Cloud
All Categories
HTTP 418: I'm a teapot
The server identifies as a teapot now and is on a tea break, brb
HTTP 418: I'm a teapot
The server identifies as a teapot now and is on a tea break, brb
Getfenv Memes
Posts tagged with Getfenv
I Sure Do Love Not Using Local Variables!
Programming
Debugging
Gamedev
12 hours ago
37.6M views
0 shares
Someone wrote code so deeply nested in getfenv() calls that it looks like they're allergic to storing values in variables. Every single line chains together getfenv().game.ServerScriptService.data[plr] like they're being paid per character typed. Instead of doing the sane thing and writing local playerData = getfenv().game.ServerScriptService.data[plr] once at the top, they decided to traverse the entire object hierarchy on every. single. line. The performance implications alone are making my CPU cry. It's like watching someone walk to the grocery store and back for each individual ingredient instead of just... buying everything at once. The irony? They're clearly working in a Roblox/Lua environment where local variables are basically free and would make this code 10x more readable and performant. But nope, let's just spam getfenv() like it's going out of style and create a maintenance nightmare that would make any code reviewer weep.
Today's picks
G.SKILL USB KM360 Professional Tenkeyless Mechanical Keyboard, Cherry MX Red, ABS Dual Injection Keycap, (White)
Affiliate
$34.99
NordVPN
Sponsored
VPN
Junior programmers using spacebar to indent codes be like
Programming
83.1K views
2 years ago