Website v.0.4 update notes
Website v.0.4 update notes
V0.04
TLDR;
- Remade file system
- Added mkdir command
- Added cat, touch, and append commands for managing .txt files
- Made it so that the website isn’t breakable by putting html code into the input field as this is a huge website vulnerability
- Remade the help command
- Added the sources command
- Redid the ascii image of my self
- A bunch of small changes
- Code is explained with comments
- Reformatted my code
Explanation of this update:
This update was a mess. The issue is that I didn’t want to push the update till the new file system was working properly, including working .txt files but this took literally over 20 hours and then on top of that I had kept also working on small things to fix. Then if that wasn’t enough I originally planned by the time this was finished that this would be the last update before I submitted this project off for marking and so I had to do tons of things to get it ready for that like, format the code properly, and write comments. But enough of me complaining, let’s get onto the fun stuff. How does the file system work?
How does the file system work:
Ok so to start off with how the file system is structured. There is an object called directories and inside that there is an object called home. Within that object every directory is an object and every text file is a string with its contents being the contents of the text file. Then there is an array called “currentDirPath”. This by default just contains Home, then if you go to a new folder inside home, it adds the name of that folder to the currentDirPath array.
Change directory command:
This will be quite a big simplification because if you need it explained better, you should read the code and the code comments. Basically it gets the current directory, then it finds all objects inside of it and one of those objects matches up with the one specified it puts the user into that directory.
List directories command:
The list directories command just gets the current directory, then finds the contents of the object the ‘directory’ is called and then it lists all the objects and strings inside, and adds .txt to the strings.
Cat command
The cat command is pretty similar again, it just gets the current directory, looks to see if there is a string inside that directory that matches up with the name specified by the user, then if there is, gives the contents of that string.
Touch command
What else is in this update other than the file system:
- Remade the help command - From testing the help command was one of the worst bits and ment that users that didn’t understand only tried about me, and then gave up. Now the help command will show you all the commands, what they do and how to use them with an example. This now means that users who don’t know how to use a terminal can easily learn how to use my website if they can be bothered
- Added the sources command. After many updates where I needed sources, and my website actually had this command, it just wasn’t finished. I finally added it. You can try it to find out who’s on it and why
- Redid the ascii image. This was people’s number one problem with the website, so really it was the most urgent thing to fix. I just ran the image I originally used, which I had commissioned last year and is in the favicon through another text to ascii converter, but this time let’s use more complex characters not just letters.
Testing
This time I did another round of testing and it proved more successful (This is all with a new group of people):
- Person 1 - Person one told me they really liked my website, and while they were able to do the basics, which is basically all I need someone looking at the website to see, they needed my help for the more advanced stuff
- Person 2 - Person two had a good go at doing all the commands, however eventually got stuck and needed help when they wanted to create a text file
The takeaways from the testing
From this batch of testing I felt a lot better than after my last lot of testing and I had several takeaways
- While it isn’t how the help system is presented in a linux terminal it still needs to be yet more detailed, to show exactly what users to do