[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

What are some common programming practices that you find stupid?

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 30
Thread images: 6

What are some common programming practices that you find stupid?

>separation of transformation, view, and projection matrices in graphics programming
>making the second most calculation intensive part of the graphics program do numerous unnecessary multiplications, not to mention passing three times as much matrix data through the CPU-GPU bottleneck
>>
>>58048998
anime
>>
>>58048998
shaders are good at matrix multiplication :^)
>>
File: pic4IW8Lh.jpg (93KB, 555x416px) Image search: [Google]
pic4IW8Lh.jpg
93KB, 555x416px
>muh OOP sucks

I think anyone on /g/ is naive if they think a certain practice is stupid when most posters are kids here and will have hardened professionals make you sound like a retard.
Also some here haven't worked in a professional environment where sometimes shit just needs to get done QUICK.
>>
>>58048998
Iteration
>>
>>58049254
You mean in place of recursion?
Iteration makes sense in place of recursion in that it's hard to tell how far you can go with recursion until a program crashes, iteration is just harder to program.
>>
File: 1463182060199.jpg (67KB, 1280x720px) Image search: [Google]
1463182060199.jpg
67KB, 1280x720px
>>58049033
>comes on anime website
>complains about anime
I estimate that your IQ is under 90 just based on that comment alone.
>>
>>58049431
fuck off, weeb, there is already a /mkg/
>>
>>58049125
it's not exactly OOP that's dumb, but treating it as a one-size-fits-all paradigm
>>
>>58049494
OOP makes a lot of stuff a lot easier, but in my computer science class we had to use objects in some pretty ridiculous ways.
>>
>>58048998

So you can split out segments like culling, clipping, etc into the spaces which are less expensive than if you were to just merge into one matrix.

Next dumb thing you don't understand?
>>
>>58049525

Component architecture vs hierarchical. Objects still reign strong.
>>
File: 1471121218168.jpg (102KB, 897x675px) Image search: [Google]
1471121218168.jpg
102KB, 897x675px
>>58049448
>fuck off, weeb
Your life must be total shit when you get off on insulting people for liking anime on an anime site. I bet you also go on faggot.com/forum/tech and insult ppl there for being fags. Get some pills or weed... they'll help your depression a lot more than shitposting and insulting ppl.
>>
>>58049628
fuck off, weeb, there is already a /mkg/
>>
>>58048998
The whole header file tradition carried over into C++, specifically with how the implementation and interface is separated. It makes things overly complicated for smaller classes, and using templates pretty much requires implementation to be placed in the header file with class declarations anyways.

Also the whole practice of having to instantiate a class object for things like random number generation and encryption is just plain stupid.

>>58049396
And a lot of languages don't support tail call optimization (even in algorithms that could benefit from TCO), which means recursive implementations tend to use excessive memory.
>>
>>58049448
>>58049645
What do mechanical keyboards have to do with anime?
>>
>>58048998
When people quote software engineering blogs and books like they're the word of god. It's a starting point for discussion, but just because you can do HATEOAS doesn't mean you should.
>>
>>58049671
It became a weeb general a few days ago

since then it's dead, ain't gonna post _key_caps for weebs
>>
File: 1467028708157.png (287KB, 1000x1000px) Image search: [Google]
1467028708157.png
287KB, 1000x1000px
>>58049713
This whole website is anime general you motherfucking mongoloid.
>>
>>58048998
>EVERYTHING MUST BE IN A CLASS
>SOURCE FILES WITH GLOBAL FUNCTIONS AND NO STATE ARE THE DEVIL

OOP is good but for fuck sake don't use it when it doesn't bring any advantages, it will only do the exact opposite.
>>
File: 1482008098896.png (197KB, 513x599px) Image search: [Google]
1482008098896.png
197KB, 513x599px
>>58049842
This whole website is about /b/ and NOW FUCK OFF
>>
>>58049888
>t. redditeur
>>
>>58048998
People who think functions should be as small as possible and divide them up into hundreds of tiny functions. It makes code so fucking unreadable.
>>
in C:
for(;;)
>>
>>58052482
What does that do?
>>
>>58052553
Infinite loop.
>>
>>58052559
Why can't they just use "while true"?
for(;;) makes sense but is extremely unintuitive, especially as it would be rejected in many languages.
>>
>>58052592
>Why can't they just use "while true"?
They could, but they don't.
I don't know; it's a style thing.

There is also the very outdated misconception that people actually think the compiler is going to evaluate the "true" part each time the loop is ran, which is ludicrous. Even the most simple optimising compiler is just going to transform that into an unconditional jump.
>>
>>58052650
There really should be more info on what compilers do and don't do well.
Such info seems only available as probably-true rumours, such as "if statements make fragment shaders slow".
>>
>>58049125
I literally don't even understand OOP

why would I want a weird live datatype thing with combined with functions....
Thread posts: 30
Thread images: 6


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
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.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.