Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Search - "learnprogramming"
-
What is a pointer?
A descriptive and ELI5 answer found on Reddit:
You have a house.
When you’re outside, and you want to go home, you don’t make another house right where you are, because it’s too big for you to carry around or take apart.
So you carry a piece of paper or store on your phone the address of your house. Now you always know exactly how to find your house so that you can go home.
The piece of paper or your phone is a variable.
The variable contains an address (a reference) to your house.
You can make a copy of this piece of paper and hand it out to your friends when you invite them over, instead of building each friend a copy of your house.
You can have an address book filled with pages, where each page is an address (i.e., an array of pointers). Each page you turn (each index you increment) goes to the directly next address-containing variable.
Now if you cut the address book in half along its height, and then attach the lower half behind the upper half, then you have a book with smaller pages but more pages.
You can store phone numbers in this, and even if it’s the same total size, you have double the number of pages and double the number of phone numbers (if you store one number on each page).
Now, since the pointers to home-addresses are different from pointers to phone-numbers, turning the page in an address book (increment pointer by 1) moves forward by one address.
But turning the page in the phone book (incrementing pointer by 1) leads you to the next phone number, even if you technically turned only “half a page”.
That’s how pointer arithmetic works.
Source: https://reddit.com/r/...8 -
C# or c++. Hi im starting to learn programming and i have to decide between c# or c++. I use linux as my os. What do you think?17
-
So, the internet is over. Just in case you didn’t notice. If you post a link to anything that involves you: an article, a podcast, a thing you built, a video you made - then mods and admins and trolls get their pitchforks and ban you or roast you or delete you.
This is not the way.
Not only are the walled gardens of apple, Twitter, Facebook/Instagram, breaking the web into little areas - and marketing is buying your time - but we’re doing it to ourselves too.
I can’t post a video about some of my favorite programming books in
/learnprogramming or I’m immediately banned!? Every link that takes people away from your ad dollars is ‘spam?’ Without any useful discourse and content - then why would anyone be there in the first place.
One time I posted a link HERE about how people could get CSS help in the CSS discord and I got fire-stormed for self-promotion. Really? Hundreds of hours helping people learn programming - for free... is my self promotion? Is everyone so insecure that they can’t allow anyone else to talk about their work? It’s super scary.
This is how you control people. This is Nazi shit. It’s a slippery Slope. Watch out.
And whatever you do... don’t share links to your things. That is NOT what the internet was made for.4 -
Has anyone here used app academy open. Is it good and does it teach useful and up to date stuff? I was thinking of doing it but there are barely any reviews online. There is a reddit thread about why it is handicapped but it is old and a user clarified it was misinformation. https://reddit.com/r/...
Their curriculum seems to be pretty good except that I will need to learn ruby on rails which I need to forget after the MERN stack part and that they teach docker compose instead of kubernetes