WHY MOST C++ TUTORIALS ON THE WEB DONT TEACH MODERN C++ REEEEEEEEE I'VE BEEN...

Ian Wright
Ian Wright

youtube.com/watch?v=TJHgp1ugKGM

WHY MOST C++ TUTORIALS ON THE WEB DONT TEACH MODERN C++

REEEEEEEEE
I'VE BEEN STRUGGLING TRYING TO FIND SDL2 TUTORIALS ON MODERN C++
LAZY FOOS IS TRASH OLDER LEGACY C++

Other urls found in this thread:

youtube.com/watch?v=rX0ItVEVjHc

Juan Parker
Juan Parker

Did he just spend like 40 minutes explaining that sequential data access is faster than random data access.
EVERYONE HAS KNOWN THIS FOR YEARS

Camden Martin
Camden Martin

sepples
u deserve it tbh fam

Colton Sanders
Colton Sanders

I'VE BEEN STRUGGLING TRYING TO FIND SDL2 TUTORIALS ON MODERN C++
Have you tried looking for a more general (not tied to a single library) tutorial on modern C++? If you know modern C++ by itself, I suppose you should be able to translate much of the old trash to it.

EVERYONE HAS KNOWN THIS FOR YEARS
I don't know man. I'm willing to bet there's more than a few CS grads out there who know nothing about cache locality and everything about how "elegant" linked data structures are.
<linked lists have O(1) insertion so they're always better than arrays when you need to insert something :^)))))))))))

Benjamin Sanchez
Benjamin Sanchez

pic
smh fam. you're supposed to aim at the roof of your mouth (brainstem specifically), not your temples.
sage for offtopic

Jaxson Russell
Jaxson Russell

Effective Modern C++ isn't too bad. It focuses on C++ 11 and 14. It drones on a bit, but far less than some other books. The most annoying thing is it intentionally shows you how not to do things and after hours of reading, it's easy to forget they're showing the wrong way to do it.
The C++ Standard Library 2nd Edition by Nicolai Josuttis has a good section on C++ 11.
Programming with C++ 17 is another book by Josuttis, but it's not finished yet. He has a pretty good writing style.

Ryder Diaz
Ryder Diaz

the only language fatter than your mum
GNO
From: Richard Stallman
To: emacs-devel
Subject: Re: Efforts to attract more users?
Date: Mon, 12 Jul 2010 08:36:48 -0400

C++ is a badly designed and ugly language. It would be a shame
to use it in Emacs.

Gavin Howard
Gavin Howard

Emacs Lisp is even uglier then C++ though

Elijah Diaz
Elijah Diaz

Go read Bjarne Stroustrup's work.

Richard Stallman
"C++ is a badly designed and ugly language"
Stallman can go fuck himself.

Justin Kelly
Justin Kelly

It's ugly (like all lisps) but C++ always takes the crown.

Austin Gutierrez
Austin Gutierrez

WHY MOST C++ TUTORIALS ON THE WEB DONT TEACH MODERN C++
You open with what is clearly worded as a statement or hypothesis but your link doesn't contain any supporting evidence. Are you perhaps illiterate, or mentally retarded?

Asher Howard
Asher Howard

SDL is a C library anyway, you goddamn brainlet wojakposting cuckchanner.

Zachary Butler
Zachary Butler

Check out Alex Allain's Cprogramming.com; Alternatively, check out his book, Jumping into C(++). As a previous user mentioned, Bjarne Strostrup has an excellent collection, and it's the de-facto standard for college level courses.

William Mitchell
William Mitchell

This image
Why the fuck did they placed a light bulb into the psu?

Aaron Murphy
Aaron Murphy

It must be one of those new age fads.

Liam Bennett
Liam Bennett

gaymur lighting?

Jeremiah Clark
Jeremiah Clark

Engineering newfag here, doing c++ this term. I can't understand what the point of the ‘using’/‘using namespace’ is. Surely if I've included something it means I want to use it no?

Chase Reyes
Chase Reyes

Including and doing that are different things. Let's take a look a cout from the standard library. If it's just included you need to use it like so:
std::cout << "Example" << std::endl;
If you use the "using namespace std" you only have to do:
cout << "Example" << endl;
Problems can arise in doing that because you could have a different library with a cout function for example and it wouldn't know which one you were referring to.

Ethan Wright
Ethan Wright

You can declare things in a namespace. "using namespace foo;" means that you can use things in namespace foo without specifying every time that the thing is in namespace foo. For instance: namespace loo
{

int poo = 1;

}

//without using namespace:
int designated1 = loo::poo;
//with using namespace:
using namespace loo;
int designated2 = poo;
You're probably familiar with "using namespace std;". This is used because standard library things (like std::cout) are all in namespace std.
Surely if I've included something it means I want to use it no?
#include "india.h" just means that you're literally copy-pasting the content of india.h into your file, so things are still inside their namespace.

Luis Butler
Luis Butler

WHY MOST C++ TUTORIALS ON THE WEB DONT TEACH MODERN C++
Are you making a statement or do you not know how to formulate questions in English? Pro tip: you swap the verb and the noun (this is called an inversion) and you place a question mark at the end of the sentence.

If it was a question: I guess most people just don't know modern C++. They learned C with classes, or some slightly more modern C++, usually from someone who also only knew C with classes, and so it gets perpetuated. It doesn't help that modern C++ is fucking ugly as shit and is literally bolted onto the language.

I'VE BEEN STRUGGLING TRYING TO FIND SDL2 TUTORIALS ON MODERN C++
SDL is a C library, and Lazyfoo is an ass for writing the tutorial in C++. Learn SDL, then learn modern C++, and then you will be able to put the two together without problems. If you want to follow the Lazyfoo tutorials just suck the crappy C++ down, you're not in for the C++ code, you are in for the SDL code.

I didn't know that until I watched a video by Stroustrup and was also raised on "le O(1) insert". And now I am paranoid of linked lists and try avoiding them beyond what is reasonable.

Jace Richardson
Jace Richardson

Yes. Read my book!

Adrian Morgan
Adrian Morgan

Just use a vector fam

Lucas Richardson
Lucas Richardson

sdl
all the cool kids use sfml

Lucas Rodriguez
Lucas Rodriguez

It's all good as long as it's a newer CFL

C++ is OK if you don't veer off the reservation and try to do things that it can't understand*. You will find most tutorials tell you what you should do, but not examples of what you shouldn't do & why you shouldn't do it - which can sometimes be even more important for beginners when learning to code. The why is often more important to understand than the how, since you can deduce the how from understanding the why. (Essentially there not as much focus experience transferal)

-Why can't I do this?
No, you don't do that. Do this.
-Yes, but that seems a convoluted solution. Why can't I simply do this?
Do you want it to work or not?
-Yes, but why can't I do this and it work too?
I don't know. It just doesn't. Do you want it to work or not?

*before you sperg out "C++ does it all" telepathically tell your computer what you want to type. Did it do it? No? That's because it can't understand telepathy. C++ can be used to "do it all" solution wise, but (I was talking about coding syntax (concept interpretation) here) there are things it can't do.
unsigned int I_dont_want_a_pointer_I_will_fill_array_later [] [] [];

Juan Clark
Juan Clark

You can sort of think of it like an abbreviation, or path setting.
When you #include it you say "I'd like to have available..x..because I'm going to use it later", but when you actually use it you need to say it's full name.

std::cout << "This would be the full name of cout if you #include the relevant header" << endl;

using namespace std;
cout << "Able to use a shorter name (abbreviation), because you've said you're using std namespace" << endl;

James Allen
James Allen

Surely if I've included something it means I want to use it no?
Yes, but when you use it, you must use it's full name.
I send an invite (#include) to Mr. Keith Peterson because I want him at the dinner.
When he attends I must always refer to him using his full name "Mr. Keith Peterson" to not get confused with other guests called Keith. If I have stated I'm within his circle of friends (namespace) I can call him "Keith", but there is the possible danger of getting confused with another guest.

#include - includes the code, by copying it and pasting it
namespace - includes the named scope, so you don't have to write it in full each time.

Aiden Edwards
Aiden Edwards

Thanks user, it's would have been great if my professor with his very dubious accent explained that properly instead of just saying "please pasta this into your code".
I already understand how headers work because I played around with C before attending uni, I just wish my prof and his niggershit textbook would actually teach something besides pajeet programming techniques.

Gabriel Powell
Gabriel Powell

modern c++ is not designed for performance speed, it's designed for safety, "implementation speed", an trying to be coop and hip with the in crowd (which no c++ programmer will never get)

If you're going for sdl2, you probably are going for something graphic, this does not need implementation speed but rather performance speed, you want to churn triangles at the highest speeds to your graphics card, not worry about having total reflection and runtime bounds checking and some class being uncle sister mentor bing bong to another class.

Thus, any tutorial talking about games that is actually talking about modern c++ is simply not worth it, you shouldn't be writing games on modern, but rather adopting something like orthodox c++

also watch this youtube.com/watch?v=rX0ItVEVjHc

Nathan Ramirez
Nathan Ramirez

the blogposting brazilian cuckchanner is still coming up with excuses on why he can't learn things
now he needs tutorials for a specific version of C++ to use a C library
You're so fucking retarded. It's hilarious.

Xavier Morgan
Xavier Morgan

Modern C++ sucks ass, like all modern programming paradigms.

Colton Green
Colton Green

cuz everyone's busy doing javashit

Landon Thompson
Landon Thompson

stroustrup has three different books on modern c++ depending on your needs and skill level
i hear he knows a little bit about the language

Henry Brooks
Henry Brooks

Due to lag of adoption of C++ standard by compilers, OS distributions, etc. it's usually not possible to start using new useful language features immediately. General guideline is: if current year is C++year+5 then it's safe to start selectively using C++year's features. For example, if standard is C++11, and current year >= 2016 then it's probably safe. If standard required to compile your code is C++17 and year is 2016 then obviously you're practicing "Resume Driven Development" methodology. If you're doing this for open source project, then you're not creating something others can use.

the fuck is this horseshit

Grayson Myers
Grayson Myers

Ah... I see, you're one of those guys that are so fucking annoying and go preaching around how everyone should code using the newest standard that comes up every week, and how new people should not be allowed to know how the underlaying metal works (so they don't know how to be faster, so, you don't have an excuse to go faster either).

I'm sorry dude. It's not fast people the ones making you slow. You're the one making yourself (and other people) slow, with poor design desitions.

You're going for untested features in all senses, you don't know how well new features are implemented, and you don't even know if those new features are all that useful in making implementation speed faster. Basically you're just using a new tool just because it's new, and not because it's the tool you need.
Zealous attachment to wathever the c++ dark council chooses to fancy on currentYear is a sign you have never programmed for speed, stay out of this conversation and stop pretending you have enough idea to be calling things horseshit, when your code is probably as sluggish as stale puke.

Asher Ortiz
Asher Ortiz

But does he know anything about programming?

Jayden Watson
Jayden Watson

Why would you want to use Modern C++ with SDL OP? Assuming you're not just troleing, then use SFML and read a good book. I suggest Stroustrup or Meyers.

pic
every time

Andrew Jones
Andrew Jones

Try Rust.

Jaxon Nelson
Jaxon Nelson

The choice of cock-monglers everywhere.

Benjamin Miller
Benjamin Miller

At least it's :

safe
fast
modern

Everything that C++ isn't

Jason Johnson
Jason Johnson

Modern C++ is modern though.