• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 05:27
CEST 11:27
KST 18:27
  • 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
[ASL21] Ro24 Preview Pt2: News Flash10[ASL21] Ro24 Preview Pt1: New Chaos0Team Liquid Map Contest #22 - Presented by Monster Energy18ByuL: The Forgotten Master of ZvT30Behind the Blue - Team Liquid History Book20
Community News
$5,000 WardiTV TLMC tournament - Presented by Monster Energy1GSL CK: More events planned pending crowdfunding0Weekly Cups (May 30-Apr 5): herO, Clem, SHIN win0[BSL22] RO32 Group Stage4Weekly Cups (March 23-29): herO takes triple6
StarCraft 2
General
BGE Stara Zagora 2026 cancelled Blizzard Classic Cup @ BlizzCon 2026 - $100k prize pool Weekly Cups (May 30-Apr 5): herO, Clem, SHIN win Rongyi Cup S3 - Preview & Info Team Liquid Map Contest #22 - Presented by Monster Energy
Tourneys
RSL Season 4 announced for March-April $5,000 WardiTV TLMC tournament - Presented by Monster Energy Sea Duckling Open (Global, Bronze-Diamond) GSL CK: More events planned pending crowdfunding Sparkling Tuna Cup - Weekly Open Tournament
Strategy
Custom Maps
[D]RTS in all its shapes and glory <3 [A] Nemrods 1/4 players [M] (2) Frigid Storage
External Content
The PondCast: SC2 News & Results Mutation # 520 Moving Fees Mutation # 519 Inner Power Mutation # 518 Radiation Zone
Brood War
General
Gypsy to Korea so ive been playing broodwar for a week straight. ASL21 General Discussion Pros React To: JaeDong vs Queen [BSL22] RO32 Group Stage
Tourneys
[Megathread] Daily Proleagues [BSL22] RO32 Group B - Sunday 21:00 CEST [BSL22] RO32 Group A - Saturday 21:00 CEST 🌍 Weekly Foreign Showmatches
Strategy
Muta micro map competition Fighting Spirit mining rates What's the deal with APM & what's its true value Simple Questions, Simple Answers
Other Games
General Games
Stormgate/Frost Giant Megathread Starcraft Tabletop Miniature Game General RTS Discussion Thread Nintendo Switch Thread Darkest Dungeon
Dota 2
The Story of Wings Gaming Official 'what is Dota anymore' discussion
League of Legends
G2 just beat GenG in First stand
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
Mafia Game Mode Feedback/Ideas TL Mafia Community Thread Five o'clock TL Mafia
Community
General
US Politics Mega-thread Things Aren’t Peaceful in Palestine European Politico-economics QA Mega-thread Canadian Politics Mega-thread Russo-Ukrainian War Thread
Fan Clubs
The IdrA Fan Club
Media & Entertainment
[Manga] One Piece [Req][Books] Good Fantasy/SciFi books Movie Discussion!
Sports
2024 - 2026 Football Thread Formula 1 Discussion Cricket [SPORT] Tokyo Olympics 2021 Thread General nutrition recommendations
World Cup 2022
Tech Support
[G] How to Block Livestream Ads
TL Community
The Automated Ban List
Blogs
Loot Boxes—Emotions, And Why…
TrAiDoS
Broowar part 2
qwaykee
Funny Nicknames
LUCKY_NOOB
Iranian anarchists: organize…
XenOsky
FS++
Kraekkling
ASL S21 English Commentary…
namkraft
Electronics
mantequilla
Customize Sidebar...

Website Feedback

Closed Threads



Active: 2085 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
28100 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
Hyrule19201 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
Poland17717 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
France12911 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
Spain18257 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
France12911 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 33m
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
SortOf 108
Nina 79
ProTech10
StarCraft: Brood War
Zeus 2822
Sea 2672
Bisu 759
firebathero 551
Jaedong 398
Hyuk 279
actioN 159
Stork 96
Killer 90
sorry 60
[ Show more ]
Leta 56
Free 55
Shinee 47
Aegong 44
Sharp 40
ToSsGirL 39
Backho 17
NotJumperer 17
[sc1f]eonzerg 14
Bale 13
GoRush 10
Rush 10
JulyZerg 8
ajuk12(nOOB) 8
Dota 2
XaKoH 442
NeuroSwarm87
Counter-Strike
olofmeister2498
shoxiejesuss617
Other Games
singsing1066
Liquid`RaSZi675
ceh9631
Happy192
crisheroes170
Mew2King64
Organizations
Counter-Strike
PGL11618
Other Games
gamesdonequick671
BasetradeTV18
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 12 non-featured ]
StarCraft 2
• LUISG 28
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
League of Legends
• Jankos2209
Upcoming Events
The PondCast
33m
CranKy Ducklings
14h 33m
WardiTV Team League
1d 1h
Replay Cast
1d 14h
CranKy Ducklings
2 days
WardiTV Team League
2 days
uThermal 2v2 Circuit
2 days
BSL
2 days
n0maD vs perroflaco
TerrOr vs ZZZero
MadiNho vs WolFix
DragOn vs LancerX
Sparkling Tuna Cup
3 days
WardiTV Team League
3 days
[ Show More ]
OSC
3 days
BSL
3 days
Sterling vs Azhi_Dahaki
Napoleon vs Mazur
Jimin vs Nesh
spx vs Strudel
Replay Cast
3 days
Replay Cast
3 days
Wardi Open
4 days
GSL
5 days
Replay Cast
5 days
Kung Fu Cup
6 days
Replay Cast
6 days
Liquipedia Results

Completed

CSL Elite League 2026
RSL Revival: Season 4
NationLESS Cup

Ongoing

BSL Season 22
ASL Season 21
CSL 2026 SPRING (S20)
StarCraft2 Community Team League 2026 Spring
Nations Cup 2026
PGL Bucharest 2026
Stake Ranked Episode 1
BLAST Open Spring 2026
ESL Pro League S23 Finals
ESL Pro League S23 Stage 1&2
PGL Cluj-Napoca 2026
IEM Kraków 2026
BLAST Bounty Winter 2026

Upcoming

Escore Tournament S2: W2
IPSL Spring 2026
Escore Tournament S2: W3
Acropolis #4
BSL 22 Non-Korean Championship
CSLAN 4
Kung Fu Cup 2026 Grand Finals
HSC XXIX
uThermal 2v2 2026 Main Event
RSL Revival: Season 5
WardiTV TLMC #16
IEM Cologne Major 2026
Stake Ranked Episode 2
CS Asia Championships 2026
Asian Champions League 2026
IEM Atlanta 2026
PGL Astana 2026
BLAST Rivals Spring 2026
CCT Season 3 Global Finals
IEM Rio 2026
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.