EX52 LPTHW - Flatmate Simulator


Hey everybody!

So when I was at the end of LPTHW I sort of kept going on the project and made it bigger, restructured it a couple of times and was trying to implement new technologies I was learning.

So I really feel like I learned a ton from this and thanks so much @zedshaw for the inspiration.

I’d be really happy to get some feedback on it and I already know about a couple of things that I can improve:
-Output messages are not stored in one central place, but all over in different databases and modules. This is also why it’s a bit of an effort for me to implement a “change language” option.
-Using different Databases (PostgreSQL and SQLite) does not really make sense for a rather small project and is probably more confusing. (The reason I did this was basically because I wanted to learn both of these and just needed an outlet to implement it, but probably it’s not so practical)
-There is probably a bunch of cleaning up to do, just going through the modules and checking for things that can be simplified, doing some refactoring here and there, I haven’t really done that yet.
-The HTML and CSS are written pretty ugly and were created more with a Trial & Error approach and not really knowing deeply what it is going on. So I should probably review this and clean it up.
-Probably the worst pain for anyone reading the code. I put right about 0 docstrings and explanations in there. Very sorry… I became aware of this only after there was already so much code that it felt like it would be a huge task. Also should probably put some line seperators and just more things to make it more readable for humans.

So for all the issues that I am not seeing I am very grateful to get Feedback! Also if you have specific advise or agree/disagree with the things that I already stated I am happy to hear about it.

Anything else you would recommend to me based on the code: Libraries that would have been smart to use or any kind of technology that would have helped me; Resources that would be good for me that you can point me to, etc.

Basically I feel that after working on this for quite some time I now need to get my mind off it and work on something else. That’s also the reason why I haven’t fixed any of the things I already mentioned. I can well imagine that in some time I would come back to clean it up and fix all these mistakes, but the reason I am posting is also to get general Feedback on my code and apply this feedback now on other things I am working on. So please let me know about bad habits and general things also!

The github repository is here: https://github.com/leonvdb/david_simulator

And there is a deployed version here: http://www.davidsimulator.com/

Sadly at the moment all the message output is only in German… :frowning:
Still all of the commands also work in english, but it’s not actually really playable without reading the code… I hope you can still get something out of the pure code and if there is any questions please let me know. Maybe also someone here speaks German, guten Tag! :stuck_out_tongue:

Thanks very much for any Feedback! :slight_smile:

All the best,

Leon :slight_smile:


@DidierCH is you man for speaking German but your intro and pre-warning of the lack of comments and having to read the code may be a put off.

Thanks for sharing anyway.


Hey @leonvdb very cool idea and creative implementation. I like it. Just “wasted” 30 min of my live playing David :stuck_out_tongue: very funny!
It would be very cool if you would implement a english version so the other LCLive Students can enjoy your game. If you need some help drop me a line.

Gut gemacht! :+1::+1::+1::+1::+1:


Nice job! Honestly this is WAY more than I expected but it looks like you totally smashed it. Too bad I don’t quite speak german, but if you want to make a hilarious English version you could probably do a cheap quick translation with google translate and https://docs.python.org/3/library/gettext.html The gettext module is a built-in translation selector. It’s not too hard to use, and I bet the English would be hilarious if you did that.

Looking at your code, I don’t see too much I’d change. I think given that you worked on this for so long and that it’s got a good look to it and works then I’d say it’s a win. Time to move on and keep this for possibly coming back later and reworking it when the inspiration hits you.