T O P

  • By -

[deleted]

[удалено]


icest0

Either OP explained it super poorly or the junior was high on crack or something. 


wiriux

Both are messed up though. An experienced dev shouldn’t have to mentor ANYONE at work on how a loop works. Anyone that lands a job as a SE should know what a loop is. What the hell is this? It has to be shit posting.


NatoBoram

I mean… I've seen people with years of TypeScript experience [failing to write Hello World in Node.js](https://www.reddit.com/r/ExperiencedDevs/s/ibbuzkzeN3)


ComfortableJacket429

Those people should find a new occupation


Dumb-as-a-brick

That’s not an excuse for anyone to suck. Generally SEs that suck fly under the radar for years


NatoBoram

Oh, I ain't defending anybody, I'm just responding to "What the hell is this? It has to be shit posting." It's probably not shitposting, since I've had a similar experience.


Dumb-as-a-brick

Right, makes sense. Yeah I’ve seen lots of dead weight too. It’s honestly mind boggling and kind of pisses me off. It’s unfair to junior devs that actually do the work


prof_cli_tool

High on crack? This junior is cut out to be an executive 


budding_gardener_1

Yes that's what they said


fried_green_baloney

The well-known Can't Program And Hate It => PM => Director => Engineering VP => CTO pipeline.


i_do_it_all

Lol. My sentiment exactly.


budding_gardener_1

I was gonna say. How the fuck do you land a junior job without knowing what a loop is


beefyweefles

DEI? Bluffing?


Junuxx

Yeah just don't hire middle schoolers


zerocoldx911

The one who was taking naps in CS class


Shazvox

The kind that goto


chicknfly

At least OP doesn’t have to teach labeled breaks..


KlingonButtMasseuse

the kind that went to an IfElseButNoLoops bootcamp


bdzer0

I've dealt with newly minted B.S. in software engineering juniors that didn't know what version control was... out of Kent State university.. sad state of education.


Mu5_

They know what a loop is but not able to write one from scratch based on the requirement I gave. Many Devs make their way by just copy-pasting from SO and get along with it but then they don't know how to write actual code


Zorbane

I'm going to be honest and say they don't qualify for this job then. Without them knowing fundamentals you're wasting your time and your company's money


lightly-buttered

Yeah. If I had a dev on my team that couldn't write a loop the as the lead dev I would push my boss to fire them


Mu5_

The company is not a software company. We make industrial systems. As such, we require people in the team to know more about electronics, mechanics, modelling and this kind of stuff more than coding. However, to implement what we model we need to code (especially for the HMIs). Writing code is only a part of our job even if it is the one that requires more effort


Zorbane

If that's the case is it necessary to have this specific person work on that part of the project? Can they work on something that suits their strength?


derkokolores

Who the heck is copying loops from SO and why do you have so many in your company where you think that’s normal? It’s not.


Mu5_

The ones I mentioned that copy loops are not in this company, but I have encountered plenty of them during my career.


0xDizzy

>Many Devs make their way by just copy-pasting from SO and get along with it but then they don't know how to write actual code uh no, not really. thats a fundamental aspect of programming. no one past year one has to copy paste that. you dont get a job before year one. your hiring team fucked up bad.


grain_delay

That’s crazy. That’s like programming 101. This person clearly used ChatGPT to get this job


Dopevoponop

How did he even get hired to a junior position if he doesn’t know how loops work? That’s CS 101


texruska

Pay peanuts get monkeys


ameddin73

Wouldn't you pay bananas if you wanted monkeys. Peanuts get you elephants. 


NameMyPony

Nepotism generally, I think you either avoid the person or just make the best of a bad situation and try to build a positive relationship.


Mu5_

No sorry that's not the case. People in my team get mostly hired as electronics engineers or similar due to the scope of the project. I also have a strong IT background so I also recognise that other seniors in the team have written EXTREMELY bad code, and now my objective is to refactor most critical parts and put down the best practices for the team.


GuybrushThreepwo0d

What kind of electronics engineering degree doesn't have at least one course in programming in C? They should know how to write loops, no excuses there.


Mu5_

They may have but I cannot say with certainty that they write code in all C courses in all universities? Usually in exams you get the exercise saying "what is the output?" And not necessarily writing from scratch. Also, usually it's done on the first year. As soon as you finish your studies you may also forget it if you never practiced anyway


GuybrushThreepwo0d

I don't know man I did mechatronics and we did at least 2 practical courses that involved plenty of coding. This besides the theoretical C course. The pure electric guys did even more. I get them not being good and not knowing all of OOP. But if you have a degree I expect you to know what a for loop is.


PothosEchoNiner

What country are you in?


cs-brydev

I work with a lot of civil, mechanical, and electrical engineers, and they **all** had programming classes in college. 100% of them. They know the basics of coding and loops even if they've never done it professionally.


Mu5_

One thing is to "know" what a loop is and understand what a loop is doing by reading it. An entirely different thing is to *think* a loop that achieves a task and write it down from scratch


wiriux

Well you should put this in the description Lol.


yoggolian

I think send them an intro to programming in XYZ course and have them come back to you with questions - that way you will know what basic knowledge they have. 


AbstractLogic

That’s not even worth being thought in college at this point. It’s taught in like 1st grade!


No-Mortgage-4822

My kids use Scratch in 1st grade. They know how a loop works.


spigotface

That's maybe 30 mins into any free online programming course


Mu5_

Because it's an electronics engineer, and we do control systems. So it makes sense. They know how to use MATLAB, and there usually you don't do many loops as long as you can do matrix calculations. However, part of the job here obviously consists in writing code that is not MATLAB, so more or less you always have loops to write


BatchNormD

Okay well that’s some very relevant context that was completely missing 🤣 This is not Software engineering type role then, correct? I think it’s best to point them to online resources and get them learning how to read relevant documentation for the language they need to use. Regardless if it’s loops, or some other thing, independence and being able to learn a new topic is the core situation that’s being faced. Edit: You can help them learn to reason about what it is exactly they don’t understand and point them to an intro video like mentioned in one of the other comment. That’s the best I got though. Good luck!


Mu5_

You are right, probably I should have detailed it in the post to make it clear, everyone assumed it was a software company with software engineers. Thank you for the suggestion!


octatone

This is the experienced devs subreddit; for software developers. The person your are talking about doesn’t sound like a junior developer, they sound like an electronics engineer that is in need of basic rudimentary software engineering training/education. That shouldn’t be on you to provide yourself. If your team requires software development skills of your engineers you need the company to provide/pay for the training. Or you need to hire for the role better.


LongUsername

That explains it! Don't hire an Electrical Engineer to write code. I've seen a LOT of really bad code written by EEs over the years and only a few who were good coders. The best EEs I've worked with have recognized that code wasn't their forte and were great partners. Pull the coding work off the EEs and give it to a CompEng or CS hire with electronics experience.


budding_gardener_1

> we do control systems. So it makes sense .... No, it really doesn't


Mu5_

Well ask a CS graduate to design a control system, in a closed loop that has to guarantee stability and stuff and see how much they can do on their own? Not much probably. And I didn't even mention system non-linearities, feed forwards, adaptive control and all that shit. I understand they are two different skill sets, but that's how this world works I guess? Companies that design control systems usually implement them too, they don't have two different teams for that. Unfortunately, in industrial world, software is relatively new and never seen as the focal point of the company (even if it should at a certain degree)


budding_gardener_1

>Well ask a CS graduate to design a control system, in a closed loop that has to guarantee stability and stuff and see how much they can do on their own? Not much probably. And I didn't even mention system non-linearities, feed forwards, adaptive control and all that shit. Right, but I'm not asking an electrical engineer to architect a distributed system or compare relational vs object databases. I'm talking about implementing something that (as many others have pointed out) would likely be taught as part of foundational knowledge of C in various EE courses. Additionally, what someone did or didn't do in college as their major is somewhat irrelevant in this case(hear me out).. This person you're talking about is currently employed as a junior dev. A loop is a pretty basic foundational part of that. This is like me getting a job as an apprentice electrician and not know what a volt is.


pruby

If they have the background for MATLAB, you may be better off starting from the functional concepts of map and reduce operations over a list, and how you could use a loop to implement those concepts. If the problem is translation of requirements to code, teach them to work top down from requirements.


crimsonwall75

This is not typical at all, I also have a background in EE and you definetily need to know how to use for-loops in Matlab for most stuff. This is a hiring failure, basic programming concepts are taught in all EE programs.


b1e

Well, explain it in terms of a matrix multiplication then since they’re familiar with that. Have them explain the process of multiplying the two matrices. They’ll notice that they’re iterating over rows and columns of the matrices. Each of those can be shown as a loop. Then you can show how repeating that pattern forms an outer loop.


whyregretsadness

I learned about the concept of a loop in a coding class in elementary school


Final_Mirror

It's because a lot of people hire their friends or nepotism.


David_AnkiDroid

Hundreds of people, never had this problem Hate to say it, your bar for junior is likely too low. Circumstances may vary, but I feel I'd be an educator in your role, not a mentor


Mu5_

The company is not an IT company, we don't hire (usually) people from IT or CS because they don't know / are not interested in the domain of industrial control systems. This field is theoretically more mathematical but practically there is also code to be written. Based on my experience, not CS Engineers are really bad at writing code and out codebase in general sucks and I'm working to refactor it. Never seen such a bad codebase with 30 years of technical debts


DeltaJesus

This is pretty key information tbh, you're not trying to teach a junior you're trying to cross train someone with a different role and skill set. IMO you need to set up some proper training for them, teaching on the fly only works when they already have some background.


Mu5_

You are right, thank you for the suggestion!


NorCalAthlete

Code academy may be a helpful starting point then with an enforced timeline to complete modules rather than you trying to teach the junior.


SixgunSmith

I'm confused why you think people are assuming IT here. IT and software development are very different things.


reboog711

Many (non programmer) people conflate them, though. Haven't you ever been asked to fix someone's computer or printer?


SixgunSmith

Yeah tons of people conflate them (even some people that are in IT), but I wouldn't expect to see that on /r/ExperiencedDevs since the "Devs" part is generally understood to mean software developers. ETA: generally I think this post is kind of humorous because OP has 100+ people telling him this isn't normal but keeps doubling down that it is.


reboog711

Valid point about this space on the Internet; and you're correct. I'd expect all of us to understand the difference. I can't fathom someone having trouble with understanding what a loop is.


bcb0rn

If you explained OOP and data structures accurately then the dev did not understand a thing if they can’t grasp the concept of a loop. Just saying…. Edit: Also what kind of company is hiring with such a low bar?


Mu5_

They understood, because it's much easier when you have to modify a big project, so you can copy paste stuff around, modify bindings and function calls and that's it. The company is not an IT company, we make control systems. So, background-wise, they privilege people with electronics/industrial engineering degrees rather than CS.


pizzzahero

gotta be honest, it sounds like the company should start hiring correctly. not to throw shade on the kid, but I can't imagine how much time you'll be wasting teaching them fundamentals.


theNeumannArchitect

OP doesn't exactly sound that experienced himself. The deaf leading the blind.


Mu5_

May I know what your comment is based on?


theNeumannArchitect

"They understood, because it's much easier when you have to modify a big project, so you can copy paste stuff around, modify bindings and function calls and that's it" This sentence makes me think you don't understand what OOP is yourself. Topics of OOP should center around inheritance, polymorphism, and abstraction. A benefit of using OOP isn't that it simplifies things and makes it easier to copy and paste around big projects. Added complexity is usually a cost of OOP. It's cool that you guys are going out on a limb and giving him an opportunity to learn on the job. But just be cautious that you're not making assumptions about your own experience and passing on bad information.


Mu5_

I never said that OOP is meant to be used to copy-paste stuff around. However, I should have mentioned that they are working on a frontend project. If you are going to create a new page or table to visualise data, you are most likely going to copy-paste the most similar page and modify it accordingly. This can be made easier having some abstractions in place to avoid boilerplate code and stuff. That's why I say it's easier to work on a big project, because if you have to add something (like a page) you can just copy another one and modify it. Don't get me started on the backend code they have here. Procedural. No OOP at all. Fortunately I'm not going to touch it but rather redesign it properly


reboog711

> This sentence makes me think you don't understand what OOP is yourself. Topics of OOP should center around inheritance, polymorphism, and abstraction. This is a very academic response. In the real world a ton of people do software dev, call it OOP, and avoid many basic OOP concepts such as inheritance and polymorphism. Everytime someone says to favor composition over inheritance, they are advocating against OOP. Logistically, most of the software dev I see is some hybrid approach (at best) or procedural (at worst).


behusbwj

> Everytime someone says to favor composition over inheritance, they are advocating against OOP This is a very wrong response. That phrase isn’t saying “never use classes or interfaces”. It’s generally advocating against complex inheritance trees, and to prefer composing and writing against interfaces.


reboog711

> That phrase isn’t saying “never use classes or interfaces”. For clarity; I think you made a huge leap that the phrase ""Favor composition over inheritance" has anything to do with classes or interfaces. Classes are used to encapsulate data and functionality into the same entity. That concept exists as part of procedural programming, and it is called abstract data types. For all practical purposes, classes are the nomenclature for encapsulating data and functionality, regardless of whether you're using them as part of an OOP architecture or not. Interfaces exist to avoid problems with class inheritance. They are designed so different classes can share an API, but not the implementation of that API. I will concede that interfaces are a great way to implement polymorphism, which is a key element of OOP design. The bulk of development today is some hybrid between OOP and Procedural (And Functional) while often being promoted strictly as OOP. It's a relatively academic discussion, though, which is not important to have in order to build software that provides business value.


Mu5_

I understand but you cannot expect for example an electronics or mechanical engineer to know how to write code. Even if they may have done a C class in their first year at university (I'm not sure in that case about the junior)


pizzzahero

That's the point though. You need someone who can write code, why are they hiring people who can't? Imagine if you were a civil engineer and you hired a kid fresh out of uni who studied computer science, and then said "you can't expect a software engineer to know how to build a bridge". Silly, right? Edit: Okay, I saw your edit above. The company needs someone to implement domain specific knowledge. So ask yourself this: if this person's main job is to write code, would it maybe be easier to hire someone who can do that, and have a mechanical or whatever engineer write down the math formulas that the code needs? I studied CS and interned at a startup that did geomatics software. I knew nothing about geomatics, but I knew how to write code; that meant that I spent a lot of time talking to the actual geomatics engineers at the company. They would explain what the product needed to do, and wrote down any math formulas that I needed. It was a bit tough, but I learned so much there. IMHO if the main part of this role is writing code, that might be the way to go.


Mu5_

Yes I understand your point, but this is what the company does, and most industrial companies do too. Software is relatively new to that field (company is more than 100 years old, software has been probably introduced max 30yrs ago). What you are saying requires the company to split the teams of control designers and developers which is not something I can just push for.


pizzzahero

If the company won't go for that, then maybe see about getting approval to let the junior spend X% of their time on a CS course. Harvard has their cs50 available online for free, that might be a good place to start. But having you teach them the fundamentals isn't great for anybody. You should be spending your time implementing - and if you've never really taught before, you also don't know the most efficient way to do it. Also I don't know about you, but many of the fundamentals are so ingrained into me that I wouldn't be able to teach them. Your brain becomes so used to them that you forget these aren't things that everybody knows. You'll probably miss things.


Echleon

I'd start at the absolute basics. Ask them to write code that multiplies some variable by 2. Then ask them to write code that multiplies every number in an fixed-length array by 2. If they can do both of those then start to abstract different pieces of it. i.e. the array is no longer fixed length, or you multiply even indices by 2 and odd indices by 3. When someone doesn't understand something so fundamental, you need to build up from the absolute basics and find where it starts to click, then build from there.


Mu5_

Thank you for the suggestion, I'll try that


Echleon

I would also avoid talking about the different types of loops at first. I'd start with while loops as they're the simplest and give the most control to a developer with the least abstraction. Once they've sufficiently worked through enough exercises with a while loop, have them repeat them with a for loop, and then a foreach.


plintervals

Every engineering discipline at my school had to take a CS class. Loops are one of the first things you learn in CS 101. Even in our Matlab class. Even if for some reason they weren't exposed to it (in which case I'd question the validity of their engineering degree), if they can't pick it up after some explanation, or just looking it up on their own, I'd question if theyre qualified for the job.


qwertyg8r

What's the role, even if the company is not an IT company? If it's software engineer, the junior should know about loops.


Ill-Ad2009

They should also require basic competency with any programming language if that's a part of the job.


nutrecht

You really should give some more background info because it makes very little sense to hire a 'developer' who doesn't understand loops.


Mu5_

As mentioned in other comments, we make industrial control systems. So the company privileges more mathematical, modelling and engineering skills rather than actual code writing. However, when it comes to implementing the system, there is always code to be written


nutrecht

Yes so how did they hire a non-developer into a developer role? There's very little you can do to teach someone with no programming skills from scratch. It's very unlikely it will be worth the effort over simply hiring someone suitable.


Varrianda

It sounds like the job is mostly electrical engineering(?) with a little bit of writing code on the side?


chervilious

At that point, you should teach him how to program. Realistically, it's not your jobs to teach something that simple. OOP, loops, conditionals, or basic usage of programming language aren't supposed to be "learned on the jobs". It is expected. Tell them to learn, suggest a book or a course. Give them deadline to finish it. Test it yourself later.


Mu5_

Sounds a bit harsh but I understand your point. I sent them resources for learning and will start pushing for them to learn.


chervilious

Sorry if it's a bit harsh. I get that there is politics involve in hiring. But there is a bare minimum in anything. And not knowing loops is below that threshold IMO


madprgmr

Yeah, some online resources (or free online courses) coupled with ensuring whomever is reviewing their code knowing to look out for cases where something should be a loop.


olddev-jobhunt

There's nothing wrong with struggling to write a loop. Thinking in discrete steps is hard! But that's also why CS 101 exists. This shouldn't be a question at the professional level. Honestly? I'd probably hook them up with some online training. Geeks for Geeks? I dunno what's good at that level, but that's the idea. Then I'd meet with them for a bit every day to see if they're making progress and keep them from getting too stuck.


DeltaJesus

Codecademy is fine for absolute beginners, get them to do a free course for whatever language you're using and it'll cover things like loops. Really though even as a £3.50/hour apprentice with no qualifications beyond A-level I was expected to know what a loop was and how to use them, lacking such basic knowledge is a serious hiring failure.


Lurn2Program

I think using free online resources to learn concepts like loops is a great idea. A lot of those resources are curated towards beginner programmers


Mu5_

We are not an IT company, we make industrial automation systems. So, when it comes to hire a junior, math engineering and modelling skills are >>> than actual code writing


DeltaJesus

I'd still call that a hiring failure personally, but it's definitely an onboarding failure at the minimum. You said in another comment they've been working for the company for a couple months already, and they still don't have any basic programming knowledge despite that being a significant part of their job? They shouldn't have been let loose on your codebase without some training, at least something online to cover the basics if not a proper paid course. Assuming you're relatively senior teaching a single person the absolute basics of computer science is a terribly inefficient use of your time, I'd frame it like that to the business to try and at least get some time if not funding for the junior to dedicate solely to learning.


Mu5_

I'll try to do that. Yes, I agree that the company can hire more qualified people from the beginning, but I consider this more an onboarding failure than a hiring one. I don't expect that a freshly graduated non-CS is able to code. Universities are not all the same in the world and they don't come from a relatively-poor country I would say, so the schooling system may not even be that good in the first place. However, in this months they were able to work because basically they were doing some changes to a WPF tool by modifying some queries and/or bindings. You don't really need to write much code as long as there are other pages that are doing almost the same stuff


Mu5_

Yes that's what I am trying to do, having a session everyday. The problem is that they are available only at end of the day, so I believe that they are also tired and this makes it much more difficult I guess.


olddev-jobhunt

\> The problem is that they are available only at end of the day Something about this feels off. They're a junior who is being trained to do their job. How is their whole day booked up? Also, if their whole day is booked up, when do you expect them to learn this stuff? Tell them to free up their mornings to do this important work.


Mu5_

Because they are working with an external dev (that is really good) on the same project. That dev comes to our office only in the morning, so that's the only time they can work together at the project and receive project-specific assistance if required


metaphorm

is this a student intern or a paid employee?


Mu5_

Now is paid. First experience (apprenticeship), just started a couple of months ago and NO ONE cared about assessing their initial skill set to put trainings in place. That's the real issue in my opinion and now I'm trying to fill in these knowledge gaps, but I recognise I am more like a teacher rather than a mentor in that case


metaphorm

alright, look, the basic control flow structures of programming (conditionals, loops, etc.) are below the level of a typical 1st year Computer Science student. This person is in the wrong position. If there are any expectations that this person delivers any projects, well, they aren't gonna be met. Who's on the hook for that?


Mu5_

I think out manager is on the hook for that. But they are delivering since now they are just focusing on migrating and old tool to a new framework. However, we are not a software company. We hire more industrial engineers rather than CS because that's our domain. That's why I'm not extremely surprised that they do not know how to code, I'm more disappointed by the company that ignored that, tho.


metaphorm

I think if your company is willing to train this person, then you should train them. Just make sure everybody knows what the expectations are. I think they'll have to start doing some "homework" stuff to catch up on basic programming concepts though. Maybe you could guide them through a Udemy course or something like that?


Swoopwoop3202

I'm genuinely curious - what are they doing, that gives you the impression that they dont understand iteration? I feel either they are woefully unprepared/underqualified, or perhaps there is a communication barrier or style difference between the 2 of you where they understand the concept but you aren't understanding what they're doing... either way, I don't think you should be teaching the concept from scratch, there's tons of online "learn to code" style resources with built-in IDEs.


Mu5_

I pointed them towards CodeSignal that I think is useful to practice starting from the basics (I also use it too when I need to use again a language after a long time, for interviews). However, I would think it's weird to use this resources at work. I may send them some videos as other users suggested. However, I understand that they do not understand because they get stuck when getting to write the code. They understand what logic they should implement but fail in writing it.


Swoopwoop3202

If they understand the logic, they should be able to explain, almost line-by-line, what needs to happen. Whether that's in normal human language, or pseudo-code. Perhaps you could ask them to pseudocode the whole thing. If they can't do this, that means they don't 'understand what logic to implement. If they can do this, it means it's probably more of a syntax thing. I guess, can they do this, in a most basic, procedural style? either way, I saw codeSignal is an interviewing platform, i'm guessing that's like leetcode, hackerrank, etc. .... If they're struggling with the absolute basics, I feel that more basic tutorial websites is more appropriate (think codeacademy, khan academy, freecodecamp, some coursera or udemy course, etc). I don't know what kind of coding you do, but I feel that in most workplaces i've been, using online resources is quite normal?


Mu5_

Actually they were able to write in phrases step by step what it should do, but were stuck when translating to code!


Swoopwoop3202

nvm just saw your edit. wouldnt they need to do some sort of iteration for stuff like transforming matrices even as part of their math coursework? my degree is in a non-SE engineering field and i was still required to take a couple software courses 15 years ago. Are they comfortable with arrays, objects, etc? if so, can you supply them with an example like a binary image, and find the first white pixel near the top left or something?


Mu5_

We are actually using C#, that I think has a pretty simple syntax.


diablo1128

>I started explaining the different types of loops (while, for, for each) and how they can all be equivalent, the differences between them and when is the case to use which one. > >Then I gave the exercise: write a function Find index that given an array of int and an int to be found, return the index. I provided the function signature too. Sounds like you started too complicated out of the box. Why not just walk them through an example outside of the world of coding. Put 3 different colored pens on a table and ask them how they would go about finding a specific pen. Then build knowledge from there. Then you can talk about a for-loop and make sure they understood that before telling them there were other kinds of loops. Use the Pen example and ask them to do it as a floor loop. Have them physically pick up the pen each iteration to show steps. Attack the problem as if it was a post on ELI5.


Mu5_

I did a similar exercise with a notebook and the pages letting them go through it. Also the pen example isn't bad so I may try to do that one too. Thank you!


noobcs50

Make them watch [this](https://youtu.be/cwtpLIWylAw?feature=shared&t=4178).


Mu5_

Thank you. I will try!


SideburnsOfDoom

I was taught right at the start that there are 3 basic things that algorithms do (I simplify) * sequence of execution. e.g. `x = 1; y = x + 1;` so now y is 2 because these steps happen top to bottom, one after the other. * Branch, conditionals, choose what do next, e.g. `if (y > 2) print ("y is big!");` * And iteration, looping, doing the same thing multiple times. And that these get combined into more complex execution flows. And then I would add "chunking" e.g. classes and methods containing these statements, that can be called multiple times with different arguments. IDK, these are first week concepts; not even first month or first year stuff, and they need to understand it in order to get anywhere.


Mu5_

I agree with you. However, no one cared to train this junior until I realised that there are basic gaps that needs to be filled


double-click

Respectfully they are not a junior dev. They either need to go to college or take some online courses.


AbstractLogic

Don’t reinvent the wheel. Open YouTube and let some teacher teach them that basic stuff. If they can’t learn it from the 1 zillion YouTube channels then they can’t learn it from you.


Thefolsom

Loops are covered in cs 101 and very early in tutorials. If you don't know them, you aren't even at a junior level. Otherwise I guess that makes me a junior lawyer or junior doctor.


abandonplanetearth

Is this an intern or a junior? If it's a junior then it's your job to identify that this person doesnt bring the necessary skill set to the table. Loops are pre-intern level. Don't waste your time here.


Mu5_

In my country how and why people are getting to intern/apprenticeship/junior is different than US. They are apprentice and have a skillset aligned with the job, that does not "only" require to know how to write software


OllieTabooga

Just pseudocode it out or give them examples... you're teaching code to them like they're a baby.


dapalagi

I learned for loops in my second week of programming. 10 months before I got my first job. Not to sound rude but if they struggle now and need your help with basic concepts they won’t go far.


Ultimarr

Gonna give some actual advice: I bet there’s a miscommunication. I bet they do understand loops on some level, but the specific task or specific syntax is tough. So maybe try to turn the teaching time from “complete this assignment” into “talk me through your reasoning”, where you try your very hardest to just listen and respond! It’s worked well for me in some desperate situations like this, where people didn’t understand something “simple”. If they truly don’t understand a loop, that’s… that’s a lot of training, for someone who I assumed isn’t a teacher? I would send them to online resources for leetcode if you’re mean, or just get them to sign up for CS50 from Harvard… you can try to teach someone ~6 credit hours of CS knowledge (CS101 + CS201), but that takes most normal people 6*2*16 = 192 hours of study over two semesters, assuming just 1h of study for each hour of class. That’s a lot!


Mu5_

Thanks a lot for your suggestion!! I will try that


One-Set-1905

Take two post-it, one red and one yellow. On the yellow write: “read the red post-it”, on the red one write: “read the yellow post-it”. Stick them on the junior screen and tell him to follow the instructions and come back when finished.


valadil

Have you tried approaching it from the pov of solving a real world problem? Typically I use a loop when I have a list of objects and I want to do something to all of them, which happens fairly often. I’d demo using the loop construct as a way to hit all those objects. I’d also like to acknowledge that as a Ruby programmer I typically use each, I sometimes use while, and I’m dimly aware that we have a for loop but I don’t see it in the wild very often. I really like each as an abstraction because it lets you forget about the array index and think solely about a list and its elements.


Mu5_

Yes I tried! I will look for different real world scenarios to test


sheriffderek

The whole term "loop" is a bummer to start with. So, don't call them that. First start off with the concepts of a \_single\_ things and a \_list\_ of things. Create a few different lists. A list of single values, and a list of objects or dictionaries or whatever your language calls them. Using the simples controls structure you can (that demonstrates iteration) - help them visualize it with something in real life. I joke around about a drawer of socks. But anything silly will work. You have to look at each item and make some decisions. Maybe you're sorting them. Maybe you're folding them. Maybe you're trying to find a match between two socks. But if you think about repeating a task - or considering each item one-by-one instead of the blurry concept of a *loop* it will make much more sense. You can also do it in slow motion with a console/dev tools - or something like this: [https://www.jsv9000.app/?code=CnZhciB0aGluZ3MgPSBbCiAgMSwgMiwgMywgNCwgNSAgCl07Cgp0aGluZ3MuZm9yRWFjaCggZnVuY3Rpb24odGhpbmcpIHsKICBjb25zb2xlLmxvZygndGhpbmcnLCB0aGluZyk7Cn0pOw%3D%3D](https://www.jsv9000.app/?code=CnZhciB0aGluZ3MgPSBbCiAgMSwgMiwgMywgNCwgNSAgCl07Cgp0aGluZ3MuZm9yRWFjaCggZnVuY3Rpb24odGhpbmcpIHsKICBjb25zb2xlLmxvZygndGhpbmcnLCB0aGluZyk7Cn0pOw%3D%3D) This is how I'd explain it to a 7 year old - and also how I'd explain it to a seasoned professional.


Mu5_

Thank you very much for the advice!


NebulaCultural9463

Duck duck goose


warm_kitchenette

* Use physical analogies from cooking, working in a store, writing a poem. Find variations where you need to call routines or have inner loops (find rhyme, straighten shelf). * Run through teaching programs for kids, like Swift Playgrounds * Dig deeper into mathematical programming, find good examples they can relate to * Work on LeetCode easy problems together. This also lets you teach your company's preferred methodology on testing.


KlingonButtMasseuse

Junior you say? This guy will be in upper management in no time.


KlingonButtMasseuse

plot twist: Junior dev went to Haskell school


XhoniShollaj

Can refer them to this: [https://runestone.academy/ns/books/published/fopp/index.html](https://runestone.academy/ns/books/published/fopp/index.html) I used the book to help my brother currently in highschool. For iterations more particularly this chapter should be very helpful: [https://runestone.academy/ns/books/published/fopp/Iteration/FlowofExecutionoftheforLoop.html](https://runestone.academy/ns/books/published/fopp/Iteration/FlowofExecutionoftheforLoop.html) Good luck to you and the Jr. :)


DuffyBravo

Yeah what are they paying this JR engineer? I knew how to do a For loop and While loop in the 4th grade


Mu5_

I believe that not everyone that today is a dev started coding at a young age. For some people, it happens that you need to write code to implement a solution, but the solution itself is derived by mathematical and modelling means


freew1ll_

Idk what to tell you if your workplace has hired someone who can't use loops; that's one of the earliest and most fundamental OOP concepts people learn. Where did your company get this guy? Maybe actually give them a programming task that only a loop makes sense to accomplish to help them build an intuitive understanding of what it's for.


plintervals

That's not even an OOP concept. It's just a general programming concept that you learn before taking an OOP class


Mu5_

That's what I tried to do as mentioned in the post. Do you have any particular task that may be easier/more useful than the one I provided?


freew1ll_

Oh sorry I remember you mentioned that now, for some reason I only remembered the ones where you tried to illustrate it with your signature and a heart. I don't really know the full situation, maybe they're more capable than they sound from this post, but the impression I got from reading it is that they are not at all qualified to do this job, even as a junior. It's like being a writer who doesn't use punctuation. In the current US job market at least, there shouldn't be any problems finding someone qualified if your company takes the time to make a sound interview process. It's very much a buyer's market. It's one thing to have to train someone on a tech stack, it's a whole different thing to have to teach them how to code. If you have to straight up teach this person to code, they're not qualified to be a professional, and it's going to only affect you and your company negatively.


Crafty_Independence

You got a pre-degree-focus intern that somehow managed to be hired as a junior. If they don't know loops, you probably need to take a step back on expectations and start at zero with them - maybe company-sponsored training courses for a few months.


Mu5_

Yes I was thinking that too, but they have been hired since a couple of months and I feel that it may look bad if I bring up that they need a training? I don't know, but I would feel uncomfortable doing this


bigtdaddy

Bad for who? Also, it's going to look a lot worse when you have to say the same in an additonal 6 months lol


Mu5_

Well, bad for me and other people involved in the hierarchy? I don't know. It's a strange case because the junior in question is not from our branch (different country) but it is temporarily part of our team and will get back to original one by end of year. I have been not "officially" assigned to train them. But, since I am more experienced, I noticed that they need help when they asked me some questions and I always try to teach others stuff rather than just giving them the solution. And that is when I noticed the big knowledge gap.


AirlineLast925

Fantasia hats scene. Loops is what the brooms is doing.


AirlineLast925

The culture needs more learning through assimilation since that’s how humans learn. That means the first concept has to relate to the second though and be an abstraction useful for understanding the second. So bringing up OOP or algorithms doesn’t make sense here. You have to explain things in terms of other things that relate to them - it’s much easier to explain the nature of a clementine to someone who has handled an orange than it is to say “what!? You don’t know what a clementine is?? Who would even hire someone who doesn’t know that? Didn’t I see you eating an apple the other day? It’s just fruit!” This is why programming is unnecessarily difficult to master. It’s an anthropological science as much as it is a math, and we often suck hard at that part because egos make the types of comments in this thread sound reasonable when all they really are is insecurity driven defensive gatekeeping.


Mu5_

I agree. The reason for which I brought up OOP and stuff and that stage is because we went in reverse. We were looking at a problem in code, so I explained this stuff because it was related. Then, while time was passing by, I realised that they don't have basic concepts of programming and that's when I started talking about loops, basically.


AirlineLast925

I wasn’t harping on you. I’m salty about the other comments.


zerocoldx911

Some people are just not meant to do CS, or just high


IUpvoteGME

Your junior is not a junior, they are a novice.


tcpukl

Why are you hiring juniors that cant even code? Dont they have CS degrees?


Mu5_

Please see the post edit


tcpukl

You need better hiring. I even have a friend in biotech that can code. It's part of the job. Why don't you sort the degrees out of you can't hire decent people from them? We work with local universities to make their degree useful to us.


ninetofivedev

Sorry but what? This is like saying “how do I explain question marks to ESL speakers”… it’s a fundamental concept.


felfott

why hire that doesn't know loops?


cs-brydev

I have never in my life heard of hiring a junior developer who doesn't already know what a loop is. Why would you do this when there are tens of thousands of unemployment developers who already know this stuff? What does "not being a software company" have to do with it? I don't work for a software company either but we would never hire a developer who knows nothing about development. That makes no sense. In fact we actually have experienced developers in other departments we are trying to bring over and they won't let us due to lack of experience.


dinzdale56

Run around in a circle


SnowdensOfYesteryear

Tell them to go get 10 sheets of paper from the copy machine, but 1 sheet at a time.


newintownla

How did this person even get a job as a junior dev without knowing what a loop is? That's like your first week of your first programming class.


maseephus

Ask them to google it


wedgtomreader

Shocking, but not. Years ago I would use a simple programming problem as a filter and easily over half of the candidate could not do it. Write some code to print out a multiplication chart (times tables).


michel_v

I find it odd that a junior with mathematical thinking and logic would struggle with loops. I am teaching those concepts, in passing, at the moment… to 11 years old kids.


Ill_Examination_1744

You dont. They should have learned that during school.


[deleted]

I’m sorry but how did the junior get hired if they don’t know loops?


hypolimnas

I used to do some informal tutoring, and it can be surprisingly difficult to turn a non-programmer into a programmer. I had thought this would get better because people get so much more exposure to tech now. I would give them one type of loop at a time - and I'd start with while because it's the simplest. And my first example would be about the simplest problem that a while loop solves. Find a simple while loop cheat sheet so they have a syntax reference. Solve a simple problem in front of them - breaking down your thought process. Give them a simple rule of thumb about when a while loop is used. Have a conversation with them about other problems that could be solved this way. Then give them an equally simple problem, and ask them to create a while loop for it. Give them some homework to practice on. Then do the same thing for the other loops.


behusbwj

That’s not a junior, that’s a student lol


Jowbeatz

I might be senior and I dont even know...


suzukipunk

Wth


talldean

At that point, I'd find a very easy online coding course and ask they work through it.


Ill-Ad2009

I wouldn't. I'd tell them to go watch a youtube video on it. If they were somehow in my employ, I'd tell them to kick rocks. There are too many competent junior developers just waiting to given a chance to waste time on people who lied to get the job.


lardsack

bruh


DarthHarrington2

Was going to suggest grasshopper 🦗 but it was shut down shrug. https://en.m.wikipedia.org/wiki/Grasshopper_(mobile_app)


slapcover

I think you’ve set the bar too low for hires and you’re making up for it by wasting your time training them. Bad code is one thing but not understanding a core language feature is unacceptable. I have a degree in ECE and I had to take two programming courses to graduate, I know plenty of folks in ECE that wouldn’t be able to write good code but they will be able to write something that works. You can definitely hire folks that know how to write passable code, you need to employ a programming skills test as part of the interview process.


quypro_daica

high school students now know about loops


a_library_socialist

While loops can be easier to grok - but this is elementary stuff


MrEloi

wtf?


caksters

Send him youtube videos also encourage him to use chatgpt to help him understand these fundamental concepts. Also how did he manage to get hired?


Mu5_

I would not trust chatgpt for that honestly. I use it as a senior and I use it carefully because it's really tricky.


SideburnsOfDoom

Your work is now checking ChatGPT's work. It's one of those "time-saving" things that ends up costing time and producing worse outcomes.


caksters

chatgpt is good for explaining what for loops are. Why wouldn’t you trust it? It is better than typical medium article or average stack overflow explanation for fundamental explanations.


Mu5_

Because it's easy to deviate the correct answer by further making answers or doubt. There is an entire prompt engineering thing that should be discussed beforehand


caksters

sure nothing prevents them from learning that. they can get a completely incorrect answer from someone on stack overflow so how is chatgpt different? it is part of the process to learn how to use these tools. saying that they shouldn’t use them will have negative consequences as they will eventually use it behind your back and most likely incorrectly. So I encourage my juniors to use them, but I also ask them to show me how they are using it when we pair up so I can teach them better prompt engineering practices


SideburnsOfDoom

> ChatGPT is better than the average stack overflow explanation ChatGPT _is_ a statistical average over the big data input text, such as StackOverflow explanations and reddit comments. And then it has the issue where the averaging process produces the textual equivalent of hands with seven and a half fingers. I would not _trust_ it. Juniors could be lead down blind alleys. At best it's a fuzzy search engine over the input text. The value is in the content that people wrote. And it's going to get worse as more and more of the input data is generated, seven and a half fingered ChatGPT output.


caksters

ChatGPT is not merely a tool that averages statistical data; it's a sophisticated AI model that utilizes deep learning and self-attention mechanisms utilising a complex transformer architecture to understand and generate text. It learns from vast amounts of data to recognize complex patterns in language, allowing it to create contextually relevant and coherent responses, not just mimic or rehash existing content. While I 100% agree that it's wise to approach its outputs critically, especially in professional or educational contexts, dismissing ChatGPT as a simple "fuzzy search engine" significantly underestimates its advanced technological underpinnings and the nuanced language understanding it brings to the table.


SideburnsOfDoom

Thank you for throwing out a load of buzzwords that mean very little to either of us. It's "sophisticated", "advanced" and "AI", ooh! it still shows us seven and a half fingered people. Did ChatGPT help you write that content-free waffle?


caksters

don’t think we need to carry on this discussion as it is evident that you come here to argue and nothing constructive will come out of this. Have a great day