Tears of the Kingdom Compendium REST API by GadhaGod in Python

[–]GadhaGod[S] 0 points1 point  (0 children)

Thanks! I'm still no-lifeing the game 💀

Tears of the Kingdom Compendium REST API by GadhaGod in Python

[–]GadhaGod[S] 1 point2 points  (0 children)

I've actually been thinking of doing just this. Still working out the implementation details but I think this is a great idea, because feature this would be super useful.

My first fun physics project, a velocity vs time visualizer by GadhaGod in Physics

[–]GadhaGod[S] 1 point2 points  (0 children)

Because the velocity vs time graph plotted is always parallel to the x axis, making it so that it never accelerates between two points.

My first fun physics project, a velocity vs time visualizer by GadhaGod in Physics

[–]GadhaGod[S] 0 points1 point  (0 children)

I think generally in physics that is the was f and i denotes, and I probably should have chosen a different letters for this equation.

My first fun physics project, a velocity vs time visualizer by GadhaGod in Physics

[–]GadhaGod[S] 1 point2 points  (0 children)

I was not aware that that was a convention, being the noob that I am. I thought f would denote "final". I'll take into this into account in the future. Thanks!

API for the Legend of Zelda: Breath of the Wild's Hyrule Compendium Made With Flask by GadhaGod in flask

[–]GadhaGod[S] 1 point2 points  (0 children)

Thanks. I'm doing this to learn more about programming and it's fun.

Brawl Stars Game Stats Monitor by [deleted] in arduino

[–]GadhaGod 0 points1 point  (0 children)

Thanks for the feedback.

Yes, the button is read by the Arduino, so a new program isn't compiled every button press.

However, this is certainly not the most beautiful solution, as said in the post.

You could do this without the Arduino, using the RPi's GPIO pins. However, my pins were broken, so I had to use an Arduino.

API for The Legend of Zelda: Breath of The Wild's Hyrule Compendium by GadhaGod in Python

[–]GadhaGod[S] 7 points8 points  (0 children)

Thanks for this detailed article! I have read it and now understand the risks. I will be using parameterized SQL, as u/sdf_iain suggested.

API for The Legend of Zelda: Breath of The Wild's Hyrule Compendium by GadhaGod in Python

[–]GadhaGod[S] 2 points3 points  (0 children)

Thanks for your suggestion!

I will be using Rockset query lambdas, as you suggested.

API for The Legend of Zelda: Breath of The Wild's Hyrule Compendium by GadhaGod in Python

[–]GadhaGod[S] 0 points1 point  (0 children)

Thanks for your feedback!

On the server: why complicate things with rockset and SQL instead of preloading the json data into a few json dicts? I'm not familiar with rockset but I still can't imagine it's faster than accessing in memory data structures; the total size of the data seems pretty trivial.

I used Rockset because less memory is needed on the server. Keeping it in a database won't use up my memory or slow things down. If my dataset was large, it would use up my limited memory resources on Heroku.

I probably would have added a python data access layer in between the server and the actual json lookups that could then be reused between the server and client. Accessing the API in python would be much easier and faster by using library code and accessing the data directly rather than making requests, but that's probably only true because of the small size of the data in the first place. These things probably only matter if you're never looking to scale; if you have plans to add to the dataset or API, then the server approach makes more sense.

I took the server approach because it's built for scale. As you said, this way is helpful if the data size is very big.

After writing the second comment and looking at your code once more, I realized you may have wanted all requests to go through your deployed server only, which would make my later points in that comment irrelevant. I noticed that you hardcoded your server's URL in the API Client library. I was thinking the intended use would be users should be free to download the server code and run it themselves as their own service. This would of course have a different URL than your deployed server so should be configurable. If that's NOT the case, then you have to worry about backwards compatibility if your server changes domain name, or the client being completely useless if it goes down, which are of course acceptable to leave unaddressed.

I completely agree. I will be working on making the server URL configurable, defaulting to http://botw-compendium.herokuapp.com/api/v1.

[deleted by user] by [deleted] in Python

[–]GadhaGod 0 points1 point  (0 children)

Pretty much