Almost everything I do I try to have a mix of entertainment and education. There’s a sweet spot between those… If it’s too entertaining you don’t learn anything, and if it’s too educational nobody listens.Russ Roberts
Really simple example of how to build an API with Python and Flask that listens for HTTP requests and spits out JSON. The hard part of all of this is building the JSON with python. For really simple JSON we can just use a dictionary. However, where things get complicated is if you want your JSON objects to contain objects. The work around I’ve found is to simply create a dictionary of dictionaries, where we will use dictionaries instead of objects. In the example below first_category, second_category, and third_category would normally be represented as objects, but have been converted to dictionaries instead:
Hello Internet Friends,
This post isn’t really for you. I just wanted to jot down a few notes on feature requests and bugs that need to be addressed with my app MoneyPhone before I forget:
- Allow users to edit transactions
- Add spending categories
- Include pending payments (accurately)
- Bring back “money spent yesterday” sms feature
- Add category budgets
- Figure out how to handle expired access_tokens
Dear Internet Friends,
Tonight I wanted to write a real quick post on an experiment I’m conducting. I’m still struggling to find a traction channel for promoting my personal finance app, MoneyPhone, so on a whim I decided maybe I should try answering some questions regarding the topic of personal finance on Quora. To my surprise the site actually has a pretty decent Personal Finance / Budgeting section with many recent unanswered questions on the topic. And since I’m actually using MoneyPhone successfully to solve my own personal finance and budgeting problems, I decided to answer a couple of questions suggesting the OPs try my app. Not sure if my answers will get any views, or result in any downloads, but it’s worth a shot right?
So without further ado, here are the links to my two answers:
Your Friend Topher
UPDATE (8/3/2019): I woke up the day after posting my two Quora answers and found that Quora moderators had deleted one of my answers. I sort of assumed that this would be a possibility considering they need to make money from people looking to market/advertise on their platform. However, I don’t think its a very good policy as I was ready to start spending money on their platform to promote some answers but have now changed my mind. Really, it was quite unnecessary. They easily could just push answers from marketers down the page unless they pay to push their answers up to the top. O well! On to the next traction channel.
Feeling fired up, like Jorge Masvidal.
Cool “spacewalk” PhaserJS tutorial for use with my students @ theCoderSchool:
Repl.it Starter Template (Includes Game Assets, No Code)
Quick update on my latest HTML5/Apache-Cordova application. I recently decided to ditch the Materialize CSS framework in favor of Ratchet, an HTML5 framework from one of the core contributors to Bootstrap. However, I’ve run into a bunch of problems using the Push.js library that comes with Ratchet. Push.js is kind of like Turbolinks in that it is meant to make building single page HTML5 applications a lot simpler than using something like React, Angular, or Vue. However push.js isn’t very well documented and I haven’t been able to get it to do what I want!
So… since I’ve already figured out how to get Turbolinks to do what I want, I’ve decided that I’m just going to dump the Push.js library that comes bundled with Ratchet in favor of Turbolinks instead. While I still don’t have everything worked out completely, I think Ratchet + Turbolinks is going to be the easiest way for me to build an HTML5 application using Apache Cordova. And hey, when I get all of this finished maybe I can just combine Ratchet and Turbolinks into my own nifty HTML5 framework? I really like Ratchet so far, it just seems to be missing some stuff when it comes to developing single page applications. To build my app the “push.js” way I believe would require me to do a lot of server-side rendering which isn’t really something I want to do.
I know that there are obviously the big three SPA frameworks out there that solve this problem, but they are a lot more complicated that what I want. I wonder if I can use Ratchet and Turbolinks plus a little of my own ingenuity to make the simplest single page application framework? I really want something that is almost as easy as just creating a website with straight HTML. I know it won’t end up being quite that simple, but I think I could whip up something like this, where when a user clicks on a button/link we =>
- Fetch some data from a server with AJAX (if necessary)
- Load new HTML that is stored locally on the phone with Turbolinks
STARTER TEMPLATE: https://repl.it/@topherPedersen/FlappyBirdJS-STARTER-TEMPLATE