DEV Community

Asim Shrestha
Asim Shrestha

Posted on • Edited on

1

What to do when tackling a new project.

Step 1

Whenever you're tackling a new project, it can be tempting to dive right into writing code. But more often than not, It's best to take a step and consider the bigger picture. I recommend first drawing up a high-level plan for what your program needs to do. Don't think about the actual code yet - you can worry about that later. Right now, stick to broad strokes.

For example, your phone and email address extractor project will need to do the following:

  • Get the text off the clipboard.
  • Find all phone numbers and email addresses in the text.
  • Paste them onto the clipboard.

Step 2

Now you can start thinking about how think might work in code. the code will need to do the following:

  • Use the pyperclip module to copy and paste strings.
  • Create two regexes, one for matching phone numbers and the other for matching email addresses.
  • Neatly format the matched strings into a single string to paste.
  • Display some kind of message if no matches were found in the text.

Heroku

Build apps, not infrastructure.

Dealing with servers, hardware, and infrastructure can take up your valuable time. Discover the benefits of Heroku, the PaaS of choice for developers since 2007.

Visit Site

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay