corri construction flow chart

Project 3 Complete

I have now completed and submitted my third full stack software developer training project. This project focuses on using Python.

It is a portal for constructors to add their dates, number of days and hours into so they can get an idea of how much they will be paid.

After creating the main project my mentor encouraged me to add a Google Sheets API to the project so once the information is submitted the sheet is updated.

Here is the live project

As this is Python the main form of PEP8 validation is done through my Codeanywhere IDE.

I had to set up a Heroku account and deploy the project using Heroku, which I will upgrade to once my student credits run out.

How the project works

It starts by printing out the instructions for a contractor. I used a staggered typing effect to type them all out.

def type_print(text):
    for character in text:
        sys.stdout.write(character)
        sys.stdout.flush()
        time.sleep(0.05)
    print('')

Then the user is asked for their name and profession.

They are then given an employee number (I used random.randit) which is just a random number and told their hourly rate.

The program moves on and asks them to add the dates, number of days and hours they worked.

This information is taken and the user is told how much their pay will be before and after tax and national insurance is deducted.

They are asked to confirm the information is okay and they are happy to submit.

Finding Errors

I spent a lot of time making sure any potential errors a user could make were picked up because this is a major part of this project. The assessor will be looking for ways to “break” the site.

I added my project into the “peer review” Slack channel I have access to and someone gave me an error I had missed. When I asked a yes or no question (y/n) if they put another letter in it wasn’t picked up.

First, I updated the instructions to say “Use y or n only” then I also added code so if they used another letter e.g. f – the system brings up an error asking them to only use y or n. They can only move on once one of those two letters are selected.

Another important issue I picked up was in the input of first and last name. I accidently hit the return key and no name was entered but the system moved on. I realised I had to make first and last name a required field. I also added instructions asking for first name (Mark) and last name (Jenkins) – although mark jenkins and MARK JENKINS were also acceptable.

Then I added code to ensure numbers and symbols could not be used, although if Elon Musk starts a trend and people name their children using numbers that may have to change in 18 years time!

Using Python

I actually enjoyed learning and using Python. It was a lot easier to use than JavaScript. Creating the code and understanding what I wanted it to do was easier for me because I felt as if I could just “write out” what I want to achieve in code.

With JavaScript I feel there is a need to understand what JavaScript code does to make it to what you want but with Python I felt as if I knew what I wanted and I could get the code to do that for me – not sure if that makes any sense!

Onto Project 4

While I struggled to decided what project 3 was going to be about I am not having that issue with project 4. I already know that I want to create a social media type site. I will be creating the back-end and front-end. I will also have to ensure people have the ability to post, edit, cancel and delete information. Exciting times.


Posted

in

by