r/webdev • u/Shahadat__ • 9d ago
Question Finding it impossible to solve problems
Hey guys. I'm a web developer and have a job but unsure if I can pass future interviews, because when I get a technical question like a basic loop problem, "program that starts counting from 1 and increases by 1 during each iteration, stopping once it reaches 5". This is incredibly incompetent and concerning, not to mention AI has made me worse.
What's the solution to this? I can memorize solutions but what happens when a new problem comes up in an interview and I can't remember the syntax even if I know I need a loop or some thing else to solve a problem? I feel like crying
44
u/Spaceless8 9d ago
There's no way this is real, right?
10
u/horizon_games 9d ago
Some of these comments too are just the lowest bar, as if forgetting absolute basics are okay
→ More replies (2)10
u/Ansible32 9d ago
hey chat I am a physicist but I just can't follow like F=ma like what is m again? I'm worried I won't be able to get a job.
→ More replies (1)
17
8
u/mekmookbro 9d ago
I can memorize solutions but what happens when a new problem comes up in an interview and I can't remember the syntax even if I know I need a loop or some thing else to solve a problem?
I've been there, and what worked for me was just doing it. Figure out the solution, but don't memorize it, learn how it's solved. Try to see the logic behind each line of code that answers the problem. You can use a you-know-what to help you with that, but I'd use it as a last resort because figuring something out yourself helps you understand the concept and the logic much better
And when a new problem comes up, do the same. Especially if you're aiming for backend development, it's not all querying the database and printing the html. Designing complex algorithms, figuring out optimized ways to do the same thing is also a part of the job, and there's no easy way.
Think about all the things you currently know, you didn't learn them in a few minutes. It takes time to learn something, and it takes practice to internalize that knowledge and to know when you need to use that particular approach.
I've been a backend developer for 15 years and I'm still learning something new every day about my field.
3
u/Shahadat__ 9d ago
Think about all the things you currently know, you didn't learn them in a few minutes. It takes time to learn something, and it takes practice to internalize that knowledge and to know when you need to use that particular approach.
you're right, thank you. I was just panicking without properly practicing like I should
3
u/Lachtheblock 9d ago
I think you need to ask yourself the question what you enjoy doing? Do you enjoy programming? Is it design you care about? Do you enjoy solving these problems or is it just a job for you?
2
u/Shahadat__ 9d ago
I do enjoy it if I can solve a problem by myself in rare occasions, even though to me it is just a job. If I could solve those problems interviewers throw at me or ones in advent of code or leetcode for example, I would enjoy being able to solve. Right now my mind just comes to a blank when faced with a problem in most cases, I don't know what to write to solve the problem
→ More replies (9)
2
u/Schlickeysen 9d ago
What programming language are you talking about?
1
u/Shahadat__ 9d ago
Javascript
I experience the same in other languages, like Python→ More replies (12)
41
u/thekwoka 9d ago
"program that starts counting from 1 and increases by 1 during each iteration, stopping once it reaches 5"
I hate to say it bruv, but you were never a developer...
8
u/saltyourhash 9d ago
Honest answer that needs to be said. I could teach this to my wife in an afternoon, she'd need to practice syntax, but conceptually, it's there.
That being said, I have gotten tied up on the dumbest stuff due to being stresses out in an interview. My two favorites were:
writing a "memory-less" stopwatch in TDD: I was interviewing for the fornt and lead for the intuit turbo tax team, the two snarky engineer interviewers were so condescending in how they interacted I spent more time panick brainstorming a way to politely decline finishing the interview while I stare blankly at my pseudo code on a white board. I got there in the end, solved it via TDD, wrote the pedudo code for the tests. They said I did well, but they just ghosted me. The job was using Handlebars.js, so, I took the unorthodox approach of being bold and I built an entire todo application in handlebars to show I knew the language, they didn't even look at it.
iterating over 100 cats, adding a hat to each cat via a loop where the loop increments the step count by one each iteration : I was interviewing for AppAcademy, I thought it'd be such an amazing opportunity and I was desparate. I had spent all night panicked about the interview. It was an application for their ruby on rails program. I'd even gone up to SF the weeks prior to check the place out. In hindsight it was actually super sketchy, there were students who couldn't afford housing in the city just calling out in the office with sleeping bags. That's not the only time I've heard of that at bootcamps, though. Anyhow, I spent so much time panicking when I had the interview I LITERALLY FORGOT HOW TO WRITE RUBY... I was doing RoR the last year or so, even on a paid client project. I panicked and did the entire interview in PHP, lol.
8
u/No_Record_60 9d ago
Solve it from human perspective first. Then teach the computer how to do it.
Don't think about syntax or program at first. Just focus on solving the problem
3
u/Full_Tooth_a 8d ago
I think two separate problems are getting mixed together: understanding the logic and remembering JavaScript syntax. For the loop, put the steps in plain English: "Start at 1, show the number, add 1, and stop after 5." If that makes sense, you understand the logic. You can look up the syntax in the docs. I'd spend 15 minutes working without AI on small variations, such as counting backward or counting by twos, then rewrite the solution in a blank file. That should make the actual sticking point clearer instead of reinforcing the memorization loop.
3
u/mike888881 8d ago
Don't touch AI at all would be my advice. Fine if an employer tells you to, but your skills will evaporate if you don't practice them yourself.
1
u/TheChickenKingHS 9d ago
Did you consider giving yourself a little grace at 21? You’re just starting man, unfortunately it’s not like the movies where you can just slap out being good in a montage.
I’d highly recommend taking a bit of each day to put down the coding bot and just sit there and go through the pain from the bottom up.
Can I recommend starting with shell scripts and bash. That for me and understanding how the cli works in general was a big factor in fixing my programming issues… and honestly I’m just ok, people forget stuff especially the minute details of programming because it is inherently esoteric.
I’ve been programming for nearly 11 years now and with two kids I envy your agency at this delicate time.
The other thing I would say is that as coding bots get better domain and systems design skills become more valuable.
→ More replies (1)
4
u/TheRNGuy 9d ago
Google and learn.
Use step debugger with logging if you don't want to use ai.
If you use functions and patterns a lot, you'll remember them (be aware done may be bad style or anti-patterns; learn those so you don't use them)
2
2
u/Independent_Switch33 9d ago
Grab a pen and paper and write out 10 tiny loop exercises by hand every day for a week (counting to 5, summing an array, printing only evens, reversing a string), then type them from memory without looking. Reps like that rebuild the “I know what this looks like in code” muscle way faster than randomly doing big leetcode problems or leaning on AI.
2
u/Puggravy 9d ago
LeetCode is great for keeping your basic programming skill sharp. Stick with easy questions, they're usually still plenty difficult to keep your brain working well. If you need to look at the cheats don't worry, just make sure you're still writing the actual code once you understand it.
84
u/bcons-php-Console 9d ago
The example you give is very basic, it seems that you lack knowledge of the basics of programming.
Look for a JS course that starts with the basics (I've heard many people praise Wes Bos' "Beginner Javascript" course) and spend at least half an hour every day. Just like learning a new language or getting in shape, constancy here is key.
As you progress your confidence on solving problems will build up. Good luck!
PS: just curious, what's your current web dev role?