just returned from an Interview - /g/ (#105856531) [Archived: 436 hours ago]

Anonymous
7/10/2025, 10:33:23 AM No.105856531
592
592
md5: ba8b02292add9f0370a8a9e6a47bbab7🔍
i studied python, design patterns, i learned abstract classes, threads, multiprocessing,... i was ready for it all


>what is the else clause in for, for?
excuse me, what?
>the else, in for loop sir
i'm sorry you mean if else, inside a for loop?
>sir we really appreciate your time for this interview *pats me on the back + smile


WHAT THE FUCK DUDE
Replies: >>105856561 >>105856607 >>105858718 >>105859439 >>105859767
Anonymous
7/10/2025, 10:37:43 AM No.105856561
>>105856531 (OP)
the for else construct in python is very stupid but it does exist, given that you not only picked python, you aren't aware of it's syntax and that you tried to correct the interviewer when you were wrong really looks bad on you.
Replies: >>105856573 >>105856585 >>105856782
Anonymous
7/10/2025, 10:38:32 AM No.105856566
Do retards really use the else clause of for loops in python? It's probably the stupidest shit in the whole language.
I can never remember if it's run on gotos (break) or not either or if it's just a finally block for a loop in disguise.
Replies: >>105856584
Anonymous
7/10/2025, 10:39:38 AM No.105856573
>>105856561
No, he's right to mock the interviewer for even mentioning it.
Anonymous
7/10/2025, 10:40:33 AM No.105856579
Memorizing language constructs is a stupid thing to ask since you don't need any skill or thinking to answer that, but they probably thought for-else was rudimentary enough in python for you to know it

Is it the first language you learned?
Anonymous
7/10/2025, 10:41:41 AM No.105856584
>>105856566
Yes, it's very useful for cleanly knowing if you haven't exited early from a loop instead of using some flag variable
Replies: >>105856631
Anonymous
7/10/2025, 10:41:44 AM No.105856585
>>105856561
Everyone pretends python's syntax is simple but it's one of the more complex languages syntactically.

Never let the FP autism into your programming language. Not even once.
Anonymous
7/10/2025, 10:42:26 AM No.105856589
OP being a dumb frogposter who doesn't understand his own language of choice aside, what is the point of these interviews? Your awareness of specific nice structures of a language doesn't make you a good engineer, you can Google that shit in 5 minutes if you ever encounter it and it won't make your code better if you use it. A software engineer needs to understand which algorithms to use and when to use them, and how to write performant and secure code, not arcane bullshit in the language standard
Replies: >>105856604 >>105856608 >>105856620
Anonymous
7/10/2025, 10:44:44 AM No.105856604
>>105856589
You clearly don't have a job. 95% of programming is code to move data around and abstractions over that that make sense for your business logic. No one writes "algorithms" except for niche cases.
Replies: >>105856616
Anonymous
7/10/2025, 10:44:58 AM No.105856607
>>105856531 (OP)
Don't worry, they were probably a shitty place to work for. Knowing for/else doesn't matter but they were just testing to see if you had crammed obscure Python syntax, as a proxy for whether or not you really wanted the job.
Anonymous
7/10/2025, 10:45:07 AM No.105856608
>>105856589
>doesn't make you a good engineer,
It's better than it initially seems. The more time you spend reading random code in a language the more you'll trip over weird stuff like this. It indicates familiarity which is otherwise super hard to test for in such a short period of time.

Remember: what they want is someone who can absorb complexity and produce solutions by becoming familiar with their insane corporate code base. It's not about being a good programmer, it's a weird social+strength thing. That's why interviews are so weird.
Replies: >>105856616 >>105856617
Anonymous
7/10/2025, 10:46:36 AM No.105856616
>>105856604
>>105856608
So it's a code monkey position? OP never had a chance, he can't compete against an indian
Replies: >>105856630
Anonymous
7/10/2025, 10:46:38 AM No.105856617
>>105856608
Yeah but you can't assume interviews are also perfectly put to meet this.
Anonymous
7/10/2025, 10:46:42 AM No.105856620
>>105856589
Right but the point was that he could have asked to google it in 5 minutes or he could have been a fucktard and go "lol wut u mean [wrong thing] right?" 100% deserved.
Anonymous
7/10/2025, 10:47:40 AM No.105856630
>>105856616
code monkey is when you don't reimplement quick sort 10 times each day
Anonymous
7/10/2025, 10:47:41 AM No.105856631
>>105856584
How? I just checked and it's even worse than I remember. Else verbiage imo implies early loop exit or maybe semantically could be, if-never-ran (as in empty iterator). Simply executing on loop end without break is retarded.
Replies: >>105856638
Anonymous
7/10/2025, 10:49:05 AM No.105856638
>>105856631
Language constructs don't have to make sense to you
Anonymous
7/10/2025, 11:10:49 AM No.105856782
>>105856561
saar please
Anonymous
7/10/2025, 3:16:01 PM No.105858718
>>105856531 (OP)
>he didn't read the official documentation
https://book.pythontips.com/en/latest/for_-_else.html
unironically ngmi
Replies: >>105859423 >>105859439
Anonymous
7/10/2025, 4:35:18 PM No.105859340
you made it up
Anonymous
7/10/2025, 4:46:05 PM No.105859423
>>105858718
>"the official documentation"
>quotes not the documentation but literally the first google result of "python for else"
you're ngmi either
Anonymous
7/10/2025, 4:47:56 PM No.105859439
>>105856531 (OP)
>>105858718
>for loops also have an else clause which most of us are unfamiliar with. The else clause executes after the loop completes normally. This means that the loop did not encounter a break statement.
>Using break inside a for
>Using break at all
Sirs...
Replies: >>105859446
Anonymous
7/10/2025, 4:49:15 PM No.105859446
>>105859439
abandoning goto has been a disaster for programming
Anonymous
7/10/2025, 4:49:20 PM No.105859449
1740550996949958
1740550996949958
md5: 6758cc4c1c61bfc1fdbed946884a07fb🔍
for (int i = 0; i < n; ++i) { ... } else { ... } should the else branch be taken when i < n on the first iteration or act more like finally in common lisp
Replies: >>105859479
Anonymous
7/10/2025, 4:53:04 PM No.105859479
>>105859449
Definitely the latter. Reading that I would not expect the else clause to execute until i < n is false.
Anonymous
7/10/2025, 5:29:43 PM No.105859767
>>105856531 (OP)
When interviewers use shitty gotcha/brain teaser questions like this it means they didn't want to hire you in the first place.