• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EST 21:38
CET 03:38
KST 11:38
  • 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
RSL Revival - 2025 Season Finals Preview8RSL Season 3 - Playoffs Preview0RSL Season 3 - RO16 Groups C & D Preview0RSL Season 3 - RO16 Groups A & B Preview2TL.net Map Contest #21: Winners12
Community News
SC2 All-Star Invitational: Jan 17-1818Weekly Cups (Dec 22-28): Classic & MaxPax win, Percival surprises2Weekly Cups (Dec 15-21): Classic wins big, MaxPax & Clem take weeklies3ComeBackTV's documentary on Byun's Career !11Weekly Cups (Dec 8-14): MaxPax, Clem, Cure win4
StarCraft 2
General
SC2 All-Star Invitational: Jan 17-18 Weekly Cups (Dec 22-28): Classic & MaxPax win, Percival surprises Chinese SC2 server to reopen; live all-star event in Hangzhou Starcraft 2 Zerg Coach ComeBackTV's documentary on Byun's Career !
Tourneys
OSC Season 13 World Championship WardiTV Mondays $5,000+ WardiTV 2025 Championship $100 Prize Pool - Winter Warp Gate Masters Showdow Sparkling Tuna Cup - Weekly Open Tournament
Strategy
Custom Maps
Map Editor closed ?
External Content
Mutation # 506 Warp Zone Mutation # 505 Rise From Ashes Mutation # 504 Retribution Mutation # 503 Fowl Play
Brood War
General
I would like to say something about StarCraft A cwal.gg Extension - Easily keep track of anyone BGH Auto Balance -> http://bghmmr.eu/ (UMS) SWITCHEROO *New* /Destination Edit/ What monitor do you use for playing Remastered?
Tourneys
[BSL21] Non-Korean Championship - Starts Jan 10 [Megathread] Daily Proleagues [BSL21] Grand Finals - Sunday 21:00 CET SLON Grand Finals – Season 2
Strategy
Current Meta [G] How to get started on ladder as a new Z player Fighting Spirit mining rates Simple Questions, Simple Answers
Other Games
General Games
General RTS Discussion Thread Nintendo Switch Thread Awesome Games Done Quick 2026! Stormgate/Frost Giant Megathread Mechabellum
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
Deck construction bug Heroes of StarCraft mini-set
TL Mafia
Vanilla Mini Mafia Mafia Game Mode Feedback/Ideas Survivor II: The Amazon Sengoku Mafia
Community
General
US Politics Mega-thread Russo-Ukrainian War Thread Canadian Politics Mega-thread The Games Industry And ATVI 12 Days of Starcraft
Fan Clubs
White-Ra Fan Club
Media & Entertainment
Anime Discussion Thread [Manga] One Piece
Sports
2024 - 2026 Football Thread Formula 1 Discussion
World Cup 2022
Tech Support
Computer Build, Upgrade & Buying Resource Thread
TL Community
The Automated Ban List TL+ Announced
Blogs
National Diversity: A Challe…
TrAiDoS
I decided to write a webnov…
DjKniteX
James Bond movies ranking - pa…
Topin
StarCraft improvement
iopq
Customize Sidebar...

Website Feedback

Closed Threads



Active: 1226 users

The Big Programming Thread - Page 889

Forum Index > General Forum
Post a Reply
Prev 1 887 888 889 890 891 1032 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
28094 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
Hyrule19186 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
Poland17556 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
France12906 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
Spain18160 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
France12906 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 1032 Next
Please log in or register to reply.
Live Events Refresh
Next event in 10h 22m
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
RuFF_SC2 192
ProTech142
Ketroc 52
StarCraft: Brood War
Britney 19020
Artosis 808
Shuttle 136
910 75
ggaemo 59
Noble 20
NaDa 19
Dota 2
XaKoH 537
elazer68
LuMiX1
League of Legends
JimRising 735
Counter-Strike
summit1g5849
m0e_tv316
minikerr39
Super Smash Bros
amsayoshi62
Heroes of the Storm
Khaldor154
Other Games
ViBE148
Organizations
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 19 non-featured ]
StarCraft 2
• Hupsaiya 112
• Adnapsc2 10
• IndyKCrew
• sooper7s
• AfreecaTV YouTube
• Migwel
• intothetv
• LaughNgamezSOOP
• Kozan
StarCraft: Brood War
• HerbMon 30
• Pr0nogo 1
• STPLYoutube
• ZZZeroYoutube
• BSLYoutube
Dota 2
• masondota22768
League of Legends
• Doublelift4831
• Stunt268
Other Games
• imaqtpie2774
• Scarra2041
Upcoming Events
OSC
10h 22m
Korean StarCraft League
1d
OSC
1d 9h
IPSL
1d 11h
Dewalt vs Bonyth
OSC
1d 15h
OSC
2 days
uThermal 2v2 Circuit
2 days
Replay Cast
3 days
Patches Events
3 days
Liquipedia Results

Completed

C-Race Season 1
WardiTV 2025
META Madness #9

Ongoing

IPSL Winter 2025-26
BSL Season 21
Slon Tour Season 2
CSL Season 19: Qualifier 2
Escore Tournament S1: W2
eXTREMESLAND 2025
SL Budapest Major 2025
ESL Impact League Season 8
BLAST Rivals Fall 2025
IEM Chengdu 2025
PGL Masters Bucharest 2025

Upcoming

CSL 2025 WINTER (S19)
Escore Tournament S1: W3
BSL 21 Non-Korean Championship
Acropolis #4
IPSL Spring 2026
Bellum Gens Elite Stara Zagora 2026
HSC XXVIII
Thunderfire SC2 All-star 2025
Big Gabe Cup #3
OSC Championship Season 13
Nations Cup 2026
Underdog Cup #3
NA Kuram Kup
ESL Pro League Season 23
ESL Pro League Season 23
PGL Cluj-Napoca 2026
IEM Kraków 2026
BLAST Bounty Winter 2026
BLAST Bounty Winter Qual
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 © 2026 TLnet. All Rights Reserved.