Bugs can help a lot
If there’s one thing that annoys every new developer is a bug on the code. More experienced developers say that fixing bugs are the core of our profession. And that is true!
With time and studies I’ve been starting to change my mindset when it comes to bugs on my code. There is no way I can code perfectly from start to finish. Moreover, we’re not always going to be working with things we’ve coded.
So, we've got to get used to finding bugs on codes. In fact, we need to be happy when we see them. They not only show us things we need to fix, but also teach us a lot.
And this is what I’m going to be talking about! I can’t be talking about a lot of job experiences yet, but I can talk about my learning experience.
Take the latest bug on my portfolio for example. I’m working on a portfolio so I can be backed up when applying for jobs.
The Component
I was working on the blog area of my page. And I wanted to use what I post on Medium. So, I googled and found a really cool tutorial. I read it all and followed as it was taught.
But at the end, I had a problem. Everything was working fine on Chrome and Android, and not working on Safari or iOs.
Here is where it all begins. I use Chrome on my computer, but have an iPhone. After deploying my changes I found out it was working fine on the desktop and breaking on the mobile.
But on the mobile I couldn’t debug (or so I thought). So, I couldn’t see the console and didn’t know what error I was having.
I googled and googled, read and read… talk to fellow students, asked teachers, and even left a question on stackOverFlow. Nothing helped at first.
Learning process…
One day goes by, and on the next… I already knew that this kind of problem has happened before to other people. And maybe, there was something wrong when fetching the API. Well, I'm using React and Rails all together, so it might be that, right?
Went to forums and asked questions… at first I didn’t know how to ask the question. But now, I not only knew what to ask, but also “knew” what the problem was. I've talked and talked… even had a video call with someone I didn’t know but was willing to help… and nothing worked.
Summing it up
Long story short… I've learnt how to debug the phone browser on my computer. And that’s when I actually found the error…
Safari wasn’t accepting the date( ) format I was using on the blog card. That’s why it wasn’t working. Simple error, right? Well, when I say it like that…
I still haven’t fixed the error (when I published this). But I’ve omitted the date code for now, and it is working. But now I know what to study and what to learn…
And that’s why I'm writing this… bugs can help us a lot. One “simple” bug made me learn a lot about things I’d never think about. And that’s how we grow and build our experience.
I’ve changed my mindset, and now I kinda like bugs a bit… it’s growing on me…
What about you? Any crazy bug story to tell? Let me know in the comments… or hit me up!
Daniel Costa