• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 06:17
CEST 12:17
KST 19:17
  • Home
  • Forum
  • Calendar
  • Streams
  • Liquipedia
  • Features
  • Store
  • EPT
  • TL+
  • StarCraft 2
  • Brood War
  • Smash
  • Heroes
  • Counter-Strike
  • Overwatch
  • Liquibet
  • Fantasy StarCraft
  • TLPD
  • StarCraft 2
  • Brood War
  • Blogs
Forum Sidebar
Events/Features
News
Featured News
[ASL19] Finals Recap: Standing Tall9HomeStory Cup 27 - Info & Preview18Classic wins Code S Season 2 (2025)16Code S RO4 & Finals Preview: herO, Rogue, Classic, GuMiho0TL Team Map Contest #5: Presented by Monster Energy6
Community News
Flash Announces Hiatus From ASL54Weekly Cups (June 23-29): Reynor in world title form?13FEL Cracov 2025 (July 27) - $8000 live event16Esports World Cup 2025 - Final Player Roster16Weekly Cups (June 16-22): Clem strikes back1
StarCraft 2
General
RECLAIM STOLEN BTC HIRE BLOCKCHAIN CYBER RETRIEVE Weekly Cups (June 23-29): Reynor in world title form? The SCII GOAT: A statistical Evaluation PiG Sty Festival #5: Playoffs Preview + Groups Recap The GOAT ranking of GOAT rankings
Tourneys
Korean Starcraft League Week 77 Master Swan Open (Global Bronze-Master 2) RSL: Revival, a new crowdfunded tournament series [GSL 2025] Code S: Season 2 - Semi Finals & Finals $5,100+ SEL Season 2 Championship (SC: Evo)
Strategy
How did i lose this ZvP, whats the proper response Simple Questions Simple Answers
Custom Maps
[UMS] Zillion Zerglings
External Content
Mutation # 480 Moths to the Flame Mutation # 479 Worn Out Welcome Mutation # 478 Instant Karma Mutation # 477 Slow and Steady
Brood War
General
BW General Discussion Player “Jedi” cheat on CSL Flash Announces Hiatus From ASL BGH Auto Balance -> http://bghmmr.eu/ Unit and Spell Similarities
Tourneys
[Megathread] Daily Proleagues [BSL20] Grand Finals - Sunday 20:00 CET Small VOD Thread 2.0 [BSL20] GosuLeague RO16 - Tue & Wed 20:00+CET
Strategy
Simple Questions, Simple Answers I am doing this better than progamers do.
Other Games
General Games
Stormgate/Frost Giant Megathread Nintendo Switch Thread Path of Exile What do you want from future RTS games? Beyond All Reason
Dota 2
Official 'what is Dota anymore' discussion
League of Legends
Heroes of the Storm
Simple Questions, Simple Answers Heroes of the Storm 2.0
Hearthstone
Heroes of StarCraft mini-set
TL Mafia
TL Mafia Community Thread Vanilla Mini Mafia
Community
General
US Politics Mega-thread Trading/Investing Thread Things Aren’t Peaceful in Palestine Russo-Ukrainian War Thread The Games Industry And ATVI
Fan Clubs
SKT1 Classic Fan Club! Maru Fan Club
Media & Entertainment
Anime Discussion Thread [Manga] One Piece [\m/] Heavy Metal Thread
Sports
Formula 1 Discussion 2024 - 2025 Football Thread NBA General Discussion TeamLiquid Health and Fitness Initiative For 2023 NHL Playoffs 2024
World Cup 2022
Tech Support
Computer Build, Upgrade & Buying Resource Thread
TL Community
Blogs
Culture Clash in Video Games…
TrAiDoS
from making sc maps to makin…
Husyelt
Blog #2
tankgirl
StarCraft improvement
iopq
Trip to the Zoo
micronesia
Customize Sidebar...

Website Feedback

Closed Threads



Active: 754 users

The Big Programming Thread - Page 889

Forum Index > General Forum
Post a Reply
Prev 1 887 888 889 890 891 1031 Next
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.
Hanh
Profile Joined June 2016
146 Posts
Last Edited: 2017-06-12 03:23:50
June 12 2017 03:22 GMT
#17761
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.
Liquid`Jinro
Profile Blog Joined September 2002
Sweden33719 Posts
June 12 2017 04:01 GMT
#17762
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...
Moderatortell the guy that interplanatar interaction is pivotal to terrans variety of optionitudals in the pre-midgame preperatories as well as the protosstinal deterriggation of elite zergling strikes - Stimey n | Formerly FrozenArbiter
TheEmulator
Profile Blog Joined July 2010
28087 Posts
Last Edited: 2017-06-12 04:29:33
June 12 2017 04:25 GMT
#17763
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?
Administrator
Liquid`Jinro
Profile Blog Joined September 2002
Sweden33719 Posts
June 12 2017 05:44 GMT
#17764
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.
Moderatortell the guy that interplanatar interaction is pivotal to terrans variety of optionitudals in the pre-midgame preperatories as well as the protosstinal deterriggation of elite zergling strikes - Stimey n | Formerly FrozenArbiter
dsyxelic
Profile Joined May 2010
United States1417 Posts
Last Edited: 2017-06-12 06:59:00
June 12 2017 06:25 GMT
#17765
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
TL/SKT
NovemberstOrm
Profile Blog Joined September 2011
Canada16217 Posts
June 12 2017 06:33 GMT
#17766
learning LINQ and lambda expressions so might be coming here for help
Moderatorlickypiddy
BrTarolg
Profile Blog Joined June 2009
United Kingdom3574 Posts
June 12 2017 14:16 GMT
#17767
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
tofucake
Profile Blog Joined October 2009
Hyrule19030 Posts
June 12 2017 14:26 GMT
#17768
it's pretty trivial in php too:

function first_unique_letter($param) {
$a = explode('', $param);
$b = array_unique($a);
return reset($b) ?: '?';
}
Liquipediaasante sana squash banana
phar
Profile Joined August 2011
United States1080 Posts
Last Edited: 2017-06-12 17:42:36
June 12 2017 17:38 GMT
#17769
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
Who after all is today speaking about the destruction of the Armenians?
Blitzkrieg0
Profile Blog Joined August 2010
United States13132 Posts
June 12 2017 17:47 GMT
#17770
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.
I'll always be your shadow and veil your eyes from states of ain soph aur.
dsyxelic
Profile Joined May 2010
United States1417 Posts
June 12 2017 17:49 GMT
#17771
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)
TL/SKT
beg
Profile Blog Joined May 2010
991 Posts
Last Edited: 2017-06-12 19:08:54
June 12 2017 18:43 GMT
#17772
And a solution using regex in Python!

def unique(word):
for char in word:
if len(re.findall(char,word)) == 1:
return char
return '?'
Manit0u
Profile Blog Joined August 2004
Poland17243 Posts
Last Edited: 2017-06-12 19:26:19
June 12 2017 19:24 GMT
#17773
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).
Time is precious. Waste it wisely.
Nesserev
Profile Blog Joined January 2011
Belgium2760 Posts
Last Edited: 2017-06-12 19:51:41
June 12 2017 19:30 GMT
#17774
--- Nuked ---
Poopi
Profile Blog Joined November 2010
France12790 Posts
June 12 2017 19:34 GMT
#17775
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?
WriterMaru
beg
Profile Blog Joined May 2010
991 Posts
June 12 2017 19:39 GMT
#17776
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.
Nesserev
Profile Blog Joined January 2011
Belgium2760 Posts
Last Edited: 2017-06-12 20:06:55
June 12 2017 19:59 GMT
#17777
--- Nuked ---
Acrofales
Profile Joined August 2010
Spain17970 Posts
June 12 2017 20:22 GMT
#17778
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.
Deleted User 3420
Profile Blog Joined May 2003
24492 Posts
June 12 2017 20:40 GMT
#17779
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...
Poopi
Profile Blog Joined November 2010
France12790 Posts
Last Edited: 2017-06-12 20:57:58
June 12 2017 20:57 GMT
#17780
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
WriterMaru
Prev 1 887 888 889 890 891 1031 Next
Please log in or register to reply.
Live Events Refresh
RSL Revival
10:00
Season 1: Playoffs Day 3
ByuN vs ChamLIVE!
herO vs Reynor
Tasteless790
Crank 654
IndyStarCraft 49
Rex49
3DClanTV 47
IntoTheiNu 35
LiquipediaDiscussion
CranKy Ducklings
10:00
Master Swan Open #93
CranKy Ducklings16
LiquipediaDiscussion
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
Tasteless 790
Crank 654
trigger 54
IndyStarCraft 49
Rex 49
StarCraft: Brood War
Larva 1064
Stork 330
Flash 312
actioN 182
Yoon 87
sorry 73
BeSt 66
Hyun 55
Last 44
Shinee 38
[ Show more ]
TY 31
Soulkey 29
Barracks 22
GoRush 22
Free 19
Mong 17
yabsab 14
NaDa 12
sSak 11
ivOry 6
SilentControl 4
Dota 2
XcaliburYe646
XaKoH 589
Counter-Strike
Stewie2K1320
Heroes of the Storm
Khaldor213
Other Games
Happy476
SortOf97
Organizations
StarCraft 2
ComeBackTV 300
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 11 non-featured ]
StarCraft 2
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
League of Legends
• Lourlo2897
Upcoming Events
WardiTV European League
1h 44m
FEL
5h 44m
RSL Revival
23h 44m
Clem vs Classic
SHIN vs Cure
FEL
1d 1h
WardiTV European League
1d 1h
BSL: ProLeague
1d 7h
Dewalt vs Bonyth
Replay Cast
2 days
Sparkling Tuna Cup
2 days
WardiTV European League
3 days
The PondCast
3 days
[ Show More ]
Replay Cast
4 days
RSL Revival
4 days
Replay Cast
5 days
RSL Revival
5 days
RSL Revival
6 days
Liquipedia Results

Completed

BSL 2v2 Season 3
HSC XXVII
Heroes 10 EU

Ongoing

JPL Season 2
BSL Season 20
Acropolis #3
KCM Race Survival 2025 Season 2
CSL 17: 2025 SUMMER
Copa Latinoamericana 4
Championship of Russia 2025
RSL Revival: Season 1
Murky Cup #2
BLAST.tv Austin Major 2025
ESL Impact League Season 7
IEM Dallas 2025
PGL Astana 2025
Asian Champions League '25
BLAST Rivals Spring 2025
MESA Nomadic Masters
CCT Season 2 Global Finals
IEM Melbourne 2025

Upcoming

2025 ACS Season 2: Qualifier
CSLPRO Last Chance 2025
2025 ACS Season 2
CSLPRO Chat StarLAN 3
K-Championship
uThermal 2v2 Main Event
SEL Season 2 Championship
FEL Cracov 2025
Esports World Cup 2025
StarSeries Fall 2025
FISSURE Playground #2
BLAST Open Fall 2025
BLAST Open Fall Qual
Esports World Cup 2025
BLAST Bounty Fall 2025
BLAST Bounty Fall Qual
IEM Cologne 2025
FISSURE Playground #1
TLPD

1. ByuN
2. TY
3. Dark
4. Solar
5. Stats
6. Nerchio
7. sOs
8. soO
9. INnoVation
10. Elazer
1. Rain
2. Flash
3. EffOrt
4. Last
5. Bisu
6. Soulkey
7. Mini
8. Sharp
Sidebar Settings...

Advertising | Privacy Policy | Terms Of Use | Contact Us

Original banner artwork: Jim Warren
The contents of this webpage are copyright © 2025 TLnet. All Rights Reserved.