Finishing touches

Dear Tim,

The system is now running, the site is now updating, elections are happening, and assemblies are voting on policies. It’s like real politics – the very first assembly privatised the Health sector. I’m very upset by this development and I’m concerned that the citizens may eventually privatise everything, but we’ll have to wait and see.

Now that the system is running without intervention, it’s a good time to begin looking for bugs and issues. I haven’t done this in my development environment yet as I don’t have the tech, nor a way to directly implement the structure without relying on AWS. Now my API is entirely handled by AWS, I don’t have a development API and I’d only be able to set one up by creating a DEV database in AWS. But that’ll cost money so it’s a no from me dog.

It does mean my production environment has become a bit of a testing ground but that’s not a an issue as it’s still not publicly known. Who’s going to care if it goes down? Just me. But let’s review some of things that are left:

  • Change up the assembly feed to use less messages to produce it’s element. This could also do with a loading icon while it procures the messages, even if its visible for only a second. The only thing to change here will be how the messages are formed, as I’ve got the style down. I may consider changing the logic of how discussions work, get loyalty in there somehow, or perhaps change the logic on how they choose whether to argue the policy or the arguer. I also would like to visibly see what policies haven’t been argued yet so maybe I’ll change the data held for whether a vote passes or fails.
  • Add a news page – this page I want to use as my way of communicated changes. This page I’ve pretty much arranged, but the data retrieval and storage I’ve had to build. It’s just a simple blog system, and this shouldn’t be too taxing as I want to keep the content down. They won’t be as long as these blog posts for sure.
  • Icons – I’m missing some icons for religions, and icons for each sector of government. Shouldn’t be problematic, I think I can reuse some icons from the industries for the sectors, or maybe modify them slightly.
  • Set-up the authentication system.
  • I found an issue when trying to restrict access to my database using networking. By limiting, I couldn’t limit in an easy way to just allow my scripts AND my lambda functions. It seems the lambda functions need to be able to create networking adapters to then connect. I may go back to looking at this, but as there’s authentication required on the database it’s not a problem.
  • I’ve also switched the Access-Control-Allow-Origin back to “*” to assist in development as I couldn’t easily programmatically deduce it from the AWS Proxy Integration.

The authentication system is going to be the big one. I’ve looked at Auth0 as it allows me to ignore trying to make sure my database is secure, but I would need to ensure that the two databases for authentication and data can talk to one another: this is important to track what candidates a registered user can vote for, and also to retrieve the possible values that a registered citizen can have.

For the initial set-up, I’ll try to reduce my expectations: I just need to store an email, a password, and the constituency they belong to. This can be displayed in a user area. The user area will also be where the logged in user can vote; this means I only need one page managed by the authentication system and keep it all contained.

I will need a new table to track ‘human votes’, but this can look like current vote tally. The only important thing to track is if the human user has already voted and this is achieved by a boolean – just something to say they’ve voted in the current election. That way my insert can check this boolean, and if it’s false, post the tally. And if it’s true, then respond to say they’ve voted. The component can use this value, and even if they manage to click the button multiple times, it won’t process their vote more than once. It could mean their vote may get lost, but its not the worst problem in the world – I’m not managing card data or something important, its a fictional vote in a fictional election.

Will I prevent people making several accounts? No. Nope. I don’t care. If someone wants to flood the system with ten or hundreds of users, again, the gains are just that they can influence an imaginary election. This is one of those problems that you find in game development; the overactive hypotheticals. Trying to prevent a bug before it’s even occurred. You can easily obsess over a simple unintended consequence over your system, but its important to getting a finished product to only consider the average user. And the average user isn’t going to seek to break your system like you think they could. “If they jump in this corner, spin around, they could accidentally move into this area, and then they’ll be stuck.” Yeah but most won’t do that. Finish the product, then go back and fix them if they prove to be a more common occurrence. So if someone creates a ton of accounts to break my system, then and ONLY then will I look at a fix. For now it’ll hinder me more to consider it.

Because my authentication system will be so simple, it may be that I build it myself. It depends on how good Auth0 is at allowing me control over the user data, how granular I can store user information, and if I can connect to that database for the operations in determining who wins in an election AND if I can retrieve that information for the election charts.

Anyway, I may leave a lot of this for a while and focus on the creative aspects of the website for now. Including the News Articles.

All the creative aspects will be to give a little life to the country of Kalmany and make it more of an interesting place to be involved in. The ticker will also get an update so every hour, there’ll be a random item added that reflects stuff going on – something like a citizen commenting on the current state of a sector, or maybe a weather report.

Hope you’re doing alright, you’ve gone dark and I’ve not received any book messages from you. I took out the Oxford dictionary from the library three times and I’ve not found any annotations by D Carrel, and it’s concerning me. I’ve also asked 37 if they’ve heard anything but not even a smoke signal. you love smoke signals! Stay safe…

Yours,

Stan

Leave a comment