what's up y'all this is Hussein Nasser from IGeometry where we discuss
software engineering by example and this is our software talk series where we
pick a topic and casually talk about it alright today's topic is troubleshooting
all right Before we jump to the video if you new
to this channel consider subscribing we have a lot of software engineering
topics here I have a lot of series we have this series the software talk we
just casually sit down talk about things in software engineering things that
particular interest me there we pick advanced stuff and we talk about it as
well illustrated by example that's why it's software by example and we also
have tutorials JavaScript tutorial c-sharp tutorials GIS that's my major
basically that's my specialty geographic information system tutorials a lot
tutorials tutorials reverse engineering stuff I love this series where we
basically pick an app a mainstream happen try to reverse-engineer it and
see that how the developers actually designed that thing from scratch alright
so what we need to do is get started with the troubleshooting so if you are a
software engineer right or even a developer you run into problems
essentially right with the software like say a bug and you click a button and
software crash right or that's my favorite where you click a button to
submit something and it takes a long time right just to perform that task
right so that's your you're down to the app itself let's say it's a mobile app
or web app or anything really right troubleshooting can happen across the
whole stack so it's just discuss what's going on there so
troubleshooting in in my opinion it's it's an art in itself and there are
depending depending on the personality yes the personality of the tester or the
software engineer you can tell how far down the rabbit hole a good software
engineer can go to identify a problem and that what makes him or her special
Epps Peschel or a good software engineer is by their troubleshooting skills so
what what do I mean by that so usually when you are a software engineer you
work with a developer right so says okay there's a developer that developed this
piece and you found some performance problem with his work in that area and
you want to show him what exactly is wrong right so that's your the first
first of all you found it right that's the first step you find a bug or a
problem and you get a point by that okay you're good that's your job your job is
to find problems as a software engineers testers you find problems that's what
you get paid for that's the most of the thing you get you you just try to find
problems with the software okay and then second thing is there there are people
that stops at step one find it a problem and send it to the developer there are
software engineers that did do that hey this thing doesn't work send an email
hey this thing is slow some people will say yeah I just did my gel op right sure
you did your job you did you didn't you did the bare minimum you found it kudos
right but you didn't do the extra step what's that sister if it's let's say
it's a it's actually a mobile app right make it harder so a mobile app so how
can you go deeper than that okay it's like wait how do you what do you do
after that okay you click a button trying to say this is like I don't know
click and then it's slow and you can send it to the developers is hey guys
this is not working too slow or you can do a little bit of due diligence and
just ask yourself what exactly going down there and turn off for example
airplane mode and then run the button again is the feeling to come quick or
not so why do you ask that because if if it failed immediately that means there
is nothing wrong with the user experience if it's still slow while the
airplane mode is on like there's no internet there's no nothing goes out the
phone to make a request out there then something wrong with the app itself
right something is spinning here before even sending that request to the server
so we can't just blame the server slow yet or the rest endpoint is slow we have
to just think about it real little bit right so that could be it another thing
is you start sniffing the requests after that goes out of the phone
it's like Turner turn it back on and click does the request comes up
immediately after you click or just the phone starts thinking and do something
and then the request comes it sounds right each each thing anything means any
behavior will mean something and you can make decisions based on that okay some
people will stop at that say hey looks like an app problem and that's good
that's perfect yeah some people say you know what I
turned a Wi-Fi off or what n turn it off and then I still see it as slow way
right alright since they like I for grandma failed immediately right so that
means okay that the the phone actually made the request the app and the form in
the request but right immediately fail because there are no internet connection
or timed out immediately so you stuff that request and you see now the
requests coming out right you start measuring that rest endpoint so it says
so what you do instead you remove the phone completely and you call the rest
and point yourself and well using the same parameters and see okay I'm gonna
call this endpoint and see simulate that request to see how long it takes and
says uh for example took five seconds to reply a lot right or one hundred or two
second or three seconds alright and that's time is it now the ask a question
where is that time spent is that is my network does - work at problems is my
server okay right let's try that as if for example is my request getting queued
for some reason and then it didn't actually it is being starved because it
wasn't even served to begin what or is it actually being served and executed
what there is input the actual code behind the server the middle where is
doing something right so I start diving deep into that then you start saying
okay this button for example updates the profile page and are we updating just a
picture right how big is the how big is the picture you're sending is it is it
BMP is a bitmap is it just how big is it how are we compressing it so you see
what I'm going with that guy's right so you can go up to the deepest deepest
level on the server and you can start asking yourself questions and that would
like go back to the database and start asking low more questions about okay I
took it down till the okay the insert comes back and then when I that query is
actually trying to select something and that select statement is taking three
seconds - for example - to complete just whoa okay so you can take it all the way
from your app from your thin app all the way to the database you can start asking
questions okay are we missing an index are we
doing a full table scan are you asking all these questions and that just that
spectrum of things will make you why default a better engineer because you
start questioning things you start being just in pathetic about the process the
whole thing you have to put yourself in other people's shoes you can just throw
stuff on the on the wall and said just assume people will fix it right it might
get you a job but if you wanna want to advance in your career be a better one
just doing that you don't have to say anything if you do that right people
will notice this is oh this guy's good because well instead of he gave me just
for example just a problem you have a problem versus hey by the way if we just
I think if I think I part of the problem I think it's that it's that table we're
doing a full table scan on it so if we change the execution plan we might
actually we might actually have a better luck if we analyze the table after
adding this much data or if we added an index whatever the solution right or for
example if it's just the rest API we need to increase the queue size or we
need to add more servers whatever the reason is just by giving that solution
to the developer or in not even a surgeon just to tell them they're okay I
think this is whether where the problem is going on or for example the debugger
is doing a bad thing maybe instead of doing a select statement right there
doing a loop with a select right you know code you know and what bugs can
happen but you you have to be you have to start analyzing and doing a logging
in and learn all these skills to be a better software engineer alright guys
sorry I always took a lot of these this years that's what's called software talk
but I hope you enjoyed this episode subscribe and like this video if you
liked it and I'm gonna see you in the next one check all the other contents in
this channel a lot of good stuff I think you gotta like it bye