FINALLY! After an hour of debugging, EVERYTHING WORKS!
Encryption
Decryption
Uploading to & Fetching from the Database
Sign Up
Login
The only things that aren’t fully working yet are Swiption and Random Mode, and honestly that’s on me 😭. I got way too focused on making everything else work first AND GOD I had to improvise whole sections of the decryption logic.
If you compare the code I committed before this and the code I committed today, the difference is crazy, i removed and added so much. My old decryption was code wrong, i mean the logic was on point but the syntax and a few other things were off that’s why it wasn’t working.
Some of the errors were genuinely silly 😅
All my elifs somehow had the same condition (I still don’t know how I missed that).
My traversal i was a string, and I kept accidentally treating it like an int iterator.
A lot of bugs were literally sitting right in front of my eyes.
Some bugs were much bigger tho. One of the weirdest happened after I finally got decryption working. The decrypted text had way too many spaces between words. After staring at it for a while, I noticed that the number of spaces was exactly the same as the number of unique letters in the text. That’s when it hit me — the loop was continuing to run even after finding a match. Few breaks later, everything worked 😭.
Phewww. A lot of silly bugs.
Now only Swiption and Random Mode remain. They’re already halfway done in a separate file, so once those are finished I’ll focus on making the code look real pretty, like -
Fixing my silly variable names
Comment notes ig?
Better spacing and formatting
Cleaning up extra files
Writing a proper README and project description
And yes…
On the 13th Devlog, the project will be done :)
(And also now i tried to properly format the devlog so that it’s easier to read, you can tell me if it’s better 🙃)