|
Thread Rules 1. This is not a "do my homework for me" thread. If you have specific questions, ask, but don't post an assignment or homework problem and expect an exact solution. 2. No recruiting for your cockamamie projects (you won't replace facebook with 3 dudes you found on the internet and $20) 3. If you can't articulate why a language is bad, don't start slinging shit about it. Just remember that nothing is worse than making CSS IE6 compatible. 4. Use [code] tags to format code blocks. |
On June 12 2017 10:10 Manit0u wrote: It all depends on your uni (obviously, some have better courses than others). I just don't think it's a huge requirement or anything and way too many people think that if they get their CS degree they'll instantly become programmers (you wouldn't believe how many people apply for a job in my company only to learn they can't solve the most basic interview question). I even though about getting an engineer degree but when I solved some of the problems my friend needed help with (he was doing it at the time) I realized that it would just be a waste of every second weekend for the next 3 years just to get the paper. They give people some weird problems and after they get their degree they can't solve basically the only problem we give at interviews:
Write a function (any language, can be pseudocode, doesn't have to be optimal) that gets a string as a parameter and returns first unique letter in it (or return '?' if no unique letter is found).
Every single candidate is posed with this problem. It's not super trivial, but it doesn't require knowing anything past the absolute basics and some thinking. We do 5-10 interviews each week and we hired 3 people over past 4 months (and we need like 20 more). Most candidates fail on the above problem.
Programming is just a part of CS and is not taught in Uni much. I'd guess that it's because it takes practice and time is too restricted. But judging CS graduates on their programming skills is a poor indicator of their future performance, just like you wouldn't judge a doctor by how well he can stitch a wound.
On the other hand, lots of uni programs are just plain bad too.
|
Sweden33719 Posts
On June 12 2017 06:58 TheEmulator wrote:Show nested quote +On June 12 2017 05:47 BrTarolg wrote: I'm gonna do a 1 year masters, it seemed like a good idea and i don't mind learning some theoretical stuff, might be useful one day with a finance+maths background but who knows
What's cs50 edx?
CS50 is the intro to computer science course at Harvard, and it's offered as a MOOC (massive online open course) from Edx. The Edx version is called CS50x and it's basically an exact version of the actual course. The 2017 version has all the video lectures from 2016 and the same problem sets/syllabus. It's probably the most highly regarded MOOC alongside 6.00.1x from MIT. CS50 is so big at Harvard it's like a cult, lol. The prof is very entertaining tbh. The MIT course is good too, but it's a bit harder and a lot more dry when it comes to the lectures. Also it has a schedule and some exams (it's a 2 month course), while CS50 can be completed any time during 2017. edit: should note, CS50 is taught in C with a small module on python/html/css at the end. I think week 0 you have to use scratch for the problem set. 6.00.1x is all python. I actually really loved the MIT professor (and grew to love the one in 6.00.2 as well), though you are right he's not as high energy as David Melan (I think that's his name?) for CS50.
What I personally liked about 6.00.1 as compared to CS50 is that they break the lecture up into like 10 short videos instead of a 1~2 hour long one, with questions and exercises in between. In terms of entertainment not as great but I liked the immediate reinforcement...
|
28079 Posts
On June 12 2017 13:01 Liquid`Jinro wrote:Show nested quote +On June 12 2017 06:58 TheEmulator wrote:On June 12 2017 05:47 BrTarolg wrote: I'm gonna do a 1 year masters, it seemed like a good idea and i don't mind learning some theoretical stuff, might be useful one day with a finance+maths background but who knows
What's cs50 edx?
CS50 is the intro to computer science course at Harvard, and it's offered as a MOOC (massive online open course) from Edx. The Edx version is called CS50x and it's basically an exact version of the actual course. The 2017 version has all the video lectures from 2016 and the same problem sets/syllabus. It's probably the most highly regarded MOOC alongside 6.00.1x from MIT. CS50 is so big at Harvard it's like a cult, lol. The prof is very entertaining tbh. The MIT course is good too, but it's a bit harder and a lot more dry when it comes to the lectures. Also it has a schedule and some exams (it's a 2 month course), while CS50 can be completed any time during 2017. edit: should note, CS50 is taught in C with a small module on python/html/css at the end. I think week 0 you have to use scratch for the problem set. 6.00.1x is all python. I actually really loved the MIT professor (and grew to love the one in 6.00.2 as well), though you are right he's not as high energy as David Melan (I think that's his name?) for CS50. What I personally liked about 6.00.1 as compared to CS50 is that they break the lecture up into like 10 short videos instead of a 1~2 hour long one, with questions and exercises in between. In terms of entertainment not as great but I liked the immediate reinforcement... Definitely agree. The course is great and the prof is world class at what he does. I mostly meant he was dry compared to Malan, but I definitely feel engaged listening to him speak as well.
I loved the short videos with the 6.00.1x, although the long lectures in CS50 were tolerable because of Malan and seeing crowd interaction was pretty cool. You almost feel like you're in the class even though it was taped a year ago 
edit: how is 6.00.2 btw? I haven't actually done that one yet. I'm assuming it's a direct continuation from the other course?
|
Sweden33719 Posts
6.00.2 starts off a loooot rougher than 6.00.1 and I don't purely mean this in a difficulty level sense. When I took it, there were a number of editing errors (video repeating the same info in different takes etc) in the first chapter.
However, I also realised that part of my initial feeling of discomfort was just because it was a tougher subject for me and after that I mostly loved the course. Overall, I'd say slightly less polished than 6.00.1 and the professor has a slightly different style (which I eventually grew fond of as well), but still very good.
|
I think my university curriculum puts more emphasis than most on practical programming
I learned basic web and mobile development through some classes (android, full-stack web app) which I figure isn't normal. was also taught things like version control, agile, etc. I was also told this normally wasn't the case but they added these things due to student feedback asking to teach these things in classes.
we also have a bunch of theoretical classes and math but I guess we can afford more classes due to it being a quarter school and requiring 5 years
i'm pretty thankful for this as I tend to enjoy the practical stuff more and school lights a fire under my ass for learning new things. but its also a PITA at times.
though i'm sure like most students i still have a shit ton to learn in the workforce. im realizing right now on my internship how underprepared i am for real work.
On June 12 2017 10:10 Manit0u wrote:Show nested quote +On June 12 2017 06:36 Fwmeh wrote:On June 12 2017 03:12 Manit0u wrote:On June 11 2017 22:24 BrTarolg wrote: Hi!
I just completely learn python the hard way (except for the bits about creating web-pages)
And now im here haha. I wrote a blackjack simulator and tictactoe with some unit tests. Hoping to enter to do a masters in CS so i can do a career swap I did career swap without any kind of degree in CS (all I have is bachelor's in Sociology and I've been following a successful programming career for the past 4 years with steadily increasing gains and positions). Just so you know, unless you're working with something that's very close to the "sciency" part of the CS you probably won't use 90% of what you learn there in a real work (especially not the way they teach you to program). I have a friend who has a PhD in CS (specializing in distributed systems and parallel computing), he switched from academic work to regular programming and his opinion is that he was living in the dark for all those years and even programmers just above junior position were better than him in the beginning. There's plenty of people in my company (myself included) who'd love to get a degree in cognitivistics but unfortunately they don't offer weekend or evening classes so you can't really do that and work at the same time. Philosophy is actually super useful in programming since they teach you plenty of logic and abstractions in there. I would actually strongly disagree. I would estimate that I have had use of roughly 80% of what I learned at university, either directly or indirectly. Looking back, I realize just how good our initial programming courses were. That said, there were some very huge gaps, at least with the courses I took, most obviously: 1) How to work in larger, collaborative code-bases over a long period of time. 2) How to work effectively with requirements in a non-trivial business domain 3) How to manage legacy code/systems. But the reason I would prefer to hire people with degrees over those without is simple that a degree is at least some hint (however imperfect) that I'm dealing with someone capable of learning. Hopefully fast, and hopefully reasonably sophisticated things. The most valuable thing (to me) in a potential hire would be a desire to always improve and learn new things. It all depends on your uni (obviously, some have better courses than others). I just don't think it's a huge requirement or anything and way too many people think that if they get their CS degree they'll instantly become programmers (you wouldn't believe how many people apply for a job in my company only to learn they can't solve the most basic interview question). I even though about getting an engineer degree but when I solved some of the problems my friend needed help with (he was doing it at the time) I realized that it would just be a waste of every second weekend for the next 3 years just to get the paper. They give people some weird problems and after they get their degree they can't solve basically the only problem we give at interviews: Write a function (any language, can be pseudocode, doesn't have to be optimal) that gets a string as a parameter and returns first unique letter in it (or return '?' if no unique letter is found). Every single candidate is posed with this problem. It's not super trivial, but it doesn't require knowing anything past the absolute basics and some thinking. We do 5-10 interviews each week and we hired 3 people over past 4 months (and we need like 20 more). Most candidates fail on the above problem.
doesn't have to be optimal? if so I'm pretty sure most students who finished their first year should be able to do it
def foo(s): for i in xrange(0,len(s)): if s[i] not in s[0:i] and s[i] not in s[i+1:len(s)]: return s[i] return "?"
not optimal at all (pretty sure dict would be the optimal choice?) but took me around a minute to think of a naiive solution and another minute or so to code it
well that gives me a confident boost especially cause I think I'm pretty average
|
Canada16217 Posts
learning LINQ and lambda expressions so might be coming here for help
|
On June 12 2017 10:10 Manit0u wrote:Show nested quote +On June 12 2017 06:36 Fwmeh wrote:On June 12 2017 03:12 Manit0u wrote:On June 11 2017 22:24 BrTarolg wrote: Hi!
I just completely learn python the hard way (except for the bits about creating web-pages)
And now im here haha. I wrote a blackjack simulator and tictactoe with some unit tests. Hoping to enter to do a masters in CS so i can do a career swap I did career swap without any kind of degree in CS (all I have is bachelor's in Sociology and I've been following a successful programming career for the past 4 years with steadily increasing gains and positions). Just so you know, unless you're working with something that's very close to the "sciency" part of the CS you probably won't use 90% of what you learn there in a real work (especially not the way they teach you to program). I have a friend who has a PhD in CS (specializing in distributed systems and parallel computing), he switched from academic work to regular programming and his opinion is that he was living in the dark for all those years and even programmers just above junior position were better than him in the beginning. There's plenty of people in my company (myself included) who'd love to get a degree in cognitivistics but unfortunately they don't offer weekend or evening classes so you can't really do that and work at the same time. Philosophy is actually super useful in programming since they teach you plenty of logic and abstractions in there. I would actually strongly disagree. I would estimate that I have had use of roughly 80% of what I learned at university, either directly or indirectly. Looking back, I realize just how good our initial programming courses were. That said, there were some very huge gaps, at least with the courses I took, most obviously: 1) How to work in larger, collaborative code-bases over a long period of time. 2) How to work effectively with requirements in a non-trivial business domain 3) How to manage legacy code/systems. But the reason I would prefer to hire people with degrees over those without is simple that a degree is at least some hint (however imperfect) that I'm dealing with someone capable of learning. Hopefully fast, and hopefully reasonably sophisticated things. The most valuable thing (to me) in a potential hire would be a desire to always improve and learn new things. It all depends on your uni (obviously, some have better courses than others). I just don't think it's a huge requirement or anything and way too many people think that if they get their CS degree they'll instantly become programmers (you wouldn't believe how many people apply for a job in my company only to learn they can't solve the most basic interview question). I even though about getting an engineer degree but when I solved some of the problems my friend needed help with (he was doing it at the time) I realized that it would just be a waste of every second weekend for the next 3 years just to get the paper. They give people some weird problems and after they get their degree they can't solve basically the only problem we give at interviews: Write a function (any language, can be pseudocode, doesn't have to be optimal) that gets a string as a parameter and returns first unique letter in it (or return '?' if no unique letter is found). Every single candidate is posed with this problem. It's not super trivial, but it doesn't require knowing anything past the absolute basics and some thinking. We do 5-10 interviews each week and we hired 3 people over past 4 months (and we need like 20 more). Most candidates fail on the above problem.
let me have a crack at this in pseudocode lmao
function getunique(x):
x = rawinput a = x.split // returns a list/array of individual strings value = "?"
for b in range(len(a)) for c in range(len(a)) if a[b] == a[c] and c != b value = c
return value
Something like that? haha noob programmer here
|
Hyrule18977 Posts
it's pretty trivial in php too:
function first_unique_letter($param) { $a = explode('', $param); $b = array_unique($a); return reset($b) ?: '?'; }
|
You can do in o(n) time and o(n) space instead of o(n^2) time, but that will only matter if you have prodigiously large strings. That would be a reasonable tradeoff I'd look for as an interviewer (have done ~100 interviews, probably majority of those are undergrad/masters candidates). But that sort of question wouldn't generate much interesting code, so I'd slot that for an easy warmup and expect the candidate to bang it out with functioning code (not pseudo) in like 5 min, before moving on to other shit.
But yea I'd echo what others have been saying RE Uni programming skills. Don't expect much, and employers aren't expecting much either. I've only worked with a couple of new grads who actually wrote good code (and I wouldn't include myself in that group, back when I was a new grad...). University code/programming is by and large complete crap. There's definitely variance between Universities, but the bar is pretty low. Some problems common problems you'll see with a Uni grad's code:
- Tries to be too clever
- Code is horribly nested, or otherwise hard to follow
- Unit testing? Ha no, we just got it to compile.
- System/integration testing? Might not even know what this is...
- Code has essentially no sense of API design (vs something thought out)
etc etc
A lot of this comes from the fact that Uni code/programming and actual real-world code/programming has some major differences:
- Real world code generally serves some ongoing purpose or solution, and evolves gradually, and thus needs to be maintained in a very different fashion. Uni code is more often one-shot. Or, if you're very unlucky, you get to inherit some ball of legacy mess from previous grad students and try to Frankenstein stuff on top for your paper, at which point you hand it off to the next poor sap. Of course, there's a good bit of Frankensteining crap code on top in industry too.
- Industry code is more often than not going to make prodigious use of existing libraries and institutional knowledge, rather than trying to reinvent the wheel. In Uni, often the whole point of the assignment is to reinvent the wheel.
- If a mistake is made in pushing industry code to production, you may start hemorrhaging thousands of dollars per minute, if it's a billion dollar product. There isn't "production" for Uni code, but if a mistake is made there, you may get knocked down half a letter grade or something. So stakes are very different.
- Industry code / programming is going to end up involving a lot more pieces than Uni code - actually the code bit of industry is only a small part. Docs, configs, productionization, testing, and rampant political bullshit will take up more of your time.
- Real world code is typically read an order of magnitude more times than it is written, and by people who might not even know the person who wrote it, and spaced out by a period of N years (5, 10, or more). (By "read", I mean humans looking at the code trying to figure out / verify what it does). Uni code is typically written and re-written frantically and then read exactly 0 or 1 times (either as part of a course, or in the PhD paper mill crunch happy fun time factory)
- On that note, actually I've seen a lot of PhD candidates who can't code their way out of a cardboard box, because PhD research quality code is a whole different ballgame
|
On June 12 2017 12:02 TheEmulator wrote:I'm so scared to start applying before I feel really confident that my base skills are where I believe they need to be. I can't understand how people who are clueless go around applying for jobs. Do they not know they are clueless, or are they hoping someone takes a chance on them or doesn't notice 
If you've never programmed in front of a human being before and explained your thought process I suggest getting some friends together and practicing. The whole interview process where you're coding and explaining what you're doing is pretty overwhelming if you've never done it before.
|
Would you be willing to share a good interview question that helps you assess a candidate the best over others? Im curious as I havent been on a real technical interview yet (white boarding and such). I have a general idea for big n's and such but not your average company (excuse me if you work at one of the aforementioned type of companies)
|
And a solution using regex in Python!
def unique(word): for char in word: if len(re.findall(char,word)) == 1: return char return '?'
|
On June 12 2017 23:26 tofucake wrote:it's pretty trivial in php too: function first_unique_letter($param) { $a = explode('', $param); $b = array_unique($a); return reset($b) ?: '?'; }
Oh, really?
function first_unique_letter($param) { $a = explode('', $param); $b = array_unique($a); return reset($b) ?: '?'; }
echo first_unique_letter("tesseract");
E_WARNING : type 2 -- explode(): Empty delimiter -- at line 4
E_WARNING : type 2 -- array_unique() expects parameter 1 to be array, boolean given -- at line 5
E_WARNING : type 2 -- reset() expects parameter 1 to be array, null given -- at line 6
?
// fixed code that actually runs function first_unique_letter($param) { $a = str_split($param); $b = array_unique($a); return reset($b) ?: '?'; }
echo first_unique_letter("tesseract");
t
Array unique will turn "tesseract" into "tesrac" and then you simply return the first element.
It's actually way harder to do than you imagine in PHP since it's array and string operators are pretty shit (I have yet to meet a person who remembers all of the array and string function param orders). I came from PHP, interviewing for Ruby and I've actually tackled this problem with C (with which I have next to no experience).
|
|
France12759 Posts
Hi, I'd like to improve my technical skills in Python during the summer since I feel I waste some time in machine learning classes when we implement stuff using Python.
I looked at the Python guides from the old OP but some of them (google one for example) are for absolute beginners in Python. I already know a bit about it since I used it relatively frequently for 1.5 years now, so I am not an absolute beginner, but I'm not good enough to properly evaluate where I'm lacking and pick a guide accordingly.
So should I go with the google one for beginners in order not to miss a thing, even though there'll be things I already know, or seek another guide but not being sure I got all the basics?
|
On June 12 2017 23:16 BrTarolg wrote:Show nested quote +On June 12 2017 10:10 Manit0u wrote:On June 12 2017 06:36 Fwmeh wrote:On June 12 2017 03:12 Manit0u wrote:On June 11 2017 22:24 BrTarolg wrote: Hi!
I just completely learn python the hard way (except for the bits about creating web-pages)
And now im here haha. I wrote a blackjack simulator and tictactoe with some unit tests. Hoping to enter to do a masters in CS so i can do a career swap I did career swap without any kind of degree in CS (all I have is bachelor's in Sociology and I've been following a successful programming career for the past 4 years with steadily increasing gains and positions). Just so you know, unless you're working with something that's very close to the "sciency" part of the CS you probably won't use 90% of what you learn there in a real work (especially not the way they teach you to program). I have a friend who has a PhD in CS (specializing in distributed systems and parallel computing), he switched from academic work to regular programming and his opinion is that he was living in the dark for all those years and even programmers just above junior position were better than him in the beginning. There's plenty of people in my company (myself included) who'd love to get a degree in cognitivistics but unfortunately they don't offer weekend or evening classes so you can't really do that and work at the same time. Philosophy is actually super useful in programming since they teach you plenty of logic and abstractions in there. I would actually strongly disagree. I would estimate that I have had use of roughly 80% of what I learned at university, either directly or indirectly. Looking back, I realize just how good our initial programming courses were. That said, there were some very huge gaps, at least with the courses I took, most obviously: 1) How to work in larger, collaborative code-bases over a long period of time. 2) How to work effectively with requirements in a non-trivial business domain 3) How to manage legacy code/systems. But the reason I would prefer to hire people with degrees over those without is simple that a degree is at least some hint (however imperfect) that I'm dealing with someone capable of learning. Hopefully fast, and hopefully reasonably sophisticated things. The most valuable thing (to me) in a potential hire would be a desire to always improve and learn new things. It all depends on your uni (obviously, some have better courses than others). I just don't think it's a huge requirement or anything and way too many people think that if they get their CS degree they'll instantly become programmers (you wouldn't believe how many people apply for a job in my company only to learn they can't solve the most basic interview question). I even though about getting an engineer degree but when I solved some of the problems my friend needed help with (he was doing it at the time) I realized that it would just be a waste of every second weekend for the next 3 years just to get the paper. They give people some weird problems and after they get their degree they can't solve basically the only problem we give at interviews: Write a function (any language, can be pseudocode, doesn't have to be optimal) that gets a string as a parameter and returns first unique letter in it (or return '?' if no unique letter is found). Every single candidate is posed with this problem. It's not super trivial, but it doesn't require knowing anything past the absolute basics and some thinking. We do 5-10 interviews each week and we hired 3 people over past 4 months (and we need like 20 more). Most candidates fail on the above problem. let me have a crack at this in pseudocode lmao function getunique(x): x = rawinput a = x.split // returns a list/array of individual strings value = "?" for b in range(len(a)) for c in range(len(a)) if a[b] == a[c] and c != b value = c return value Something like that? haha noob programmer here your code is returning the index of a non-unique letter. but we want to return the first unique letter.
|
|
On June 13 2017 04:30 Nesserev wrote:Show nested quote +On June 13 2017 04:24 Manit0u wrote:+ Show Spoiler +On June 12 2017 23:26 tofucake wrote:it's pretty trivial in php too: function first_unique_letter($param) { $a = explode('', $param); $b = array_unique($a); return reset($b) ?: '?'; } Oh, really? function first_unique_letter($param) { $a = explode('', $param); $b = array_unique($a); return reset($b) ?: '?'; }
echo first_unique_letter("tesseract");
E_WARNING : type 2 -- explode(): Empty delimiter -- at line 4
E_WARNING : type 2 -- array_unique() expects parameter 1 to be array, boolean given -- at line 5
E_WARNING : type 2 -- reset() expects parameter 1 to be array, null given -- at line 6
?
// fixed code that actually runs function first_unique_letter($param) { $a = str_split($param); $b = array_unique($a); return reset($b) ?: '?'; }
echo first_unique_letter("tesseract");
t
Array unique will turn "tesseract" into "tesrac" and then you simply return the first element. It's actually way harder to do than you imagine in PHP since it's array and string operators are pretty shit (I have yet to meet a person who remembers all of the array and string function param orders). I came from PHP, interviewing for Ruby and I've actually tackled this problem with C (with which I have next to no experience). You're actually supposed to return the first letter that's unique in the original string. Now you just return the first letter  The letter 'r' is supposed to be the first unique letter. Show nested quote +On June 13 2017 02:49 dsyxelic wrote: Would you be willing to share a good interview question that helps you assess a candidate the best over others? Im curious as I havent been on a real technical interview yet (white boarding and such). I have a general idea for big n's and such but not your average company (excuse me if you work at one of the aforementioned type of companies) Here's a good one. You're the new guy on the team. A client calls you with a panicked voice, and tells you shit is going sideways REALLY BAD. You log in to the system and see a bunch of error messages that you don't know anything about, BUT your boss and co-workers are all out of office and can't be reached, because they all went to celebrate Jeff's birthday (you weren't invited, because they don't want you to know about their secretive cocaine and hooker parties until they can trust you). What's the first thing you do?
Tell the client that everything is completely normal in your end, and find some cocaine and hookers. Then act all surprised the next day when your colleagues realize the system has been down for however many hours.
|
Boolean logic stuff:
http://www.cs.umd.edu/class/summer2017/cmsc351/hwk-np.pdf
I don't understand 5a onward AT ALL. Can someone point me in the right direction?
The only thing I can come up with is just to directly convert the formulas into circuits. Then for 5b I just drew the circuit. Then for 6a the answer would be that it is big theta n... because the circuit is a 1 to 1 representation.
I am clearly not understanding something here...
|
France12759 Posts
A Boolean formula is satisfiable if and only if there exists an interpretation of your variables (for example, x OR y is satisfiable because there exists an interpretation of x, y that makes the formula true, ie. x=1 and y=0) that makes the formula true.
@Nesserev: thanks I'll try that
|
|
|
|