Devlog #10 - A Slight Setback
This is going to be the biggest devlog. And this one’s gonna be a disappointing one 🥲
.
First of all, I was talking to my brother and he asked such a good question - It pointed to a flaw which I didn’t notice at all.
.
Let’s say there’s a word “am” in the journal, a’s cover is 1 and m’s cover is 27 (so am = 127). Now cuz there’s not spacing the decryption code will actually traverse thru each of number at a time in the encrypted text (127), so it’ll literally convert 1 and then 2 and then 7 separately. This was such a major flaw in my logic and I’m still agonizing internally over the fact that my eyes missed it.
.
But ah it’s ok, I’m fixing that by simply making adding a trailing space after the cover to separate each letter’s cover.
.
There was so much running and errors and staring at screen and all that.
.
Another thing I noticed is that in Advanced Encryption when the user will choose covers for 52 letters, he might accidentally repeat a cover - which obvi will make it impossible to distinguish btw 2 letters. So I gotta add each cover to a list and then every time the user adds a cover i’ll see if it’s already there in the list or not.
.
Now these flaws I got to know when I was talking to my brother, and it was past midnight. So almost immediately after waking up I was onto fixing these flaws, and it’s in progress :)
.
Apart from that, I’ve been refining the code (Found some silly errors in functions) and fixing more logic issues.
.
Earlier the Encryption Key that I was using to decrypt, it was a dictionary - with the keys as letters and values as the cover. So before uploading them to the db table, I converted them into text. But then while fixing decryption code, I did tried dict(the string key) and later found out that it all doesn’t work like that, the syntax.
.
I checked online, asked GPT, he suggested that I use the json module, and so I did. Json made it pretty easy, now the conversion was smooth and 2 liner.
.
Also I fixed all the login/signup system, it works as smooth as butter now Hehe
.
I’d say the main issue wasn’t the code it was following where am I.
.
Like cuz there are so many functions and steps and paths that I was getting overwhelmed (plus the code is like 600 lines), so I basically carefully went thru each line of code and arranged each function in an order and side by side made the final flowchart (It made following the code super easy and looks cool tbh) - But yes that’s hectic work right there.
.
Now after all that…
Does the code run?
HELL NO IT DOESNT!
.
It’s still showing 21 errors 😭 Plus, Swiption’s still left.
.
So right now, I’m trying to fix the flaws and errors and get this code up and running without Swiption, once it is smooth then at the end I can code Swiption into it.
.
See ya in the next devlog!
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.