Share your repls and programming experiences

← Back to all posts
Dizzle v2.0 + QAPI!
h
DillonB07

Dizzle v2.0!

What happened to v1.0?

I released a website called Dizzle a while ago. It gave you a random general knowledge question with a text box that checked your answer. It wasn't very good as it only worked properly on one screen size 2048 x 1152.

So, I decided to abandon Dizzle version 1 and create version 2!

Version 2 has been created completely differently.

What's different?

CSS

Dizzle now has a new stylesheet that uses flexbox to ensure full responsiveness on all screen sizes!

Not only that, but the CSS has been prefixed by an auto-prefixer to ensure backwards-compatibility with older browsers that don't support newer flexbox rules.

Backend

The original version of Dizzle had a text file for each question and one was randomly opened and sent to the template. This was a very bad approach to it for multiple reasons but also good for other reasons.

Benefits

  • Using separate text files meant that I could write a Python program to make adding question questions a lot easier!
  • Err, I can't think of anything else

Disadvantages

  • That was a LOT of files!
  • I had to update a variable in the program whenever I added new questions.
  • It was very hard to locate a particular question
  • It was extremely inefficient

So, I decided to create a brand new repl.... QAPI!

Hey, what's QAPI?

QAPI is an API service that anyone can use to get a random question for their apps. It has multiple endpoints that let you get a question from a particular topic, or a particular type of question.

The topics are literature, geography, history, entertainment, science, leisure and technology. They are extremely broad so you could get a question about something that happened in a certain country in the geography category.

The types of questions are memory, multiple choice, true or false and number.

All questions are stored in a Python dictionary which makes it easy to include all of the necessary information when being sent to the program!

Learn more about QAPI here: https://qapi.ml

Why is QAPI better for Dizzle?

QAPI is better for Dizzle because it means that there are quicker loading times and there's now logic inside the templates for different types of question! If you have a memory question you'll only get a text box, but if you have a multiple choice question you'll have radio buttons!

Contributing

Question contributions are welcome! You can contribute on GitHub via an issue, Pull Request, or the suggestions form on Dizzle

If you have any feedback or suggestions for either Dizzle or QAPI then please leave them in the comments or on GitHub issues!

Links

Websites

Dizzle - https://dizzle.ml
QAPI - https://qapi.ml

GitHub

Dizzle - https://github.com/DillonB07/Dizzle
QAPI - https://github.com/DillonB07/QAPI
QAPI-Frontend - https://github.com/DillonB07/QAPI-Frontend

Replit

Dizzle - https://replit.com/@DillonB07/Dizzle
QAPI - https://replit.com/@DillonB07/QAPI
QAPI Frontend - https://replit.com/@DillonB07/QAPI-Frontend

Voters
ChaseLean
ruiwenge2
MrVoo
ch1ck3n
VulcanWM
DillonB07
Comments
hotnewtop
MrVoo

Pupaphobia is the feat=r of what?

English 100 ;)

DillonB07

@MrVoo Oops! I'll fix that, thanks!

VulcanWM

ayy this is amazing. I love the way you actually took my suggestion and made it.

DillonB07

@VulcanWM Thanks! It was a great suggestion and it definitely worked well with needing to redo the website because of the responsiveness issues!

VulcanWM

np! this is way better than the first version! @DillonB07

DillonB07

@VulcanWM definitely! I think that this is my best project!

VulcanWM

i think it is too! @DillonB07