/dpt/ - Daily Programming Thread

Last thread: What are you working on, Sup Forums?

Other urls found in this thread:

articles.mercola.com/sites/articles/archive/2008/07/24/why-tofu-wrecks-your-brain.aspx
tutorialspoint.com/computer_graphics/circle_generation_algorithm.htm
sourceware.org/ml/gdb/2018-01/msg00026.html
pastebin.com/ZX7grvkh
adventofcode.com/
discord.gg/4TuhPhr
twitter.com/SFWRedditVideos

Haskell!

c++ is the best programming language ever.

and females are not good at programming.

good OP

I'm female and I work at a successful company developing in Go and Rust... maybe you should rethink your views on the world before the world bites you in the arse.

false and true

female or female (male)?

and a couple exceptions does not make it incorrect. majority of the time, females are not good at programming.

Nice pasta

Avoid soy products
articles.mercola.com/sites/articles/archive/2008/07/24/why-tofu-wrecks-your-brain.aspx

Notice something? The company is successful.
Not you and sure as hell not because of you.

post legs

State your unpopular opinions.

Here's mine: Rust the language is kind of shit for most applications. Too low level with an overly constraining ownership model. It's memory safe, but so are all of the GCed fast languages.

But... cargo is so ridiculously good that I don't mind. I'd rather start a project in Rust than C++ despite liking C++ better overall, exclusively because Cargo makes it so much easier to pull in a dependency. As a result, I'm actually using it for a few personal projects.

Currently working on a Magic the gathering client.

>successful company

You mean yet another shitty startup that will be gone before the next tuesday.

Playing with codeable Legos is an actual form of programing.

>.aspx

>.aspergers

Remember kids, it is alright if you enjoy memes like FP or haskell. But if you put them on your CV, there is a very high chance that it will get thrashed on the spot

Do I really need to insert an index in my binary file, in order to tell how many records are inside? Or is there an actual way of counting records?

I am using C btw.

>record
what is it?

and the answer is probably yes

I am successful though, I've made a career out of this and I have been doing it for more than a decade. Of course the company would still be successful without me, as it was before I joined, but I have been successful and I have helped push the company toward more success during my time.

The issue here, I think, is that you (most everyone actually) are throwing "womyn programmers" in with us actual programmers who just happen to be women. If you were to rid the industry of the girls that are only in here to fill diversity quotas it'd become quickly apparent that a woman programmer and a man programmer can be just as good as one another in the field. Only difference between us is that fewer women enter the field.

I've been here more than a decade, it existed a while before then.

When do I have to care about endianess?

When a problem arises that is due to endianness.

not sure if i understand your question: i did not add an index field in the struct below.
struct database {
char name[NAME_SIZE];
unsigned int age;
char city[CITY_SIZE];
};

could you do it?

if you are trying to read an array of database instances from a file, you can first check the file size to calculate how many objects in it

but simply writing number of objects first and the objects themselves after is much simpler. you can also read it one by one until you hit eof

is this written by a literal retard?

yeah pretty much, people like you.

>you can first check the file size to calculate how many objects in it
user, you have no idea how much of a brainlet I feel right now. Thanks.

>On two occasions I have been asked, — "Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?" In one case a member of the Upper, and in the other a member of the Lower, House put this question. I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question.
t. Babbage

>Go and Rust

pajeet, my son

Sadly, I think it's inevitable by now that koder gurls and strong womyn programmers who don't need no men programmers is what you'll be associated with anytime you mention that you're female.

Only when you're reading / writing binary values directly into machine number type variables. Like from over the Internet, or if you've decided to write your own FAT32 driver or whatever.

If you just declare `int i = 1` and shift it around, it's always going to behave like big endian no matter what platform or language you're on.

>our female percentage is low! quick hire more women!
this kill the entire industry and people's opinions on females ever

practically never unless you are targetting weird cpus

you show know how little endian works and that is all

I want to draw a graph in the browser using Javascript. What libraries should I use?

How do I generate a bunch of coordinates of a cricle given a radius and a center?

tutorialspoint.com/computer_graphics/circle_generation_algorithm.htm

r = radius * sqrt(random()))
a = random() * 2 * pi
random_point = center + (r*cos(a), r*sin(a))

Do people literally think this in real life? We had two women programmers who were fantastic (possibly because they were afraid to make mistakes) from koder skoolz

gdb 8.1 released

sourceware.org/ml/gdb/2018-01/msg00026.html

I understand, though it still fucks me off. Because when people so often say that women are shit in the field that does include me and it hurts a bit because I know I'm not a Koder, yet still I'm viewed as such. What also hurts is knowing how much damage I could do to the company if I were to be promoted to a position in which the public become aware of my role in the company, it could quite easily put our customer's off if they are made to feel that I'm only being given the role as some token diversity gesture.

Not my choice of language, you work with the tools you're given.

yes, your situation is excepetional

>females ruin opinion on females
It's almost like it's true in the first place.

>if they are made to feel that I'm only being given the role as some token diversity gesture
but that is probably the case user. you fill the gender quota

I cannot seem to find what's wrong with my code.

pastebin.com/ZX7grvkh

>If you just declare `int i = 1` and shift it around, it's always going to behave like big endian no matter what platform or language you're on.
Good to know.

>Only when you're reading / writing binary values directly into machine number type variables
I'm reading bytes from a pipe and want to convert the bytes back into their original type. I figured what I would do is shift and OR them but I'm confused on how to determine which order to use without knowing the senders endianess.

Well, the sender also should endianness as well. or you ensure that stream is converted to same endian even if your system is not the same

Women aren't fucking women over. Big companies are using women as bank fodder. Young, impressionable, confused and ambitious girls are manipulated by these companies with the promise of success, riches, and maybe even a little fame. Of course they fall for it, who wouldn't? You spend your teen years experiencing typical teen stress, except all the while you have big companies and government telling you the stress is caused by some omnipotent evil and that you can fight that evil by joining their company and/or cause or some shit. These companies take weak, vuinerable, young girls and manipulate them and turn them in to horrible mouthpieces of the company politics.

Women are particularly easy to manipulate because of our naturally more emotional state of being. I suspect this is why the vast majority of male feminists are so pathetic, because only a weak, emotional wreck of a man could possibly associate themselves with such crap.

Not currently, no. I'm the only woman here, and have been the only woman here for quite some time. Used to be another here but she left to have a baby and do mum stuff. The company doesn't do a song and dance about having a womyn on the team either, which I suspect they would if I were nothing but a diversity hire.

Got it, I will enforce a standard endianess on the protocol. I should have come to that conclusion in the first place since that's what people do with network sockets.

>that walkArray initialization
>int i = FALSE
>nError == TRUE
>not moving duplicate code to the default
nigga your code is ugly as fuck, no fucking wonder it's broken

#define NORTH 0
#define EAST 1
#define SOUTH 2
#define WEST 3
Use an enum

char walkPrint, walkArray[10][10] = ...
Pajeet tier. Also probably designed very poorly but you can still use this which basically does the same thing but it's not as ugly
char walkArray[10][10];
memset(walkArray, '.', sizeof(walkArray));

Too lazy to read the rest

c++ is the greatest language of all time

>are manipulated
You mean paid? Now it's not them wanting to compete in the same space but they are somehow forced to?
Not being able to understand simple social concepts is one reason why you shouldn't stick to environment you do not comprehend.
And you can't just shake off responsibility by blaming anything with more responsibilities than you.

C is better
proof: pastebin.com/ZX7grvkh

Too much wrong shit in there.
>unwanted unbracketed ifs
>TRUE and FALSE everywhere instead of using stdbool.h
>hideous static initialization of walkArray
>no check for xVal and yVal going OOB
Son...

>I'm female and I work at a successful company
That in no way means you are actually good though. They probably just hired you to fill diversity quotas.
>developing in Go and Rust
Yep, confirmed diversity quota filler.

I mean manipulated. From a young age women are being made to believe that there is some omnipotent evil that is desperate to hold them down, and to fight this evil they need to join the cause in one way or another. By default women have very little interest in many of the fields men enjoy, just as men tend to have little interest in the fields women enjoy. There's a small amount of overlap but it's hardly significant. Women don't want to sit around programming for 8, 10, 12 hours a day because most women hate this stuff. Just as men don't want to sit around painting fingernails and braiding hair for 8 hours a day, most men hate that stuff. So now we have to answer the question of why so many women are entering a field they have no natural attraction toward. Women haven't undergone a massive genetic mutation in the last decade which has altered their behaviour so it has to be an outside force that is effecting this behavioural change, and from my perspective the biggest part of this outside force (atleast in the tech field) is big tech companies.

I've addressed your points in my other posts, you should read them before replying.

reinterpreting byte arrays as other types, where the byte array could've originated from another machine.

>I've addressed your points in my other posts
Doesn't make you right.

Why are you trying to turn a conversation in to an argument? I have no interest in arguing, I come here to have fun and relax. I'm happy to discuss these things with you but I won't indulge your petty competiveness.

People are autonomous and not stupid. A person has to lack any understanding of social order and have no perspective for future to cling onto something this ideological.
That person will be a failure regardless of subject.

It's the tolerance for incompetence that became a social norm. It's affordable in rich countries and make people feel good about themselves like they are children.
And I won't point fingers who leads this because we just as well allow for this.

>Reveals her/his gender on /dpt/
>"I have no interest in arguing, I come here to have fun and relax"
Yeah nah, you're definitely looking for an argument alright.

Females don't exist on /dpt/.
Anyone claiming to be is just a trap, and should be ignored completely.

This, also traps are gay

How do i make the rename() function in C work in directories that i'm not executing the program?

By supplying absolute paths, duh.

So I'm learning my first every programming language (Python) using a textbook called Starting Out with Python.

I'm about 70 pages through and most of the stuff here is making sense to me.

Where do I go after finishing it? I feel like if I were to not tinker with Python or programming for a few months or maybe even weeks, I'd forget a lot about it. I really don't want that to happen so that's why I'm here.

what are some good questions that i can ask an interviewer at the end of an interview?

ive done 3 software dev internship interviews thus far and i never got any call backs, i have one tomorrow at 4 and im trying to think of things to say because they've all done the "so do you have any questions" thing at the end and i dont really say anything.

After you finish it; no, even now you should post legs

Give me one good reason why I should ever need syntax highlighting

>Pay
>Turnover rate
>Daily work pace and environment
>workplace culture

>what are some good questions that i can ask an interviewer at the end of an interview?
What is, in your opinion, the best thing about [company name here]?

Does the discord still exist?

Going through the adventofcode.com/ problems will keep you fresh, some are even tricky.

Another thing to do would be to make some shell scripts to automate something you do on the computer. For example, fetching the weather. Then you'll probably natural little projects to keep it in mind.

discord.gg/4TuhPhr

it does not work with rename, yet it works when i usesystem (mv ~/Desktop/x/y/oldname ~/Desktop/x/y/newname)

>How would you describe the responsibilities of the position?
>How would you describe a typical day and week in this position?
>Is this a new position? If not, what did the previous employee go on to do?
>What is the company's management style?
>Who does this position report to? If I am offered the position, can I meet him or her?
>How many people work in this office/department?
>How much travel is expected?
>Is relocation a possibility?
>What is the typical work week? Is overtime expected?
>What are the prospects for growth and advancement?
>How does one advance in the company?
>Are there any examples of a career path beginning with this position?
>Would you like a list of references?
>If I am extended a job offer, how soon would you like me to start?
>What can I clarify for you about my qualifications?
>When can I expect to hear from you?
>Are there any other questions I can answer for you?
>Do you have any reservations about my qualifications?
>Do you have a policy for helping new members of the team get on board?
>What are biggest challenges of this job?
>What's the most important thing I should accomplish in the first ninety days?
>How would you describe this company's values?
>How has the company changed over the last few years?
>What are the company's plans for growth and development?
>What are the biggest rewards of the job and working for this company?
>What is the best part of working for this company?
>What's your least favorite part of working here?
>What type of background do you feel would be best suited for success in this position?

Trying out some obfuscated C coding...
int strlength( char *str ){
int i = 0;
while( *(str+(i++)) );
return --i;
}


I also finally understood what lamba expressions are used for in Lisp. :D

>when i use system

Why there's not easy middle ground between making your game on SDL and spending several years making an engine?

#define STRLEN(s) (sizeof(s)/sizeof(s[0]))

the key to getting internships is to pretend that youre super keen on starting full-time at the place after the internship ends.

i've done hiring at my job off-and-on for almost 5 years now, and i hire a lot of "new grads" but the majority of our new employees come right from internships because we try to only hire interns that have distinct goals in the industry that we can fulfill by onboarding them. if you're doing an internship in an industry or subject you dont like just to do it and get it on your resume you better work very hard to lie about that fact

Just start at -1 and pre-increment. You won't have to backtrack.

just use Unity and Unreal

you won't be able to come up with an engine people will care about :(

>do you have any questions
>yeah, what are some good questions that i can ask an interviewer at the end of an interview?
Have fun getting an internship.

question makes no sense
using only SDL would require that you make an engine

you can make a relatively sentient bot but it'd turn into a massive disaster extremely quickly

>inb4 skynet
no, not in a skynet type of way, probably not

People are autonomous but this doesn't mean they're free from outside influence, and a big enough influence can essentially coopt a person's autonomy. I'm not trying to wash the blame off of the involved women here, if that's what you think I'm trying to do, but I am trying to say that this stuff goes well beyond just women being incompetent or stupid or whatever else you might want to say. I get that we do stuff that's annoying, I accept that and it's fine, but what I don't accept is that zillions of young girls are suddenly becoming dead interested in programming through their own volition.

We like interviewees that get us to sell the company to them. So long as you don't get cocky, putting the interviewer in the hot seat for a moment can be a positive thing. Ask the interviewer what they believe to be the company achievement that best defines the company. Not necessarily the best technical achievement, but an achievement in which the all core values and ambitions of the company were put to the test and succeeded. Do it right and you can make the interviewer feel good about themselves as they bask in the glory of being the temporary face of company achievement, and if you make a person feel good they are far more likely to like you.

There are tons of engines out there to use. SDL isn't even really an engine, it's just a multi-platform wrapper for basic hardware functionality. It's like using WebGL or something.. Which is fine, but isn't exactly a complete game engine.

if you ask these questions they will think you're literally retarded and don't know the difference between an internship and an actual position

People have this assumption that they should make their engine as a totally seperate thing from their game, I disagree. An engine of your own should be constructed over the course of multiple games as you begin to understand what your preferred methods are, what functionality you tend to drag from one game to the next and so on. Just make a game, and when it's finished and you move on to your next one the stuff you port over from your old game will become part of your own little engine.

>post legs

What's that?
Thanks brah.

Neither companies want unproductive employees. This is 100% and social and political issue since academia has been compromised by ideas trying to undermine social order.

Last line is for you bro.

>Neither companies want unproductive employees
Yet there are many examples of companies hiring lots of unproductive employees simply to fill their diversity quotas.

not sure if this belongs here or in /sqt/ but i (unfortunately) learned java and now i want to learn c++ but every video or site i find bores me to death with 90% material i know and 10% material i don't know

is there any site or youtube playlist that teaches c++ as if you already know another programming language?

how do you code SDL with modern c++?

You don't.

You don't because sdl is a c library and C++ is shit.