5 Essential Tips to Debug Any Piece of Code (That I Learned in My College Class)

preview_player
Показать описание

Debugging: The 9 Indispensable Rules for Finding Even the Most Elusive Software and Hardware Problems (Amazon Affiliate link)

#Coding #Debugging

🎧m u s i c 🎧

💖 m o r e m a y u k o 💖

🛠m y g e a r 🛠
Links above affiliate links, where I make a small commission from your purchase at no extra cost to you, helping me to fund this channel!

🌸a b o u t 🌸
Mayuko Inoue is a content creator and Software Engineer. After working in Silicon Valley tech companies like Intuit, Patreon, and Netflix for six years as an iOS Engineer, she became a full-time creator in 2020. Her work aims to help people find their way through the tech industry by sharing her own experiences navigating this world through technology, career advice, and lifestyle videos. She is passionate about discussions around mental health, cultural identity, and creating technology with empathy and compassion.

✉️c o n t a c t ✉️
Рекомендации по теме
Комментарии
Автор

5 Tips to Easily Debug Any Piece of Code:
1. Reproduce behavior consistently
2. Divide & Conquer
3. Survey the landscape
4. Make one change at a time
5. Get a fresh perspective

jessicabonzo
Автор

IDE: Has a debugger
Me: but print statements

BSQT
Автор

I wish there was a class like this when I was an undergrad student studying CS. I remember going to the computer lab for help, and some of the people would say "do it yourself" without helping me understand the issue thoroughly. It would make me even more frustrated.

Sometimes, I try to ask for help by sending messages. The weird part is that I sometimes figure out the solution before I get a response.

guynamedjoeFTW
Автор

The mindset and mindspace I bring to the table, also makes a yuuge difference.

We _cant_ pressure ourselves into figuring things faster. It's actually much more difficult when I feel overwhelmed. You can't beat a river into submission. You've got to surrender to it's currents and use it's power as your own.

Qasibr
Автор

So many of my friends suffered with debugging issues...I told them to add in print statements everywhere, but they never listened lol.

DragonicBuster
Автор

I didn't know there was actual strategies to this apart from like praying and crying 😅 I wish I had a debugging class in college. Then I wouldn't have had to learn these from hours spent debugging 😅

NitrixTech
Автор

Love this video! How you learn how to debug is definitely important and can save sooo much time. Most programming tutorials don't cover debugging since they show you the perfect path to create something. Thanks for the vid Mayuko!

hankim
Автор

Hey Mayuko. Love all the tech videos you're putting out. 💖

RehannahB
Автор

I didn't have a debugging course in school, and it wasn't until my Masters program that I had some classmates and instructors help me learn a better approach to debugging. Luckily, with their help, I managed to learn about the things you discussed here. I agree that sometimes the best thing you can do is ask for help; one thing I like to do sometimes is explain what I've tried, what broke, and then see what others say as they review my work.

arturoordonez-hernandez
Автор

Almost a perfect video. The only thing that was "off" was the tone for "this" in the question "Who wrote this code?"... needs to be waaaay more ferocious :P

manuakasam
Автор

I'll definitely apply this insight into debugging. On the string search, ripgrep and fd-find comes to mind. I use them all the time.

Scleavers
Автор

breakpoints and print statements is quite a good advice, I do it all the the time and it's very very useful. Bisecting works a a lot too. Good video

sprintwithcarlos
Автор

Mayuko, Thanks for doing these. This stuff is gold as a graduate student struggling with ways to make what I am learning more useful and impactful!

TravisFritzwrmr
Автор

Legit video. So much good information for people new to debugging (or coding really). I typically don't need to go through all of these for each bug and usually I can instantaneously figure out the problem, but the more I work with other people's code, in languages I haven't worked with professionally, the more important these concepts become.

I like how you stated that simplifying the steps to reproduce the bug is important. eXtreme Programming states that if something is good to do then we should do it often and it should be fast. Same concept applies here.

GeneralZeroOfficial
Автор

These are the exact steps I take! Sadly I learned most the hard way, I wish I had seen a video like this before, thanks Mayuko!
1 thing I'd empathise:
- narrow down the timeline, specially if you're able to find the exact time or release (of a package, or repository) that caused the issue, that might even lead to the pull request for the change.

FernandoOrtega
Автор

As an SDET I appreciate it when I see modern videos and especially well-known influencers like yourself make videos about debugging. I've encountered many SWEs who come straight out of college not knowing a test about testing and I have to blame our educational system for not offering such courses on debugging/testing (at least that I know of...maybe there are courses offered now). I should just make a modern video series on such topics. There is no shortage of outdated videos out there about software testing.

nikkeii
Автор

Loved this video, thank you for these tips!!! Also, for anyone who debugs in Visual Studio, Immediate Window and Call Stack are very helpful. 😁

miguelmorell
Автор

Consistent bugs are usually easy to fix. The ones that are inconstant, But step 2 can help with Step 1 also sometimes lol

justanotherperson
Автор

I really like your videos. Super high quality and easy to follow and I enjoy the way you talk. Keep up the good work, subscribed :)

GeekyMino
Автор

Great strategies. I recently was reading a chapter in Code Complete 2 about Debugging and it had very similar viewpoints.
One thing that chapter mentioned about inconsistent bugs that might be helpful for everyone, is to look into initialisation methods.
If a bug happens in some scenario but doesn't happen again, points something towards how the program gets initialised under different circumstances.

AshutoshAnandashu