/dpt/ - daily programming thread

Does anyone have the instructor's manual to the 3rd edition of Intro to Algorithms?

old:

Other urls found in this thread:

bookzz.org/book/502892/6ad216
bookzz.org/book/951032/1b3cf1
panther.vos.cz/novaknihovna/new/books/Introduction_to_Algorithms_Cormen.pdf
hero.handmade.network/episode/game-architecture/day026
hero.handmade.network/episodes
en.cppreference.com/w/cpp/language/initializer_list
twitter.com/NSFWRedditGif

1st for Go > *

ftp://ftp.installgentoo.com/EBOOKS/Programming/
a:install
pw:parakeet

1st for Go fuck yourself.

lemme guess: you are a C++ dev.

I've actually read the first 50 pages of that book it is pretty good at explaining the common patterns and algorithms in programming of sorting searching swapping and whatever else there is

I use all the Cs (c, c++, c#), because C is for cancer and I don't want to live on this planet anymore.

Nice mem

>Cheese pizza RPG
>Chip8 emulator in rust
>Lack of understanding of programming
>Should I learn Python

Did I cover everything? Can we move onto something more productive like insulting one another?

Can anyone save me.
Ive been trying all day but I cant figure out how to use the glfw callbacks properly.
Particularly
>glfwSetWindowSizeCallback
I want a member function of a class to run if the window is resized. But I cant figure out how to use this callback.

Very cool. Thanks. The solutions are for 2nd edition though.

bookzz.org/book/502892/6ad216
bookzz.org/book/951032/1b3cf1

you forgot the constant hate on Java for 0 logical reasoning

Nobody cares, fuck off, do your homework without cheating, suck a dick

That's because Java is shit, Pajeet

I've been learning Swift.

No it's not you are giving 0 reasons and no real explanations to why it is.

>0 reasoning
Have fun programming in Blub.

>respecting homework
Not him but I'm confident that simply not learning algorithms and starting to write code for real projects would teach you more than learning algorithms. And that's all assuming the course is good. It's very rare to get good courses at university.

I think people should just have a small booklet which describes a large amount of algorithms and their complexity. Is there anyone who needs anything else?

>Blub
>implying Paul Graham didn't invent that meme to take dumb autists like you out of the workforce

>Showing the irrational aggression that truly stops these threads from ever being productive.

Pajeet, you can't even express functors in Java, because it doesn't support abstracting over higher-kinder types.

A programmer who learns algorithms and has no real projects learns less than a programmer who does real projects and doesn't learn algorithms. They both learn less than a programmer who learns algorithms and does real projects.

Oh, I'm sure not learning any fundamentals or theory and instead jumping into writing code will let you make a fine mess of things.

>Undervaluing yourself by working for others.
Paul Graham's advice isn't for people who look for jobs in programming.

>functors

Functors are useful things.

a little yin, a little yang, boys. yin and yang.

no
>>reddit

Maybe read my post?
Learning algorithms is a waste if they're not really used.

Like linked lists, not to start that conversation again. But they're pointless, you should never have to learn them. I'm not saying people shouldn't know about them. I'm just saying that the kind of shit you're taught is a huge waste of time. Like most of you (i imagine) I've had to teach it, it's garbage. And it's difficult to ease the pain of the students.
It's true. Every newbie programmer is shit. We should teach people programming architecture in a nice way. And not the 'write UML diagrams for everything' kind of architecture. Something useful. It's hard to find that stuff. Most just have an intuition for programming well. That should be codified some way. It'd be nice to have a set of rules different programmers follow somewhere.

But all of that has very little to do with algorithms really.

Do you even know what a functor is?

As a computer science student who has taken algorithms, architecture, and programming. I still can't build anything useful. I learned more on my own googling stuff

Yup, I'm basically restating what you said for retards to understand. I also only skimmed your post, but I don't see harm in restating it.

I oppose any kind of coding rules because all the ones I've seen have been pointlessly obstructive in order to cater to the egos of lazy programmers who don't want to learn.

Working on implementing a quadtree for collision detection, then a boid system for flocking AI. What have you done recently user?

Why not try building something useful. If leftpad can do it, so can you.

>Most just have an intuition for programming well
i don't have an intuition. i read many books on theory, and learned it.

it's a skill, but at some point along the way it just becomes so ingrained that others misattribute it as some gay intrinsic factor

shitpost endlessly on /dpt/

I wrote an emulator in javascript.

It's either way too hard or I need a team of 5 other guys

I'm not in school. When I was, the end of chapter problems are how I learned. How am I going to know if I'm right and learned if I don't have the solutions?

I wrote an emulator over a weekend. There should be something you can make.

The manual is 2nd edition. Thanks though.

Post yfw the coding standard you have to follow bans gotos

made a simulator of my irl bf


int main() {
return 0;
}

There's nuance though.
As your post was a reply to mine there's usually some extra input. And 'learning both' to me in that context would imply that there's formal learning of algorithms and code projects going on.
While I'm advocating you just know about algorithms on a very shallow level and then learn about them as you (think you) need them. Preferably you should know enough to determine.

Well. It's 'rules'. I'm sure you have them. I can't imagine coding without the 'rules'. It's about code structure and the exploratory part of programming that most programmers are missing.
I recommend watching maybe episode 1-27 of handmadehero.org
Skip where you feel appropriate (you don't need to see someone groan about winapi).
It's intended to teach how to program, not 'how to program this specific thing'.

I wish I had that when I was new. And even so I learned some things from it.
I'd call that intuition. There's nothing intrinsic about intuition. Intuition is learned.
Call it skill if you want. But skill is more about the ability to preform rather than the knowledge, to my mind. Doesn't matter. I think we're talking about the same thing.
Jesus fucking Christ user SEARCH.

...

>he gives nothing in return
Aww ;3 poor user.

I have my own tastes in code structure and layout, which many people do not share. I do not want to be forced to conform to the coding style of the majority.

Newbies would gain a lot from seeing stuff like that though. Usually they don't. They just see 'here's how you do OOP' and that's the first glance of a structure they get, and generally people like to have a structure I've noticed.

I'm not advocating some global standard. That'd be retarded and would obviously never work. We can't even agree on simpler things.

Is this it?
panther.vos.cz/novaknihovna/new/books/Introduction_to_Algorithms_Cormen.pdf

Then you're in the wrong field. There is almost always going to be a set of standard practices on whatever project you're working on. At least, outside of hobbyist and self started projects.

My previous workplace gave me complete freedom in how I structured my code, as long as I could explain it.

It would help if we stopped showing them OOP.

Goto only really makes sense in C, and only in two areas -- error handling and escaping nested loops. The only time I have ever wished I had goto was when I was using a language custom built for teaching kernel development, which neither had goto nor anything resembling smart pointers to make error handling easier after encountering some sort of problem halfway through acquiring resources.

Yeah but they need something else. So I suggested a catalog of programmers where they describe their styles.

Since it's such a political topic.

no idea how to make an emulator

each video is an hour and a half long no thanks

People use OOP to the T? I don't even do a lot of the design specifications half the time cause it's tedious to come up with all the seperation of concepts. I dont try to micromanage things into their own classes. I divide them by their core "graphics, audio, player" and thats usually enough for me. I use a hybrid of OOp and functional.

it was more in the vein of him not existing

>no thanks
>can't spend ~40 hours learning something important.
Well here's probably the most important takeaway:
hero.handmade.network/episode/game-architecture/day026
And maybe the following video (but that's more game specific).

It's an example, you don't have to make one. There were a lot of resources that helped out when I searched "How to make an emulator".
What do you want to make that takes so long? Or is it under NDA? :^)

//tfw no gf

More like that maybe.

This is only helpful for learning how to make a video game for programming lol

If you don't want to spend time and research you will never learn or improve. Literally all skills are a result of prolonged effort.

If you can't even spend a couple days watching videos / researching on how to do the things you don't currently have the knowledge for your patience and dedication is pitiful.

I haven't seen it, but I assume it'd also be helpful for starting a programming project from scratch.

No. I addressed that specifically. But it's very general information that's presented. And if you strip away the game specifics it's plainly obvious how you can translate these videos into non-games.

For instance there's videos on translating code into SIMD and what SIMD is. How to do a job system etc.
hero.handmade.network/episodes
Just search this and see.

Also it's interesting because games are very general projects in many ways. They're arbitrarily complex, they can cover everything (though it's unlikely they do). So it's not a complete loss to watch all of it.

Most programming can teach you about other cases. Because it's all about telling computers to do what you want.

Well once he's done with the basic prototype platform layer (day 25) it's really not about a from scratch project anymore. You could pick up GLFW and effectively have skipped that stuff.

The previous generation of memers said it would help if we stopped showing them PL/I, Algol, Pascal, Ada, Fortran, etc. and how they do things.

They were trying to push their "functional programming" garbage down students' throats back then too.

If the replacement is so great, why do you have to hide alternative ideas from your students?

Why should I have any respect for someone who thinks denying their students information is an acceptable way to educate?

Before I started learning about CS history, I thought this kind of thing only happened with political topics in oppressive third-world countries.

I'm saying there's no alternatives offered right now. And it's bad to show a paradigm like OOP to students first. They should learn procedural programming more imo because all else is special rules on top of that.
>I thought this only happened in politics
Why?

Oppressive third-world countries -> Literally America, members of the UN, and others all do this... Is it perhaps a sign that the whole world is progressively become more oppressive?

Teach me to get good the easy way

Through smart and hard work.

I REALLY wanna start learning C, but I am barely learning javascript. I am currently on OBJECTS. Should I wait until I learn python to jump into C? or SHould I yolo and go into C before/after finishing javascript?

Where are you right now?
What is the most complex thing you've done?
What tends to stop you from doing what you want?
Have you tried to do what you want?
If you haven't why wouldn't you?
Do you lack knowledge of the terminology to search your way to answers?

C doesn't really have any prerequisites. It was the first language I learned.

There is no such thing as easy. You just use your brain and work hard.

The only easy way in life is a bullet to the brain or a quick dive off a sky scraper / bridge.

C is simpler to understand than Javascript/python.

The reason C is 'hard' is because it doesn't hold your hand with garbage collection and such. Meaning your fuckups aren't something that solve themselves.

Learning C first isn't a bad idea at all.

So is it okay for me to learn 2 or 3 languages at the same time? I wanna become a GOOD programmer(Software Developer), not a code monkey. Will that be just forcing it?

idk. It might actually help you to realize that a lot of languages are really similar, but you might get confused with the differing syntax. If you want to be a good programmer, then just knowing lots of programs won't help you much. You should also know about different paradigms, algorithms, data structures and the why you do the things you do,

That make sense, knowing lots of programs will just make a code monkey. I gotta THINK like a programmer first, I guess I will just keep practicing. Thanks user.

Maybe. I'd just focus on one at a time. Because I'd mix it up.

First for Machine Learning is god-tier research. Anyone who thinks that it is a meme is a brainlet and a NEET.

Just keep asking yourself if you're on the right path and you'll be fine. If you're having trouble figuring out, ask here or in other places. If someone calls you a Pajeet, you might be a monkey.

>being this insecure
You're basically an excel monkey

What's going on in the line I highlighted here? It's from a C++ book on threads, so they don't explain the syntax it in the text.

>ignoring the algorithms developed in this field and for the sake of it
>ignoring all the libraries made in several programming languages
>unironically being this stupid
go back to your memeskell fizzbuzz, faggot

this is what mathlets actually believe

Now I'm curious if anyone has done machine learning or neural nets on Excel. would be pretty meme-y.

>muh perceptrons

>muh one-liners

>muh meme technology
Hey, remember Ruby? Machine learning is the new that.

I don't know much about C++, but I learned this some time ago, guess this is it: en.cppreference.com/w/cpp/language/initializer_list
tl;dr: (IIUC): initialize i to i_ (i_ is passed thought the function)

Why is it that people come up with algorithms and give them absurd names?

It was named in 1957.

Can I have a decent life if I learn to program?
I dont study CS or nothing tech related, Im just learning a programing language since two months.
My mind will not collapse for so many hours of coding per day?
Respond to me realistically.

That doesn't really make a difference.

Only if you're enjoying it.

And I don't really see an issue with the name. Can you suggest a better one?

>Can you suggest a better one?

No.

Yeah is fun but I dont know if it will be fun for my brain after working a 8 hrs job for more than a month..
Do I have to work for a corporation sucking the dickS boss like a wage slave or I can become independent in the future?

Sucking corporate dick isn't a programming specific thing.. Truthfully participation in the monetary system isn't a absolutely necessary thing. You always have the option of living as a homeless vagabond or finding a secluded area no one lives and setting up shelter. It can be a enjoyable life.

Then again I may or may not have been recently exposed to hallucinogens.