Rubber Duck Challenge #38
leemc-data-ed
announced in
Data Challenges
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Rubber Duck Challenge
Whether you are just learning to code for the first time, or a professional working with code every day, you probably spend a lot of time feeling stuck. Since everyone is getting stuck all the time, it is a good idea to learn how to handle getting stuck like an expert. Here are a few strategies that can help you get unstuck like a pro.
Cheat sheets aren't cheating
A "cheat sheet" is a list of commands and short instructions for how to use them. Posit has a collection of useful cheat sheets for many R packages on their website. Despite the name, they are tools you can use all the time.
Do you have a favorite cheat sheet or webpage you keep coming back to? Post it below, so others can benefit from it too.
Search if others have encountered the same problem
Sometimes code you think should work returns an error message instead. Some of those error messages will be clear and helpful, but sometimes not. One good strategy is to copy the entire error message into an internet search. This will usually show you how other people got the same error message, and hopefully how they were able to fix their problem.
Do you have a favorite (or least favorite) error message that you have encountered? What do you do when you encounter it?
Ask a rubber duck
"Rubber duck debugging" is a strategy coders use to help think through why code isn't working as they expected, or how to build something that does what they want.
The idea is to explain what your problem is to a rubber duck. Some people have actual toy rubber ducks for this purpose, but any inanimate object you can talk at will work. The rubber duck doesn't know what your code is supposed to do, or what problems you are having, so you need to explain your problem very clearly and in plain language to the rubber duck. The process of explaining what is or isn't happening can frequently be very clarifying and help you get unstuck!
A friend or colleague could also help you in the same way, even, or perhaps especially, if they also don't know what you are trying to do. A person might ask better followup questions to your explanations, but unlike a rubber duck, they probably don't have unlimited time and patience.
What qualities (personality/catchphrase/outfit/etc.) would you want your rubber duck to reflect back to you?
Ask an expert
Sometimes everyone needs the help of an expert to get unstuck, and asking for that help is an important skill to have!
Even if you have a colleague or friend who can help you, it is still a good skill to learn how to ask the broader community for help. You can get some good practice in the friendly, supportive environment of the Q&A discussion here in our community of practice.
Another good place to post a question is on Stack Overflow, although be aware that helpful answers may not be delivered in the most friendly manner. This is a known problem in the coding community, but read this article on Medium about how to ask for programming help in public forums.
As you get deeper into a particular coding language or coding community, you might find other forums where people ask and answer questions about that language. For example if a site had a lot of conversation about things similar to what you want to do, but not quite enough information to do what you want to do, that is probably a good place to pose your question to a receptive and knowledgeable audience.
Are you stuck on something related to what you are learning in the DART program? Ask a question about it in the Q&A channel.
Or have you asked a question in a public forum and gotten a useful answer? Share a link below!
Beta Was this translation helpful? Give feedback.
All reactions