SlideShare a Scribd company logo
10 TIPS TO SAVE YOU TIME
AND FRUSTRATION WHILE
PROGRAMMING
BY: JEFF HALE
PROGRAMMING CAN BE FRUSTRATING
2
Many false starts are due in part to the slow and tedious process of learning
to code and the frustration that accompanies it. Consequently, I’m passionate
about removing the unnecessary obstacles that prevent people from becoming
competent coders. There will always be obstacles, but there’s no reason for
unnecessary obstacles.
Here are 10 tips to help you more quickly leap over the hurdles and achieve a
sense of competency. Many of these tips might seem minor or obvious to you
if you’ve been coding for years, but when starting out, nothing is obvious. And
even if you’ve been coding since cell phones were called car phones, there
might be a tip or two that will save you time.
1 +
3
Most of the time when you are learning to code, I suggest you split your screen(s) into
two side by side panels — one for the code you’re working on in your Jupyter notebook
or code editor and one for your web browser. You’ll use your web browser to look at
documentation, Stack Overflow, and tutorials. If your screen is too small, I suggest you
get a bigger one — if you can afford it. You can get a 25-inch monitor on Amazon for a
little over $100 in the US. As you get more proficient, you’ll often want to focus on a
single piece of work. Use can use keyboard shortcut keys to toggle between split screen
to full screen.
SPLIT YOUR SCREEN
For a Mac, I like the BetterSnapTool for $2.99.
Some Windows options are discussed in this article.
4
CUT OUT
DISTRACTIONS
Silence notifications on your
computer and phone. Move your
phone away from you if you can.
Play some calming instrumental
music or use noise-canceling
headphones if you’re in a noisy
area. The better you can focus,
the faster you can learn.
2
TYPE OUT
EXAMPLE CODE
You can’t just read a tutorial and
hope to remember it. Copying and
pasting is of little value. You have
to type it. Then extend it. Then
type it from memory. “In theory,
there’s no difference between
theory and practice. In practice,
there is.” — Benjamin Brewster
3
LEARN OVER
MULTIPLE DAYS
Learn a new code concept and
quiz yourself on it over multiple
days. Research shows that when it
comes to remembering things for
the long haul, spaced repetition
works far better than cramming.
4
5
LEARN BY TEACHING
Clearly explaining a concept to
others — either out loud or in writing —
forces you to understand the
concept’s essence, draw relationships, and
create analogies. You strengthen the
connections in your brain. This tip is part of
the excellent Feynman learning technique.
5
6
Variable types aren’t the most exciting topic. Classes
with attributes and methods might seem advanced.
But once you understand a language really well,
the library is far easier to use. You’ll only make a
few errors and save so much time.
UNDERSTAND A PROGRAMMINGUNDERSTAND A PROGRAMMING
LANGUAGE WELL BEFORE YOU TRYLANGUAGE WELL BEFORE YOU TRY
TO USE A LIBRARY WRITTEN IN IT.TO USE A LIBRARY WRITTEN IN IT.
LANGUAGE BEFORE THE LIBRARY
6
7
One Tab is a handy Chrome
extension to use to save tabs
for later.
7
LEARN ONE THING AT A TIME
Don’t try to learn two things at once. You
don’t learn twice as slowly, you learn like
10x as slowly. Relatedly, don’t get
distracted by shiny things. Have a place
to keep URLs that look like tempting rab-
bit holes to jump down. Put the URLs that
aren’t relevant for the thing you’re learning
right now somewhere for safekeeping.
8
SLEEP, EXERCISE,
AND STAY RESILIENT
Put your brain in a strong
position to form and strengthen
neural connections. Learn more
about techniques to help you stay
sharp in my Memorable Python
book.
8
LEARN TO TYPE
CODE FASTER
The more you type unusual symbols,
the faster you become at typing them.
However, a little intentionality can speed
this process significantly. Invest in learning
a good touch typing form. Here’s a little
exercise to help from SpeedCoder.
9
10
9
BECOME A PRO WITH KEYBOARD SHORTCUTS
HERE
are links to shortcuts
for:
Chrome
Mac
Windows.
Then restart your terminal and type two
keystrokes instead of two words.
IF
you’re a data scientist
or data analyst, I made a
GitHub Gist of Jupyter
Lab shortcuts here.
IT'S
also a good idea to create
shortcuts for a Mac or Linux
terminal by adding lines such as
the following to your Bash Profile
at:
~/.bash_profile:alias gs="git status".
+
10
Here's a game plan for resolving
95% of errors quickly.
1. Look for a typo	
2. Read the top and bottom of the error
	 message stack trace first
A parentheses that are missing or a variable or function that’s misspelled. Syntax highlighting can help here.
	 Always do your typing in software that provides code highlighting to improving your chances of avoiding or
quickly fixing indentation, unbalanced parentheses, and similar errors. There are lots of good code editors to
choose from. If you are just starting out, I suggest VSCode — it has the most market share, it’s free, and it
has gobs of handy features.
The code in the middle is generally less helpful. Then look at your code and see if you can figure out what’s
wrong, given the clues in the error message. If you can’t decode the error message quickly, copy and paste
the last line of the message into Google (if using Python. Other languages might have the error message
	 before the stack trace). New coders biggest mistake is not turning to google with an error message quickly
enough.
BONUS
+
11
...
3. Filter the online resources
Separate the wheat from the chaff. Here are a few heuristics to help you find higher quality resources faster:
Stack Overflow, Medium, Reddit, Hacker News, Dev and other online communities have feedback indicators such as
upvotes or claps to show which content is on target. These metrics aren’t perfect, but they generally work pretty well.
Stack Overflow, the Towards Data Science Medium publication, GitHub issues for the repo in question, the official
docs for a language or library are the sites where I find the most solutions.
It’s hit or miss with the quality of blogs in Google search results. If you’re using Python, I can suggest some good sites
based on my experience:
Real Python
Data School
Dataquest Blog
DataCamp Blog
Practical Business Python
Chris Albon
+
12
...
4. Avoid older resources
For most problems, you want resources that aren’t more than a few years old. When searching for a solution to an
error on Google, filter out old results — either by time-boxing the search parameters or informally when looking over
the resulting snippets. If you’re starting out in Python, content about Python 2 from 2009 is unlikely to help you.
APIs evolve and how things were done is often not the recommended way to do them today. You are more likely to
find an applicable answer in relatively recent results. If your initial forays are unsuccessful, then it’s worth looking
through older posts and lower-quality sites on the next pass.
5. Learn what error codes mean
Here’s a list of common error codes and explanations for Python. And here’s a really nice flow chart to help you tackle
common Python errors. If you use the Python pandas library for data manipulation, there are common errors. Here’s
a GitHub Gist I made with a Jupyter notebook of common errors and how to resolve them:
Common pandas errors: https://gist.github.com/discdiver/2f8df1c3f1c66f47129568a82c0666e5.
TO SUM IT UP...
13
Hopefully, these 10 tips for reducing frustration and increasing your speed will
save you time. And hopefully, the 5-step plan for resolving error messages will
help you or someone you learn more faster.
With the right mindset, a little guidance, and a lot of practice anyone can learn
to code. It might not be fast or easy, but hopefully, this article will make it a bit
less frustrating. Happy Learning!
If you’re interested in tips to help you increase your productivity, subscribe to
the author’s monthly Data Awesome newsletter.
Original post here.
14
THANK YOU!
SATURN CLOUD
33 IRVING PL
NEW YORK, NY 10003
SUPPORT@SATURNCLOUD.IO
(831) 228-8739

More Related Content

Similar to 10 tips to save you time and frustration while programming

30% faster coder on-boarding when you have a code cookbook
30% faster coder on-boarding when you have a code cookbook30% faster coder on-boarding when you have a code cookbook
30% faster coder on-boarding when you have a code cookbook
Gabriel Paunescu 🤖
 
Untangling spring week8
Untangling spring week8Untangling spring week8
Untangling spring week8
Derek Jacoby
 
Linux Commands, C, C++, Java and Python Exercises For Beginners
Linux Commands, C, C++, Java and Python Exercises For BeginnersLinux Commands, C, C++, Java and Python Exercises For Beginners
Linux Commands, C, C++, Java and Python Exercises For Beginners
Manjunath.R -
 
C, C++, Java, Python, PHP, JavaScript and Linux For Beginners
C, C++, Java, Python, PHP, JavaScript and Linux For BeginnersC, C++, Java, Python, PHP, JavaScript and Linux For Beginners
C, C++, Java, Python, PHP, JavaScript and Linux For Beginners
Manjunath.R -
 
Best pratice
Best praticeBest pratice
Best pratice
Eugenio Romano
 
Become a Better Developer with Debugging Techniques for Drupal (and more!)
Become a Better Developer with Debugging Techniques for Drupal (and more!)Become a Better Developer with Debugging Techniques for Drupal (and more!)
Become a Better Developer with Debugging Techniques for Drupal (and more!)
Acquia
 
GOOD PROGRAMMING
GOOD PROGRAMMINGGOOD PROGRAMMING
GOOD PROGRAMMINGBilal Zaka
 
EduSparkz Thunder Thursday Debugging Code
EduSparkz Thunder Thursday Debugging CodeEduSparkz Thunder Thursday Debugging Code
EduSparkz Thunder Thursday Debugging Code
Satish AG
 
TxJS 2011
TxJS 2011TxJS 2011
TxJS 2011
Brian LeRoux
 
You shouldneverdo
You shouldneverdoYou shouldneverdo
You shouldneverdodaniil3
 
WordCamp US: Clean Code
WordCamp US: Clean CodeWordCamp US: Clean Code
WordCamp US: Clean Code
mtoppa
 
Introduction to react js
Introduction to react jsIntroduction to react js
Introduction to react js
MunirMahmud3
 
How to become a software developer
How to become a software developerHow to become a software developer
How to become a software developer
Eyob Lube
 
C programming guide new
C programming guide newC programming guide new
C programming guide new
Kuntal Bhowmick
 
Learning Joomla! in a weekend (for developers)
Learning Joomla! in a weekend (for developers)Learning Joomla! in a weekend (for developers)
Learning Joomla! in a weekend (for developers)
Valentin Despa
 
Put to the Test
Put to the TestPut to the Test
Put to the Test
Kevlin Henney
 
Low maintenance perl notes
Low maintenance perl notesLow maintenance perl notes
Low maintenance perl notes
Perrin Harkins
 
LangChain Intro by KeyMate.AI
LangChain Intro by KeyMate.AILangChain Intro by KeyMate.AI
LangChain Intro by KeyMate.AI
OzgurOscarOzkan
 
LanGCHAIN Framework
LanGCHAIN FrameworkLanGCHAIN Framework
LanGCHAIN Framework
Keymate.AI
 
Scottish Ruby Conference 2014
Scottish Ruby Conference  2014Scottish Ruby Conference  2014
Scottish Ruby Conference 2014michaelag1971
 

Similar to 10 tips to save you time and frustration while programming (20)

30% faster coder on-boarding when you have a code cookbook
30% faster coder on-boarding when you have a code cookbook30% faster coder on-boarding when you have a code cookbook
30% faster coder on-boarding when you have a code cookbook
 
Untangling spring week8
Untangling spring week8Untangling spring week8
Untangling spring week8
 
Linux Commands, C, C++, Java and Python Exercises For Beginners
Linux Commands, C, C++, Java and Python Exercises For BeginnersLinux Commands, C, C++, Java and Python Exercises For Beginners
Linux Commands, C, C++, Java and Python Exercises For Beginners
 
C, C++, Java, Python, PHP, JavaScript and Linux For Beginners
C, C++, Java, Python, PHP, JavaScript and Linux For BeginnersC, C++, Java, Python, PHP, JavaScript and Linux For Beginners
C, C++, Java, Python, PHP, JavaScript and Linux For Beginners
 
Best pratice
Best praticeBest pratice
Best pratice
 
Become a Better Developer with Debugging Techniques for Drupal (and more!)
Become a Better Developer with Debugging Techniques for Drupal (and more!)Become a Better Developer with Debugging Techniques for Drupal (and more!)
Become a Better Developer with Debugging Techniques for Drupal (and more!)
 
GOOD PROGRAMMING
GOOD PROGRAMMINGGOOD PROGRAMMING
GOOD PROGRAMMING
 
EduSparkz Thunder Thursday Debugging Code
EduSparkz Thunder Thursday Debugging CodeEduSparkz Thunder Thursday Debugging Code
EduSparkz Thunder Thursday Debugging Code
 
TxJS 2011
TxJS 2011TxJS 2011
TxJS 2011
 
You shouldneverdo
You shouldneverdoYou shouldneverdo
You shouldneverdo
 
WordCamp US: Clean Code
WordCamp US: Clean CodeWordCamp US: Clean Code
WordCamp US: Clean Code
 
Introduction to react js
Introduction to react jsIntroduction to react js
Introduction to react js
 
How to become a software developer
How to become a software developerHow to become a software developer
How to become a software developer
 
C programming guide new
C programming guide newC programming guide new
C programming guide new
 
Learning Joomla! in a weekend (for developers)
Learning Joomla! in a weekend (for developers)Learning Joomla! in a weekend (for developers)
Learning Joomla! in a weekend (for developers)
 
Put to the Test
Put to the TestPut to the Test
Put to the Test
 
Low maintenance perl notes
Low maintenance perl notesLow maintenance perl notes
Low maintenance perl notes
 
LangChain Intro by KeyMate.AI
LangChain Intro by KeyMate.AILangChain Intro by KeyMate.AI
LangChain Intro by KeyMate.AI
 
LanGCHAIN Framework
LanGCHAIN FrameworkLanGCHAIN Framework
LanGCHAIN Framework
 
Scottish Ruby Conference 2014
Scottish Ruby Conference  2014Scottish Ruby Conference  2014
Scottish Ruby Conference 2014
 

Recently uploaded

Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
DianaGray10
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Aggregage
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
Ralf Eggert
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
Pierluigi Pugliese
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
Dorra BARTAGUIZ
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
Uni Systems S.M.S.A.
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
RinaMondal9
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
DianaGray10
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
SOFTTECHHUB
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
Neo4j
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Nexer Digital
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems S.M.S.A.
 

Recently uploaded (20)

Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
 

10 tips to save you time and frustration while programming

  • 1. 10 TIPS TO SAVE YOU TIME AND FRUSTRATION WHILE PROGRAMMING BY: JEFF HALE
  • 2. PROGRAMMING CAN BE FRUSTRATING 2 Many false starts are due in part to the slow and tedious process of learning to code and the frustration that accompanies it. Consequently, I’m passionate about removing the unnecessary obstacles that prevent people from becoming competent coders. There will always be obstacles, but there’s no reason for unnecessary obstacles. Here are 10 tips to help you more quickly leap over the hurdles and achieve a sense of competency. Many of these tips might seem minor or obvious to you if you’ve been coding for years, but when starting out, nothing is obvious. And even if you’ve been coding since cell phones were called car phones, there might be a tip or two that will save you time.
  • 3. 1 + 3 Most of the time when you are learning to code, I suggest you split your screen(s) into two side by side panels — one for the code you’re working on in your Jupyter notebook or code editor and one for your web browser. You’ll use your web browser to look at documentation, Stack Overflow, and tutorials. If your screen is too small, I suggest you get a bigger one — if you can afford it. You can get a 25-inch monitor on Amazon for a little over $100 in the US. As you get more proficient, you’ll often want to focus on a single piece of work. Use can use keyboard shortcut keys to toggle between split screen to full screen. SPLIT YOUR SCREEN For a Mac, I like the BetterSnapTool for $2.99. Some Windows options are discussed in this article.
  • 4. 4 CUT OUT DISTRACTIONS Silence notifications on your computer and phone. Move your phone away from you if you can. Play some calming instrumental music or use noise-canceling headphones if you’re in a noisy area. The better you can focus, the faster you can learn. 2 TYPE OUT EXAMPLE CODE You can’t just read a tutorial and hope to remember it. Copying and pasting is of little value. You have to type it. Then extend it. Then type it from memory. “In theory, there’s no difference between theory and practice. In practice, there is.” — Benjamin Brewster 3 LEARN OVER MULTIPLE DAYS Learn a new code concept and quiz yourself on it over multiple days. Research shows that when it comes to remembering things for the long haul, spaced repetition works far better than cramming. 4
  • 5. 5 LEARN BY TEACHING Clearly explaining a concept to others — either out loud or in writing — forces you to understand the concept’s essence, draw relationships, and create analogies. You strengthen the connections in your brain. This tip is part of the excellent Feynman learning technique. 5
  • 6. 6 Variable types aren’t the most exciting topic. Classes with attributes and methods might seem advanced. But once you understand a language really well, the library is far easier to use. You’ll only make a few errors and save so much time. UNDERSTAND A PROGRAMMINGUNDERSTAND A PROGRAMMING LANGUAGE WELL BEFORE YOU TRYLANGUAGE WELL BEFORE YOU TRY TO USE A LIBRARY WRITTEN IN IT.TO USE A LIBRARY WRITTEN IN IT. LANGUAGE BEFORE THE LIBRARY 6
  • 7. 7 One Tab is a handy Chrome extension to use to save tabs for later. 7 LEARN ONE THING AT A TIME Don’t try to learn two things at once. You don’t learn twice as slowly, you learn like 10x as slowly. Relatedly, don’t get distracted by shiny things. Have a place to keep URLs that look like tempting rab- bit holes to jump down. Put the URLs that aren’t relevant for the thing you’re learning right now somewhere for safekeeping.
  • 8. 8 SLEEP, EXERCISE, AND STAY RESILIENT Put your brain in a strong position to form and strengthen neural connections. Learn more about techniques to help you stay sharp in my Memorable Python book. 8 LEARN TO TYPE CODE FASTER The more you type unusual symbols, the faster you become at typing them. However, a little intentionality can speed this process significantly. Invest in learning a good touch typing form. Here’s a little exercise to help from SpeedCoder. 9
  • 9. 10 9 BECOME A PRO WITH KEYBOARD SHORTCUTS HERE are links to shortcuts for: Chrome Mac Windows. Then restart your terminal and type two keystrokes instead of two words. IF you’re a data scientist or data analyst, I made a GitHub Gist of Jupyter Lab shortcuts here. IT'S also a good idea to create shortcuts for a Mac or Linux terminal by adding lines such as the following to your Bash Profile at: ~/.bash_profile:alias gs="git status".
  • 10. + 10 Here's a game plan for resolving 95% of errors quickly. 1. Look for a typo 2. Read the top and bottom of the error message stack trace first A parentheses that are missing or a variable or function that’s misspelled. Syntax highlighting can help here. Always do your typing in software that provides code highlighting to improving your chances of avoiding or quickly fixing indentation, unbalanced parentheses, and similar errors. There are lots of good code editors to choose from. If you are just starting out, I suggest VSCode — it has the most market share, it’s free, and it has gobs of handy features. The code in the middle is generally less helpful. Then look at your code and see if you can figure out what’s wrong, given the clues in the error message. If you can’t decode the error message quickly, copy and paste the last line of the message into Google (if using Python. Other languages might have the error message before the stack trace). New coders biggest mistake is not turning to google with an error message quickly enough. BONUS
  • 11. + 11 ... 3. Filter the online resources Separate the wheat from the chaff. Here are a few heuristics to help you find higher quality resources faster: Stack Overflow, Medium, Reddit, Hacker News, Dev and other online communities have feedback indicators such as upvotes or claps to show which content is on target. These metrics aren’t perfect, but they generally work pretty well. Stack Overflow, the Towards Data Science Medium publication, GitHub issues for the repo in question, the official docs for a language or library are the sites where I find the most solutions. It’s hit or miss with the quality of blogs in Google search results. If you’re using Python, I can suggest some good sites based on my experience: Real Python Data School Dataquest Blog DataCamp Blog Practical Business Python Chris Albon
  • 12. + 12 ... 4. Avoid older resources For most problems, you want resources that aren’t more than a few years old. When searching for a solution to an error on Google, filter out old results — either by time-boxing the search parameters or informally when looking over the resulting snippets. If you’re starting out in Python, content about Python 2 from 2009 is unlikely to help you. APIs evolve and how things were done is often not the recommended way to do them today. You are more likely to find an applicable answer in relatively recent results. If your initial forays are unsuccessful, then it’s worth looking through older posts and lower-quality sites on the next pass. 5. Learn what error codes mean Here’s a list of common error codes and explanations for Python. And here’s a really nice flow chart to help you tackle common Python errors. If you use the Python pandas library for data manipulation, there are common errors. Here’s a GitHub Gist I made with a Jupyter notebook of common errors and how to resolve them: Common pandas errors: https://gist.github.com/discdiver/2f8df1c3f1c66f47129568a82c0666e5.
  • 13. TO SUM IT UP... 13 Hopefully, these 10 tips for reducing frustration and increasing your speed will save you time. And hopefully, the 5-step plan for resolving error messages will help you or someone you learn more faster. With the right mindset, a little guidance, and a lot of practice anyone can learn to code. It might not be fast or easy, but hopefully, this article will make it a bit less frustrating. Happy Learning! If you’re interested in tips to help you increase your productivity, subscribe to the author’s monthly Data Awesome newsletter. Original post here.
  • 14. 14 THANK YOU! SATURN CLOUD 33 IRVING PL NEW YORK, NY 10003 SUPPORT@SATURNCLOUD.IO (831) 228-8739