/dpt/ - Daily Programming Thread

Old thread: What are you working on, Any Forums?

Attached: 84143-0-1496096388.jpg (1920x1080, 494.43K)

Other urls found in this thread:

pastebin.com/j51ktK0j
en.wikipedia.org/wiki/Amdahl's_law)
twitter.com/AnonBabble

r8

Attached: 1aabb703206dd16ab3a189669130a388.png (1531x1071, 132.22K)

first for .NET game dev job

Attached: windowschantp.png (398x602, 312.92K)

nakadashi... corpse?

machine learning framework from scratch in C/C++. starting with numpy and pure python and working backwards. considered julia but noticed the people shilling were do nothing academics and immediately pivoted towards C++

an XNA studio or unitity? how does it compare to AAA hellhole?

I’m writing a web scraper that takes Google News Celeb headlines and converts them into watch mojo style slide show vids with gTTS. Are there examples of that?

Hey Any Forums. Do you like my maze generator?
pastebin.com/j51ktK0j

Attached: posterboy.png (1000x1414, 1.99M)

>What are you working on, Any Forums?
Forgetting her voice. Admittedly not going well when I still cry myself to sleep.

Are you planning to mess with GPU acceleration?

should i be focusing on optimizing my code while i design it, or optimize it once i have a rough draft

I usually design my code in individual components that can be optimized either now or later without affecting the other code. Essentially, optimal data structures, perhaps suboptimal alrorithms.

Never optimize work in progress.
Leave it to optimization chuds on jithub so that they feel accomplished and star your repo.
>pic
Go back to the closet.

whatever you do it's very important that you optimize it before profiling it.

Avoid the most ridiculous mistakes (making heap allocating APIs when you can use stack, don't write triple nested loops), but don't try to crack open the CLRS to try to make your own optimal algorithm. Thing about optimizing anything before a MVP is ready is that you have no reference for how much time it might / should take, so you might be optimizing something that literally does not even optimize your program (en.wikipedia.org/wiki/Amdahl's_law)

Also this
>Leave it to optimization chuds on jithub so that they feel accomplished and star your repo.

I don't think XNA is really a thing anymore, pretty much every game being made with it is either finished or dead.

i agree
optymize ur code before write

Attached: 1553919669499.gif (364x414, 1.81M)

Monogame is an implementation of the XNA API.

but how far do you go with optimization
like making a bunch of variables and then coming back to put them into an array

Unanswerable question
You can only learn this by doing it yourself
Anyone who gives you a concrete answer is wrong

You need to think in terms of ROI, like a software developer (lmao just call the std::sort, mark ticket as done) and not like a programmer ("fancy cute trick does thing in O(n log n), but I just blew week's worth of time to it").

think about optimization while designing, you don't want to design code and then go to optimize it and realize the way you've designed it is causing shit performance and have to redo it all

yea but i feel retarded for spending an hour at each step of coding because i try to make it as good as it can
i have adhd btw

so just design with future alterability in mind

Also one of the reasons test-driven development is good, it teaches you how to write testable code (I don't even care about the coverage etc. memes, it just helps you get into the mindset of writing composable / testable functions which usually are almost equal to good software design).

That's normal for a beginner and not a product of ADHD
As you gain experience, you learn where it's appropriate to pigeon hole on a topic and where you should just do a basic implementation and move on

It gets better. I remember starting out, I'd be thinking up my own solutions and spending hours. Now I'm just like "oh, that needs a binary search tree" and I get better results than I ever did back then.

>i have adhd
No, you just have helicopter parents

just a dark elf

are arrays more for optimization or organization?
if its optimization because of memory use being lower, why is that the case, is it because all the variables are in one place rather than being sprawled across the code or because you're only calling an address rather than a function or value, and if the latter is true then how would an array be more useful than single digit/character values
and for organization, is it because you have functions and variables of the same category stored in one place like a library shelf rather than sifting through every book to find what you want

You can't talk about optimization in a vacuum.
Arrays as compared to what and in what use case?

they're for both
arrays are the most optimized data structure because all the variables are right next to each other in memory