/dpt/ - Daily Programming Thread

Welcome to the daily programming thread, where programming is very occasionally discussed, but mostly the gender of anime characters is hotly debated.

Our resident trips:

>OSGTP
A Microsoft shill, C# expert, also known as "mummy"

>Ruby
Dynamic language aficionado, of indeterminate gender

>nv
Knows some type theory, will forever be working on his own language

Old thread:

Other urls found in this thread:

pypi.python.org/pypi/Pillow
pastebin.com/jF4VeCTT
developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Working_with_Objects
mobile.twitter.com/marcosc/status/770136032113287168
wiki.archlinux.org/index.php/feh#As_a_desktop_wallpaper_manager
pillow.readthedocs.io/en/3.3.x/
twitter.com/NSFWRedditGif

What does this image have to do with programming?

...seriously?

How can I make Python generate a 500x500 grid and have it randomly be populated with black or white squares?

Write the function in C and call it from Python.

pypi.python.org/pypi/Pillow

Can I ask beginner questions about JavaScript in this topic?

yes, you can ask anything as long as its programming related.

Please don't shitpost in the OP.

Which functional language is good for start?

Holy shit, kill yourself.

Yeah, avoid straight HTML/CSS shit, though.

Haskell

There's no Code of Conduct in the OP to stop me. If you think we should establish one, let's discuss it.

Scheme. Avoid the Haskell meme at all costs.

>avoid the _ meme at all costs
>recommends a lisp
>recommends a lisp influenced by _

Learn both.

Well, I'm learning how to use objects. I made a variable containing three keys which are all simple functions. I'm trying to run an input through all three functions and log it to the console with a for... in... loop, but I'm not sure how to do it. I can't seem to get the input to actually go through the keys themselves.

Follow the fucking well-established OP format. The OP isn't your personal shitposting space.
Adding a bunch of shit into the OP and/or posting a retarded image will set a terrible tone for the entire thread, and there will be much more shitposting overall.
Just look at threads with frogs, US election or trap OP images.

Learn Erlang.

I've got basic knowledge of Python and C++. What's the best book to guide me into Java? I'm reading pic related just for general programming skills and it's pretty good.

Post code.

What do traps have to do with programming?

unlearn Python

It follows good practice. It includes /dpt/ in the title, and links to the previous thread. Those are the only consistent features of /dpt/ OPs.

Erlang is useless.

haskellbook.com

I'm working on a desktop wallpaper randomizer that supports multi-monitor setups. Its working great, but only on GNOME right now. Is there some *nix way to set the desktop wallpaper without having to worry about figuring out what DE/WM the user is currently running?

Otherwise, I'd just have to write some routine for every fucking DE/WM out there... Right?

What do traps have to do with what I said?

>it follows good practice
No it doesn't, it reads as an autistic rant by someone who just got here and is into "the memes"

pastebin.com/jF4VeCTT

It's the FizzBuzz challenge. I thought running the numbers through the three functions would be a good place to start.

Are you new?
It's been
>/dpt/ in title
>Old thread link
>What are you working on Sup Forums?
for years, and NOTHING ELSE.

>and NOTHING ELSE.
Obviously this is a pretty shitty thread thanks to OP (who is definitely a faggot among faggots) but this plainly isn't true

>it follows the bare minimum qualifications of consistency so i can use the rest of it as an epic meme space x--DDDDDDDDDD
1) This is what your post reads like
2) No, see for the ACTUAL CONSISTENT BODY OF THE OP

Use Feh

I bet you thought the umaru threads were acceptable or some shit.
Anything besides the standard /dpt/ format has always been plain shitposting.

But I don't like polish notation.

Then learn Haskell instead

That template is ableist, as it presupposes that all Sup Forums posters are able to work.

It is helpful and informative for new readers, unlike the common "miyuki-chan edition, traps are best programmers!" nonsense.

Ok I installed pillow, how do I use it to draw shit?

Read developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Working_with_Objects

Why do you care?
Are you autistic?

>>OSGTP
>A Microsoft shill, C# expert, also known as "mummy"

wew

Autism is neither helpful nor informative

What's wrong mummy?

Hi mummy!

Because community guidelines need to be maintained. If you let newfags walk in and act however they want, the place will devolve into crap even more than it has.

Where does it say those are the guidelines, or law?

And only a newfag calls others newfag you autistic retard. Get over it.

Shit, you're right.

I originally started this because I'm too dumb to figure out if feh can set a different image per screen, but now that I'm generating one image that spans all the screens, using feh would be simple.

Thanks, user.

There is the stock XORG desktop that you can set with nitrogen or feh, but every faggot DE draws their own in a layer on top. So you will need a switch case for every one, sadly.

JSfags get triggered by criticism of their language, ban criticism at their conference: mobile.twitter.com/marcosc/status/770136032113287168

It's your fucking job to lurk more and find out, or fuck off.
Do you walk into a chess club, start making a ruckus and pissing everyone there off, try and force them to play checkers instead, and get defensive when they tell you to piss off?

Are there no real answers here on /dpt/? I just want to learn Java so I can get out there and get my first job programming. Thanks.

Unsurprising that people who like Javascript are incapable of listening to reason

>only a newfag calls others newfag

Java is a horrible language

You don't just 'learn Java'. It is a fool's errand. Learning concepts is more important.

>only a newfag calls others newfag
This is some bullshit made up by newfags

but isn't it the most marketable one right now? I could go with Python or C++ instead, but it might be harder to get a job with those.

I'm working on the fundamentals with SIoCP, but I want to learn the Java language as well.

Is jizzbuzz really something that people should know thesedays? I asked a programmer friend who has been working for like 5 years what is it and he didnt even know.

>sitting in embedded programming class
>lecture is on bitwise operators
>everyone is lost and confused

God dammit why did I cheap out on university choice.

wiki.archlinux.org/index.php/feh#As_a_desktop_wallpaper_manager

Yeah, looks like I can't simply use feh.

Good shit, thanks for the info.

I can only hope that WASM will purge web dev of this foul taint. I want SJW framework monkeys to leave.

>Is jizzbuzz really something that people should know thesedays?
No, you've completely missed the point.
It's something that everyone should be able to do.
Not something you should memorise and then be like "I've done this before" - it's something you should hear as a task and think "this is fucking easy"

>not using the /dpt/ grill
>not asking the question
kys

C# is considerably better, but still very marketable. Also less Pajeet poo in your code base to clean up.

yes I've been a programmer for 10 years in node.js and I can tell you it's the most common interview question I've gotten. Once you know it you know how to program

Java easily has the most jobs, but C# is second place in that regard, significantly higher than Python or C++.

It's also much nicer than Java to use.

What are you working on, Sup Forums?


Previous Thread:

This is the new /dpt/ template. It is superior.

superior in patheticness, yes

I sent over 200 individually tailored resumes since March (manually). And I went to about 8 interviews but got rejected from all of them. I believe tech interviews are totally f***ed up. I have been asked so many ridiculous questions that makes me sick for days just thinking about them. Every job posting I see asks for "SENIOR DEVS".

So I'm going to take a different approach. I believe in the numbers game. There are ton of companies out there. But its impossible for me to find them one by one.

So I'm building a bot to speed up this process: 1- Find a list of all companies 2- Filter only those companies that hire software devs 3- tailor my resume based on specific keywords 4- send emails 5- reply and arrange interview based on my schedule.

Currently I'm working on the first part. The bot finds a list of companies using major search engines. Each search engine has a certain query limit. So I use proxies to get around it. And when the system runs out of proxies, it starts data processing till the query limits are reset. Currently the bot harvested about 895,000 companies across the US. But only 9000 has been processed to see if they hire software developers.

For the data processing, I used AWS at first but it got pricey very quickly. So I built a nodejs version of my bot and used socket.io to handle connections. I run the bot as a daemon on each one of the library computers of my University. There are about 80 computers that I can access without credentials. Also I connected my slack bot to get live status from each processing node. I think at some point the system admin will notice the unusual CPU loads. So I renamed the nodejs process as chrome and I run the bot during busy hours to make it look like people are using chrome on those computers.

Anyway, so the only important part left is to automatically tailor my resume based on keywords. I don't exactly know how to go about this. Do I need to use some kind of machine learning method?

You could try a markov chain

This smells of a crosspost for fat stacks of (You)s.

Rate my masterpiece

def fizzbuzz(n):
for i in range(1, n):
if i % 15 == 0: print ('fizzbuzz')
elif i % 3 == 0: print ('fizz')
elif i % 5 == 0: print ('buzz')
else: print (i)

Yep, it's a reddit post, and this never happened anyway.

McFucking Kill Yourself.

it functions but that's about it
1/10

>elif
Fucking why

write something better nignog

I've done so dozens of times

pillow.readthedocs.io/en/3.3.x/

Can we get some more of these?

In a book I'm reading there's a question: What is a statement that introduces a new name into a program with memory set aside for a variable called? Is the answer declaration or definition? I assumed that a definition was for defining behaviour of a function whereas declaration is the right answer?

assignment dumbass

The thread is daily and has been for years so I think by this point the OP image doesn't really matter.

PHP Master Race checking in with this hot bit of code.

Assignment is just another name for declaration.

Scheme is good for the huge amount of recommended reading material on it. If you read the Schemer books and SICP, which you probably would while learning Scheme, you'd be a much better programmer and computer scientist overall. All things considered, as long as you're learning the paradigm, the specific language isn't horribly relevant.

> i -= 1;

What

did you read that on know your meme?

I just finished SICP chapter 2 (out of 5). Will the next chapters blow my mind or should I start doing practical stuff?

i = i - 1, innit?

>Will the next chapters blow my mind or should I start doing practical stuff?
Congrats, /dpt/.

You got another one to waste their time with the SCIP meme.

...

...

Infact, you're wrong. Assignment obliterates the current value of an object. Initialization is what I meant.

I've been hobby-programming for over 10 years. I have no degree and no car, and I live in a town in a rural tourism-economy state. How do I into career?

...

Initialization is declaration + assignment. Assignment can be seen as a form of definition.

...

I think they meant

$n -= 1;
// or
$n = $n - 1;
// or
$n--;


But n is fucked up all over, there's no $ in front of it. Fuckin' PHP """""devs"""""...

...

>no setters
not pajeet enough
having no setters means that the pajeet in question at least used encapsulation correctly (even though redundantly)

I don't think encapsulation means what you think it means