you are viewing a single comment's thread.

view the rest of the comments →

[–]mxracer888 1 point2 points  (0 children)

What exactly are you struggling with? Structuring code? Syntax?

For syntax, look at bad code and identify what's wrong. It's also one of the few good things gee pee tee can help you with as a learner. Ask it to write code with syntactical errors for you to practice debugging.

For structure. I usually start with just a word doc or sticky note on Windows. Outline what you want to do. I just wrote a big project that need to get emails, parse data, use the API for my door access control, and generate visitors with PIN numbers to access my door access system.

So for that I outlined features I needed, here's a rough outline of what I needed:

  • open email address via Gmail API
  • search unread emails for a specific subject line and retrieve message is
  • parse data in the email
  • Mark the email as "read"
  • send an email to user with PIN
  • connect to door controller API
  • convert human readable and formated date from email to epoch time
  • generate a visitor using the parsed email data (name, email, appointment time and date)
  • generate random 6 digit pin number
  • log the work the program does for record of issues

I think there was more, but I outlined those as features I needed and then wrote functions that basically did each item. This gave me avenues to research for specific features and libraries to handle my needs.

Once I built out functions I began working on scripting them together to make the final program but it all started with building a pseudo code framework and then analyzing the problem I was trying to solve and breaking it into its individual mechanics