[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
>interviewing fresh cs grads >can't do dynamic programming
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /g/ - Technology

Thread replies: 255
Thread images: 43
File: 1417636315551.png (82 KB, 461x660) Image search: [Google]
1417636315551.png
82 KB, 461x660
>interviewing fresh cs grads
>can't do dynamic programming
>can't print a binary tree level by level
>can't implement basic sorts
>one failed fizzbuzz
How can you get a CS degree without knowing basic algorithms?
>>
They scraped by and did the bare minimum.
Most don't even open their text editors outside of class because they have no drive to program, it's just a means to an end for making money.
>>
>>52198143
Please tell me ops pic isn't real...
>>
>>52198192
it is. really ridiculous.
>>
>>52198192
https://www.netmeister.org/blog/MrMEEE/
>>
File: computer_science.gif (2 MB, 320x240) Image search: [Google]
computer_science.gif
2 MB, 320x240
>>52198143
Computer Science is not about programming.
>>
>>52198581
It's also not about computer nor is it science
>>
>>52198743
Then how does it get you IT and programming jobs.
>>
>>52198743
Touché.
>>
Can you hire me instead? I can do all those things, but I'm a math undergrad that really likes CS.
>>
File: 1445884921797.png (123 KB, 201x241) Image search: [Google]
1445884921797.png
123 KB, 201x241
>>52198143
>that pic
Holy fucking Christ lad
>>
>>52198246
Fuuuuuuck that
>>
>>52198581

Dynamic programming, binary trees, and sorting algorithms are all a standard part of any CS curriculum, as is at the very least a basic knowledge of how to actually program (and good CS programs will find a good balance between teaching theory and practical knowledge). Any CS graduate worthy of their degree should be able to solve basic interview questions.
>>
>>52198581
>>52198743
Computer Science is like a guinea pig: neither a pig nor from Guinea
>>
>>52198143
That's what happens when you tell everyone "STEM makes you rich lmao", all the unenthusiastic normalfags flock to it, learn to exploit the education system so as to do as little real work as possible (thus learn nothing), and essentially steal a degree that is used by them primarily to fool employers into hiring them, foolishly thinking they actually know what they're doing. The ones that aren't hired bitch and moan that they can't get a job "doing what they want to do", say STEM is shit and everyone lied to them, as they march to McDonalds, resume and thousands of dollars of debt in hand.
>>
File: 1447542034739.png (121 KB, 361x332) Image search: [Google]
1447542034739.png
121 KB, 361x332
>>52198143
Someone explain what's happening in pic.
>>
>>52198989
that space there in the script makes it delete the /usr directory instead of usr/lib/nvidia-current/xorg/xorg
>>
>>52198930
I've never met anyone who works fast food with a degree.. Wait I met one and he had an art degree
>>
>>52199020
I'm exaggerating about McDonalds, but all those retards you hear ranting and raving about how they were lied to about STEM being profitable are all unenthusiastic fucking retards that couldn't beat the interview screening because they learned absolutely nothing from school. If you're just in it for the money, CS is absolutely not going to work out for you.
>>
>>52199020
lol
>>
>>52198989
rm is the "remove files" command in unix/lunix.
-rf is two flags for rm: -r is "recursive" (go into subfolders, remove shit there, remove folder), -f is "force" (do not ask user for confirmation)
The code was meant to remove "/usr/lib/nvidia-current/xorg/xorg", but because of the space between "/usr" and "/lib", the shell treats this as two separate arguments: "/usr" and "/lib/nvidia-current/xorg/xorg".
So "rm" gets launched, sees the recursive+force flags, and sees that it has to delete everything in "/usr". On unix/linux, that's where pretty much all but the most system-critical executables reside. As you can imagine, the result is rather nasty for the system.
>>
>>52198758
Any one can get those jobs. You don't even need a CS degree but it makes it look nicer
>>
>>52198758
IT: Get certs
Programming: Build a portfolio and get a degree
>>
>can't do dynamic programming
thats a good thing
>>
>>52198143
>can't implement basic sorts

Guilty of this, been meaning to spend some time over Christmas practising implementing quick, merge and heapsort.
>>
>>52199131
I implemented quicksort and heap sort like 6 years ago when I took Data Structures. I can't remember shit, but I know how they work. Mergesort is actually very easy to do.
>>
File: 1443750026342.jpg (14 KB, 500x500) Image search: [Google]
1443750026342.jpg
14 KB, 500x500
>>52198143
>mfw I'm 2 years from graduation and I can do all that stuff

Can I have a job plz?

But seriously, why are you asking such standard interview questions like that? "Print a binary tree level by level" and FizzBuzz are such common, standard questions that there's a good chance the person you're interviewing has seen them before and memorized the solutions to those problems. Wouldn't you rather ask them questions that actually test their ability to solve problems they haven't memorized the solutions to?
>>
>>52198143
Why do I even need a binary tree?
>>
>>52199351
pajeet detected

we know you are a rockstar man
>>
>>52199340
I bet your happy
>>
>tfw I have guaranteed media jobs, 80k starting, out of college.
>tfw majoring in philosophy

STEMcucks btfo
>>
>>52199068
>If you're just in it for the money, CS is absolutely not going to work out for you.
>>52198930
>unenthusiastic normalfags flock to it, learn to exploit the education system so as to do as little real work
>>52198184
>>Most don't even open their text editors outside of class because they have no drive to program, it's just a means to an end for making money.

I'd be interested to hear what you'd recommend to someone who has no passion or enthusiasm for anything, and just wants to get a paycheck for as little effort as possible
>>
>>52199340
You'd think everyone would be able to answer those but alas.

Of course, if you get these right, you still have to answer harder ones.
>>
>>52199340
>fizzbuzz
basically, an idiot detector. if you can't do fizzbuzz, there's no hope for you. and if you just memorized it, you will probably stumble if I dig into "explain your code".
>>
>>52199436
>who has no passion or enthusiasm for anything
I recommend nothing.
You will not enjoy any line of work because you have no passion for anything.
Just kill yourself.
>>
File: dpt.jpg (185 KB, 800x547) Image search: [Google]
dpt.jpg
185 KB, 800x547
>>52199402
I just want to know, man.
I've been doing programming in my spare time for a while now but I've never thought "hey, I'll use a binary tree to do this".
>>
File: 1421726533010.jpg (58 KB, 259x220) Image search: [Google]
1421726533010.jpg
58 KB, 259x220
>he's not EE/CmpE master race
>>
>>52198143
>print a binary tree level by level
google says this is just breadth first search

>wasting programmers time with bs questions
>>52199340
is right you should be asking questions that actually assess problem solving.

I would throw out the first two questions but keep the second two as a basic test
>>
>>52199436
If you can into speaking, politics is an easy way to make money without knowing shit about anything
>>
>>52199436
politics
>>
>>52199433
>80k starting
Why would you want a job that doesn't even cover your rent?
>>
>>52199482
>google says
you're not allowed to google the answer dickhead

also it's a weed-out question
>>
>>52199493
You must live in new York
>>
>>52199293

I took my algorithms module last term, surprisingly in the classes we never had to implement any sorts which is why I've been meaning to do it, they spent more time on trees and graph theory.
>>
>>52199433
80k starting is nice or not entirely depending on location
>>
i have a CS degree and i had forgotten all coding by the time i graduated because i took those classes 3 years before then. still have an IT job because only the small percent of computer science jobs actually use coding.
>>
>>52199493
>he thinks 80k isn't a lot of money
wtf spoiled much

>>52199517
>thinking your interviewees are dickheads for googling bs questions
i wouldn't want to work at ur pos company anyway pham
>>
>>52198143
That's all shit I got in my first year. I know about them, but 3 years later (right now) I would have to look up how to actually do dynamic programming or implement most of the sorts (though I could probably figure them out if I sat down to think about it long enough). That's shit you learn about once and barely (or not even) use in the rest of the curriculum. At least not that in depth. Like you learn the sorts in the first year and after that you just pick the sorting algorithm most suited and don't bother with the implementation anymore.

But printing a tree or writing fizzbuzz is shit any CS grad should be able to solve immediately when woken up in the middle of the night

Its normal to forget the details of things you don't use all the time. Since you get a ton of different courses in CS I don't think it's a problem.
It's only a problem when CS grads have no clue what it even is or where to look for brushing up their knowledge.
>>
>>52199436
There are plenty of jobs that require zero enthusiasm to excel in, sometimes it's even better if you're unemotional about them. Anything in the field of business is generally all about the money and really nothing else. I'm in IT and I have no enthusiasm, but I really don't need it, I have the skills, I can tolerate it, I make a living, no harm done.

CS is just one of those things you need to have a genuine interest in. You get out exactly what you put into it.
>>
>>52199131
>heapsort
dunno why, always had problems grasping that one.
>>52199293
>quicksort
this one I've actually learned by heart, because I'm a lazy whore and often just prefer to write those few lines myself instead of digging through docs as to find if whatever obscure language I'm programming in actually has a standard sort function.
>>
>>52199556
>not coding in your free time
>>
>>52199544
this.
>tfw eastern yurop
>tfw first job paid ~5.5k/yr
>>
>>52198143
wut? you need a cs degree to learn that shit? i was implementing binary trees and sorting algorithms in my high school computer science class.
>>
>>52198143
According to some blogs by people who have to hire programmers they even sometimes get the retards who can't do basic recursion, or make a loop that counts from 1 to 10.
>>
>>52199599
>working for free
i can't really think of any other profession in where you're expected to keep working at home in your free time for fun
>>
How the hell do you print a binary tree level by level?
I'd pass along a List<List<Node>> to get the nodes sorted by level but that sounds pretty stupid.
I can't remember a single sorting algorithm and I was never able to get them beyond memorizing how to solve them and write them for tests.

I am a senior full stack developer for my countries ministry of finance (^:
>>
>>52199607
how does it feel taking our jerbs you FUCK?

you're pretty much a pajeet
>>
>>52199623
>i can't really think of any other profession in where you're expected to keep working at home in your free time for fun
Is this a joke? No wonder CSfags have such a
>>
CS is gay
>>
>>52199623
don't worry its a meme
>>
>>52199638
>No wonder CSfags have such a
hard time finding jobs. You guys are fucking lazy faggots.

Find me an electrical engineer who doesn't breadboard and create circuits in their free time. Find me a mathematicians who doesn't read proofs for fun in their free time.
>>
>>52199128

No it's not. Dynamic programming is one of the basic means of improving the runtime complexity of an algorithm. If one can avoid re-computing subproblems, one can only find good results, unless one is constrained for space.
>>
>>52199599

Depends if you enjoy it, I was talking to some people in my CS year and one person was very surprised that I spent some of my free time programming. Just shows the amount of retards that take CS really.
>>
>>52199623
There's lots of enthusiastic programmers. These get jobs.
>>
>>52199623
Any career that requires you to solve complex problems.

Not necessarily "for fun", but if you're not keeping sharp you're gonna have a bad time when you need to implement something you've let get rusty over years and years of neglect.
>>
>>52199612
You don't. These are simple af questions.
>>
>>52198143
I don't get it. How did it manage to delete the /usr folder?
>>
>>52199625
>I work for the government
>>
>>52199652
>find me an electrical engineer who doesn't breadboard and create circuits In their free time
H-hey
>>
>>52199468
This is because your programming involves importing libraries which, at some point, use a BST or the like.

So, systems programmers.
>>
>>52199625
>queue Q
>enqueue root in Q
>while Q not empty
> n <- dequeue(Q)
> print(n)
> enqueue(Q, children(n))

if you couldn't think of something like that in a few seconds you have failed miserably at CS and should not be allowed to program
>>
>>52199718
rm removes every file listed, separated by spaces
>>
>>52199652
No job should require you to work on your own time, outside of a 40-hour (maximum) workweek
>>
>>52199767
>no job should require training or knowledge!
>every job should be dumb menial repetitive labor!!
>>
>>52199750
this

google breadth first search and graph theory
>>
>>52199767
These people enjoy it. Heard about hobbies? Are you surprised professional musicians play their instrument during their free time?
>>
>>52198581
I think OP would have even less luck if he asked them to prove np-completeness of a problem or unsatisfiability of some predicate logic formula.
>>
>>52199767
It's not required by any means, but it's good practice and you will suffer if you don't. Don't expect to be able to compete with someone with a genuine interest in CS, who actually cares about learning new things that will make their job easier and please their employer.
>>
>>52199767
you're not working
you're programming on your own time, working on personal projects
how the fuck do you expect to learn if you never applied your skills anywhere when learning to program?
surely, you're telling me a carpenter has zero interest in carpentry outside of work and doesn't even own any tools himself?
>>
>>52199623
It's not work if it's a hobby.
>>
>>52199793
This shit is literally year 1 stuff
>>
>>52199722
Big money, big bonuses and benefits all over the place! Fresh startup feeling NOT included.

>>52199750
Who'd ever think of that!
I am not a Computer Scientist, I studied infocomm as BSc and Software Engineering as MSc. I am a programmer, not a mathematician/scientist.
We learned how to build big business applications instead of toying with trees which is something only the really smart people should do, those who write the data structures we are using, like Javas insane ConcurrentHashMap.
>>
>programmers are expected to like programming and program for free in their spare time and post their source code on the internet for everyone to take for free
>they must do this in order to secure a job on top of a 4-year CS degree

top cuck
>>
>>52199078
this kills the installation :(
>>
>>52199916
>We learned how to build big business applications instead of toying with trees which is something only the really smart people should do, those who write the data structures we are using, like Javas insane ConcurrentHashMap.

This is a troll, don't respond.
>>
>>52199931
>people who enjoy programming and do it in their free time have a better chance of getting a job doing something they enjoy

I don't see the problem with this at all
>>
>>52199931
>programmers are expected to like programming and program for free in their spare time and post their source code on the internet for everyone to take for free
Good programmers are. If you want to be a spaghetticode currynigger you can slack off all you want, but good luck actually get a job, or holding a job, or working on anything worthwhile.
>>
>>52198143
>can't implement basic sorts
Honestly I think most CS students forget absolutely everything they learn about algorithms as soon as they stop taking the class. At best they'll remember is "a Quicksort is fast and a Bubblesort is slow", and that's if you're lucky.
>>
>>52199990
>no true programmers
>buzzwords
>racist /pol/ speak
never reply again unless you can actually contribute to the discussion
>>
>>52198143
can someone please explain the OP picture here
>>
File: tipsfedora.jpg (21 KB, 480x600) Image search: [Google]
tipsfedora.jpg
21 KB, 480x600
>>52200041
Upvoted. Keep up the good work, fellow Redditor!
>>
File: 1451258783610.jpg (53 KB, 500x501) Image search: [Google]
1451258783610.jpg
53 KB, 500x501
Heh I can relate to some of the people here.

Getting a BS/MS in computer science in 2 years and I honestly never want to program again, or at least if I do end up in a programming job that I don't have to invent anything crazy. Gonna look for that sick IT job or something easy that pays min 70K.
>>
>>52200057
don't reply again until you're ready to contribute to actual discussion
>>
File: 1445447175984.png (264 KB, 380x458) Image search: [Google]
1445447175984.png
264 KB, 380x458
>>52200041
>misinterpretation of a logical fallacy
>"muh buzzwerdz"
>too sensitive to read the word "nigger" on 4chan
>>
>>52200053
see
>>52199078
>>
>>52199625

Well one simple manner to print a binary tree level by level would be to flatten it out into a vector. You make a vector of pointers to nodes, you set the first element of the vector to the tree's root, and you start setting all of the elements thereafter based on previous elements in the vector. For example:

vec[1] = vec[0]->left;
vec[2] = vec[0]->right;
vec[3] = vec[1]->left;
// etc... (but use a loop, don't write it like this!)


After flattening the tree, just print the vector in order.

You can also use a queue, as suggested here: >>52199750

Either way, the idea is to keep a temporary store of the elements of the tree, which can be accessed in order.
>>
>>52199950
This is what I truly and firmly believe, even if it makes you mad.
Software Engineering is about choosing the right tools and techniques to create a product. It's not just about software but also about management.
Computer Science is about researching computer related stuff like algorithms and low level software. That research often ends up as part of the tools software engineers use.
Computer scientists sometimes work as software engineers and software engineers sometimes work as computer scientists though since they are closely related and overlapping fields.
Do you expect your doctor to be able to assemble an X-ray device?
Do you expect a cook to be able to breed cows?
>>
>>52200096
don't reply again until you can contribute to the conversation
>>
>>52200090
it's : Never fucking reply to me again unless you're contributing to the thread.

get your memes right
>>
>>52199625

void print_tree(node * tree) {
if(tree->left)
print_tree(tree->left);

printf("%d\n",tree->value);

if(tree->right)
print_tree(tree->right);
}

>>
>>52200101
but then you would know which nodes belong on which level, right?
>>
>>52199652
>Find me an electrical engineer who doesn't breadboard and create circuits

Literally me
>>
>>52200103
A "software engineer" needs understanding of CS theory to be able to design decent architectures.
I am under the impression that what you mean is actually termed a "code monkey", a group which is comprised of mostly retards and curryniggers that write unintelligible spaghetticode.
>>
>>52200162
0/10 see me after class
>>
>>52200228
why? it's not wrong. that prints all values from the tree
>>
>>52200240
but not level-by-level
your code prints the tree in-order
>>
>>52200240
No, not level-by-level. Look up the difference between a "breadth first search" and "depth first search".
>>
>>52200287
>>52200255
oops . my mistake then :)
>>
>>52199599
>working for no reason on something that will do nothing for you.
>>
Are these skills really important?
Shouldn't you be worrying about how diverse the candidates are?
>>
Pretty sure almost all the replies are from people who haven't worked yet.

Have fun programming for fun after working for 8 hours.

Also almost all programming jobs don't hsve anything to do with CS, it's all about framework stitching and RTFM.
>>
>>52200361
>will do nothing for you.

shut up already
>>
File: aoZe8xn_460s.jpg (48 KB, 460x396) Image search: [Google]
aoZe8xn_460s.jpg
48 KB, 460x396
>can't do dynamic programming
>can't print a binary tree level by level
>can't implement basic sorts
>one failed fizzbuzz

Ok so it's been 2 years since I graduated and been programming in the industry now since graduation. Dynamic programming is the heart of CS I personally think so that one's easy to remember.

Printing a binary tree was the first year of CS and given enough time I think I can do that again. If we're printing top to bottom, first print. Then follow the left node of the primary node (if it exists) then print, then follow the right node of the primary node (if it exists) then print. Then recurse to each node ensuring the level matches for each print execution. As in only print out nodes from X level if we're in X that exact level at the time of check. This sounds inefficient in my head but whatever. I'm sure there's a alternative way.

I can't remember which sort is which (who does honestly) with out the help from google. However I know one sort that'll work, just take slot 0 of the array, go throughout the array and move the biggest (or smallest if you want small to big instead) to slot 0. Then repeat for slot 1, then slot 2, etc for the length of the array. This sounds like shell sort.

I'm on fucking /g/, fizzbuzz is retarded easy.

Granted I'm not interviewing right this second so that's why I'm not really caring if I got the binary or sorting right or wrong.
>>
>know all this stuff
>Sorry, it says here you don't have 10 years of work experience with Java enterprise applications.
>>
>MFW CS newbs cant underwater programming
>>
>>52198143
>print a binary tree level by level
As a non-native english speaker. What does this mean?
>>
>>52200456
>know all this stuff
>have 10 years working with Java enterprise applications
>be male
>oh sorry, the position has been filled
>later find out they hired a woman without a CS degree or previous experience
>>
>muh binary tree
>muh stack
>muh bubbleSort

Probably can't even give a polynomial reduction from SAT to 3-SAT.
>>
>>52200513
http://articles.leetcode.com/2010/09/printing-binary-tree-in-level-order.html
>>
This was me. I get nervous on job interviews and literally cannot focus. I was asked to hardcode a merge sort, easy oh so simple, but in an interview environment...
>>
Oh btw
https://www.youtube.com/watch?v=kPRA0W1kECg
An old sorting algorithm visualization my university showed us when I was back in uni.
>>
>>52200513

Breadth first.
>>
>>52200369
Well the jobs have to tell can you even program at all. And they have to access this from the little time they have with you.

In reality you won't be touching most of what they interview you.
>>
File: 1451263104009.jpg (66 KB, 399x382) Image search: [Google]
1451263104009.jpg
66 KB, 399x382
>>52200533
that's the worst feeling in the world

>be 4th year cs student
>decent grades, not really impressive, but not bad
>a few projects, had a really impressive sounding internship
>be male though
>google comes to campus to recruit and talk to the 10 or so seniors in my program
>rep spends 20 minutes talking to the one girl
>she's about the same as me, no projects or internships though
>she gets fast-tracked to interviews at google
>I get no response 1+ month from when they got my application

and that's when I learned that men aren't wanted in this profession
maybe I'll go to grad school and get a theoretical masters/PHD if I can't get any good offers this semester
>>
>>52200585
Off the top of my head I could do reduction to CNF-SAT.
I forgot how all the prominent reductions were done long ago.
>>
>>52200654
you're probably autistic or have a major deformity
nobody wants uggos
>>
File: 1337394806773.jpg (293 KB, 700x849) Image search: [Google]
1337394806773.jpg
293 KB, 700x849
>>52199340
just show them the work you're doing and see how they cope for a few minutes. this is what they will be doing on the job anyway. this is the eternally best way to interview people.
>>
>>52199436
>I'd be interested to hear what you'd recommend to someone who has no passion or enthusiasm for anything, and just wants to get a paycheck for as little effort as possible
HR
>>
>>52200730
>implying

go SAP consultant
>>
>>52200654
Do you honestly want to work for a company that values "muh vagina" more than actual competence and merit. Let Google do what they want, eventually it will bite them in the ass while companies who don't fuck around will succeed.
>>
>>52200590
you are probably an idiot, sorry.
>>
File: grothendieck.jpg (9 KB, 232x217) Image search: [Google]
grothendieck.jpg
9 KB, 232x217
>mfw i interviewed for a job after a semester of cs coursework and got a job anyway
>mfw some faggot techno nerd thought me blew me the fuck out for not knowing dynamic programming when i got an offer for 75k at another company anyway
>mfw i took algos the next semester and dominated it despite drinking and partying instead of studying for exams
>>
>>52200819
>and dominated it despite drinking and partying instead of studying for exams
that's me if you replace "drinking and partying" with shitposting and masturbating
>>
>stuff that never happened: the post
>>
File: borat.jpg (13 KB, 248x320) Image search: [Google]
borat.jpg
13 KB, 248x320
/g/ posters
>racist
>convince themselves that it's extremely difficult to get a CS job despite this being the easiest field to break into right now
>think you need a huge github repo to get a 70k job doing stupid shit like medical billing software

>>52200585
that's a party trick. most people will have memorized it after seeing it since it's kind of simple, but there's really no purpose to know it once you know that it can be done.
>>
>>52198989
Deleted system 32
>>
File: cool hair.png (51 KB, 183x166) Image search: [Google]
cool hair.png
51 KB, 183x166
>interviewing fresh CS grads
>tell them to outline a proof of the cook-levin theorem
>100% fail
>ask them to prove that the halting problem is unsolvable
>75% fail
>ask for proof that sqrt2 is irrational
>only 2 get it
>mfw they start rambling about their github repos and node

Codemonkeys gonna codemonkey
>>
>>52201088
there's no way
unless they've never had anything on automata and turing machines, there's no way they wouldn't know about the halting problem
...right guys?
>>
> print a tree level by level

I have to admit when I first heard this I thought it sounded quite difficult. I have found a solution though:

function printTree(tree) {
var levels = {};

(function enumerateNodes(node, level) {
levels[level] || (levels[level] = []);
node.value && levels[level].push(node.value);
node.left && enumerateNodes(node.left, level+1);
node.right && enumerateNodes(node.right, level+1);
})(tree, 0)

(function printTree(levels, level) {
if(!levels[level]) return;
levels[level].forEach(v => console.log(v));
printTree(levels, level + 1);
})(levels, 0)
}


I would be interested to know if there is a 'single pass' solution.
>>
File: fizzbuzz.jpg (36 KB, 381x499) Image search: [Google]
fizzbuzz.jpg
36 KB, 381x499
>>52201131
>this kills the self-taught no-degree pleb
>>
>>52201088
>tells me to outline a proof of the cook-levin theorem
>just prove it using 3sat

what now fuccboi
>>
File: icametolaughatyou.jpg (32 KB, 640x480) Image search: [Google]
icametolaughatyou.jpg
32 KB, 640x480
>>52201184
>needing to justify your academia circlejerk with academia garbage
>>
>>52201194
then u get an offer.
>>
>>52198143
>>52200407
>fizzbuzz

this is the first time i've ever heard of fizzbuzz so i looked it up. are people seriously this retarded or am is there something im missing?
>>
>>52198143
>This entire fucking thread
>Implying most CS jobs involve anything to do with theoretical computer science and are not mostly just pushing forms and data around
>>
>>52201325
how new are you, seriously?
>>
>go to interview
>told to do some shit like "fizz buzz" and "print a binary tree"
>laugh and ask the interviewer if he's being serious?
>he is
>Tell him to call me when he wants to interview and not verbally give me my 1st year algos final
>walk out
>>
>>52201383
i dont visit /g/ very often. im just bored right now wondering around and i saw this thread.

i saw this thing about fizzbuzz so i looked it up, threw something together in c++ and it gives the desired output, but im not sure if i did it 'wrong' because it seems stupid easy

i'm now trying to figure out if i'm part of the "99.5%" of retards to fail the fizzbuzz test.
>>
>>52199488
What if Harvey Dent voted in that poll?
>>
>>52201467
It's hard to get it wrong if you understand the problem correctly. It's not a trick question.
>>
>>52201184
The halting problem can't be a huge deal. It was on the first Python book I read.
>>
>be me
>apply for cs job after 1 year and 3 months after graduation
>get asked questions
>show them my desktop specs, headphones, smartphone, animue, and gamer keyboard
>interview ends
>go home
>wait two weeks
>get call back with an offer starting at €110k
>>
File: learner.png (207 KB, 396x462) Image search: [Google]
learner.png
207 KB, 396x462
>Don’t forget: the correct answer to “How do you reverse a linked list” is “Thanks for your time but I’ll see myself out”.
http://programmingisterrible.com/post/116698171738/nothing-is-more-indicative-of-a-bullshit-job-than
>>
>>52201533
>I can't get a job
>must be the interviewer and not me
>why the fuck should I have to know about any data structures?
>>
>>52201571
what? the problem has nothing to do with knowing data structues. the guy making the argument likely has ten times the experience you do writing systems.
>>
>>52201571
Did you even read the link he posted?
>>
>>52201645
he is me. and he thinks you're retarded.
>>
>>52198143
I'm graduating next semester and I can hardly do this shit.
>>
>>52199436
Oil rig or some other job in Alaska.
Tons of money.
>>
>>52201533
But there's no trick to reversing a linked list.
Except when it's turns out the interviewer means a doubly-linked list with a pointer to the tail - that would be bullshit.
>>
>>52201698
missing the point.
>>
>>52201325
it's a filter question
it'd be like if you were interviewing some guy for a job at a pine forest and you said, "hey, those birch trees are looking good this time of year"
80-90% of people will answer how you're expecting, but it filters out the really dumb people before you even begin
>>
>>52201698
that would be easy as fuck though
#define front back
#define back front
#define next prev
#define pre next
>>
>>52201726
oops last one should be
 #define prev next
>>
>>52201726
you just defined pre as prev
I think you meant to swap your last and second to last statements
>>
>>52201726
>that would be easy as fuck though
that was my point
>>
>>52201718
what is the point?

he bitches about questions with a "trick" in them, but where's the "trick" in reversing a linked list?
>>
File: guido.jpg (24 KB, 400x400) Image search: [Google]
guido.jpg
24 KB, 400x400
Man, all this talk about lists is getting me hot.
>>
>>52201789
>list fetish
>not a lisper

you dun goofed
>>
File: 1411543196696.png (245 KB, 900x851) Image search: [Google]
1411543196696.png
245 KB, 900x851
>>52201780
>i already know the answer
>but where is the trick?

4chan is always like this.
>>
>>52201834
I didn't already have some answer handy for reversing linked lists, I came to one after thinking for 5 seconds about it just now
>>
File: 1433716247384.jpg (70 KB, 500x500) Image search: [Google]
1433716247384.jpg
70 KB, 500x500
>>52201864
cool. so you figured out the trick in a few seconds. this was clearly a good test of your skills. would def hire.
>>
File: john mccarthy.jpg (26 KB, 576x538) Image search: [Google]
john mccarthy.jpg
26 KB, 576x538
>>52201820
Hey bby my dik so big it can't be held in contiguous memory.
>>
>>52201931
I can't see anything there that you could call a trick.
Please tell me what you call a trick while reversing a linked list.
>>
>>52202014
trick questions can be crafted by asking stupidly straightforward problems in the form of questions. please tell me you're trolling at this point. most people learn this around 10.
>>
>>52202070
So fizzbuzz is a trick question now and not a simple test of very basic programming ability?
>>
>>52198143
Hmm, I could do 2 , 3 and 4.
Where can I learn computer science online? Should I just start reading TAOCP?
>>
>>52202128
http://jeffe.cs.illinois.edu/teaching/algorithms/

especially the DP stuff is pretty good
>>
>>52202119
you could have considerable skill and not know about modulus because you've never needed it. so fizzbuzz does have an error rate for its intended purpose. people in this group would see it as a trick question if they weren't given the ability to do research.
>>
>>52202119
Honestly, what does asking FizzBuzz accomplish?

Someone who can't do FizzBuzz will never be able to solve harder problems, and someone who can do FizzBuzz also might still be an awful programmer who doesn't know anything, because FizzBuzz is literally week one programming 101 material.

Just save everybody from wasting time by going straight to the actual questions, FizzBuzz doesn't actually do anyone any good
>>
>>52202171
you can easily solve it without modulo
>>
>>52202167
Thanks!
>>
>>52202200
source? i ask cause i doubt you can produce any.
>>
>employers want projects
>post in /dpt/ about my projects every so often and ask for feedback, how people would do them better
>no one ever replies
>they go back to arguing over who has the fastest language or the nest paying jobs
>or they go back to talking about crossdressing while programming


where do you go for discussion like this? irc channels? old forums?
there's got to be some place to talk about small personal projects without bullshit dick measuring
right?
>>
>>52202128
wikipedia has pseudocode for different sort, heap sort, bubble sort, merge, etc. just implement it in your language only using the pseudo code
>>
>>52202192
fizzbuzz filters out the retards who claim to know programming but can't even write a single line of computer code or figure out a trivial algorithm to solve a trivial problem
>>
>>52202192
To filter out people who know nothing about programming and it didn't used to be some common problem they'd prepare for.

It's useless now though, since so many people know about fizzbuzz and they possibly just looked up a solution before.
>>
>>52199118
What certs are recommended?
I've currently got my A+ (I know, it's nothing), working on CCNA, then I want to get security+. Might get Network+ as another cert to throw on there, shouldn't require much studying.
>>
>>52201685
Same here buddy. I haven't even found an internship yet so I can really see how bad I am at this. I'm good at SQL, because SQL is easy. Will probably end up being a DBA. Which I'm cool with.
>>
>>52202192
it proves that in any given language you know
>loops
>conditional statements/branching

to be honest, it's basically a slightly more advanced hello world
>>
>>52202234
i haven't seen any projects posted in a while
go post yours right now
>>
>>52202226
You can use a number indicating when to write fizz, buzz, both or the number and do a cyclic shift each iteration.
>>
>>52202234
Reddit.
>>
>>52199293
you plebians cant even into the most basic of algorithms.

normal people do this shit when they sort cards. ffs, you all should be totally ashamed of yourselves and never show your face in public again
>>
>>52202237
I didn't mean learning sorting algorithms. I meant more advanced stuff.
>>
File: d6kVu.png (136 KB, 500x395) Image search: [Google]
d6kVu.png
136 KB, 500x395
>>52202284
>ask for source
>responds with pseudoshit
>>
>>52202171
No need to use that pesky modulo thing, mate.
#include <stdio.h>
#include <stdlib.h>

#define P(s) fputs(s, stdout)
#define FIZZ { P("Fizz"); mark = 0; }
#define BUZZ { P("Buzz"); mark = 0; }
#define NUM printf("%d", i)
#define NL { P("\n"); mark = 1; }
#define MOD3(x) ((x)-(((x)+1)*85>>8)*3)
#define MOD5(x) ((x)-(((x)+1)*51>>8)*5)

int main(void) {
int i, mark = 1;
for (i = 1; i <= 100; ++i) {
if (!MOD3(i)) FIZZ;
if (!MOD5(i)) BUZZ;
if (mark) NUM;
NL;
}
return EXIT_SUCCESS;
}

No modulo or division here.
>>
>>52200103
computer science is about
computational science
. nothing else.

algorithms have been around since the dawn of life.
>>
>>52201718
>all these /g/ posters thinking that sorting is the only type of algorithm

no wonder you all shitpost and bikeshed so much.
>>
File: 1440235912837.png (131 KB, 555x378) Image search: [Google]
1440235912837.png
131 KB, 555x378
>>52202377
>No need to use that pesky modulo thing, mate.
>defines two mod macros
>>
>>52202226
you can use decimal numbers and and then check for divisibility by doing
(num == round(num))

if it is indeed divisible by 3 it should return true since num/3 would be a natural number, and if you round a natural number it would be itself.
>>
>>52202357
#include <stdio.h>
#include <stdint.h>
int main() {
uint32_t x = 19142723, i = 0; char d[] = "fizz\0buzz\0\x04\0\x05\0\x04\x04\x04\x05%s%s\n\0\0\0%s%s%d\n";
while (x=x>>2|(x&3)<<28,i++<100) printf(d+18+(((x&3)==0)<<3),d+d[10+(x&3)],d+d[14+(x&3)],i);
}
>>
>>52202259
any of those + certs are nothing, senpai.
you need to get a bachelor of science.
>>
>>52202408
>rename macros
>problem solved
>>
>>52202450
missing the point, again. please reread the thread. you've gotten lost.
>>
>>52202357
not him but
count3 := 0
count5 := 0
for i := 1...100 do
count3++
count5++
if count3 = 3 && count5 = 5 then
count3, count5 := 0
print "FizzBuzz"
else if count3 = 3 then
count3 := 0
print "Fizz"
else if count5 = 5 then
count5 := 0
print "Buzz"
else
print i
end
end


wow
hard
>>
>>52202483
You seem to be the one lost here, friend.
The code doesn't use the modulus operator feature of the language, which the previous poster pointed out a person might not know about.
>>
>>52202517
modulus is more than an operator, retard.
>>
>>52202543
so can be addition, but I don't see you complaining about that. If you never have used modulus and don't know that it exists, well then just write your own function that does the same thing modulus does.
>>
>>52202248

This is the basic problem of modern day programming: A problem has a solution that anybody can google. This kills off how the user would approach a job which becomes a problem when said job becomes more specific.
>>
File: 1448575890011.jpg (33 KB, 276x233) Image search: [Google]
1448575890011.jpg
33 KB, 276x233
>>52202593
>dont know A exists to solve problem B
>just write your own function A

ya this is troll.
>>
>>52202226
I don't think there's an easy way to do it, but I wouldn't count out anyone who could work around modulo.

You could write a modulo function.

You could make an array storing 1 to 100, setting any number whose digits sum to 3, 6, or 9 (if two digit number is result, sum again) and any number that ends in 0 or 5 to -1 in array.

You could have two counters, i3 and i5, that count up while i counts up. When i3=3 or i5=5, reset to 0 and print fizz, buzz, or fizzbuzz.
>>
>>52202543
It's also a mathematical concept, but if you don't know about that, then you shouldn't go anywhere near a computer, let alone, apply for a software engineering job.
>>
>>52198143
Passed one of those shitty interviews by googling binary tree the night before, 3 years in the job, never had to use a binary tree. :^)
>>
File: vlcsnap-2015-12-15-15h38m21s149.png (1 MB, 1920x1080) Image search: [Google]
vlcsnap-2015-12-15-15h38m21s149.png
1 MB, 1920x1080
>>52198143
>>52198184
>mfw i couldn't do fizzbuzz
>mfw been coding since I was 14 to the detriment of anything else
>mfw still fail at it

Whatever, at least I make sweet moneys doing it.
>>
>>52202624
Again.
If you don't know what's modulus, go to an elementary school.
If you don't know that language X has modulus function, you can write your own implementation.
>>
>>52202631
cause modulus is very important and completely unavoidable when developing software. right? what is with this arrogant escalation?
>>
>>52202669
Get this: I have never used modulus outside of fizzbuzz.

Programming is logic, not math.
>>
>>52202674
it's an extremely basic mathematical concept.
it's like not knowing what negative numbers are
>>
>>52202632
You could be using red-black binary trees if you're using data types like associative arrays (aka dictionaries).
>>
>>52202624
Saying
>hurr what if da programmer has never used modulus before
is more of a troll
>>
>>52202674
Basic math is absolutely a per-requisite to software development.
>>
>>52202692
>it's like not knowing what negative numbers are

No it isn't, I knew what negative numbers are but never learned what modulus does until maybe 2 months ago when I actually had to do fizzbuzz in an interview (I'm 26).

That's after I had seen it a gorillian times because it's the only thing /g/ can do (other than logos).
>>
>>52202687
Then you probably haven't programmed a lot.
>>
>>52202692
it's really not. you encounter negative numbers in most software. with modulus you do not. plenty of schools do not touch the concept and you can easily find many people who don't know and don't care unless it's needed for some problem.
>>
>>52202717
>but never learned what modulus does until maybe
are you fucking kidding me?
you never divided integers by hand?
>>
>>52202687
Well, formal logic is a branch of mathematics.
The theoretical studies under the computer science banner actually also started as a branch of mathematics.
Programming is not only formal logic, it's also category/type theory, formal automata, formal languages etc. - all covered under the broad spectrum of mathematics.
TL;DR you're stupid.
>>
>>52202730
followup:
this is still a moot argument. you retards want to justify your filter devices that test niche knowledge because you're incapable of having a five minute discussion with someone to check whether they grasp basic fundamental concepts.
>>
>>52202762
>modulus
>niche knowledge
>>
>>52202739
>>52202779
Did it ever occur to you that not every one call modulus, modulus?
Because I had never head of modulus until CS, it was referred to by other names growing up.

Not the other anon.
>>
>>52198184
>Most don't even open their text editors outside of class because they have no drive to program
I'm doing CS and am not more than that into programming. Which is more CS related than the IT stuff you're mentioning.
>>
>>52202788
But we're not arguing about the names you retard, we're arguing about the concept.
It doesn't matter what the guy calls his adhoc modulo function in his fizzbuzz.
>>
>>52202762
Nice strawman. I'm not advocating certain HR methodology, I'm talking about mathematics and programming.
>>52202788
You don't have to know the name of a concept to use it. E.g. I used dependency injection without knowing some java cucks call it that.
>>
Modulo is useful for extracting digits from an integer without using strings. Fairly useful as a quick, mathematically incorrect way of setting bounds on a randomly generated integer. Very important for determining whether a number is odd or even.
>>
>>52202171
for (int x = 1; x <= 100; x++) {                                                                                                                                                                             
if (x/3.0 == floorf(x/3.0) && x/5.0 == floorf(x/5.0))
printf("FizzBuzz\n");
else if (x/3.0 == floorf(x/3.0))
printf("Fizz\n");
else if (x/5.0 == floorf(x/5.0))
printf("Buzz\n");
else
printf("%d\n", x);
}


Let me guess what you're going to say next.
"What if they have never ever rounded a number before! see i got you!."
>>
>>52202902
I've never rounded a number before.

>>52202495
Also, I never counted up to 3.
>>
>>52202805
>It doesn't matter what the guy calls his adhoc modulo function in his fizzbuzz.
if I called it killAllNiggersAndJews() would they hire me?
>>
>>52202930
If you applied to ISIS, then yes.
>>
File: 1427599655423.jpg (46 KB, 700x627) Image search: [Google]
1427599655423.jpg
46 KB, 700x627
>>52202902
not really.

not one reply has shown any understanding of what i'm talking about since my initial link to the programming is terrible site. i'm out at this point. you people are hopeless.
>>
>>52202724
No I just don't solve problems that requires it.

>>52202756
>you never divided integers by hand?
Of course I did, when I was grade 4 or 5.

>>52202756
Without logic in programming you aren't going to do much. You can get away without knowing math, by math I am talking about literal calculations, because of libraries. You can't get away without knowing logic though.

I have coded a thread safe, re-sizeable and contiguous while not invalidating memory container without using modulus.

I have coded 5 released games without using modulus.

I have coded an interactive application for use with a car show demo without using modulus.

Please tell me again how important modulus is.
>>
>>52202943
pretty sure the ISIS fizzbuzz problem goes a little differently
>>
>>52202972
>Of course I did, when I was grade 4 or 5.
Then you know what modulo is
>>
>>52202972
>No I just don't solve problems that requires it.
So basically you're just retarded?

As someone who is looking to hire someone, why would I even consider hiring a person that is such a fucking brainlet that they don't have the mental capacity to grasp what a fucking remainder is.
>>
File: 1438444056582.jpg (22 KB, 480x360) Image search: [Google]
1438444056582.jpg
22 KB, 480x360
>>52202972
they don't understand.
they are incapable of understanding.
it may be some kind of mental block from their education or just a lack of experience.
>>
>>52202972
And I once implemented modulus without knowing "modulus".
I don't know how important it is, but the concept is fairly basic.
>>
>>52202987
>Then you know what modulo is
Not really, I can't even remember the process I used to take to do it. I do remember doing long and short division but I doubt I could do long division on paper now...Nor could I tell you all the names of parts of a division. (divisor, remainder is all I remember...)

Have you guys just graduated school and have excellent memory or something?
>>
>>52202972
So you're saying you're a code monkey.
>>
>>52202972
>Making shit up: The Post
>>
>>52203044
>Have you guys just graduated school and have excellent memory or something?
No, we're just not sub100 IQ mentally challenged brainlets. Do you even remember your birthday, or did you forget that too since nobody celebrates it?
>>
>>52203074
rude.
>>
>>52203045
>think modulo is in any way important in the real world
found the freshman cs student

This thread is filled with people that are still in school or hobbyist programmers trying to make up bs about how the real world works in software. It's hilarious.
>>
>>52203044
>>52203045
>>52203057

What have these Mr. Modulus cunts ever accomplished apart from fizzbuzz and star challange on /g/ lmao.

Just ignore them, you'll get jobs whereas these cunts will be out of it because they can't solve actual real world problems.
>>
>>52203044
>remainder
DING DING DING
>>
File: tips.png (1002 KB, 655x745) Image search: [Google]
tips.png
1002 KB, 655x745
>I am a Theoretical Computer ScienTIST

Thanks we will call you. NEXT!
>>
>>52203092
I've never studied CS.
>>
>>52203104
>im a stronk independent coda who needs no modulo
Thread replies: 255
Thread images: 43

banner
banner
[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y] [Home]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.