Python Forum
CookBook Project on github
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
CookBook Project on github
#5
I haven't really got time to look much at the code in detail, but a couple of quick things:

1. Commit messages: make sure they're useful - "commit" tells you nothing really about what that commit changes. I know you can look at the diff, but having a short summary lets you know at a glance. Commits should be small enough that you can describe a change in a short sentence. Why? A commit that's hard to describe is likely making lots of changes at once and that's bad because if you need to undo something, it won't be easy.

2. You don't really need to list the directory structure in the README. People can see the structure.

3. In your database code, you're using f-strings to parameterise your SQL statements. Don't do that, as it's vulnerable to SQL injection. Instead, you should be using parameter substitution placeholders. For SQLite, those are ? characters (see the docs) and you'll be able to find out the ones for MySQL in their docs too.
Reply


Messages In This Thread
CookBook Project on github - by menator01 - May-14-2020, 12:03 AM
RE: CookBook Project on github - by menator01 - May-14-2020, 03:34 AM
RE: CookBook Project on github - by menator01 - May-14-2020, 07:17 AM
RE: CookBook Project on github - by scratchmyhead - May-16-2020, 07:20 AM
RE: CookBook Project on github - by ndc85430 - May-25-2020, 07:21 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  CookBook Learning Project menator01 0 1,623 Apr-29-2020, 08:20 PM
Last Post: menator01

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020