[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]

Daily reminder.

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: 116
Thread images: 4

File: 113449.png (51KB, 700x700px) Image search: [Google]
113449.png
51KB, 700x700px
Daily reminder.
>>
prove it
>>
Wasn't it norwegian?
>>
>>61832542
Daily reminder Dijkstra was the first, original language shitposter and self-proclaimed basement dwelling sperglord.
Such peoples opinion is invalid by default, whatever it actually is.
>>
>exceptionally bad
>produced the most productivity of any paradigm in history

Yea ok grandpa who's famous for literally two things
>>
>>61832575
Fuck you, Dijkstra was a god
He should be the one elevated to the heights at which RMS was raised
>>
>>61832575
So your opinion is invalid then?
>>
>>61832575
>ad hominem
>>
>>61832704
>strawman
>>
kek, the only thing we were taught about dijkstra was his shortest path algorithm and how A* is better

what a grandad
>>
>>61832542
How do I pronounce his name?
>>
>>61832728
ed yer dick strah
>>
>>61832672
>Fuck you, Dijkstra was a god
No u, he created some trivial algorithms first and wrote a massive amount of shitpost letters, that's it.
I can do that too, in particular the second part.
>>61832674
No, since I'm not basement dwelling.
>>61832704
Look it up, it's well documented and even Dijkstra basically himself said so.
>>
>>61832582
>>produced the most productivity of any paradigm in history

Bruh
>>
File: cpumemory.2.png (13KB, 305x273px) Image search: [Google]
cpumemory.2.png
13KB, 305x273px
>>61832559
Don't need to. CPU architecture proves it for me.
>>
>>61832672
>stallman
>heights
What? He's a glorified evangelist and not very good at it considering corporations just end up subverting a lot of FOSS if they don't burn out on their own due to lack of interest from developers or users. FOSS suffers greatly from survivor bias
>>
>>61832542
I've been telling people this since the 1980s. Sheeple don't listen.
>>
Principles of Object Oriented Programming
>>
>>61832898
>Number 1: Just make all your data private because
>Number 2: Put all your functions in a glorified namespace
>Number 3: Just use interfaces and inheritance and whatever else just because it's there and you might as well 'leverage' it
>>
>>61832542
let me guess, you use a superior language like html5 or Java

nice try pajeet
>>
>>61832575
On the contrary, such peoples' opinions are the only ones with any validity.
>>
1) Fake quote;
2) OOP is awful.

sage hide
>>
>>61832542
>Dijkstra: Computer Science should not have anything to do with programming
>Dijkstra: Why should i work with other people ? they are all stupid.

Fuck this dutch nigga, his life's work is destroying other people's future. Yeah, his algorithms and contributions to science are great, but why the fuck did he need to prevent autists, who don't have other choices, from going into coding ?
>>
>>61833564
>>61833673
kek
>>
>>61833018
Number 1. That's terror
Number 2. That's terror
>>
>>61832542
We already know that the hello-worlders from /dpt/ don't need OOP. Why everyone should give a fuck about your preferences for student amateur projects?
>>
File: IMG_0024.jpg (333KB, 2151x2603px) Image search: [Google]
IMG_0024.jpg
333KB, 2151x2603px
>>61832876
Plz explain
>>
>>61832542
No you dum fuck. OOP <~> POO. It could only have originated in India.
>>
>>61833707
WARNING
>>
>>61832876
this means absolutely fuck all.
>>
>talk shit about oop
>still use C structs as objects
You can't escape OOP, you need it, better than being retarded and having tons of global variables.
Only niggers that have never programmed more than a fizzbuzz are against OOP.
>>
>>61834203
It means something to me.
>>
>>61834254
>Purely grouping data conceptually over access patterns
>>
>>61833998
You basically just want to say 'fuck you' to anything that doesn't give you performance, maintainability and robustness, right?

Even a simple concept like cache pre-fetching on the CPU tells you how you should be organizing your code and accessing your data.

So when you see someone calling new/allocate every millisecond for some factory pattern of classes that inherit from an interface/virtual base class, please tell them to stop.
>>
>>61832565
nope
Xerox did it
>>
>>61832842
>wrote a massive amount of shitpost letters
I know he wrote the "GoTo considered harmful" thing, and started that meme, but what else did he write?
>>
>>61834830
If it was shit than why are games OOP? Oh because writing games like hydro thunder was a complete nightmare during the days of C
>>
>>61832898
goes in loo.
>>
>>61832876
>>61832542

there are ups and downs but the world's still fucking spinning
>>
>>61834254
"""Enterprise""" OOP Fizzbuzz
public string FizzBuzz(int startInt, int endInt) {
if(startInt>endInt) {
log("Tried to FizzBuzz but the starting int is less than the ending int");
return "";
}
if(startInt<0) {
log("Tried to FizzBuzz with a negative int");
return "";
}
return pFizzBuzz(startint, endInt);
}
private string pFizzBuzz(int startInt, int endInt) {
String ans ="";
for (int i=startInt, i<=endInt; i++) {
if (pFizz(i).size() > 0 || pBuzz(i).size() >0) {
ans+=pFizz(i);
ans+=pBuzz(i);
}
else {
ans+=i.toString();
}
ans+=" ";
}
return ans;
}
private string pFizz(int number) {
if (i%3==0) {
return "Fizz";
}
return "";
}
private string pBuzz(int number) {
if (i%5==0) {
return "Buzz";
}
return "";
}



Gee i wonder why /g/ hates OOP
>>
>>61838065
I can't even read that.
>>
>>61832542
Poor grandpa couldn't figure out polymorphism.
>>
>>61838065
>code something poorly intentionally
>claim its the fault of the paradigm
Wow you sure convinced me shitposter #61838065

I'm convinced that people on /g/ only hate OOP because it's trendy to do so. Nothing more.
>>
>>61838790
>>
>>61832542
But OOP makes programming so easy a braindead fuck could do it. Great for large projects where programming needs to be as simple as possible so you can focus less on program architecture.
>>
>>61838609
>code something poorly intentionally
>claim its the fault of the paradigm
That's enterprise OOP you dip. You are defending it and yet you don't even understand it? Let me break it down for you:

>public wrapper function that sanitizes input, logs instances of bad input, and passes the parameters along to a private function
>private function that does the real work. Operates under the assumption that input is sanitized. Readability is prioritized above all else, relying on short helper functions to perform calculations or small tasks.
>two helper functions performing simple calculations / data mutations

Enterprise OOP is shit because 1) you have to assume your other programmers are idiots and sanitize all bad cases in the wrapper and 2) because the main logic must prioritize readability over all else you spend double time breaking up your logic into separate functions.
Basically you spend triple the time to do anything to make sure Poojeet with a <100IQ doesn't fuck anything up.
>>
>>61838065
Aaaaaaaaaaaaaaaa
>>
>>61838884
This.
/g/ might be "uh oop is pajeet stuff" but once you program something bigger than a few thousand SLOC you really need to focus on how to treat objects instead of "how to use something that looks like classes but not really"
>>
>>61834830
I don't think you know fuck all about what you are talking about
>>
>>61838065
I was going to.complain about the lack of exceptions, instead returning "", but then I remembered my first programming job had a "DO NOT THROW EXCEPTIONS, PERIOD" policy.
>>
>>61832565
Yes it was.

>>61835842
Simula-67 was the first object-oriented programming language.
>>
Friendly reminder that while Dijkstra may have thought that OOP is shit, he still fucking loved exceptions.
>>
>>61839110
>you spend double time breaking up your logic into separate functions
Maybe you are the retards, anon. Extracting the function takes no more than 10 seconds in all modern IDEs and text editors. And readability is really important. I don't want to read something and constantly think "the fuck did he mean by this".
Also, I haven't really personally encountered "sanitize input, pass to other method" style.
>>
>>61838065
>if(startInt>endInt) {
>log("Tried to FizzBuzz but the starting int is less than the ending int");
>return "";
>}
>startInt>endInt
>less than
fucking idiot

I know this is a troll so I won't comment on the rest of your shitty bait but this honest mistake right there showed me how retarded you are
>>
>>61839141
>>61838884
this. this and the whole loonix instead of wangblows thing just proves that /g/ is filled with basement dwelling hipster NEETs who don't program for a living. compatibility issues with software that people actually use? being able to efficiently make large scale projects? completely irrelevant information to these cunts.
>>
>>61839243
>Extracting the function takes no more than 10 seconds in all modern IDEs and text editors.
It's not the actual extraction that takes long; it's
>Spending extra time thinking about what to extract
>Thinking about what to name your extractions
>Searching/remembering if there's already a helper function that does what you want
Meanwhile, what's in front of you already works, it's just not "enterprise" ready. It's brain-torture forcing you to do the same thing over and over to meet the "standards"

>Also, I haven't really personally encountered "sanitize input, pass to other method" style.
Then you certainly have never worked enterprise. Protip: OOP is popular because of enterprise development, not because it's good.
>>
>>61839343
> this honest mistake right there showed me how retarded you are
You're right I fucked up. But I didn't fuck up because I'm retarded, I fucked up because enterprise OOP is fucking dumb.
Let me explain what you are doing in the wrapper function and why I failed:
>Think of failure cases
>Write logic to catch failure cases and break
>write a log that explains what you just
So I am writing a log that's just repeating my logic for sanitizing the input. My brain is completely off as I'm typing. I'm just mindlessly repeating what I've already programmed, and typed incorrectly. When your brain is constantly switching between this actively programming break cases and passively writing logs, you make mistakes. It's an inevitable part of enterprise OOP.

Hell, I didn't even write a good log even without the mistake. A good log would be:
log("Tried to call FizzBuzz with startingInt " + startInt + " and endInt " + endInt + " but no value will be returned because startingInt is greater than endInt. Ensure that endInt is greater than startInt for proper functionality");


which is even more infuriating and mistake-prone after you've been writing these all day.
>>
>>61839361
No one ever said that you can't have a Windows VM or burner laptop to test how your application runs in that shit tier OS that you're forced to support because normies don't know any better. But if you use it as your everyday computer you're retarded. And how the fuck is using Linux to develop large scale projects less efficient that using Windows to do it?
>>
>>61834830
what the fuck
>>
>>61839705
woah you talk as if Linux is any better lol.
>>
Object oriented programming is bad but classes and inheritance are occasionally useful.

Though generally speaking non-inheriting generic constructs do the job perfectly without throwing inheritance into the mix.
>>
>>61832542
Sage
>>
>>61843309
prototypal inheritance 4 lyfe
>>
>>61839243
>I don't want to read something and constantly think "the fuck did he mean by this".
You wouldn't have to if you weren't such a god damn retard.
>>
File: 1499712521307.jpg (102KB, 1200x790px) Image search: [Google]
1499712521307.jpg
102KB, 1200x790px
>>61832542

Why are methods fundamentally worse than free functions?
>>
>>61837830
Considering the turnover time for game development and performance back in the days, I have to disagree.

You look at the rate which a small company like Id software pushed out games. All in C.
Even in the 6502 days. People just busting games out.

Games are OOP because people like mental models to link to their 3D, world-like digital space.
>>
>>61844622
The rate they turned out games had nothing to do with C or OOP. If you don't have to make an engine from scratch, it takes less time to make a game.
>>
>>61832542
bump for awareness
>>
>>61844560
Because methods have to be paired with a class that fits conceptually in a mental model.

Except then you get into philosophical arguments about verbs and nouns.
When I've brought this up, I've had people tell me, "Isn't that the point of programming?"
>>
>>61844673
In the mid 90's people were making engines.
I'd argue starting from nothing with 6502 assembly is even harder.

Look at the engines people have today.
You have people that specialize in certain software suites they're so in-depth.

There's more to it today than just OOP, but I'll argue it's still a bigger hassle than people are willing to realise.
>>
>>61839243
You may wish to try using an extremely useful feature of most modern langauges called a "comment". It is really useful for adding explanations to code that you may not immediately understand.
>>
>>61844793
Well that's another thing.

You don't really need to write comments.
The code should be self explanatory from being code, it's already a language in a language.

Comments should just be quick notes.
>>
>>61844825
Two quick opinions on comments:
1. Comments should only be used where the code itself can't convey the message.
2. If the code and the comments disagree, both are probably wrong.
>>
>>61832876
could you dumb it down for me?

>>61834254
what about functional programming?
>>
>>61832876
I can't see the California part.
>>
>>61844991
Cache is essentially fast memory next door to the CPU.
So when we want a variable, we take it from Main Memory (RAM) and put it into the CPU.

But what if we want that same variable again and it isn't on the CPU? We have to go back to main RAM, and that takes a while.

But the CPU can also put the variable in the cache, which is much faster to access than main memory.
So the CPU fetches data into these caches in chunks.
So it takes the original variable, puts in it the cache from Main memory, but then it also takes the next 200 bytes after the variable and puts them into the cache for example.

So modern CPUs are built for procedural code and linear memory access. At least as far as performance is concerned.

But everything is easier when it's linear.
So you simplify your programming AND you get performance benefits.
>>
>>61844991
>>61833998
http://www.dataorienteddesign.com/dodmain/
parts of the first few chapters discuss some problems with OOP,

the 2 main reasons i can remember from it is
>OOP groups too much data together, if you dont use everything loaded into cache its a big waste
>polymorphism in OOP fucks up data and instruction cache
>>
>>61832728
I could be wrong but I've been saying "dike-struh" with the "j" sound kinda shoehorned into the "dike"
>>
>>61840828
>>61839157
If either of you find fragmenting the heap via thousands of calls while trashing the cache via virtual calls is a good idea for maintainability and performance in your travels let me know.
>>
>>61845882
>fragmenting the heap via thousands of calls
If we're talking about Java, there's absolutely no fragmenting. Moreover, the "heap" there is more akin to a stack and it's extremely cheap for any thread to allocate.
>>
>>61846357
>Memory allocation is cheap in Java

I don't believe this, I'm going to look it up.
Java hangs when the garbage collector hits, God knows what it's doing for each new statement.
>>
>>61845882
>virtual calls
OOP isn't just polymorphism, anon
>>
>>61847921
You're right, it's worse than that.
>>
Is problem solving skills meme??
>>
>>61848370
Being foolhardy enough to think that a paradigm can fit every problem is.
>>
>>61832542
>>61832559
https://www.youtube.com/watch?v=QM1iUe6IofM
>>
>>61832728
DJ Extra
>>
Dijsktra was an academic and didn't really know how big and unmaintable purely structured programs in the enterprise can get.
>>
>>61832542
OO is good to be used where OO is needed.
Trying to make EVERYTHING OO because muh paradigm is retarded.
Also over-extending shit, making you need to go thru 50 files to find where X thing is actually executed is also stupid.
>>
>Hello and welcome to another "all programming languages suck except those who I learned" thread
>>
>>61834203
It does something if you understand cache memory
>>
>>61838884
You can write overly complex code with every paradigm.
>>
>>61843309
Interfaces are my favourite OOP feature.
>>
>>61846541
Java has heap/stack that has been allocated by OS at the start and the size is managed by VM. When calling new you save the time spend on allocating memory from OS compared to some other languages.
>>
ITT: People who don't even know that OOP is.
Hint: No, it's not just about objects.

https://www.youtube.com/watch?v=QM1iUe6IofM
>>
>>61849380
Every language is garbage except C, Ruby, Python and Lua.
Fuck Lisp and those stupid braces.
Fuck C++ for fucking everything up.
Fuck Java. Fuck C#.
Fuck Haskell, I can't read this shit.
Fuck D for being C++ 2.0 instead of the obvious.
Fuck Rust for caring about safety.
Fuck R for doing nothing.
Fuck you PHP.
Go away JavaScript.
Markup languages can fuck right off, holy shit.
>>
>>61849380
/thread
>>
I agree
>>
>>61849519
>ruby python lua
fuck dynamic typing
>>
>>61849380
It's even worse when you learn at a university.
CS profs will hail their preferred FP language as the best thing in the world to impressionable first semesters and shit on every other language.

My old prof even devoted a whole lecture solely on shitting on Java.
(and that was the only time he had properly prepared slides, instead of scribbling equations on the black board for two hours and then noticing he made a mistake at the beginning)
>>
>>61849657
It's because Java is shit. Didn't you even listen?
>>
>>61849473
Doesn't matter what it actually is.
Just do the programming. Programming isn't hard, you just do the thing.
Simplest thing first.
>>
>>61849776
Most of his criticisms were retarded nitpicks.

Like "Oh my god you have to use object wrappers for primitive data types in Generics" or "Java doesn't have TCO"
>>
>>61832542
Add another one to the "I'm too stupid to understand it and therefore it's bad."
>>
>>61849826
How can you get a CS degree without being capable og understanding simple babby programming?
>>
>>61845138
>linear memory access

You know, this is what I don't understand, if RAM is random access, why should linearity matte? Isn't the whole point of RAM that at any point any address can be accessed just as fast.
>>
>>61849840
>implying higher education isn't mostly about communist brainwashing
>>
>>61849826
Dijkstra was just to intelligent to understand OOP
>>
>>61849842
He just explained why.
The CPU tries to cache shit you're gonna use a lot from RAM. If you access shit in a random fashion it becomes impossible to predict what you need to cache.
>>
>>61832582
>t. OOP baby who is incapable of writting code that doesn't have a million layers of abstraction, inheritance hierarchies and indirection and thinks it's somehow more maintainable because of it.

Reminder that nothing is more maintainable, readable and straightforward than a few functions and data structures.
>>
>>61832542
Really? I could've sworn it was Italian.
Y'know, because of all the spaghetti code.
>>
>>61849842
Modern RAM memory is not exactly 100% optimized for random access.
You have to send commands to it to jump to another address and it takes a while to update the internal muxers etc..
But linear reading is faster because you don't actually have to send a command per read.
>>
>>61849842
if the data is in cache(fast) you dont have to acces ram(slow)
when you get some data from RAM you put an entire chunk of data in cache

lets say you are going over an array with 100 elements (the data is in consecutive postions in memory)
you read the first from ram, the moment you read the first you save the next 10 in cache
now accesing the next 10 elements is fast as hell because you go to cache instead of ram again
so at the end you go to ram 10 times

now instead of iterating over an array you do it over a list (the data is in random positions in memory)
first you get the first element from ram, you'll save a chunk of data in cache
in that chunk there aren't any elements of the list, so every time you acces an element you go to cache instead of ram
you need to read data from ram 100 times

the first program will be 10 times faster because you dont have to wait for ram for every element
>>
>>61849899
OOP is more like lasagna coding
>>
>>61833673
Can you provide the exact quotes?
>>
>>61850182
first will be even faster because of prefetching.
the processor can predict that you want the next block of memory before you get to it.
Thread posts: 116
Thread images: 4


[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.