• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 12:51
CEST 18:51
KST 01:51
  • 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
Code S Season 1 (2026) - RO4 & Finals Preview5[ASL21] Ro4 Preview: On Course12Code S Season 1 - RO8 Preview7[ASL21] Ro8 Preview Pt2: Progenitors8Code S Season 1 - RO12 Group A: Rogue, Percival, Solar, Zoun13
Community News
Weekly Cups (May 11-17): Classic wins double0Code S Season 1 (2026) - RO8 Results2Weekly Cups (May 4-10): Clem, MaxPax, herO win1Maestros of The Game 2 announcement and schedule !16Weekly Cups (April 27-May 4): Clem takes triple0
StarCraft 2
General
Weekly Cups (May 11-17): Classic wins double Code S Season 1 (2026) - RO4 & Finals Preview Team Liquid Map Contest #22 - The Finalists Code S Season 1 (2026) - RO8 Results Code S Season 1 (2026) - RO12 Results
Tourneys
$1,400 SEL Season 3 Ladder Invitational GSL Code S Season 2 (2026) GSL Code S Season 1 (2026) $5,000 WardiTV Spring Championship 2026 Maestros of The Game 2 announcement and schedule !
Strategy
Custom Maps
[D]RTS in all its shapes and glory <3 [A] Nemrods 1/4 players
External Content
The PondCast: SC2 News & Results Mutation # 526 Rubber and Glue Mutation # 525 Wheel of Misfortune Mutation # 524 Death and Taxes
Brood War
General
25 Years Since Brood War Patch 1.08 Lights Ro.8 Review (asl s21) vespene.gg — BW replays in browser BGH Auto Balance -> http://bghmmr.eu/ BW General Discussion
Tourneys
[ASL21] Semifinals B [BSL22] RO8 Bracket Stage + Another TieBreaker [ASL21] Ro8 Day 4 Escore Tournament StarCraft Season 2
Strategy
Muta micro map competition Fighting Spirit mining rates [G] Hydra ZvZ: An Introduction Simple Questions, Simple Answers
Other Games
General Games
Stormgate/Frost Giant Megathread Warcraft III: The Frozen Throne ZeroSpace Megathread War of Dots, 2026 minimalst RTS Nintendo Switch Thread
Dota 2
The Story of Wings Gaming
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 TL Mafia Community Thread Five o'clock TL Mafia
Community
General
US Politics Mega-thread European Politico-economics QA Mega-thread YouTube Thread Russo-Ukrainian War Thread UK Politics Mega-thread
Fan Clubs
The herO Fan Club!
Media & Entertainment
[Manga] One Piece Anime Discussion Thread [Req][Books] Good Fantasy/SciFi books
Sports
2024 - 2026 Football Thread McBoner: A hockey love story Formula 1 Discussion
World Cup 2022
Tech Support
ETHEREUM RECOVERY ASSISTANCE streaming software Strange computer issues (software)
TL Community
The Automated Ban List
Blogs
Why RTS gamers make better f…
gosubay
How EEG Data Can Predict Gam…
TrAiDoS
ramps on octagon
StaticNine
Customize Sidebar...

Website Feedback

Closed Threads



Active: 1779 users

The Big Programming Thread - Page 890

Forum Index > General Forum
Post a Reply
Prev 1 888 889 890 891 892 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.
Deleted User 3420
Profile Blog Joined May 2003
24492 Posts
June 12 2017 21:01 GMT
#17781
I understand that, I don't think it's particularly helpful for this problem.
Manit0u
Profile Blog Joined August 2004
Poland17744 Posts
Last Edited: 2017-06-12 21:26:19
June 12 2017 21:25 GMT
#17782
On June 13 2017 06:01 travis wrote:
I understand that, I don't think it's particularly helpful for this problem.


What you need is to learn about tautology in Boolean logic. What it boils down to is that you assume the result to be false and assign variables to satisfy this statement. If you come to the point where you can't solve it because you'd have discrepancies (like and having to be true while comparing true and false) then it's a tautology (can never return false) so it's not satisfiable. You do this with implication, which can only be false if it's result is false while it's formula is true. You just check the tautology for each variable and it should be good.

Hope this helps.
Time is precious. Waste it wisely.
Deleted User 3420
Profile Blog Joined May 2003
24492 Posts
Last Edited: 2017-06-12 21:36:15
June 12 2017 21:34 GMT
#17783
But this problem isn't about satisfiability.

It is saying we are assigned a specific set of true/false inputs each day, and we need to evaluate that set of true/false inputs.

It may be the case that our circuit is unsatisfiable, or that every set of inputs satisfies it, etc - but it also may not. Knowing that doesn't necessarily help us evaluate that specific set of inputs.
Poopi
Profile Blog Joined November 2010
France12920 Posts
Last Edited: 2017-06-12 21:40:11
June 12 2017 21:37 GMT
#17784
On June 13 2017 06:34 travis wrote:
But this problem isn't about satisfiability.

It is saying we are assigned a specific set of true/false inputs each day, and we need to evaluate that set of true/false inputs.

It may be the case that our circuit is unsatisfiable, or that every set of inputs satisfies it, etc - but it also may not. Knowing that doesn't necessarily help us evaluate that specific set of inputs.

From what I read in 13)a) you just have to find a satisfying assignment using the satisfability of the formula so it is about satisfiability.
For example, you could just do the naive solution and test every possible interpretation if the formula is satisfiable, but it would not be a fast solution.
WriterMaru
Deleted User 3420
Profile Blog Joined May 2003
24492 Posts
June 12 2017 21:43 GMT
#17785
I should have been more clear. I am only doing part 2, and am specifically confused about questions 5-7.
slmw
Profile Blog Joined October 2010
Finland233 Posts
June 12 2017 21:44 GMT
#17786
As travis said, I think you're all missing the point. Are you guys looking at the correct task?

Explain very briefly in English how you would use the Boolean circuit evaluation program to evaluate Boolean formulas


I think you could briefly describe how to generate a boolean circuit from a boolean statement (and assume that the circuit evaluation program takes the input in some form you can generate reasonably easily with your program). For 6a and 6b I think you should figure out how many wires and gates would your program create as the input for the circuit program. For 7 just do the opposite approach.
BrTarolg
Profile Blog Joined June 2009
United Kingdom3574 Posts
June 12 2017 21:51 GMT
#17787
On June 13 2017 04:39 beg wrote:
Show nested quote +
On June 12 2017 23:16 BrTarolg wrote:
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.


oops! return a[value] ^_^

Man coding interviews sound scary. I have like, 20 tabs of google open at once when im writing anything lol
Deleted User 3420
Profile Blog Joined May 2003
24492 Posts
June 12 2017 21:52 GMT
#17788
On June 13 2017 06:44 slmw wrote:
As travis said, I think you're all missing the point. Are you guys looking at the correct task?

Show nested quote +
Explain very briefly in English how you would use the Boolean circuit evaluation program to evaluate Boolean formulas


I think you could briefly describe how to generate a boolean circuit from a boolean statement (and assume that the circuit evaluation program takes the input in some form you can generate reasonably easily with your program). For 6a and 6b I think you should figure out how many wires and gates would your program create as the input for the circuit program. For 7 just do the opposite approach.


Just so I am not crazy, this is all.. very easy, right? There's nothing super special that could happen in 6 or 7 to really speed up or slow it down is there? It seems to me that complexity will stay the same (which is what confuses me the most about the question)
Nesserev
Profile Blog Joined January 2011
Belgium2760 Posts
Last Edited: 2017-06-12 22:15:57
June 12 2017 22:07 GMT
#17789
--- Nuked ---
beg
Profile Blog Joined May 2010
991 Posts
June 12 2017 22:18 GMT
#17790
On June 13 2017 06:51 BrTarolg wrote:
Show nested quote +
On June 13 2017 04:39 beg wrote:
On June 12 2017 23:16 BrTarolg wrote:
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.


oops! return a[value] ^_^

Man coding interviews sound scary. I have like, 20 tabs of google open at once when im writing anything lol

now it's returning a non-unique letter
Deleted User 3420
Profile Blog Joined May 2003
24492 Posts
Last Edited: 2017-06-12 22:23:32
June 12 2017 22:22 GMT
#17791
+ Show Spoiler +

On June 13 2017 07:07 Nesserev wrote:
Show nested quote +
On June 13 2017 05:40 travis wrote:
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...

The part "(from above)" refers to the composition of these formulas. You could build the circuits through a recursive divide and conquer strategy like that:

result = (((A ∧ NOT(B)) ∨ (NOT(A) ∧ C)) ∧ (B ∧ NOT(C))) = (m ^ n)
m = ((A ∧ NOT(B)) ∨ (NOT(A) ∧ C)) = (o ∨ p)
n = (B ∧ NOT(C)) = (b ∧ q)
o = (A ∧ NOT(B)) = (a ^ r)
p = (NOT(A) ∧ C)) = (s ^ c)
q = NOT(C)
r = NOT(B)
s = NOT(A)

circuit = create_circuit(formula);

def create_circuit(formula):
parsed = parse_formula(formula)
if parsed.is_atom():
return create_input_element(parsed.atom)
else:
if parsed.is_and():
leftCircuit = create_circuit(left)
rightCircuit = create_circuit(right)
return create_and(left, right)
elif parsed.is_or():
leftCircuit = create_circuit(left)
rightCircuit = create_circuit(right)
return create_and(left, right)
elif parsed.is_not():
circuit = create_circuit(formula.complement)
return create_not(circuit)


Note: this doesn't work, but I hope it gets the idea across.

6a depends on 5b. 6b should be trivial.

For question 7: Just build the formula from whatever format the circuit is specified in, probably similar to 5a.




ohhh... so this was what I was missing. That it's asking how I actually build the circuit. Which now, I see, was obviously what I was asking. But it was just hard to understand until you gave an example.

thou art a hero of monumental proportions
dsyxelic
Profile Joined May 2010
United States1417 Posts
June 12 2017 23:15 GMT
#17792
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?


quit the job? maybe naiive but I don't think I would want to work at a place that disorganized that a new person on the job can be the first line of defense on something so critical

I guess I failed rip
TL/SKT
Poopi
Profile Blog Joined November 2010
France12920 Posts
June 12 2017 23:19 GMT
#17793
On June 13 2017 08:15 dsyxelic wrote:
Show nested quote +
On June 13 2017 04:30 Nesserev wrote:
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.

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?


quit the job? maybe naiive but I don't think I would want to work at a place that disorganized that a new person on the job can be the first line of defense on something so critical

I guess I failed rip

If you are the new guy how is it even possible for a client to directly call you?
WriterMaru
Nesserev
Profile Blog Joined January 2011
Belgium2760 Posts
Last Edited: 2017-06-12 23:36:46
June 12 2017 23:35 GMT
#17794
--- Nuked ---
dsyxelic
Profile Joined May 2010
United States1417 Posts
Last Edited: 2017-06-12 23:46:11
June 12 2017 23:37 GMT
#17795
On June 13 2017 08:19 Poopi wrote:
Show nested quote +
On June 13 2017 08:15 dsyxelic wrote:
On June 13 2017 04:30 Nesserev wrote:
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.

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?


quit the job? maybe naiive but I don't think I would want to work at a place that disorganized that a new person on the job can be the first line of defense on something so critical

I guess I failed rip

If you are the new guy how is it even possible for a client to directly call you?


i know there are companies out there bad enough that that could actually happen

but yeah just took it as a hypothetical and i think the right answer is probably to leave that unless you are beyond desperate

On June 13 2017 08:35 Nesserev wrote:
Show nested quote +
On June 13 2017 08:15 dsyxelic wrote:
quit the job? maybe naiive but I don't think I would want to work at a place that disorganized that a new person on the job can be the first line of defense on something so critical

I guess I failed rip

Most work environments aren't Disney princess resorts with unlimited resources and logically thinking creatures at the helm.

Show nested quote +
On June 13 2017 08:19 Poopi wrote:
If you are the new guy how is it even possible for a client to directly call you?

Client couldn't reach the usual contacts, and thus called the office and you picked up the phone (only person there). Pedro is lost in hooker tits frosted with white powder of unknown origin and has more important stuff to do than picking up the phone, while Johnny is trying to figure out in which solar system he is... he can't choose between TRAPPIST-1 or Epsilon Eridani.


to counter, I would say that the companies who would actually have these sort of situations wouldn't really have a problem that is so critical that I as a new employee couldn't just say sorry I am someone who isn't familiar with the product and the ones who are are out right now. here is the number of the project lead if you'd like to try calling directly, otherwise I will be more than willing to use the best of my ability to help. then hope I can googlefu (or think smart enough) my way out or if just listening to the guy vent helps.

before all that I would probably just scan the office real quick if there is someone higher up I could contact that could take care of the situation I am obviously not well-equipped for or give me some quick advice for the situation so I don't do a major fk up like promise the client something we can't do or just get him more pissed by saying I can't help. If I am literally alone to fend for myself just go with the above while trying to be as compassionate as possible and showing sympathy while hoping to god the problem is something actually trivial and the client is just a big idiot.
TL/SKT
Hanh
Profile Joined June 2016
146 Posts
June 13 2017 00:40 GMT
#17796
On June 13 2017 04:30 Nesserev wrote:
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?


Ask the client to restart his machine.
BrTarolg
Profile Blog Joined June 2009
United Kingdom3574 Posts
Last Edited: 2017-06-13 02:14:38
June 13 2017 01:58 GMT
#17797
On June 13 2017 07:18 beg wrote:
Show nested quote +
On June 13 2017 06:51 BrTarolg wrote:
On June 13 2017 04:39 beg wrote:
On June 12 2017 23:16 BrTarolg wrote:
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.


oops! return a[value] ^_^

Man coding interviews sound scary. I have like, 20 tabs of google open at once when im writing anything lol

now it's returning a non-unique letter


OMG i didn't know what you meant until i read properly rofl

several edits later: yes i'm going to need to read up on this and think about this problem carefully before submitting wrong solutions again hahaha
Hanh
Profile Joined June 2016
146 Posts
June 13 2017 03:26 GMT
#17798
On June 13 2017 04:30 Nesserev wrote:

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.



Irony explosion!!! :D

I won't take the risk of trying to answer now.
dekibeki
Profile Joined June 2011
Australia34 Posts
Last Edited: 2017-06-13 03:44:21
June 13 2017 03:38 GMT
#17799
For the first unique letter, does this work? (quadratic)
+ Show Spoiler +
 
char find_first_unique(const char* s) {

size_t s_len = strlen(s);
size_t count;

for(size_t i = 0; i < s_len; ++i) {
count = 0;
for(size_t j = 0; j < s_len; ++j) {
if(s[i] == s[j]) {
++count;
}
}
if(count == 1) {
return s[i];
}
}
return '?';
}


And depending on container, linear expected and quad worst case vs nlogn expected and worst case
+ Show Spoiler +

char find_first_unique(const char* s) {

size_t s_len = strlen(s);
Map<char,size_t> count_map;

for(size_t i = 0; i < s_len; ++i) {
++count_map[s[i]];
}

for(size_t i = 0; i < s_len; ++i) {
if(count_map[s[i]] == 1) {
return s[i];
}
}
return '?';
}



Mr. Wiggles
Profile Blog Joined August 2010
Canada5894 Posts
June 13 2017 03:48 GMT
#17800
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.


Since everyone else is doing it (In Python)

+ Show Spoiler [Code] +

from collections import Counter


def first_unique_letter(string):
frequency = Counter(string)

for character in string:
if character.isalpha() and frequency[character] == 1:
return character

return "?"



+ Show Spoiler [Test Run] +

>>> from unique import first_unique_letter
>>> first_unique_letter('bab')
'a'
>>> first_unique_letter('!@#a')
'a'
>>> first_unique_letter('aaabbb')
'?'
>>> first_unique_letter('!@#$')
'?'
>>> first_unique_letter('abc')
'a'



Not the most optimal solution, but it's pretty clean.

At my company, we normally get things rolling by trying to make sure that you know low-level programming in the form of C.

For example, given a string, reverse all individual words within the string. For simplicity, assume all input is composed of letters and spaces.

e.g.

void reverse_all_words(char *input, size_t len);

"Hello World" => "olleH dlroW"
"My name is Bob" => "yM eman si boB"
"abc bb " => "cba bb "


Bonus points if you do it space-efficiently.
you gotta dance
Prev 1 888 889 890 891 892 1032 Next
Please log in or register to reply.
Live Events Refresh
Next event in 16h 39m
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
mouzHeroMarine 337
elazer 202
SteadfastSC 152
BRAT_OK 56
UpATreeSC 51
MindelVK 26
StarCraft: Brood War
EffOrt 986
Jaedong 759
Mini 514
ggaemo 303
firebathero 239
actioN 230
Soulkey 221
BeSt 155
Hyuk 93
Aegong 85
[ Show more ]
Hyun 54
ToSsGirL 53
scan(afreeca) 31
Sexy 31
Movie 30
Rock 27
Terrorterran 13
ajuk12(nOOB) 8
Dota 2
Gorgc9410
qojqva1686
Dendi666
Counter-Strike
fl0m2069
Fnx 1758
byalli374
adren_tv91
kRYSTAL_27
Other Games
singsing2462
Grubby1469
FrodaN869
hiko790
B2W.Neo657
crisheroes292
Hui .206
KnowMe193
ArmadaUGS71
QueenE63
oskar50
Trikslyr49
Organizations
Counter-Strike
PGL814
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
[ Show 17 non-featured ]
StarCraft 2
• LUISG 20
• Dystopia_ 5
• AfreecaTV YouTube
• sooper7s
• intothetv
• Migwel
• Kozan
• IndyKCrew
• LaughNgamezSOOP
StarCraft: Brood War
• HerbMon 25
• FirePhoenix4
• STPLYoutube
• ZZZeroYoutube
• BSLYoutube
League of Legends
• TFBlade670
Other Games
• Shiphtur284
• WagamamaTV60
Upcoming Events
GSL
16h 39m
Cure vs sOs
SHIN vs ByuN
Replay Cast
1d 7h
GSL
1d 16h
Classic vs Solar
GuMiho vs Zoun
WardiTV Spring Champion…
1d 18h
Replay Cast
2 days
Sparkling Tuna Cup
2 days
WardiTV Spring Champion…
2 days
Replay Cast
3 days
RSL Revival
3 days
Classic vs SHIN
Rogue vs Bunny
BSL
4 days
[ Show More ]
Replay Cast
4 days
Afreeca Starleague
4 days
Flash vs Soma
RSL Revival
4 days
BSL
5 days
Patches Events
5 days
Universe Titan Cup
5 days
Rogue vs Percival
Wardi Open
5 days
Monday Night Weeklies
5 days
Replay Cast
6 days
The PondCast
6 days
Kung Fu Cup
6 days
Liquipedia Results

Completed

Escore Tournament S2: W7
2026 GSL S1
Nations Cup 2026

Ongoing

BSL Season 22
ASL Season 21
IPSL Spring 2026
KCM Race Survival 2026 Season 2
Acropolis #4
KK 2v2 League Season 1
BSL 22 Non-Korean Championship
YSL S3
SCTL 2026 Spring
RSL Revival: Season 5
Heroes Pulsing #1
Asian Champions League 2026
IEM Atlanta 2026
PGL Astana 2026
BLAST Rivals Spring 2026
IEM Rio 2026
PGL Bucharest 2026
Stake Ranked Episode 1
BLAST Open Spring 2026
ESL Pro League S23 Finals
ESL Pro League S23 Stage 1&2

Upcoming

Escore Tournament S2: W8
CSCL: Masked Kings S4
CSLAN 4
Kung Fu Cup 2026 Grand Finals
HSC XXIX
uThermal 2v2 2026 Main Event
Maestros of the Game 2
WardiTV Spring 2026
2026 GSL S2
Bounty Cup 2026
BLAST Bounty Summer 2026
BLAST Bounty Summer Qual
Stake Ranked Episode 3
XSE Pro League 2026
IEM Cologne Major 2026
Stake Ranked Episode 2
CS Asia Championships 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.