/dpt/ - Daily Programming Thread

Previous: No weeaboos edition.

What are you working on, Sup Forums?

Other urls found in this thread:

ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-001-structure-and-interpretation-of-computer-programs-spring-2005/
youtube.com/watch?v=4agL-MQq05E
github.com/EZ3CHI3L/Tallis
norvig.com/spell-correct.html
twitter.com/AnonBabble

Move this thread to

Move your face to

So, best edition then?

I thought this was interesting

>XKCD
I think you should kill yourself, mate.

I think I should kill myself too. But not until I rid the world of degenerate anime posters

>anime posters
It's from a game though, you fucking idiot.

I'm triggered.
just go away, im trying to code in html.

Is C++ a difficult language to throw myself after just introductory classes (with java)?
should I practice fundamentals with C++ first then move on to different languages or do the reverse?

You shouldn't use C++ for any purpose.

NEW OP
______________________________________

ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-001-structure-and-interpretation-of-computer-programs-spring-2005/

______________________________________

That's even worse, 2bh

first for javascript.

just do whatever, learning c++ is easy for the beginning stuff. I did some java then dropped it in favor of c++ (tell me, did you use bluej?)

Does anyone have the exe/code of the webm-encoder some anons made a while back that would take in data and spit out a webm made up of black and whites pixels/chunks?

>using a virus language

i don't use languages created by bigots

*bigots/retards

The language is basically a virus. Just like MGSV.

You guys are cunts

I know.. I don't like it. I might need it for our robotics team's website. Not sure yet, just want to cover all bases so I don't look like a retard.

prove me wrong

>most masculine languages
C
C++
ASM

>most feminine languages
python
javascript
C#

>poo in loo language
java

But I can't user.

You're right... you're always right...

Is this based on the amount of body hair you've got?

Then ASM should be on a top league of it's own

if (veryLongCalc() == conditionA
|| veryLongCalc() == conditionB
|| veryLongCalc() == conditionC))
{
do stuff
}
-----------------------------------------------------------------------------------
var calc = veryLongCalc();

if (calc == conditionA
|| calc == conditionB
|| calc == conditionC))
{
do stuff
}
Is one of these statements better than the other? Seems like in the first one the program has to computes the same function 3 times. The second one computes the function only once but has to use some memory to store that value.

Why the hell are you checking if it matches three conditions you retard? It can only equal one thing you fucking dumbass. The first one would be better as you don't have to """waste""" that precious 1 byte of memory.

>tfw fluent in all of the feminine languages and none of the masculine ones

excellent, well on the way to becoming a woman

in youtube.com/watch?v=4agL-MQq05E why does the base case return 1, and how is it adding the numbers?

>Bucky
I stopped right there. Bucky is only good for syntax.

>tfw c++ trap
time to switch to c#

Top for embedded, bottom for everything else.
The fuck are you on about?

i figure as much, he comes off as a biochem sort of guy, with 0 math. None the less its the syntax guy ive chosen to go with for now

literally what

x*factorialFinder(x-1) multiplies x by the return value of factorialFinder again passing in x-1.

Goddamnit. I'm a cuck and It's late and I can't read. The bottom one would be better. I'm sorry dog, I thought the ||'s where &&'s

>It can only equal one thing

what does "feminine" mean in the context of computer programming?

good one

what are you such a ポンコツかわいいこちゃん

unsigned char lut[] = {
[conditionA] = 1,
[conditionB] = 1,
[conditionC] = 1,
};

if (lut[veryLongCalc()])
...

It means you crossdress and that makes you a better programmer. Checkmate brogrammers
thank's dog

your job is in san francisco and you have meetings at the gay bar next building

>It means you crossdress and that makes you a better programmer.

how

ah right, and return 1 terminates it when the x value is 1.

Yep

>he didn't double major in physics and math, and self-thought CS through MIT's OCW at the side

how does it feel to know everything is described in math?

Ball flow, comfy as fuck clothes, and looking cute as h*ck

But what if i want to minor in math and get a bachelors in CS?

My physics / womens studies double major will get me further than your math degree ever will

thanks, i missed the cesspool that is /sci/

>ball flow
when you sit down this doesn't even matter, they're still there.
>comfy as fuck clothes
i think I would be horny more than anything else, this would prove detrimental to productivity

Why programming is not god tier if the most richest men in the world are programmers like Bill Gates and Mark Zuckerberg and the most intelligent people like Alan Turing that helps on the WW2? also programming includes math a physic and they can create the software of medic machines, cars, weapons, etc, everyone needs to learn something about programming, is like english or math, is gonna be important in one future.

Hike up the skirt to like right below your nipples and let the air suck you dry dude

nigga I double majored in film and computer science, minored in accounting

but maybe that's why im currently unemployed

what the fuck are you doing with your life

i have a minor in animes

I have no fucking clue what to do

how many years did you spend in undergrad school

>there are people who spend 4+ years and $30k+ to learn how to program in university
>they don't even learn it correctly because profs are shit and they never self-learn on their own time

Why do people do this?
Programming is the one thing you can actually teach yourself without starting your working life with decades of debt.
Pic related, it's your typical 2nd year CS course.

You're retarded.

what the fuck

5

thats not bad, i'll be doing 6 years if I plan on double majoring

though your choices were retarded sorry

Because its best to have a professor and university learning environment when learning more complex shit like Data Structures and Algorithms.

Sure any monkey can learn to fucking code on their own, but when it comes to DS&A it's a little more than just knowing how to use a fucking API and more of thinking like a computer scientist.

Also you'll never get hired by any big company if you don't have extensive knowledge of algorithms and how to approach problems efficiently.

>Also you'll never get hired by any big company if you don't have extensive knowledge of algorithms and how to approach problems efficiently.

This is such a vague statement that it may as well say "I don't want to feel like I wasted my time and money chasing a piece of paper!!!".

same

It's true though. Every major company has interviews where they test your knowledge on algorithms and problem solving. If you're looking for a job as a script kiddie who doesn't know, for example, what dynamic programming is then you're basically worth the equivalent of a secretary in the tech industry.

You guys talk like you want a job at google or something.

same

making a video game so that I have something to do while I wait another two years to get my worthless degree

maybe I'll just kill myself first though

write fizz buzz without any dependancies

fizz buzz

If it's remotely anything like Hooli in Silicon Valley, then fuck yes.
Unfortunately my GPA sucks so i don't even see the point unless they enact some kind of "academically discriminated" hiring policy

All that stuff can be learned, and you certainly don't need to learn it from an out of touch professor in an algorithms and data structures class that is only taught once every other semester.

My CS program was so shit the data structures course was only once a year, and since it was the only DS course offered on a predictable basis, people from other colleges would enroll just for this once class and it made it difficult for local students to get in and to make it worse, this was THE capstone course to transfer.

I'm so glad I dropped out.

>out of touch professor

yeah if you go to a shit university yeah but it's well worth having an environment where you solve problems by deadlines and receive criticism (grades) outside of the job world. Also, to you know, use the professor as a resource to help solve any issues you are having with your algorithm.

...

None of this stuff looks particularly difficult to study on your own, in fact, you end up learning a lot of this inadvertently if you spend any amount of time programming for fun.

Check out this lightning
Simulation (obviously) slowed down

Get fucked up.

>undergrad education
Oh boy, it's mainly ESL TAs failing to teach freshmen and sophomores and faculty with a chip on their shoulder failing to teach juniors and seniors.

MOST important VIM commands & movements to know?

I missed most of my classes in algorithms, and did terribly in theory tests.

But then we coded sort algorithms and i had to write a boyer_moore algorithm and i passed the class.

:^)

I can admit DS can be taught on your own, but Algorithms is another level of difficulty. If you can self teach complicated problem solving methods through algorithms without contacting another human for help then go ahead and change the world there buddy, you're a prodigy.

>complicated problem solving methods through algorithms

Can you give an example there?
You're being unnecessarily vague again.

Edit distance problem
Chain Matrix Multiplication
Min Triangulation of Convex Polygon
Skyline Problem
shortest pair of 2 points

just to name a few DP and DC problems, there's also greedy algorithms and NP algorithms too.

well there are books on algoriths from beginner to advance, youtube courses from top universities, and things like MIT OCW

also libgen with access to anything imaginable on the spot for free

its just a matter of being lazy or not, and the convenience as having an instructor will save you tons of hours of research and you will use less energy, meaning you can dedicate that energy to moving on to the next step

:!emacs -nw

And how does any of that apply to any field outside of geometry?

Algorithms can certainly be self taught.

all of those I listed were interview questions fielded by google over the past 10 years

Does this compile for anybody?
github.com/EZ3CHI3L/Tallis
I'm not sure if I've built libssl incorrectly, or if my shit is just broken.
libssl 1.1 installed shared object files to /usr/local/lib but my compiler couldn't find them so I symlinked them to /usr/lib but now I'm getting linker errors (picture related).

And who would actually want to work at google?

They unironically use riddles and trick questions to reject candidates, and since you can only have so many key developers, they have all of their well educated "top talent" doing mindless CRUD gruntwork.

Well I wrote my first fizzbuzz, with a modular start and end point. it only uses if and else though, i wanted to use a switch statement but i couldnt figure out how to get the check to work in each case without creating additional variables. Can case only be assigned an interger?

Sorry if this is a bit of a blunder but I was wondering if anyone had a source for an implementation of Timsort in pure Python as opposed to see.

I can't write one myself because uh I can't read C.

tallis.c:18:5: error: implicit declaration of function ‘TLS_method’ [-Werror=implicit-function-declaration]
tallis->ssl_context = SSL_CTX_new(TLS_method());
^

Edit distance is common in spell checkers.
Chain matrix multiplication and min triangulation are for quick matrix multiplication.
I don't know what the skyline problem is for.
Shortest pair of two points probably has lots of uses.

I find it hard to believe Google expects interviewee to have already solved these problems. They seem more like ways to test a potential employees thinking abilities. Hell, even Norvig thinks edit distance is specialist knowledge. norvig.com/spell-correct.html

skyline is applied mergesort

That doesn't sound like something that would be hard to self teach.

use python instead, look into flask and django

Most of those are covered in the advanced algorithms courses.

Yes I believe your version of libssl is too old, TLS_method() was added in 1.1.0, so run openssl version to find out.

Yeah
OpenSSL 1.0.1t 3 May 2016

Just a suggestion, get rid of automake and all that overcomplicated build system crap.
Also, stop assuming that all of your users have the same build environment as you, why would you build against a specific 2008 posix standard and not try to make it portable?

The applications are irrelevant. If the examples usages are as common as you say, then they'll be in a text book the same way the nine queens problem and Heathrow to London appear in text books.