I am not the world's greatest coder, although I am getting better every year. One thing that I'm really improving on is my ability to solve coding problems. I'm not talking about those coding challenges that you can get online or in a job interview; I'm talking about those real-world problems, like "How are we going to create an automated test for this?" Here are the seven steps I use to solve any coding problem.
Step One: Remember what problem you are trying to solve
When you're trying to figure out how to do something, it can be easy to forget what your original intent was. For example, let's say you are trying to access a specific element on a web page, and you're having a really tough time doing so; perhaps the element is in a popup that you can't reach, or it's blocked by something else. It's easy to get so bogged down in trying to solve this problem that you lose sight of what your original intent was- to add a new user to the system. When you remember this, you realize that you could actually add a new user to the system by calling the database directly, avoiding the whole issue that you were stuck on!
Step Two: Set Small Steps
I often have what I want to do in my code all figured out long before I know how I'm going to it. And I used to just write a whole bunch of code even if I wasn't sure it was all going to work correctly. Then when I tried to run the code, it didn't work; but I wrote so much code that I didn't know whether I had one problem or many. This is why I now set small steps when I code. For example, when I was trying to write the email test that I mentioned in last week's post, I first set myself the goal of just reaching the Gmail API. I didn't care what kind of token I used, or what information I got back; I just wanted a response. Once I had solved that, then I worked on trying to get the specific response that I wanted. This strategy also keeps me from getting frustrated or overwhelmed.
Step Three: Change One Thing at a Time
This step is similar to Step Two, but it's good for those times when your code isn't working. It's very tempting to thrash around and try a number of different solutions, sometimes all at once, but that's not very helpful. Even if you get your code to work by this method, you won't know which change it was that caused the code to work, therefore you don't know which changes were superfluous. It's much better to make one small change, see if it works, remove that change and try a different change, and so on. Not only will you solve your problem faster this way, but you'll be learning as you go, and what you learn will be very valuable for the next time you have a problem.
Step Four: Save All Your Work
I learned this one the hard way when I was first writing UI automation. I had absolutely no idea what I was doing, and sometimes I'd try something that didn't completely work and then delete it and try something else. Then I'd realize that I needed some of the lines of code from the first thing I tried, but I had deleted them, so I had to start from scratch to find them again. Now when I'm solving a new coding challenge I create a document that I call my scratch pad, and when I remove anything from my code I copy it and paste it in the scratch pad, just in case I'll need it again. This has helped me solve challenges much more efficiently.
Step Five: See What Others Have Done
People who are good at solving coding problems are usually also masters of Google Fu: the art of knowing the right Google search to use to get them the answers they need. When I first started writing test automation, I was not very good at Google Fu, because I often wasn't sure of what to call the thing I wanted to do. As I've grown in experience, I've become better at knowing the terminology of whatever language I'm using, so if I've forgotten something like whether I should be using a static method I can structure my search so I can quickly find the right answer. The answers you find on the Internet are not always the right ones, and sometimes they aren't even good ones, but they often provide clues that can help you solve your problem.
Step Six: Level Up Your Skills
As I mentioned in this post, I've been taking a really great Node.js course over the last three months. I'm not even halfway done with it yet, and I've already learned so much about Node that I didn't understand before. Now that I understand more, writing code in Node.js is so much easier. Rather than just copying and pasting examples from someone on Stack Overflow, I can make good decisions about how to set things up, and when I understand what's going on, I can write code so much faster. Take some time to really learn a coding language; it's an investment that will be worth it!
Step Seven: Ask For Help
If you've finished all your other steps and still haven't solved your problem, it's time to ask for help. This should definitely not be Step One in your process. Running for help every time something gets hard will not make you a better coder. Imagine for a while that there's no one who can help you, and see how far you can get on your own. See what kind of lessons you can learn from the process. Then if you do need to ask for help, you'll be able to accurately describe the problem in such a way that your helper will probably be able to give you some answers very quickly. You'll save them time, which they will appreciate.
Coding is not magic: while there are all sorts of complex and weird things out there in the world of software, an answer exists for every question. By using these seven steps, you'll take some of the mystery out of coding and become a better thinker in the process!
Email Subscription Form
Subscribe to:
Post Comments (Atom)
New Blog Location!
I've moved! I've really enjoyed using Blogger for my blog, but it didn't integrate with my website in the way I wanted. So I...
-
It's never fun to start your work day and discover that some or all of your nightly automated tests failed. It's especially frustra...
-
It's book review time once again, and this month I read Unit Testing Principles, Practices, and Patterns by Vladimir Khorikov. I thoug...
-
I've moved! I've really enjoyed using Blogger for my blog, but it didn't integrate with my website in the way I wanted. So I...
Hi Kristin, great post!
ReplyDeleteI do not agree with your following statement:
"""
One thing that I'm really improving on is my ability to solve coding problems. I'm not talking about those coding challenges that you can get online or in a job interview; I'm talking about those real-world problems, like "How are we going to create an automated test for this?"
"""
Coding interview questions are actually based on real world problems, to solve a part of real world problem (e.g. fast sorting algorithm helps Google to return relevant pages). In your context, automated test is UI automation done by tester, but this is not real world problem. Because user would never user Browser in the same way as your UI automation script.
Steps that you listed are very useful in resolving any coding problem, including real world problems described in interview coding questions.
I would just add to Step four, saving your work, to use git commits as often as possible.
Regards, Karlo.
Hi Karlo- Thanks for your feedback! I will admit that I haven't done any coding challenges when I have applied for jobs, so my statement was based on the experiences of others that I have read online.
DeleteI would, however, call test automation a real-world problem, because as testers we want to set up automated checks that we can trust to tell us when something's wrong, freeing us up to do exploratory testing on new features. If I can't create an automated check for something, then I'm stuck validating it manually.
That's a great suggestion for Step Four!
I highly recommend a particular trader to everyone looking for forex, crypto and Binary trader. In this period of economic crisis, Instead of going for a loan I decided to invest in Forex/bitcoins trading with Barry Silbert, After reading a lot of good reviews about him . I am glad to tell you that he is the only legit trader I know. I now make more than $6,099 a week. He can help you earn formidable profit weekly with his good trading strategies weekly, For more details, Contact Mr Barry Silbert on Email: Barrysilbert540@gmail .com
DeleteWhatsApp: +447508298691
**FULLZ WITH HIGH CREDIT SCORES AVAILABLE**
Delete**HACKING TOOLS WITH TUTORIALS AVAILABLE**
(High Quality, Genuine Seller)
=>Contact 24/7<=
Telegram> @killhacks
ICQ> 752822040
Skype> Peeterhacks
Fullz info included
NAME+SSN+DOB+DL+DL-STATE+ADDRESS
Employee & Bank details included
High credit fullz with DL 700+
(bulk order negotiable)
**Payment in all crypto currencies will be accepted**
->You can buy few for testing
->Invalid or wrong info will be replaced
->Serious buyers needed for long term
TOOLS & TUTORIALS AVAILABLE:
"SPAMMING" "HACKING" "CARDING" "CASH OUT"
"KALI LINUX" "BLOCKCHAIN BLUE PRINTS"
**TOOLS & TUTORIALS LIST**
->US CC Fullz
->Ethical Hacking Tools & Tutorials
->Kali Linux
->Keylogger & Keystroke Logger
->Facebook & Google Hacking
->Bitcoin Flasher
->SQL Injector
->Paypal Logins/Amazon Logins/Coinbase Logins
->Bitcoin Cracker
->SMTP Linux Root
->Shell Scripting
->DUMPS with pins track 1 and 2 with and without pin
->SMTP's, Safe Socks, Rdp's brute
->Php mailer
->SMS Sender & Email Blaster
->Cpanel
->Server I.P's & Proxies
->Viruses & VPN's
->Premium Accounts (netflix cracker, paypal logins, pornhub, amazon)
->HQ Email Combo
If you are searching for a valid vendor, I'm here for you.
You'll never be disappointed.
**You should try at least once**
Contact 24/7
Telegram> @killhacks
ICQ> 752822040
Skype> Peeterhacks
This comment has been removed by a blog administrator.
ReplyDeleteSelling USA FRESH SSN Leads/Fullz, along with Driving License/ID Number with good connectivity.
ReplyDelete**PRICE FOR ONE LEAD/FULLZ 2$**
All SSN's are Tested & Verified. Fresh spammed data.
**DETAILS IN LEADS/FULLZ**
->FULL NAME
->SSN
->DATE OF BIRTH
->DRIVING LICENSE NUMBER
->ADDRESS WITH ZIP
->PHONE NUMBER, EMAIL
->EMPLOYEE DETAILS
->Bulk order negotiable
->Minimum buy 25 to 30 leads/fullz
->Hope for the long term business
->You can asked for specific states too
**Contact 24/7**
Whatsapp > +923172721122
Email > leads.sellers1212@gmail.com
Telegram > @leadsupplier
ICQ > 752822040
Hello everyone, Are you into trading or just wish to give it a try, please becareful on the platform you choose to invest on and the manager you choose to manage your account because that’s where failure starts from be wise. After reading so much comment i had to give trading tips a try, I have to come to the conclusion that binary options pays massively but the masses has refused to show us the right way to earn That’s why I have to give trading tips the accolades because they have been so helpful to traders . For a free masterclass strategy kindly contact (paytondyian699@gmail.com) for a free masterclass strategy. He'll give you a free tutors on how you can earn and recover your losses in trading for free..
ReplyDelete**SELLING SSN+DOB FULLZ**
ReplyDeleteCONTACT
Telegram > @leadsupplier
ICQ > 752822040
Email > leads.sellers1212@gmail.com
>>1$ each without DL/ID number
>>2$ each with DL
>>5$ each for premium (also included relative info)
*Will reduce price if buying in bulk
*Hope for a long term business
FORMAT OF LEADS/FULLZ/PROS
->FULL NAME
->SSN
->DATE OF BIRTH
->DRIVING LICENSE NUMBER WITH EXPIRY DATE
->COMPLETE ADDRESS
->PHONE NUMBER, EMAIL, I.P ADDRESS
->EMPLOYMENT DETAILS
->REALTIONSHIP DETAILS
->MORTGAGE INFO
->BANK ACCOUNT DETAILS
>Fresh Leads for tax returns & w-2 form filling
>Payment mode BTC, ETH, LTC, PayPal, USDT & PERFECT MONEY
''OTHER GADGETS PROVIDING''
>SSN+DOB Fullz
>CC with CVV
>Photo ID's
>Dead Fullz
>Spamming Tutorials
>Carding Tutorials
>Hacking Tutorials
>SMTP Linux Root
>DUMPS with pins track 1 and 2
>Sock Tools
>Server I.P's
>HQ Emails with passwords
Email > leads.sellers1212@gmail.com
Telegram > @leadsupplier
ICQ > 752822040
THANK YOU
Amazing trading platform, quick withdrawal I have been using this platform together with the most recommended forex strategy on the internet from Robert and so far i have no complaints making $7000-$15000 on a weekly basis he is great and i am thankful i was lucky enough to have met him via Email Robertseaman939@gmail.com or
ReplyDeleteWhatsApp: +44 7466 770724
BE SMART AND BECOME RICH IN LESS THAN 3DAYS....It all depends on how fast
ReplyDeleteyou can be to get the new PROGRAMMED blank ATM card that is capable of
hacking into any ATM machine,anywhere in the world. I got to know about
this BLANK ATM CARD when I was searching for job online about a month
ago..It has really changed my life for good and now I can say I'm rich and
I can never be poor again. The least money I get in a day with it is about
$50,000.(fifty thousand USD) Every now and then I keeping pumping money
into my account. Though is illegal,there is no risk of being caught
,because it has been programmed in such a way that it is not traceable,it
also has a technique that makes it impossible for the CCTVs to detect
you..For details on how to get yours today, email the hackers on : (
atmmachinehackers1@gmail.com ). Tell your
loved once too, and start to live large. That's the simple testimony of how
my life changed for good...Love you all ...the email address again is ;
atmmachinehackers1@gmail.com
Hi Guy's
ReplyDeleteFresh & valid spammed USA SSN+Dob Leads with DL available in bulk.
>>1$ each SSN+DOB
>>2$ each with SSN+DOB+DL
>>5$ each for premium (also included relative info)
Prices are negotiable in bulk order
Serious buyer contact me no time wasters please
Bulk order will be preferable
CONTACT
Telegram > @leadsupplier
ICQ > 752822040
Email > leads.sellers1212@gmail.com
OTHER STUFF YOU CAN GET
SSN+DOB Fullz
CC's with CVV's (vbv & non-vbv)
USA Photo ID'S (Front & back)
All type of tutorials available
(Carding, spamming, hacking, scam page, Cash outs, dumps cash outs)
SMTP Linux Root
DUMPS with pins track 1 and 2
Socks, rdp's, vpn's
Server I.P's
HQ Emails with passwords
Looking for long term business
For trust full vendor, feel free to contact
CONTACT
Telegram > @leadsupplier
ICQ > 752822040
Email > leads.sellers1212@gmail.com
Do you Need Instant Loan from $2,000 to $50,000,000.00 with no collateral required and receive a no obligation loan approval.We welcome the opportunity to show you how effective we are at helping our clients obtain the money they need to succeed. Our professional staff is available for a Free Consultation.At Patiala legitimate company Pvt , contact us now 2% interest rate, both long and short term cash reply to us (Whats App) number: +919394133968 patialalegitimate515@gmail.com
ReplyDeleteMr Jeffery
https://pcgamesfully.com/l-a-noire-complete-edition-for-pc/
ReplyDeleteL.A. Noire Complete Edition is a singleplayer action and adventure game. The game history is set in the most famous city Los Angles of California. And the game follows the LAPD department of Clafroni.LAPD means the Los Angles Police department. The main protagonist of the game is a detective from that police department. His mission is to solve different crime issues in 5 divisions of California. In this game, the player must investigate the crime, track the information, and verify the bad people to get succeed in the game.
https://crackedkeystudio.com/tenorshare-ultdata-cracked/
ReplyDeleteTenorshare UltData Crack is developed for iOS PC and it goes about with the 3 amazing data recovery modes. On the other hand, it entrusts the clients to recover data instantly. Moreover, this amazing product for data recovery provides every tool that you may need. Besides, it does a lot waste your bytes and offers quick working. In other words, if the users are confused during searching and finding the tools, best for their work they may use it.
HAVE YOU LOST YOUR MONEY TO BINARY OPTION SCAM OR ANY ONLINE SCAM WHATSOEVER?.DO YOUR DESIRE CREDIT REPAIR[EQUIFAX, EXPERIAN, TRANSUNION? WELL, YOU HAVE FOUND REDEMPTION.
ReplyDelete⚠️ BEWARE OF FRAUDSTARS looking to hoax.
if you have been a VICTIM, contact
:Email:creditcards.creditscoreupgrade@gmail.com
:whatsapp:+1785 279 3047 for directives.
Here, it's always a win for you.
��OUR SERVICES��
➡️Binary Option funds recovery
➡️Social media hack
➡️Recovery of loan scam
➡️Credit repair (Equifax,Experian,Transunion)
➡️E mail hack
➡️College score upgrade
➡️Android & iPhone Hack
➡️Website design
➡️Website hack
And lots more.
CONTACT INFO:
Email:creditcards.creditscoreupgrade@gmail.com
whatsapp:+1785 279 3047
Copyright ©️ 2022.
**FULLZ WITH HIGH CREDIT SCORES AVAILABLE**
ReplyDelete**HACKING TOOLS WITH TUTORIALS AVAILABLE**
(High Quality, Genuine Seller)
=>Contact 24/7<=
Telegram> @killhacks
ICQ> 752822040
Skype> Peeterhacks
Fullz info included
NAME+SSN+DOB+DL+DL-STATE+ADDRESS
Employee & Bank details included
High credit fullz with DL 700+
(bulk order negotiable)
**Payment in all crypto currencies will be accepted**
->You can buy few for testing
->Invalid or wrong info will be replaced
->Serious buyers needed for long term
TOOLS & TUTORIALS AVAILABLE:
"SPAMMING" "HACKING" "CARDING" "CASH OUT"
"KALI LINUX" "BLOCKCHAIN BLUE PRINTS"
**TOOLS & TUTORIALS LIST**
->US CC Fullz
->Ethical Hacking Tools & Tutorials
->Kali Linux
->Keylogger & Keystroke Logger
->Facebook & Google Hacking
->Bitcoin Flasher
->SQL Injector
->Paypal Logins/Amazon Logins/Coinbase Logins
->Bitcoin Cracker
->SMTP Linux Root
->Shell Scripting
->DUMPS with pins track 1 and 2 with and without pin
->SMTP's, Safe Socks, Rdp's brute
->Php mailer
->SMS Sender & Email Blaster
->Cpanel
->Server I.P's & Proxies
->Viruses & VPN's
->Premium Accounts (netflix cracker, paypal logins, pornhub, amazon)
->HQ Email Combo
If you are searching for a valid vendor, I'm here for you.
You'll never be disappointed.
**You should try at least once**
Contact 24/7
Telegram> @killhacks
ICQ> 752822040
Skype> Peeterhacks
It was really an enjoyable piece of content! You are very smart at integrating skills into this. Freelancing is a wonderful opportunity. I got a perfect platform to turn my Best coder in India dream into a reality which is Eiliana.com. They are equipped with experts who have the true potential to provide solutions to aspiring freelancers.
ReplyDeleteIt is really a very good blog, I have shared this blog with my friends also and now I want to know about the product on this site https://affitrends.com/ and I will tell everyone that this is a must. Try it, and you will get all the products here, I get very good service from here.
ReplyDeleteThis 7 steps to solve coding problem its very helpful and useful. I apricate your hard work. Keep it up. Now it's time to avail Locksmith in Leeds for more information.
ReplyDeleteSchool Water Safety WA is an organization dedicated to promoting water safety among students in Western Australia. They offer a range of programs and resources to educate young people about the importance of water safety and how to stay safe in and around water. From swimming lessons to beach safety workshops, School Water Safety WA aims to equip students with the knowledge and skills they need to enjoy water activities responsibly.
ReplyDeleteOverall, the safety and well-being of students when it comes to water-related activities are of primary concern for schools in Western Australia. Through comprehensive education, robust safety guidelines, and diligent supervision, schools in WA strive to create a safe and enjoyable environment for students to develop their water skills and knowledge, fostering a culture of water safety from an early age.