-6
submitted 9 months ago by [email protected] to c/[email protected]

I'm studying programming, and I don't agree woth my teacher. She basically said that if we use break (and continue too maybe) our test is an instant fail. She's reasoning is that it makes the code harder to read, and breaks the flow of it or something. (I didn't get her yapping tbh)

I can't understand why break would do anything of the sorts. I asked around and noone agreed with the teacher. So I came here. Is there a benefit to not using breaks or continues? And if you think she's wrong, please explain why, briefly even. We do enough down talking on almost all teachers she doesn't need more online.

you are viewing a single comment's thread
view the rest of the comments
[-] [email protected] 8 points 9 months ago

It's a very good lesson- to the point where I wouldn't be surprised if the teacher is deliberately putting an arbitrary restriction on the assignment.

If you want to have a career, the people that pay you are going to make you do things that you consider to be ridiculous. That's work, that's life. You've got three options- Just smile and nod and do it their way, get huffy and tell them that you don't like their yapping and you'll do their project your own way, or politely suggest there may be an alternative way, and ask if they are willing to be flexible with some requirements.

[-] [email protected] 4 points 9 months ago

It's a very good lesson- to the point where I wouldn't be surprised if the teacher is deliberately putting an arbitrary restriction on the assignment.

It's not arbitrary. When you start out on a profession, the first thing a good instructor does is make you unlearn the things you already think you know before teaching you the things you need to know. Think of it this way: When you pick up a golf club and start hitting the ball, you'll drive it left and right. First thing you'll be taught is to only hit straight. Even if you think you should try to drive a curve ball, a good teacher will not allow you. Only when you have mastered the basics will he teach you to drive curved balls. So ignore your teachers advice at your own peril, but it will most likely set you up for an expert beginners career.

As a closer, I can tell you this much: I received the same advice almost 20 years ago and now, after being a professional developer for two decades, I can not recall more than five times when a break statement actually made more sense than to rethink the algorithm.

[-] [email protected] 2 points 9 months ago

You guys have so much faith it's contagious. Very motivational words, Thank you.

[-] [email protected] -1 points 9 months ago

I've never considered that she might just be very smart. You're very optimistic. Filled me with hope out of nothing. Thanks!

this post was submitted on 29 Nov 2023
-6 points (41.2% liked)

Programming

17026 readers
83 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities [email protected]



founded 1 year ago
MODERATORS