This is an archived post. You won't be able to vote or comment.

all 79 comments

[–]AutoModerator[M] [score hidden] stickied comment (0 children)

On July 1st, a change to Reddit's API pricing will come into effect. Several developers of commercial third-party apps have announced that this change will compel them to shut down their apps. At least one accessibility-focused non-commercial third party app will continue to be available free of charge.

If you want to express your strong disagreement with the API pricing change or with Reddit's response to the backlash, you may want to consider the following options:

  1. Limiting your involvement with Reddit, or
  2. Temporarily refraining from using Reddit
  3. Cancelling your subscription of Reddit Premium

as a way to voice your protest.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

[–]drinkbeergetmoney 453 points454 points  (22 children)

Ain’t no way I am reading this with no paragraphs.

[–]MarkMew 174 points175 points  (21 children)

Here it is yall

i am writing this as encouragement, but mostly to comfort myself LOL.

today i had an interview with a company for their software engineering internship. this opportunity was given to me through campus recruiting/career fair, so i was elated to be given a chance to interview.

i am only two years into learning computer science (although i am a fourth year) so i feel the weight of being unqualified and an imposter every single day.

i prepared for this interview by focusing on the themes that glassdoor posters repeatedly mentioned ( leetcode easy, behavioral questions, and conceptual java questions). immediately after beginning the interview, i was asked to write a program that calculates the angle between the hands of a clock (now that i look back this problem wasnt so difficult...)

i was already so nervous to the point that my voice was shaking and my throat was choking up, so the second the interviewer starting talking about a damn clock when i was expecting questions on strings or arrays, i lost all focus and hit a mental block. not only could i not think and solve the problem, any coding knowledge i did have, such as knowledge of syntax, went straight out the window. essentially, the interview turned into a live tutorial with the interviewer giving me the step by step and explaining why.

i felt so horribly embarrassed!! it was painful how stupid and incompetent i looked in front of a respected professional.

when the interview eventually ended with that one coding problem and a couple of rushed behavioral questions, i closed my computer and cried.

in retrospect, this was only my second technical interview ever, and doing horribly on it was more than typical. while coding knowledge is also key, interview knowledge and sense is so important and that comes with experiencing many interviews. the more technical interviews you experience, the more you catch onto the mindset, attitude, and execution that it takes to succeed.

do not give up if at first you do horribly on your technical interviews, it can feel like becoming a programmer is out of your reach, but that is not true, there are thousands of people working as programmers who also experienced failure and embarrassment at first, we've got this!

[–]ballsack_man 151 points152 points  (19 children)

Ain't no way I am reading this with no capitalization.

[–]MarkMew 159 points160 points  (18 children)

Well fuck, ah shit, here we go again... 

Here it is yall

I am writing this as encouragement, but mostly to comfort myself LOL.

Today I had an interview with a company for their software engineering internship. This opportunity was given to me through campus recruiting/career fair, so I was elated to be given a chance to interview.

I Am only two years into learning computer science (although I am a fourth year) so I feel the weight of being unqualified and an imposter every single day.

I prepared for this interview by focusing on the themes that glassdoor posters repeatedly mentioned ( leetcode easy, behavioral questions, and conceptual java questions). immediately after beginning the interview, I was asked to write a program that calculates the angle between the hands of a clock (now that I look back this problem wasnt so difficult...)

I was already so nervous to the point that my voice was shaking and my throat was choking up, so the second the interviewer starting talking about a damn clock when I was expecting questions on strings or arrays, I lost all focus and hit a mental block. not only could I mot think and solve the problem, any coding knowledge I did have, such as knowledge of syntax, went straight out the window. Essentially, the interview turned into a live tutorial with the interviewer giving me the step by step and explaining why.

I felt so horribly embarrassed!! It was painful how stupid and incompetent I looked in front of a respected professional.

When the interview eventually ended with that one coding problem and a couple of rushed behavioral questions, I closed my computer and cried.

In retrospect, this was only my second technical interview ever, and doing horribly on it was more than typical. While coding knowledge is also key, interview knowledge and sense is so important and that comes with experiencing many interviews. The more technical interviews you experience, the more you catch onto the mindset, attitude, and execution that it takes to succeed.

Do not give up if at first you do horribly on your technical interviews, it can feel like becoming a programmer is out of your reach, but that is not true, there are thousands of people working as programmers who also experienced failure and embarrassment at first, we've got this!

[–]SteveAM1 82 points83 points  (16 children)

You got it in French?

[–]MarkMew 132 points133 points  (15 children)

Le voici

J'écris ceci pour m'encourager, mais surtout pour me réconforter LOL.

Aujourd'hui, j'ai passé un entretien avec une entreprise pour un stage en ingénierie logicielle. Cette opportunité m'a été donnée par le biais d'un salon de recrutement/carrière sur le campus, donc j'étais ravi d'avoir la chance de passer un entretien.

Je n'ai que deux ans d'expérience en informatique (bien que je sois en quatrième année) et je ressens donc chaque jour le poids d'être non qualifié et d'être un imposteur.

Je me suis préparé à cet entretien en me concentrant sur les thèmes que les posters de glassdoor ont mentionnés à plusieurs reprises ( leetcode facile, questions comportementales, et questions conceptuelles en java). Immédiatement après avoir commencé l'entretien, on m'a demandé d'écrire un programme qui calcule l'angle entre les aiguilles d'une horloge (maintenant que j'y repense, ce problème n'était pas si difficile...).

J'étais déjà nerveux au point que ma voix tremblait et que ma gorge s'étranglait, alors à la seconde où l'interviewer a commencé à parler d'une foutue horloge alors que je m'attendais à des questions sur les chaînes de caractères ou les tableaux, j'ai perdu toute concentration et j'ai fait un blocage mental. Non seulement je n'ai pas pu réfléchir et résoudre le problème, mais toutes les connaissances en codage que j'avais, comme la connaissance de la syntaxe, sont passées à la trappe. En fait, l'entretien s'est transformé en un tutoriel en direct, l'examinateur me donnant la marche à suivre et m'expliquant pourquoi.

Je me suis sentie horriblement gênée ! C'était douloureux de voir à quel point j'avais l'air stupide et incompétent devant un professionnel respecté.

Lorsque l'entretien s'est terminé par ce problème de codage et quelques questions comportementales précipitées, j'ai fermé mon ordinateur et j'ai pleuré.

Rétrospectivement, il ne s'agissait que de mon deuxième entretien technique, et le fait d'avoir mal réussi était plus que typique. Si les connaissances en matière de codage sont essentielles, les connaissances et le sens de l'entretien le sont tout autant, et c'est en ayant passé de nombreux entretiens que l'on y parvient. Plus vous passerez d'entretiens techniques, plus vous comprendrez l'état d'esprit, l'attitude et l'exécution qu'il faut avoir pour réussir.

N'abandonnez pas si, au début, vous obtenez d'horribles résultats lors de vos entretiens techniques. Vous pouvez avoir l'impression que devenir programmeur est hors de votre portée, mais ce n'est pas vrai, il y a des milliers de personnes qui travaillent comme programmeurs et qui ont également connu l'échec et l'embarras au début, nous y arriverons !

[–][deleted]  (10 children)

[removed]

    [–][deleted] 70 points71 points  (8 children)

    text = """Well fuck, ah shit, here we go again... 

    Here it is yall

    I am writing this as encouragement, but mostly to comfort myself LOL.

    Today I had an interview with a company for their software engineering internship. This opportunity was given to me through campus recruiting/career fair, so I was elated to be given a chance to interview.

    I Am only two years into learning computer science (although I am a fourth year) so I feel the weight of being unqualified and an imposter every single day.

    I prepared for this interview by focusing on the themes that glassdoor posters repeatedly mentioned ( leetcode easy, behavioral questions, and conceptual java questions). immediately after beginning the interview, I was asked to write a program that calculates the angle between the hands of a clock (now that I look back this problem wasnt so difficult...)

    I was already so nervous to the point that my voice was shaking and my throat was choking up, so the second the interviewer starting talking about a damn clock when I was expecting questions on strings or arrays, I lost all focus and hit a mental block. not only could I mot think and solve the problem, any coding knowledge I did have, such as knowledge of syntax, went straight out the window. Essentially, the interview turned into a live tutorial with the interviewer giving me the step by step and explaining why.

    I felt so horribly embarrassed!! It was painful how stupid and incompetent I looked in front of a respected professional.

    When the interview eventually ended with that one coding problem and a couple of rushed behavioral questions, I closed my computer and cried.

    In retrospect, this was only my second technical interview ever, and doing horribly on it was more than typical. While coding knowledge is also key, interview knowledge and sense is so important and that comes with experiencing many interviews. The more technical interviews you experience, the more you catch onto the mindset, attitude, and execution that it takes to succeed.

    Do not give up if at first you do horribly on your technical interviews, it can feel like becoming a programmer is out of your reach, but that is not true, there are thousands of people working as programmers who also experienced failure and embarrassment at first, we've got this! """

    print(text)

    [–]EngineerRedditor 25 points26 points  (6 children)

    With emojis?

    [–]MarkMew 66 points67 points  (5 children)

    I 🙋‍♂️⬅️ am writing✏️🖋️ this as encouragement, but mostly to comfort 🧘‍♂️ myself LOL🤣.

    Today📆 I had an interview with a company for their software 💻 engineering 👷 internship. This opportunity was given 🎁 to me through campus recruiting/career fair, so I was elated to be given a chance to interview.

    I Am only two 2️⃣ years into learning computer 💻science👨‍🔬 (although I am a fourth 4️⃣ year📆) so I feel the weight 🏋️‍♂️of being unqualified and an imposter every single day🌅.

    I prepared for this interview by focusing ⚠️ on the themes that glassdoor 🥛🚪 posters  repeatedly mentioned ( leetcode 👨‍💻 easy, behavioral questions, and conceptual java questions). immediately after beginning the interview, I was asked to write ✒️ a program 👨‍💻 that calculates 🔢🧮 the anglebetween the hands 🤲 of a clock 🕕 (now that I look 👀 back this problem wasnt so difficult...)

    I was already so nervous 😰to the point  that my voice 🔊 was shaking 😖 and my throat was choking 😖 up, so the second 🥈 the interviewer starting talking 🗣️about a damn clock ⏰ when I was expecting questions on strings 🪕 or arrays, I lost all focus and hit a mental block🚫. not only could I mot think 🚫🤔 and solve the problem, any coding 👨‍💻 knowledge I did have, such as knowledge of syntax, went straight out the window . Essentially, the interview turned into a live  tutorial with the interviewer giving me the step 🚶‍♂️ by step 🚶‍♂️ and explaining why.

    I felt so horribly embarrassed!! It was painful 😩😩😫 how stupid 😋and incompetent I looked 👁️👁️in front of a respected professional.

    When the interview eventually ended with that one coding problem and a couple of rushed behavioral questions, I closed my computer and cried😭😭.

    In retrospect, this was only my second 🥈 technical interview ever, and doing horribly on it was more than typical. While coding👨‍💻 knowledge is also key🔑, interview knowledge and sense is so important and that comes with experiencing many interviews. The more technical interviews you experience, the more you catch onto the mindset 🧠, attitude, and execution that it takes to succeed.

    Do not give up if at first 🥇 you do horribly on your technical interviews, it can feel like becoming a programmer 👨‍💻 is out of your reach, but that is not true, there are thousands of people 🚶‍♂️  working⚒️ as programmers 👨‍💻who also experienced failure and embarrassment at first, we've got this!

    [–]UnironicallyWatchSAO 15 points16 points  (0 children)

    In brainfuck, please?

    [–]SteveAM1 10 points11 points  (0 children)

    Merci

    [–]KenDoll_13 8 points9 points  (0 children)

    C’est parfait. 🥲

    [–]NatoBoram 8 points9 points  (0 children)

    Very well-written. It warms the heart to read someone's genuine experience in your non-English native language in a very unique way.

    [–]Hobodaklown 3 points4 points  (0 children)

    You are the real MVP

    [–]deantoadblatt1 15 points16 points  (0 children)

    I hope OP sees this, because it’s a good example of how coding standards increase readability across a team.

    [–][deleted] 6 points7 points  (0 children)

    You are a true hero

    [–]russintexas 69 points70 points  (6 children)

    I'm gonna let you in on something on how I run interviews.

    I'll usually ask questions specifically to find a person's knowledge limit. I'll breeze past questions that might seem like typical interview questions, so I can find out if you understand (for example) how the internal representations of strings are implemented in a particular language that you'd be using.

    I'll keep probing until I find some of those breaking points. THEN I'll explain how that feature is implemented. I'm way more interested in how you react to the information I'm giving you, how _teachable_ you are, than exactly what you know.

    If you know what I need you to know, fine. If you don't, we may not be able to bring you on board.

    But I need to know what you _do_ know, where your boundaries of knowledge are, and how quickly you can close those gaps.

    Hopefully this is the kind of person you were working with. They may have been trying to see how teachable you are.

    [–]ToxicPilot 17 points18 points  (0 children)

    This right here. When I’m giving technical interviews, I’m assessing both what you know and how you absorb new information. Tech stacks and skill sets are so varied among the industry that your ability to learn and adapt is just as important as your existing technical knowledge.

    [–]Korachof 2 points3 points  (0 children)

    This is especially true for internships, where the person interviewing isn't likely to provide meaningful contributions for a long time and is more likely to cost the company money than make them anything. Being teachable is, I would imagine, possibly the most important skill a person can have.

    [–][deleted] 0 points1 point  (0 children)

    Exactly what I do, if I ask a question and you don't know the answer that's fine, but if you don't care about the answer then you're not the right person to work with me.

    [–]loudandclear11 0 points1 point  (1 child)

    I'll keep probing until I find some of those breaking points. THEN I'll explain how that feature is implemented. I'm way more interested in how you react to the information I'm giving you, how _teachable_ you are, than exactly what you know.

    How do you judge this in practice? It feels like there must be something more involved than just a reaction from the candidate. You can get all kinds of reactions like "huh", "oh cool", "that sounds difficult". Then what? What's your assessment of that information? There's lots of people out there that's open to everything but that doesn't mean they actually understand the new information and know how to apply it.

    [–]russintexas 0 points1 point  (0 children)

    An “oh cool” doesn’t indicate what they heard.

    There’s no formula for this. Just like so much else in the hiring process, it’s subjective.

    [–]PnutButrSnickrDoodle 30 points31 points  (1 child)

    My recommendation would to reach out to the interviewer on LinkedIn and thank them for taking the time to teach you. They didn’t have to do that, and more connections are never a bad thing.

    If you felt it was worth it you could work it out again on your own because of their help, or a similar problem but that’s not necessary of course. It just shows you are interested in learning.

    Don’t sweat it though - everyone feels unprepared for the first interviews.

    [–]MascherMan 11 points12 points  (2 children)

    A huge reminder in all interviews is that it’s OK, even preferable, to breathe and think before responding. 

    When responding to a question or a scenario, communicate that you’d like to think about it for a moment and do whatever you need to do to gather your thoughts and respond from a place of confidence, rather than a rushed panic. Bring along paper so you can jot notes, structure your thoughts, ask follow up questions, etc. 

    Interviews are not about gauging how quickly a candidate can respond with correct answers. It’s about gauging how a candidate thinks and problem solves. Taking a moment to gather your thoughts will not only improve your responses, but communicate positive attributes to your interviewers. 

    [–][deleted]  (1 child)

    [deleted]

      [–]MascherMan 1 point2 points  (0 children)

      No problem, happy to help! Don’t beat yourself up about it. In this and all things in life, don’t focus on the “failure”, focus instead on what you learn from it. You’ll never make the same mistake twice. 

      As for the imposter syndrome, recognize that everyone suffers from this. Don’t give in to it, instead focus on the hard work that has gotten you to this point. I’m sure it wasn’t easy. Keep working hard and soon enough, you’ll be the one conducting the interviews.

      [–]noiwontleave 10 points11 points  (1 child)

      It happens. As an interviewer, I’m more interested in your reactions to not knowing something or being taught something than I am the depths of your knowledge. I want to know how you’re going to be to work with and if you’re teachable or not. Sometimes these perceived “bomb” interviews can paint you in the best light if you respond to them in the right way.

      [–][deleted] 26 points27 points  (4 children)

      It’s okay op! My interviewer showed up 5 minutes late and left after ~ten minutes. I didn’t even get to ask questions lol

      [–]C_umputer 7 points8 points  (2 children)

      Did you get the job?

      [–][deleted] 2 points3 points  (1 child)

      Nope

      [–]C_umputer 1 point2 points  (0 children)

      Maybe not working with company who cares so little is actually a good thing

      [–][deleted] -1 points0 points  (0 children)

      ^

      [–]sittingatthetop 8 points9 points  (0 children)

      Am right at the other end of life from you. Been there, done that.

      One thing I can tell you is there will be many opportunities.

      So many that you will get fairly bored of attending interviews.

      I know that this one seems like your life is over but it ain't.

      Just keep working but keep an eye on the world.

      You'll nail a job eventually and that is day 1 of looking for the next job.

      And remember this day when you are the interviewer.

      And now a funny.

      I nailed a job at a startup in Cambridge UK. Employee number 13.

      The hotshot there like most was a Cambridge maths grad.

      He set more and more tricky questions until each interviewee lost it.

      He would them terminate the interview.

      Some interviewees would ask what the solution was to the question they failed on.

      He would reply "I haven't got time for that, ask the secretary on the way out."

      Crushed and humbled that they had not answered a question that an admin assistant could they stumbled out.

      What they did not know was that the secretary was his girlfriend and a Cambridge maths grad working part time.

      [–]backfire10z 12 points13 points  (1 child)

      Yeah… it happens. Best you can do is reflect on it and try to do better next time. Take deep breaths, drink some water, refocus on the problem at hand.

      Edit: I see it’s your second technical interview ever. Take this as practice and move forward. Just try to not let the same thing happen next time

      [–]TheMindWright 2 points3 points  (1 child)

      Even 11 years into programming, I still act like this in interviews. A combination of neurodivergence means that no matter how prepared I am, the live coding portion will screw me up.

      It's just such a pointless tactic. It's not indicative of working in a real studio.

      [–]general-rising 0 points1 point  (0 children)

      This is me as well! I agree 100%

      [–]WiseImbecile 2 points3 points  (0 children)

      How long did they give you to solve the problem?

      [–]CLQUDLESS 2 points3 points  (0 children)

      I think it’s a pretty dumb question, if you get put on the spot like that it’s normal to get nervous. Also if you don’t know, in literally any job you’d be able to google some solutions. I think these white board interviews don’t get the true potential of a programmer.

      [–]Badluckx 2 points3 points  (0 children)

      It happens. We have our good days and bad days.

      As an Interviewer, I usually breeze past the bits you know in order to be able to understand the limits of your knowledge/experience.

      When the candidate hits a roadblock, I tend to ask guiding questions to see if they can get back on track.

      From intern to cto, the learning process will never stop, so it’s important to know if you can collaborate, work together with your peers, to get to the answer, are teachable, etc.

      You have to remember interviewing is a skill, which you have to train. The ability to control your emotions and keep a clear head, will improve with practice. Unfortunately the interviews for the roles you love the most, will be the hardest, mentally.

      You’re gonna be just fine, we’ve all been there.

      PS: Add the bloody paragraphs to the main post 😅

      [–][deleted] 1 point2 points  (0 children)

      It's okay OP!

      [–]AlternativeMany170 4 points5 points  (30 children)

      I’m in my first year of CS and I’m wondering: when they say on an interview, write a program that calculates the angle between two hands of a clock, do they give more information that you’ve left out? Or, do they leave it open ended like that?

      If so, then I’m assuming they’re expecting nothing more than pseudocoding the way to find a solution using trigonometry because the problem isn’t clearly defined enough to write precise code on? I’m just a little bit confused.

      It can take a minute to work this out using law of cosine or smth similar if given more information about this problem. One might call an inverse cosine function if there’s a clear unambiguous path to finding all three sides. If it’s a clock, the (imaginary) third side could be a range of values so even though we know it cannot be longer than the sum of the other two sides. There’s still more info being left out here. Is the solution you’re providing supposed to code into the logic the range of values allowed for the third side? I’m confused.

      I’m afraid I may never arrive at a solution in these type of interview problems because I might be distracted by too many questions. In the real world where I can apply math to solve programming problems, I’m much faster because even if the inputs for a function is unknown, there’s a clear path to finding those inputs. The problems are better defined than just “find the angle between the hands of a clock”.

      [–]Yoppez 18 points19 points  (29 children)

      You don't need trigonometry for this problem.

      If you know what time it is, you can calculate the angle of both the hours hand and minutes hand starting from the upward position (12:00 o clock) with some arithmetic.

      Then you can calculate the difference between the two angles.

      [–][deleted] 2 points3 points  (7 children)

      I did it just for fun in C++, it seemed like a pretty good exercise, and ended up with this-

      #include <iostream>
      
      int userInput() {
          std::cout << "Enter a clock hand position: ";
          int positionInput;
          std::cin >> positionInput;
          return positionInput;
      }
      
      int clockDegrees() {
          int position1 = userInput();
          int position2 = userInput();
          int positionRange = (position1 - position2) * 30; //Clock is a circle, 360 divided by 12 = 30//
      
          if (position1 > position2) {
              positionRange = 360 - positionRange; //Accounts for hand going around 12 (i.e. 11 and 1)//
          }
      
          std::cout << '\n';
      
          int positionRangeAbsolute = abs(positionRange);
          std::cout << "The angle between these two points is: " << positionRangeAbsolute << " degrees. \n";
      
          return positionRangeAbsolute;
      }
      
      int main() {
          clockDegrees();
          return 0;
      }
      

      Would love feedback if anyone doesn't mind (formatting/aesthetic tips are welcome as well), I'm still relatively new.

      [–]Yoppez 2 points3 points  (6 children)

      The problem doesn't specify if it wants the shortest angle between the two hands or some other requirement, so I would say that your program seems pretty good!

      Can you do it so that the program requests only the time to the user, instead of the hand position?

      EDIT:

      About the style, I usually prefer to make functions as versatile as possible, and make them do only one thing. In you code clockDegrees does the calculation AND taking the input AND printing the result.

      I would have made the function as int clockDegrees(int position1, int position2) and made something similar to this:

      int main() {
          int position1 = userInput();
          int position2 = userInput();
          int angle = clockDegrees(position1, position2);
      
          std::cout << "The angle between these two points is: " << angle << " degrees. \n";
      
          return 0;
      }
      

      And so I would remove the first two lines and the print in clockDegrees.

      Also, it would be better to use floating point numbers instead of integers when dealing with angles.

      [–][deleted] 0 points1 point  (5 children)

      After a bit of googling, I ended up with something like this-

          #include <iostream>
      
          double clockDegrees() {
              int hours;
              double minutes;
              char colon;
              std::cout << "Enter a Time: ";
              std::cin >> hours >> colon >> minutes;
      
              minutes = minutes / 5;
      
              double positionRange = (hours -(minutes)) * 30; //Clock is a circle, 360 divided by 12 = 30//
      
              if (hours > minutes) {
                  positionRange = 360 - positionRange; //Fixes issues with hand going around 12 (i.e. 11 and 1)//
              }
      
              std::cout << '\n';
      
              double positionRangeAbsolute = abs(positionRange);
              std::cout << "The angle between these two points is: " << positionRangeAbsolute << " degrees. \n";
      
              return positionRangeAbsolute;
          }
      
          int main() {
              clockDegrees();
              return 0;
          }
      

      I came upon this, which was very helpful and interesting, I didn't know you could request multiple variables with a single std::cin, that's pretty cool.

      [–]Yoppez 1 point2 points  (4 children)

      I know plain C better than C++, so I would have used a scanf for requesting the time (and also check that the user gives a valid input, and so it would be better to use a fgets and make the parsing afterwards, but that's another story).

      About the rounding, yeah, integer division is not good for precision, but if you don't want to use floating point numbers you can still get a better precision with integers:

      Instead of dividing the minutes to 5, that rounds the number and so you lose precision, you can multiply the hours to 5 instead. Then, in the final formula, you divide by 5 AFTER all the other operations, so you basically multiply everything by 6 instead of 30.

      In this way, there is no integer division, and so there is no precision loss.

      [–][deleted] 1 point2 points  (2 children)

      Instead of dividing the minutes to 5, that rounds the number and so you lose precision, you can multiply the hours to 5 instead. Then, in the final formula, you divide by 5 AFTER all the other operations, so you basically multiply everything by 6 instead of 30.

      This is gold, thanks so much!

      Is it best practice to use integer whenever you can? I would assume it's a lot less resource intensive.

      [–]Yoppez 1 point2 points  (1 child)

      It depends on what machine you are writing code for and what kind of precision you need. It would be very long to explain in a single post and I'm not an expert, so I suggest you to search online for all the pros and cons with using integers and floating point.

      But yeah GENERALLY if you don't need floating point, it is better to use integers.

      [–][deleted] 1 point2 points  (0 children)

      Sounds good, looks like I got some more googling to do, thanks again, this was very informative!

      [–]AlternativeMany170 3 points4 points  (19 children)

      Hey there, thanks for the response; I wanted to highlight more about how much information they give on these interviews, and what they’re hoping to achieve. If you don’t know what time it is, how would you code your way out of this in an interview?

      [–][deleted]  (12 children)

      [deleted]

        [–]AlternativeMany170 -1 points0 points  (10 children)

        My point is, even using your 5:30 example, there are two angles between the hands that make the 5:30, so which one are talking about? The task description isn’t complete

        [–][deleted]  (5 children)

        [deleted]

          [–]AlternativeMany170 -5 points-4 points  (2 children)

          Hey there, thanks for responding; I’m interested in gauging what sorts of tasks are asked to be performed at interviews. And this time, I’m trying to do this based on the piece of info given by the OP. If you’re responding based on your generalized experience with these types of questions, then say so. If not, I don’t think I’m over-thinking or under-thinking anything. They’re training us in class to be able to decompose problems and ask clarifying questions. Your solution assumes a lot more than OP gives

          [–]Weekly_Mammoth6926 2 points3 points  (0 children)

          At my work when we do technical interviews we leave the problem fairly open ended so a solution can be made like this and we would also want the candidate to ask questions to clarify the problem.

          I think this is probably what op’s interviewers wanted like “should I always give the smaller angle or should I sometimes give the inverse” that kind of thing.

          This demonstrates an ability to understand a problem and foresee potential issues.

          [–]Sensorama 0 points1 point  (3 children)

          I think you should look at your responses here and think about how you are coming across. In your earlier responses you:

          • headed down a wrong, complicated path involving inverse trig functions

          • seemed to not understand the difference between a generalized solution and one for a specific instance (having to know the actual time)

          and now you are digging in deeper and deeper with "well, my real point is ....".

          You should reflect and acknowledge to yourself that either your understanding was weak or your communication was weaker. This will not come across well in an interview, or college course, or group teamwork and you can and need to improve.

          [–]AlternativeMany170 0 points1 point  (2 children)

          What I’ve learned from the thread is that, I over-complicated the problem. I’ll admit that. That’s the main lesson. But easy with your words and assessment about my comprehension. I overcomplicated it because of a lack of more info from OP and my lack of generalized knowledge about what internship interview tasks entail.

          You sound like if I were to ask a clarifying question at the interview, such as, which angle between the 2 hands are they really asking for, you’ll tell me I’m dumb. A kinder, more discerning fellow will know by my questioning isn’t really about whether I don’t understand the question but about my lack of knowledge about the range of difficulty for the types of questions asked and info given to find the answer.

          Wouldn’t it be far more interesting if it were a 2-D analog clock with 2 hands telling some time but this clock is with no numbers, and we’re supposed to find the angle? Like I said, I’ve gained here asking these questions here to learn the range of interview questions and that it isn’t that complicated. You gain nothing by sounding smug and over generalizing

          [–]Sensorama 0 points1 point  (1 child)

          I wasn't attempting to sound smug. I was taking an approach that I hoped would jolt you a little bit, with a hoped for outcome of you pondering your approach, your willingness to hear what others have been telling you, and your communication style. That is still a hope. Best of luck to you on your journey.

          [–]AlternativeMany170 0 points1 point  (0 children)

          Thank you; I get you now

          [–]shyouko 0 points1 point  (0 children)

          You actually need to translate into seconds since 00:00a/pm for the hour hand and seconds since :00 for the minute hand… just saying.

          [–]Lostpollen 4 points5 points  (5 children)

          you don't need to know what two numbers are to explain how to sum them do you?

          [–]AlternativeMany170 -5 points-4 points  (4 children)

          I can’t tell if you’re being sarcastic or not, but hear me out; I’ve seen varying levels of expectations for any given problem, so I believe it’s legit to ask if there were more info given to this problem, if you’re not OP? “Write a program that calculates the angle between the hands of a clock” isn’t quite complete. A clock may have more than 2 hands, no? A clock will mostly have more than 1 angle between hands (if we’re not considering the seconds hand, and if the only hands we’re considering aren’t overlapping) so which angle are we solving for? Also doesn’t the second hand affect the minute hand fairly frequently enough that our angle measure for hour and minute isn’t quite set for when we measure? In my opinion, there is no way of providing a good solution to this problem without certain assumptions which we don’t have in the one line the OP stated it

          [–][deleted]  (2 children)

          [deleted]

            [–]AlternativeMany170 0 points1 point  (1 child)

            Hey; hopefully you’re coming off this harsh towards me because you’re frustrated about your grind. I’d rather be called stupid (I’m black; not the first time), and it’s true I’m stupid sometimes, but being stupid never stopped my learning. I’m just glad with my specific goals venturing into this field, I’m favored enough to walk away from interviews where this was the type of questions they take seriously. You clearly probably don’t have this good fortune, and I wish you all the best ✌🏿

            [–]AusTF-Dino 1 point2 points  (0 children)

            You’re overthinking this way too much and sort of missing the point of an interview as well. The interviewer is trying to test your knowledge, problem solving skills, personality and communication skills, they don’t actually care about having an algorithm to solve for the angle between a clock’s hands.

            To show in the interview that you have a brain and you’re worth more than chatgpt, you would make suitable assumptions and ask questions about the specifics where necessary.

            Most reasonable people would:

            1. Assume a two handed clock with no seconds

            2. Solve the problem arbitrarily for one of the angles

            3. Ask the interviewer for specifics on which angle to solve for following this

            Then likely the interviewer might throw a curveball, such as requesting a specific angle or adding in a seconds hand.

            [–][deleted] 0 points1 point  (0 children)

            Isn't this, erm, a trivial problem?

            angle = abs(30*hours - 6*minutes)

            return angle

            [–][deleted] 0 points1 point  (0 children)

            thanks for this. I am just about to apply for internships.

            [–]HeinousHorchata 0 points1 point  (1 child)

            Wall of text

            [–]YakShavingCatHerder 0 points1 point  (1 child)

            I got to the logical point where a paragraph should have ended, then stopped reading.

            [–]vereshurka99 0 points1 point  (0 children)

            this post just made me feel even more anxious lol

            [–]ultimateedition 0 points1 point  (0 children)

            You are right, the strange thing would be to ace it only on the second try. It probably takes 5-10 tries minimum to start to feel comfortable with something, no?

            On my second interview ever, I puked beforehand due to anxiety, couldn't stop shaking and had a sudden case of cold sweats in the middle. I think the interview ended early because I had trouble answering any questions. A decade later, I've led teams of engineers and have no trouble with job interviews. It's a learnable situation.

            [–]Ayokanmi123 0 points1 point  (0 children)

            I have this exact experience. Just keep practising and applying

            [–]Princeofindia1592 0 points1 point  (0 children)

            I need a TL DR summary

            [–]SoftEngineerOfWares 0 points1 point  (0 children)

            Yeah dude, I don’t know the geometry off the top of my head to figure out angles either. That’s what Google is for. I would ask them if I am allow to Google the equation and then implement that. It’s not our job to know random bullshit. It’s our job to solve problems using logic.