Failed a job interview

Just got back from a technical interview for a software development position (BS in compsci). Did not even make it through 20 minutes of the tech interview before interviewer said I wasn't getting the job.

Should I just an hero?

Other urls found in this thread:

mulpwiki.org/index.php/Uncle_Remus's_Guide_to_SSI
codereview.stackexchange.com/questions/44186/count-number-of-each-char-in-a-string
joelonsoftware.com/2003/10/08/the-absolute-minimum-every-software-developer-absolutely-positively-must-know-about-unicode-and-character-sets-no-excuses/
twitter.com/SFWRedditGifs

yes. kill yourself.

Yeah
You should really consider it

What did they ask you?

>mfw Sup Forums realizes interviews aren't just fizzbuzz

>things that never happened.

>things that never happened

Yes. It seems much more likely that OP is a successful dev that just sold their startup to Facebook for a quarter billion dollars and needs to make up stories about their failures to feel like a common loser.

They asked me to write a function that would find all repeating characters in a string and the number of times they were repeated. I tried to solve using a hashtable to get get the solution in O(nlogn) time? Basically just a simple hash that would track the number of occurrences per character. They stopped me when I was writing the hash function because I essentially made a 2d array that had the occurrences of each character in the second part of the array and use ansii for the "key." I made an incorrect assumption that the characters would not be double global characters or something like that?

Prepare and do better next time.

Enjoy the NEET life like the rest of us.

That's basically what they said. They want me to come back in in 6 weeks when I've had more time to "knock off the coder rust."

I also would have made that mistake.

They put you on the spot like that during the "getting to know you interview"? Or was this a follow up interview? Either way you should have prepared

>tfw couldn't do this in an actual efficient way
>have no idea

desu I know the retard way of just making a 2d vector or something or array the size of the sting if I already know the size and then comparing each character to the string and looking for duplicates

Follow up interview. I studied quite a bit (2 hours per day for 2 weeks) but it wasn't nearly enough.

Semi-serious question, how does one NEET successfully?

so if you get an input like "abaab"
Should return (a,3),(b,2) or (a,2) or what whas their example?

mulpwiki.org/index.php/Uncle_Remus's_Guide_to_SSI

Having people tell me to kill myself is weirdly comforting. I think I've spent too much time on Sup Forums.

It should be (a,3),(b,2). They didn't provide an actual example. They just presented the question and I gave my interpretation and assumptions. I wrote my own string and asked for information about what the answer should look like.

Wouldn't it be obvious to just use bucket sort then?
Create an array cabable of containining all elements, then increment for each instance, then convert it back ibto whatever format when you are done. That would be O(N) and very easy to implement.
The problem with bucket sort is usually it takes up a lot of memory, but when you are constricted to letters, that is not a problem.

Didn't you hear user? There's a shortage of CS graduates!

Sorry, you're too white and male.

>find all repeating characters in a string
>I tried to solve using a hashtable

LOL, you went for an extremely inefficient solution. The simplest solution would be to create an array of integers (initialize with 0), iterate through the characters in the whole string and, using the ascii value of the character as the index, increment the element of the integer array. This would all be done in a single pass.

I honestly didn't get into it for money or job security. I've wanted to programmer since I was 10 years old. I am white and male, but I can't make any excuses. That's just an emotional crutch.

That's what I did, but it was wrong and an automatic failure because it doesn't take into consideration double-byte character sets (Chinese characters ect.)

Oops, sorry I didn't read the whole post. They sound very anal. Unless you're working for some international/foreign company, you wouldn't be using double-byte characters in strings anyway. I don't think they're really interested in hiring you in the first place. They probably have a lot of candidates or they already made a decision on who to hire, and they're looking for the quickest way to end the interview.

Regardless, the more inclusive solution would be to use a Map.

Double global characters? You trying to say that you assumed the string would only only be ASCII-encoded and not UTF-16 (which is usually used for strings in-memory) or UTF-8 (which is usually used to store strings in files)? In other words your algorithm would only work for the extremely limited case of English text with no too-fancy characters. Seems kind of like a little thing to short the circuit for since that can easily be explained/changed, but I can get not wanting coders who are only used to dealing with the trivial, sanitized little "friction-less vacuum" test areas.

Hash table was the right way to go about it, though.

They were pretty cool about giving me advice moving forward so I honestly can't complain. Do you mean like a hashmap? My code skills are really bad at the moment because I haven't been really writing much at all in the last 1.5 years. Just studying again recently.

Ya, these are the areas were my lack of real world non-academic coding shows. Definitely got to work on that.

Time to go IT bro

> higher job satisfaction
> higher job growth
> cooler people

Is it really that much better? I did do some CCNA stuff and have some experience with load balancers, switches, routers ect.

Yes, like a hashmap. My skills are rusty too. When you've spending your time with only one language on the job, you tend to forget about the stuff you've learned before.

>Unless you're working for some international/foreign company, you wouldn't be using double-byte characters in strings anyway.

You say that, until some retarded user enters emojis into your form's input fields

Regardless though, it sounds like OP got screwed over if they ended the interview as soon as he made a mistake.

Unicode fucked computing. It's the original cuck.

Should've ask for bathroom and then copy this
codereview.stackexchange.com/questions/44186/count-number-of-each-char-in-a-string

Yea, I did IT work in the military and it was pretty sweet. Granted, everything in the military has to be watered down so retards can do it, so contractors do more of the heavy lifting. I'm in school for CS right now and I can already tell the software world seems like it sucks. Everyone's trying to be some genius programmer dude, since that's who the instructors idolize. IT stuff that might be better starting from junior to more senior positions:

> systems admin / cyber security
> systems analyst
> network engineer
> systems manager

Basically the more niche the better. I've read stories of guys starting off on call center floors and working into systems managers.

Thanks user, I'll keep this in mind.

ASCII should have died in the 70's. There is no reason to be using fixed-length characters in 2017 and tons of reasons not to. Even if you're only using something for internal use, please don't use ASCII.

>accommodating pajeets
Fuck them. We should have doubled down on ASCII.

They were probably looking for a simpler nested loop. It sounds like you were a better programmer than your interviewers.

utf8 is a fucking pain ot work with; there are three distinct "boundries" bytes, codepoints, and graphemes all of which have their own weird rules on how to display and when to use which. and this is all ignoring performance. at least fixed width parsing is ubiqutious and constant time indexing

this desu

joelonsoftware.com/2003/10/08/the-absolute-minimum-every-software-developer-absolutely-positively-must-know-about-unicode-and-character-sets-no-excuses/

I would have made that mistake as well. Depends of the language of course, if you are writing this in Python or Java you don't even have this problem amusing you limit yourself to their respective string/character types. In C if you are dealing with char* of course that's a different story.

It certainly has some implementation drawbacks, but once that is done it shines for the user. I'm really glad it exists.

And if I pretended all objects were squares it'd be a lot easier to draw them, but I don't think my users would appreciate the limitation.

Strings aren't meant to be indexes, they're meant for reading. Creating a human-readable data format explicitly to be human-readable and then limiting it based on (frankly trivial) computational concerns is just being lazy. I mean you would only run into non-constant indexing concerns when you're dealing with characters which couldn't be written under the alternative system.

Sometimes even tech interviews are contrained to the "people like us" mindset.

No matter how good or wrong is your answer, if they dont feel you will be a match for their culture you are out.

A friend who now work for one of the big 4 got rejected by some d00d because of this, he was sad as fuck, but some months later another guy reinterviewed him and got hired.

So OP, not takong into account your proposed solution, sometimes people like intellectial clones to work with them, "maybe" that was your case

preparation for the exam is a requisite, but its not enough, better luck next time

Did you ask them why?

How is your portfolio?

Don't get discouraged, just keep on trying until you get your foot in the door

Thanks man. I'll be more prepared next time.

Name one benefit of utf8 to an English speaking user.

Don't even mention emojis, they're a drawback, not a feature.

>not just traping the interviewer into assuming your gender

My portfolio is shit. I worked at a place were I was supposed to be writing code, but ended up doing network investigations almost the whole time right out of college.

I'd fail this immediately as I would assume that it was just some easy fizzbuzz filter question

are you an SJW?

>Name one benefit of utf8 to an English speaking user.
The world is more than just the United States. Don't be so arrogant and assume that what is enough for you should be enough for the whole world. And using different systems for different regions is not sensible.

>Don't even mention emojis, they're a drawback, not a feature.
I agree with you there. The political nonsense it introduced is reason alone it should have never been introduced to unicode.

Definitely not. Why do you ask?

I forgot there are different ways to process grapheme clusters too.

indexing is important if you are trying to manipulate text or when you need to perform any sort of text validation (think content uploaders). For both you most likely want to deal with graphemes not codepoints. Im not saying that ascii is a better general purpose solution, but fixed width chars makes everything so much simpler.

Can you write the for-each symbol (∀) in ASCII?
Can you write the pilcrow (¶) or the section sign (§)?
Can you write a musical note () or an astrological symbol ()?

Don't pretend like English is the one language we use and that it fits into a tidy little 256-sized bin, because that's simply untrue.

oh, because that's an insta-reject in most serious firms. they're a walking liability.

sounds like may be right.

don't be discouraged, user. one door closes another door opens

also, just my 2cents...

usually they expect you to ask for specifications and clarification of the task before you ever start writing code.

read the first couple chapters of cracking the coding interview

For sure, I have that book on it's way in the mail.

No job security tho.

What do IT people do, I mean the higher up levels who get to boss around the techies?

Once they have implemented a system do they just sit around all day and the company gives you get 150 grand for keeping an eye on things? The 2 people I know who had jobs similar to what I am explaining don't go to any effort to make their job sound hard.

As someone who has been fruit picking for 2 months to get cash for ryzen these IT jobs sound cushy as fuck.

var str = "writing this while getting paid for it"

var m: [UnicodeScalar: Int] = [:]

for c in str.unicodeScalars {
m[c] = (m[c] ?? 0) + 1
}

print(m)


["g": 3, "o": 1, "e": 2, "d": 1, "a": 1, "t": 5, "f": 1, " ": 6, "s": 1, "r": 2, "n": 2, "h": 2, "p": 1, "l": 1, "i": 7, "w": 2]

It's easy get paid to watch anime and browse Sup Forums.

>Once they have implemented a system do they just sit around all day and the company gives you get 150 grand for keeping an eye on things?
Yes. Because when things go bad (and they do) you are the one guy to give orders and not fuck up.

It's kinda like the military: we don't use them that often so they sit around preparing themselves until we do need them.

Yeah eat a bullet you worthless shit.

Got any savings? Go be a sex tourist in Cambodia until you run out first.

Do the mobile web developer Van Life shit. Just live in a Van, drive around the country and build web services for small to medium sized businesses.

>Some beta tester wants the software to handle Japanese

If the company doesn't do business with certain countries, there's no need to bend over backwards accommodate non-existing foreign users.

You get paid for writing nonmaintainable code?

This is the sort of thinking that costs thousands of man-hours in the long run.

>had algorithms class 1 and a half years ago
>already forgot what bucket sort is
fuggggg I should program more and watch less chinese cartoons

>using built-in encoding libraries is "bending over backwards"
Sup Forums once again showing that they never actually make anything other than chintzy little homework problems. In any real framework you're never even given the option of using fixed-length strings.

The fact that there's ANY degree of resistance to Unicode is unfortunately making me think that the interviewer might have been justified in the decision if this is actually a mentality that exists in CS students. The last thing any big project wants is someone who waits until it becomes a problem to start doing things correctly.

I have a shit tier IT job and it's still pretty alright. If it wasn't for the extra non-IT shit that I have to help out with it would probably be pretty good. I probably do no more than upto 3-4 hours work a day.

>tfw posting this at work right now.

Why do Americans stop after getting a BSc? Do you not realize you're pretty much someone who only had an apprenticeship, but without the training and experience?

That makes sense, thanks for replying.

because it's a 4 year degree and a MSc is usually necessary if you do more scientific research

imo it makes much more sense than a 3+2 year MSc because most people are essentially just that, non-trained graduates without experience, but at the cost of one more year

We used to have a 4-year diploma program similar to that but EU fucked everything up once again REEEEE

t. German

Good read ty

s = raw_input("Enter string: ")
d = {}
for c in s:
if c in d:
d[c] += 1
else:
d[c] = 1
print d

I wasn't being serious. I am getting a MEng right now and honestly the only reason to do it is because you end up more desirable for HR drones and with a higher salary cap. 1 year into the 2 year master's studies I still haven't learned anything new that is actually useful for the job later.
t. also German
>dFw kein Dipl-Ing mehr

so this is a stupid question.
a german BSc is the quivalent to another country's BSc right?
'cause isn't the abitur like U.S. associate degree? but abitur is like highschool for germans?

>a german BSc is the quivalent to another country's BSc right?
There is really no comparative scale at least for CS degrees in Germany imo, it's really heterogenous.

I've seen people close to getting a Google internship 2 years into their BSc, but some of the people I work with now 4 years into my degree (3 year BSc, first year MSc) can't write a proper line of code to save their fucking life.

It almost gets to the point where your grade is almost worthless and you only go to school for 5 years to receive a sheet of paper that shows HR you have studied but to actually get employed you need experience in totally different categories.

There are of course advanced topics like AI/ML, numerics, encryption and any kind of fundamental research where you will have a hard time learning outside of an institution, but then again, most graduates aren't becoming ML experts and of those who do, most of them go into academics anyway.

Are you retarded?

We switched to the Bachelor / Master system so the degrees would be equivalent, yes. However, the actual courses differ greatly like said.
I don't know about the associate degree so I can't answer that question. From what my friend told me who spent 6 months in the US, we have fewer opportunities for avoiding certain subjects than you do, and less choice between different levels for subjects. Mind you, I graduated in 2011 and a lot has changed since then. Abitur is now 2 years instead of 3 (grades 11 and 12, formerly 11 through 13) and the system for choosing courses has changed as well.

>but some of the people I work with now 4 years into my degree (3 year BSc, first year MSc) can't write a proper line of code to save their fucking life.
Tell me about it. I'm an EE and some people here can't integrate a polynomial, can't apply Ohm's or Kirchhoff's laws and can't even make an echo program in C or fucking Python.
>your grade is almost worthless and you only go to school for 5 years to receive a sheet of paper that shows HR you have studied
1000 times this.

>Failed a job interview
> a job interview
you can cry when you fail like 30 you fagot

learn from it, get better, learn more

>can do "for c in s:"
>can't do s[1]='a'
Kekthon

what did he mean by this

Python is a joke

I still don't get his point. You can go through the string by index if you so wish, but there's little point. Why he would statically assign the first character of the string to 'a' is a mystery to me.

*second

it took them 20 minutes for them to realize you weren't black, a woman, or a tranny?

>Why he would statically assign the first character of the string to 'a' is a mystery to me.
the point is that you can't

it's a shitty, slow as fuck interpreted scripting shit implemented in C which can't even do basic C shit with strings

Observe.
s = raw_input()
print s[:1] + 'a' + s[2:]


Nobody is debating that it's slow compared to C.
>can't even do basic C shit with strings
By that logic C is also shit because it can't do basic Python shit with strings.
Everything has its use.

>Observe
when even C++ is less verbose you have to question the decisions made by the designer of your slow SCRIPTING LANGUAGE

> Everything has its use.
yes, if your script language is all those bad things at least be capable of altering strings easily

C/C++ is less verbose for that one very specific task which in the real world doesn't occur that often, and can be circumvented for better readability. C on the other hand:
>have to determine length of string first, or manually allocate memory, and manually handle memory allocation when length is changed, leading to more verbose code
>can't iterate over list objects, have to explicitly get them by indexing
>requires #include directive even for basic shit like stdio
>no built in string type with utility functions like replace, len etc.
I'm not saying Python is objectively better, but for some applications it is more manageable. For string manipulation in particular I always prefer Python over C because parsing strings is much more convenient there.

>and can be circumvented for better readability.
That's not better readability.
>keeps trying to justify stupid decisions
Congrats, you're a cult.

>They want me to come back in in 6 weeks when I've had more time to "knock off the coder rust."
You're not getting the job, lol.
Fucking failed wagecucks man, when will they learn ?

>I studied quite a bit (2 hours per day for 2 weeks) but it wasn't nearly enough.
>studied for 28 hours to fail the interview and make a fool out of yourself
Holy fuck, this just got a lot better.
Wagecucks absolutely BTFO

>compsci
>software development
That is not related at all. What you wanted was software engineering, not computer science.

He's probably just a shitty coder. Likely took him a long time to come up with the code. Made (+ corrected) a lot of small errors. had a hard time coming up with the correct syntax. Stuff like that.
And that is why the interviewers stopped him. Not because he made any grave mistakes.

Did you explain what you were doing and why you chose your. decision? Explaining what you are thinking and talking out your decisions is way more important and getting it right. Like if you explained why a recursive loop would've inefficient and a hash table much better, the interviewer should have then said something like what about double global characters or whatever and then maybe have gone back to recursion. It's possible they actually wanted to see if you could write a recursive function instead.