[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / r / s / t / u / v / vg / vm / vmg / vr / vrpg / vst / w / wg] [i / ic] [r9k / s4s / vip] [cm / hm / lgbt / y] [3 / aco / adv / an / bant / biz / cgl / ck / co / diy / fa / fit / gd / hc / his / int / jp / lit / mlp / mu / n / news / out / po / pol / pw / qst / sci / soc / sp / tg / toy / trv / tv / vp / vt / wsg / wsr / x / xs] [Settings] [Search] [Mobile] [Home]
Board
Settings Mobile Home
/g/ - Technology


Thread archived.
You cannot reply anymore.


[Advertise on 4chan]


File: Terry_A._Davis_2017.jpg (122 KB, 640x480)
122 KB
122 KB JPG
What core concepts can I implement to avoid Niggerlicious code?
>>
>>106440024
data schema
input sanitization
struct of arrays
handle types
message queues
atomic reference counting
parse 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 code
You serious? What the fuck?
>>
>>106440024
Just 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.
>>
>>106440079
Compay
>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 it

Management realized M$FT is retarded
Made 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 it

How 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
>>
>>106440283
That sounds like a disaster, sympathy for your company's retardation, hope you yourself don't have to interact too much with it.

>>106440179
That'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.
>>
>>106440352
I am specifically hired to interact with that shit everyday
A coworker don't understand how to seed an RNG
They wanted to randomly select 40% of all test accounts & mark them with some temporary attribute
Some idiot decided to take the maximum UID and multiply that by 40%. If UID is between 0 and maxUid * 0.4, mark that UID
He worked here for 4 years and just got a promotion, he has a compsci degree too
Makes me wonder wtf are unis teaching these days
>>
>>106440024
Seek God.
>>
>>106440398
maxUid is hardcoded
If 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



[Advertise on 4chan]

Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.