What core concepts can I implement to avoid Niggerlicious code?
>>106440024data schemainput sanitizationstruct of arrayshandle typesmessage queuesatomic reference countingparse things properly and don't take shortcuts with string search and replace like my company's production code
>>106440069>parse things properly and don't take shortcuts with string search and replace like my company's production codeYou serious? What the fuck?
>>106440024Just make it actually readable.You do it like a C project with all your central functions being just functions, but you use classes to tidy it up, and you don't overdo inheritance so you have to check 6 separate source files to find where the fuck is the bug.
>>106440079Compay>eveloped a proprietary XML based DSL for "scripting purposes">interpreter was literally a C# WinForms program.>to periodically run the scripts they had a Windows server>employees need to VNC into itManagement realized M$FT is retardedMade an initiative to port the XML script over>devs don't want to rewrite their shitty XMLs in Java for some stupid reason>so they wrote half-assed XML-to-Java transpiler>the transpiled Java code is the hackiest shit ever, worst than a high schooler's programming homework>contractors copy the shitty patterns from transpiled code and build new stuff on top of itHow do you increment a variable?>hashmap.put("varName", (Integer.valueOf(hashmap.get("varName") + 1).toString())How do I parse JSON?>String json = gson.toJson(someProprietaryJsonTreeObject);>Dto dto = gson.fromJson(json, Dto.class);How do I seralize JSON?>String requestPayload = "{";>requestPayload += ",\"key\":\"value\"">requestPayload += "}";You don't need AI to make slop I guess
>>106440283That sounds like a disaster, sympathy for your company's retardation, hope you yourself don't have to interact too much with it.>>106440179That's actually a pretty neat way to look at it, one of my problems that I've had with code is the backtracing through classes to find the problem which I guess fits with the whole niggerlicious code rant Terry did.
>>106440352I am specifically hired to interact with that shit everydayA coworker don't understand how to seed an RNGThey wanted to randomly select 40% of all test accounts & mark them with some temporary attributeSome idiot decided to take the maximum UID and multiply that by 40%. If UID is between 0 and maxUid * 0.4, mark that UIDHe worked here for 4 years and just got a promotion, he has a compsci degree tooMakes me wonder wtf are unis teaching these days
>>106440024Seek God.
>>106440398maxUid is hardcodedIf somebody decides to change the pool size of the test accounts the (maxUid * 0.4) upper bound won't work and I'd imagine it was a very fun debugging experience