Reddit "programmers", everyone

Reddit "programmers", everyone.

Attached: programmers.png (890x608, 67K)

Other urls found in this thread:

gkoberger.github.io/stacksort/
twitter.com/SFWRedditGifs

>s-s-sorting algorithm? why are you giving me these brain teasers!!!!!
>in the real world, i can google these answers!
no wonder this industry is so fucked

i've interviewed around 50 candidates for junior-senior level positions and we did not consider a single one for hiring if they refused to solve programming challenges.

We unironically use fizzbuzz as our screening question and roughly 40% of candidates can't solve it in a language of their choice.

Attached: 1457051955890.png (890x670, 88K)

The javascript code is also wrong, he was supposed to sort 20 characters, but that is sorting N strings.

I believe any programmer that has not read Knuth's Art of Programming(at least the first 3 volumes, heh) is a shit programmer.

Well they want js devs. WTF would you impliment a sorting algorithm in js

this is the same mentality people that waste money on bootcamps have too. "boy I really needed to learn some cookie cutter algorithm stuff for the hiring process so I can never use any sort of algorithmic thinking or problem solving ever again"

Trips of truth. Why are low standards considered more acceptable in this field? It's common even among many students in academia. Many "programmers" find the notion of not even higher level mathematical knowledge and basic computer science as irrelevant to programming, and it shows in their work. Why is it so fucked?
Right, they want JS devs. Two words there: javascript, and developer. The question is not a real world implementation of a simple task, it's an understanding of the thinking this individual may have when attempting to solve a problem they might tackle in the future. If you can't do something as trivial as a sorting algorithm, chances are you're not going to fare well in more complex systems, even if you're working in web development.
Are bootcamps the source of this cancer? Seems likely.

Those guys are probably making ~80k just from googling error messages and copying and pasting from SO instead of solving a problem that has already been solved, meanwhile most "programmers" here know how to fizzbuzz in the most elegant, functional way but are still NEETs ricing their Arch desktops.
I'd argue being able to solve practical problems and not being a social retard is much more important in IT nowadays than knowing how to spit out a quicksort implementation in seconds.

its not the bootcamps per se, but its the exact same mentality of "imma learn to code in 3 months and im going to make 6 figures "etc

Surely, every programmer should know at least one O(n log n) sorting algorithm off the top of their head, right? I mean, anyone can at least do merge sort, right?

all sophomore cs majors can, but lots of "programmers" cant

I don't know them off the top of my head because I implemented them once 15 years ago and never touched it since
It would be strange if you did know sorting algorithms off the top of your head unless you were researching new ones

A lot of industry development is group oriented, and social skills are important. Perhaps if the industry was more tolerant of autism, or if the competent parts of Jow Forums managed to have sex we could see improvement.
It's not even about memorization, it's about basic algorithmic thinking. If you understand divide and conquer, for instance, you could easily program merge sort (assuming you have actual experience programming, and not just theoretical understanding).

>being able to solve practical problems
Googling the answer is not being able to solve practical problems. Everyone in this board can do that.

>Everyone in this board can do that.
I wouldn't go that far...

this isnt reddit user

and then you wonder why everything only becomes worse and more resource-hungry

>WTF would you impliment a sorting algorithm in js
You wouldn't, but I think you're missing the point.

The reason we pose problems like this to candidates is not because we think they would ever actually need to implement a sorting algorithm in js, or implement fizzbuzz, or whatever. We pose questions like this because there are any number of potential problems a programmer may face, and this is an effective way to measure their ability to solve them.

Programming isn't just about knowing the syntax of a language, it's about being able to convert a high level problem into a set of logical algorithmic steps to solve that problem. If all you know how to do is call sort() or google the question, you're not a programmer you're a code monkey.

>
>group oriented, and social skills are important. Perhaps if the industry was more tolerant of autism.
Well that's why I'm still NEET for 4 years. I swear these fucking companies and their damn "fun" culture. I just want a comfy 90s office setup.

I feel you on that one. Agile development and silicon valley culture sucks. They'll suck the life out of you, but at least you get bean bags.

Attached: crackingthecode.png (890x415, 57K)

Most practical problems in modern web development (or any development for that matter) can be solved by Googling. Programmers like to think, and like others to think, that their job is much more complicated and involves coming up with complex algorithms, because they have to justify the fact that they're getting paid 6 figures to be glorified copy-and-pasters. Most senior devs today have trouble implementing basic recursive or dynamic programming algorithms, which just goes to show development jobs don't actually require a lot of theoretical CS thinking.

He should have used StackSort for this: gkoberger.github.io/stacksort/

>dynamic programming algorithms
this is such a CS student thing to say

You couldn't be more wrong though.

Nobody in the real world talks about "dynamic programming", that's some irrelevant phrase from eons ago

it means the programming is more dynamic, progressive and inclusive.

that's diverse programming

kekerino

>meanwhile the weekly 'i hate whiteboards' thread on Jow Forums gets over 300 replies

Here is my solution:
#include

static inline void swap(char *a, char *b)
{
char tmp = *a;
*a = *b;
*b = tmp;
}

static void upheap(char *str, size_t i)
{
if (i == 0)
return;

size_t parent = i / 2;
if (str[parent] < str[i]) {
swap(&str[i], &str[parent]);
upheap(str, parent);
}
}

static void downheap(char *str, size_t n, size_t i)
{
size_t left = i * 2 + 1;
size_t right = i * 2 + 2;

if (left >= n)
return;

size_t children[2] = { left };
size_t len = 1;

if (right < n) {
len = 2;

if (str[left] < str[right]) {
children[0] = right;
children[1] = left;
} else {
children[1] = right;
}
}

for (size_t j = 0; j < len; ++j) {
size_t child = children[j];
if (str[i] < str[child]) {
swap(&str[i], &str[child]);
downheap(str, n, child);
break;
}
}
}

static void sort(size_t n, char *str)
{
for (size_t i = 0; i < n; ++i) {
upheap(str, i);
}

for (size_t i = n - 1; i > 0; --i) {
swap(&str[0], &str[i]);
downheap(str, i, 0);
}
}

int main()
{
char str[] = "heapsort is the best sort";
sort(sizeof str - 1, str);

printf("%s\n", str);
}
I didn't even look anything up.

Attached: 1556458812117.png (1193x810, 817K)

The interview for my current job asked me fizzbuzz as the first question. During my first week I was talking with one of the interviewers and joked about how they actually asked fizzbuzz for an intermediate software engineer position. He told me it actually weeds out a lot of candidates even for senior level positions.

sad.

> Javascript qn
> Gives answer in C
The absolute state of Jow Forums

>language matters for algorithms
The absolute state of Jow Forums

they expecting that you don't know the algorithm and you need to solve the problem, or they expecting that you should know this algorithm already?
what are they testing?

seriously this is pajeet tier interviews. you can pass if you studied textbooks.

"4channel" OP, everyone

Being able to critically think and solve complex problems is more important as a developer because what happens when you work on a large system where you can't google the error messages?

I can implement sorting of any sort, you just have to explain it to me. Tbh I don't remember sorting algorithms by their names, but I'm pretty decent at programming

Reminder to learn COBOL if you want a well paying codemonkey job

If you can't solve the kinds of problems they're bitching about in that thread, you don't deserve the high wages that come with the jobs desu. One poster complained about reversing a list... which is not difficult at all. How do these people breathe unassisted?

I agree you can't omit these retarded tests, but even I see their shortcomings.
I've had a group of pajeets from my univ literally memorize all these basic coding questions like sorting, linked list, array operations and get very decent jobs. These are the same pajeets who'd think Google chrome is an os, using Arduino is embedded engineering and python is faster than c.
They can barely even explain how some of these algorithms work and just throw around buzzwords

I have a good job, I work hard, but I honestly have no idea how this industry works

dam str8 arduinos are somethinsomethin engineering

>Python is faster than C
only in every practical sense of the word "faster" for 99% of people's jobs

Can't wait to start interviewing people just so I could ask them fizzbuzz questions

But, user, we need some python dev to manage our DB with hundreds of 20GB files. Python can do it as fast as C, no? Data science user

I assume they're already employed and applying to higher paying or more enjoyable jobs, in which case they can afford to be picky. Interviewers generally expect unemployed people to show up for interviews and become visibly uncomfortable when they find out you're currently working elsewhere. It's really funny when they were expecting somebody desperate and ended up with somebody who doesn't really give a shit either way. I have had some really terrible interviews that I found hilarious while the interviewer became increasingly pissed off at me. Last year I had an interview at Amtrak for a job I didn't really want in the first place. I just kept answering every question like it was a trick question, even though they obviously weren't. It was a great time, I have no regrets.

I legit asked this pajeet dude what he was making as a project, he repeatedly kept claiming it was related to "embedded engineering" but didn't give any details.
I later found out he was making a shitty cookie cutter "door open sensor" using an Arduino, those adafruit proximity sensors and a buzzer. He was afraid I would copy his shitty idea so he slithered away without giving too many details. I have no idea how nobody objected to this. Even his code was copied from a YouTube video.
Now that I think about it, most pajeets pulled this kind of shit in univ. One guy literally downloaded a Java "library management system" software and claimed he made it. This another guy straight up paid a grad student to make him "something", he didn't even demand anything specific, just "anything".

These guys were absolutely great at mathematics and memorized theory like champs, but they failed to grasp ANYTHING that could be considered as working knowledge

No they meant as a whole, for every possible job.
I inquired the logic behind this conclusion to which one of them answered that python is much newer than python so of course it's faster.

I did not debate this further

I figured I just like to be a shit

>this pic
i am a complete brainlet and new to programming but wouldnt be simpler to just
if var% == 0 be way simpler?
am i missing something?

>they failed to grasp ANYTHING that could be considered as working knowledge
This
These fags are not dumb, they're cunning little bastards, but they have no interest in learning about tech. They have trouble fathoming why anyone would like to learn technology

>I can't follow instructions
The ABSOLUTE STATE of YOU.
Now go wave your dick around somewhere else.

no, for efficiency you want to hard code it as the arithmetic is expensive to do at run time

>"door open sensor" using an Arduino, those adafruit proximity sensors and a buzzer. He was afraid I would copy his shitty idea so he slithered away without giving too many details
Mein sides
I went to Oklahoma SU, my roommate pajeet had his father fly from India to help him with his thesis project. His father was a rich engineer and actually knowledgeable, but he was an absolute retard.
His father eventually got annoyed with the little shit and told him to just buy the project from someone like always and went back

Pajeets are a gold mine of incompetence stories

Every time i see people getting mad at technical interviews i ask to myself: Why the fuck don't people just memorize 3 n(O^2) sorting alghoritms to just you know, answer these kind of questions?

Even me, a fucking brainlet with no math under my belt, can do some classical Algos/DS implementations on the top of my head.

>n(O^2)

mainly principle. It sucks to have to memorize something to get a job in which you won't ever actually use what you had to memorize.

And for the record, people DO memorize sorting algorithms to get past interviews. Half the time they're good engineers, half the time they're bad ones that just memorized some shit. Meaning the exercise was pointless anyway.

>this is a pajeet tier test you can pass if you studied the textbook

O(n^2)
Sorry, posting with my phone .
But you got the Idea.

Legitimate question: If I'm asked to write fizzbuzz in a software interview, should I pretend like I've legitimately never written it before and pretend like I'm "working through the problem" or just write the obvious one-liner?

If the interviewer means any sorting algorythm then do one of the simplest ones just to pass selection sort,bubble sort etc.

Yea , but after i learned sorting alghoritms for example, i inconsciently used them instead of writing my own sorting. It just sticked with me. So memorizing is not always to just the interview; sometimes you memorize by accident.

The key is not to solve it outright, it's to show them you know how to think programmatically and most of all that you know how to communicate your thoughts effectively. Whatever you do, explain it. You should practice explaining things.

upvoat, thanks my reddit dude for sharing your rad screenshot on reddit2.

>am i missing something?
the number after the modulo operator

why not alter the interview to the real reason you'd implement your own sort. A non default ordering. It's actually a common I have to do it at least once a year.

How is it different from Jow Forums programmers? All you people do is talk about fizzbuzz and other irrelevant pieces of code.

I would have just used Intelligent Design Sort.
It's a well documented and credible algorithm.

but dude, carmmackle totally invented the fast inverse magic number quake code.

Fuck, that made me laugh

I don't mind puzzles but give me a damn compiler, not some stupid white board.

I would have used random permutation sort and made everyone in that office sit until completion, no matter how long it took.

fizzbuzz was like the second week of my intro to programming lab, and i got it instantly... how can people be so retarded

It's genuinely true; modulo is extremely computationally expensive

and thats why the pajeets get the job

Attached: x1080DAw.jpg (1920x1080, 299K)

What is it about programming that attracts pajeets?

>Using lumber, please build a door frame
>*hammers nail*
>no no, you have to build the hammer from scratch

this is how stupid y'all sound

Big paychecks, same with dentistry

this is a pretty shit analogy. Interviewers want to see your thought process and how you can design an algorithmic approach to a given task, its irrelevant that a tool or function already exist in some reference library. Its about problem solving

>Its about problem solving
So is building a hammer from scratch. Pointlessly removing tools to make a problem harder than it really is.

>Here is a task
>Using this common tool, I can do the task easily
>Okay wait don't use that tool shit

He solved the problem, interviewer just didn't like it because it made his question look stupid.

listen brainlet the point is any of us could use the tools, its about doing things that are ultimately nontrivial using all resources available and your abilities

I unironically agree with Reddit.
I would rather work next to someone who can do the job than some slobbering autistic fuck who is "gud at maff".

>its about doing things that are ultimately nontrivial using all resources available and your abilities

Then the interviewer should construct a question that actually works to engage those abilities. As is, this question is no different than saying "drive this nail without a hammer". It's a silly hypothetical that will never occur.

Surely a competent interviewer could come up with a question that actually forces the candidate to solve a genuinely nontrivial problem. He could have even just started with "implement a sorting algorithm from scratch" and that would have been cool.

im sure those questions do arise in interviews user, the whole point of fizzbuzz or in this comparison "drive a nail with a hammer" is that it instantly weeds out people who reach for a screw or dont know what a hammer does, which in programming is an alarming amount of people for some reason

>t. brainlet

At my Job interview I had to write a web service from scratch even though I applied for desktop C# development position. Then a month later they moved me to C++ because I learn so fast even though all I do is read documentation.

yea programmers never have to create algorithms or anything.
they just import solution and its done.

def sort(a):
n = len(a)
new_a = list(a)
while n:
is_sorted = True
for i in range(1, n):
if new_a[i] < new_a[i - 1]:
new_a[i - 1], new_a[i] = new_a[i], new_a[i-1]
is_sorted = False
if is_sorted:
break
n -= 1
return new_a

print(sort([3,1,2]))

It's late and I probably got it wrong and I took way too long. I've got to keep sharper.

nothing they said is wrong though. Even though having the ability to design algorithms is important, reinventing the wheel isn't.
How about they think of some actual fucking problems and not just copy everything from elsewhere? most of those already have answers in books like that cracking the interview one.
And I highly doubt they'll actually need the person to do anthing other than build webshit using preexisting things. All these interviewers need to die in a fire

Only a total idiot would read that front to back.

Keep trying user, but this is O(n^2)...

I know, I know. At least you know I didn't just copy the most efficient algorithm from the internet.

A programmer is not necessary a computer scientist. Knowledge of abstraction techniques, being good at communicating, having a vision of the big picture... those are much more important than being able to analyse mergesort.

If you can implement heapsort on the spot but can't tell the differences between the publisher-receiver pattern and the visitor pattern, you then shall go back to academia to become a cs101 assistant teacher.

A programmer that doesn't know computer science is nothing more than a code monkey.

most "computer science" is absolutely irrelvant to being a good programmer

The real "programmer" here is you. Any respectable supervisor would reprimand you for implementing algorithms or data structures from scratch, unless you've already done a fair amount of searching to make sure either:
A) There is no existing implementation
B) The existing implementations are bad in obvious ways that you could fix
You might believe differently after a couple courses in college, but writing good code is difficult; if someone else has already written good code, you'd be a fool not to use it.
It's also important to recognize that sometimes the right algorithm is not O(log(n)), or O(n), but O(n^2). This is obvious when you consider a program's development time (in addition to its compilation and run time).
A good interview is meant to see if you're fit for a job. If that employer wants someone who remembers how to implement a sorting algorithm, then that interview was a massive success and both the employer and the applicant are better off. On the other hand, that answer is somewhat clever.
I think most of the "implement basic algorithm #23 from class X" are meant to make sure you paid some attention in school and that you are familiar with basic constructs and programming practices in the language. I would be surprised if an interview for a non-entry level job required something like that.
In any case, anyone who really wants a job would not refuse to answer a question - there are smarter ways to admit lack of knowledge. For example, I was once asked if I knew how to list files in a directory over the phone. Obviously, I did. I was then asked if I knew how to sort those items according to some condition. I said, "No, but I can quickly use 'man' to see what I need to do."

Not at all, read sicp.

Solving the problem doesn't make you a good programmer.

>people actually fail at fizzbuzz
Using Python in college for scientific work is my only programming experience and even I can do that shit. It's baffling to me that someone who actually programs for a living wouldn't get it. What do developers do all day?

I usually do mergesort but I decided to do a quicksort for the first time (yeah I know it's O(n^2))

var qsort = function(lst) {
var recur = function(left, right) {
if(left >= right) { return; }

var pivot_idx = Math.floor(left + ((right-left)/2));
var pivot = lst[pivot_idx];

var nleft = left;
var nright = right;

do {
while(lst[nleft] < pivot) {
nleft++;
}
while(lst[nright] > pivot) {
nright--;
}
if(nleft