/dpt/ Daily Programming Thread

Lain bear costume edition
What are you working on, Jow Forums? Previous thread:

Attached: Screenshot3.png (639x480, 351K)

Other urls found in this thread:

en.wikipedia.org/wiki/Comma_operator
github.com/ethereum/go-ethereum/wiki/Private-network
projecteuler.net/problem=78
opentdb.com/api_config.php
youtube.com/watch?v=aWePkE2ReGw
pastebin.com/23zQux4P
opentdb.com/api.php?amount=5&category=9&difficulty=easy&type=multiple
twitter.com/SFWRedditImages

1st for don't masturbate

I'm tightening up the graphics on level 2.

If I play my cards right and get lucky I might get a 60 grand job in my hometown as my first job. It's nowhere near certain but fingers crossed.

>What are you working on, Jow Forums?
Sleeping. hbu

Nice you could buy some nice hookers and blow.

>shitty old laptop
>visual studio is bloated and slow
>browsers are bloated and slow
>websites are bloated and slow
>everything else is bloated and slow

Attached: 12346723674.jpg (400x400, 29K)

Use TempleOS and make your own web browser

only real programmers know the c++ comma operator exists en.wikipedia.org/wiki/Comma_operator

60k is pretty fucking good anywhere thats not on the west/east coast. I got an offer for 60k in dallas and realized I could live in a luxury apartment 10 minutes away from my workplace

Yeah, all other jobs in my area are only 40k.

>What are you working on, Jow Forums?
Refactoring more, just blindly changing things as I go.

Attached: more_typing.png (1746x902, 243K)

raw pointers are out, smart pointers are in,
use references and rvalue references when you can,
mixing camelCase and snake_case

I've seen worse. What version of C++ are you in, C++11?

smart pointers are shit, stop embarrassing yourself
mixing cases is alright if you have a reason to do so

>this post

Attached: 8123417234123.jpg (627x383, 70K)

What a boomer, unique_ptr is as fast as a raw pointer when you compile with optimizations

he looks like a respectable programmer

cope, retard
*leaks*

Attached: 9wqu2yle0vb31.jpg (247x264, 8K)

yes but the other types of smart pointers arent
If you want smart pointers, use another language like C#

whats the best resource for learning how to make win32 applications?

C++14 at the moment looking to lower to C++11. The snake_case is from an external header. Thanks for the tips.

the necronomicon

>believing that pointer access performance has any impact whatsoever on anything they’re doing
your sub-120 IQ is showing

@72046467
based retard
you don't even deserve the (You)
measure before you """""optimize""""" you double nigger

rewrite the headers
rewrite some C library in sepples++
make your own gui toolkit

completely nonsensical post

stop touching your penis

I don't need to "measure" to know that C++ smart pointers do extra allocations to maintain reference counters
I didn't even complain about their performance, someone else just said there was no overhead
the thing is why would you even use C++ if you're going to use things like smart pointers
there's dozens of other (better) languages to use if you don't want to get down and dirty with memory

gotta know your versions

Attached: C++ interview.png (572x762, 50K)

first for buttplugs and programming socks

I've looked, and as far as I can tell there are none beyond microsoft's very shitty fragmented documentation.

>those questions
>fucking renaissance
i-it's fake right?

Attached: 841892347123.jpg (1200x800, 75K)

It's obviously fake, the interviewer didn't ask about programming socks once.

Why do jobs typically pay java devs more than c# devs?

All of the reviews on there look fake and written by pajeets

Attached: C++ interview 2.png (576x711, 51K)

>double median(double* p, int n)
what did they mean by this, median between two points, one is a double and one is an int? I guess this is to test you knowing how to deference and deal with integer division and casting. Retarded.

p is array, n is num elements

this one is a bit different though
I assume he fucked up by snapping like a sperg instead of just saying "I would look that up if need be"

>can you ask me some questions I can answer
lol this guy

ah that makes more sense

double median(double* p, int n) {
bool isOdd = n & 1;
const unsigned med = (n/2)-1;
if (isOdd) {
return p[med];
}
else {
return (p[med] + p[med+1])/2.0;
}
}

you're not told they're sorted dumdum

med = n/2
if (isodd) return p[med];
else return (p[med-1] + p[med]);

is it feasible for me to make a blockchain currency on my own network (not on etherium)? are there any good resources for doing so?
i know my post has a lot of gay buzzwords, thank you for your understanding

too many gay buzzwords, didn't read

i understand

Not my problem. Ticket closed. Ticket opened to sort p upstream.

To 72046709,

Please never post here again.

Kind Regards,
72046781

I'm a blockchain dev
Nothing is stopping you from running your own network with geth github.com/ethereum/go-ethereum/wiki/Private-network

However, no one will care about your "currency"

>Nothing is stopping you from running your own network with geth github.com/ethereum/go-ethereum/wiki/Private-network
thanks
>However, no one will care about your "currency"
im just looking to keep track of stuff, it wont be a "real" currency

>I'm sorry but you are not qualified for this position

Attached: 1489641085464.png (979x731, 20K)

and your answer being

I'm introducing a bill to ban template metaprogramming.

what the fuck

Attached: 1554248968644.png (470x556, 236K)

What seems to be the problem?

>abloobloobloo extra allocations
>what is premature optimization
choke on my hairy cock, faggot

Just because you dont know how to use ot doesnt mean you should ban it, retard. I'm a fucking brainlet and know how it works all the way up to parameter pack recursion and the billion type functions. After working out proper templates it's pretty based.

What kind of programming language do you think they use?

Attached: rentech.png (695x217, 63K)

// A
class Singleton { Singleton(); ~Singleton(); static bool instantiated; int internal; }


// B
// b.hpp
namespace Singleton { void Init(); void Destroy(); int GetInternal(); }
// b.cpp
namespace Singleton { int inernal; }


Place your bets gentleman and """"ladies"""""

all I'm saying is C++ smart pointers aren't zero overhead, nor are they the most efficient implementation of the concept. I said nothing about whether it actually matters or not in your particular program
Why are there so many programmers with the IQ of a monkey

Clojure is the future.

racist POS

Yeah good luck with all that because I'm banning it. Parliament is entirely on my side in this matter.

I'm banning the singleton at some later date, so start saying your prayers.

Attached: Siemens-SIMATICS-S7-200-PLC.jpg (6000x3376, 1.6M)

careful bitch boy, my dad works at parliament

this thread's project euler problem is
(755-1) % 677 + 1 = 78

projecteuler.net/problem=78

Attached: euler.jpg (480x600, 115K)

I'm going to fucking ban you. I'll have you arrested and sentence you to writing sensible & legible code in a straightforward language for the rest of your life. I just got off the phone with Scotland Yard and they say you're a fag.

>refactor some dumbshit's awful code without changing the public interface
>unit tests break
When will dumbshit webnigger monkey coders learn to write tests against the interface and not the implementation?

you're a webshitter too dont kid yourself

yeah, I just got off the phone with my uncle at mi7 and they say you and scotland yard dress like girls

Should I learn C, C++, C# or Rust?
I need some advice. I have javascript on the learning block but I need something more general.

learn go

Sure, sell me on Go. Why should I learn go over the languages I listed?

tried qt creator?

it's easy to learn, easy to read, easy to write, easy to set up and compile, and as a bonus it introduces you to concurrent programming in the most painless way possible

That sounds enticing. I was told it was good for scripts as well, and that Go is best suited for servers (which is good because this is what I want to do). Is that true?

it's very good on servers

I have a dual core 4gb ram server but not sure what to do with it

any ideas Jow Forums?

How come I learn so much more on r/learnprogrammer than on Jow Forums?

blow it out your ass

Learn a real man's language like Scala.

>Hey, kid! Wanna learn programming in Perl? I can teach you, hop into my van.

Attached: larry-wall-1.jpg (600x800, 100K)

pls recommend me a book where I can learn about http, web servers, in fact all of that networking stuff I have been trying for 5 days to send a POST request to google but it keeps failing, help.

Attached: 1564100153488s.jpg (250x223, 6K)

...why are there 2 threads?

/wdg/ or man curl

multi-thread parallelism

>Wowee Mr Larry! Thanks a ton for the private tutor!

Lisp is the most powerful programming language.

What the fuck? Are they streaming raw spectral analyses of american farts in their stores? What in the fuck goes in that amount of data?

pic

Attached: walmart.jpg (556x118, 25K)

>be called "heapsort"
>take place on the stack
Explain this naming bullshit.

Attached: trans thread.jpg (552x521, 38K)

the data structure used is a heap

99
I would have explained but you decided to post a degenerate picture. Good luck in hell, homosexual.

ughh why are there 2 threads guess Ill repost

Trying to call this API opentdb.com/api_config.php to make a quizz in winforms with C#, never used APIs before.

I watched this guys video and tried to replicate what he did but it's not working youtube.com/watch?v=aWePkE2ReGw

Here's my code: pastebin.com/23zQux4P
Here's an example of how the .json looks like: opentdb.com/api.php?amount=5&category=9&difficulty=easy&type=multiple

When I hit the submit button to test if I get any data back or not it says System.NullReferenceException: 'Object reference not set to an instance of an object.' 5__1 was null.

Not sure if the problem is because of naming conventions in the model, or maybe because this API has square brackets which I coded as List but maybe they're not lists idk. p-please help

Attached: 1561327965023.png (619x619, 325K)

>apis
fuck apis
they are great when they work
however i spent weeks fucking around with an api that my final group had to use, made me want to an hero

Attached: 1555952925086.jpg (1275x966, 116K)

The names of fields in your QuizModel have to match what they are named in json.

>>*powerful desktop*
>>visual studio is bloated and slow
>>browsers are bloated and slow
>>websites are bloated and slow
>>everything else is bloated and slow

Welcome to 2019.

I use vim and terminal. Its the only thing i can find thats fast, light, and works.

>want to move to loonix
>annoying file system
>ugly
>still want my visual studio
aaaaarrrrgghhh

I'm reading up on md5 collisions

Attached: rogdham_gif_md5_hashquine.gif (512x128, 152K)

reverse engineering an executable: easy
understanding a codebase that seemingly tries to use every single feature of c++17 to the maximum possible extent: hard

Attached: 1558428824544.gif (236x389, 219K)

Oh thanks that fixed that error but now it doesn't do anything at all when I click submit I thought it would show those messageboxes to display the data

t. brainlet

When the ad says "full stack developer", are they looking for a Web developer?

Does anyone actually like Web development?

Sometimes I hate OOP so goddamn much
I just spent 5 hours today trying to implement a very basic feature because of all the abstraction and responsibility memes that I had to completely rewrite without breaking everything else