Requesting Access to the Plaid API Production Environment

This blog post is brought to you by the developer of BitBudget. BitBudget is an automated budgeting app for Android and iOS which syncs with your bank account and helps you avoid overspending. If you’d like to quit living paycheck-to-paycheck and get a better handle on your finances, download it today! https://bitbudget.io

Just submitted my request to Plaid to push MoneyPhone from the Plaid Development Environment to the Live Production Environment with Unlimited Users and No Rate Limiting. Sort of nervous and hoping everything goes well with my request. Wish me luck!

 

moneyphone.app is live

This blog post is brought to you by the developer of BitBudget. BitBudget is an automated budgeting app for Android and iOS which syncs with your bank account and helps you avoid overspending. If you’d like to quit living paycheck-to-paycheck and get a better handle on your finances, download it today! https://bitbudget.io

moneyphone.app is live! (and one month ahead of schedule).

 

Why Your Startup Shouldn’t Pay the State of Texas $750

This blog post is brought to you by the developer of BitBudget. BitBudget is an automated budgeting app for Android and iOS which syncs with your bank account and helps you avoid overspending. If you’d like to quit living paycheck-to-paycheck and get a better handle on your finances, download it today! https://bitbudget.io

This isn’t really an original post, but I sort of just wanted to save this information here on the blog because it could mean the difference between success and failure for anyone starting a startup in the State of Texas. If you’ve ever started a startup before, one thing you may find out early on is that the administrative costs of operating a Delaware C Corporation can quickly exceed all of your other operating costs combined! $2,000 to incorporate through a service like Clerky, and another $800 per year miscellaneous state filing fees, this is likely to add up to more than you would spend on your DigitalOcean server bill in a year.

At the moment I’m consider forming another C Corporation for one of my latest software ventures, MoneyPhone, but I’ve sort of been balking at the idea of spending all that money once again because I know if I don’t end up receiving funding within 12 months or so I’ll ultimately end up needing to shut the C Corporation down even if the app is doing okay just to keep expenses under control.

Thankfully I stumbled upon this excellent blog post from a startup lawyer here in Texas who claims you just shouldn’t bother paying the State of Texas their crazy $750 foreign entity registration fee, and save yourself another few hundred bucks a year skipping the yearly filing fees (until your startup is actually generating revenue). This doesn’t eliminate all of the costs that I mentioned with starting a Delaware C Corporation in the State of Texas, but I do estimate that it could cut the fees in half. Also, by switching from Clerky to someone a little cheaper like Stripe Atlas or maybe someone else you can likely cut the cost of incorporation from $2,000 to more like $500 or less.

And last, here is a link to the original blog post if anyone is interested: When do I “really” need to qualify my Delaware-formed startup in Texas?

Anyway, I’ll probably make another post here on the blog sometime soon should I end up incorporating my latest venture. One thing I’m a little worried about is that the startup incorporation services like Stripe Atlas may force you register with the state. If that’s the case, I’m not sure exactly what I’m going to do. I know conventional wisdom says you should always incorporate as a Delaware C Corporation, but from my experience it’s often just a money sink. Spend $3,000 to please potential investors, but then never actually raise a dime. Hmm…

UPDATE: According to the “Startup Cheat-Sheet” you can actually find examples/templates of all the needed paperwork online for free and register as a Delaware C Corporation for $139 going the DIY route– Startup Cheat-Sheet: How to Incorporate Your Company

 

Asteroids Tutorial (for my Python Code Class Students)

This blog post is brought to you by the developer of BitBudget. BitBudget is an automated budgeting app for Android and iOS which syncs with your bank account and helps you avoid overspending. If you’d like to quit living paycheck-to-paycheck and get a better handle on your finances, download it today! https://bitbudget.io

Asteroids written in Python using the Turtle Graphics Library by Eric Lavoie

 

AttributeError: type object ‘datetime.time’ has no attribute ‘time’

This blog post is brought to you by the developer of BitBudget. BitBudget is an automated budgeting app for Android and iOS which syncs with your bank account and helps you avoid overspending. If you’d like to quit living paycheck-to-paycheck and get a better handle on your finances, download it today! https://bitbudget.io

Happened to run across a very annoying error attempting to generate timestamps tonight in Python. Apparently, the modules datetime and time can conflict with each other so that time.time() will not work if you are also importing the datetime module. I had some suspicion that the bug was due to some sort of bug related to using both datetime and time, but I wasn’t actually the person that figured this out, some wonderful man(woman?) on StackOverflow was! However, I wanted to jot this solution down here on the blog to make sure it is as easy to find as possible– Instead of importing time, import time under an alias such as time_:

# REFERENCE: https://bit.ly/2Gpmoy7
import time as time_
timestamp = int(time_.time())

 

SendGrid, Error Sending First eMail using Python– AttributeError: ‘TypeError’ object has no attribute ‘message’

This blog post is brought to you by the developer of BitBudget. BitBudget is an automated budgeting app for Android and iOS which syncs with your bank account and helps you avoid overspending. If you’d like to quit living paycheck-to-paycheck and get a better handle on your finances, download it today! https://bitbudget.io

Just wanted to post a quick remedy/solution to an annoying bug I recently encountered getting started with SendGrid using their Python Library. The error message I received following their quickstart guide went something like…

AttributeError: ‘TypeError’ object has no attribute ‘message’

Okay, so here’s what I figured out. There are two things probably going on here if you are encountering this error and can’t figure out what the problem is. First, you need to remember that your first SendGrid emails are likely going to end up in your Spam folder! Especially when using Gmail. So make sure you check your spam folder as there is a good chance your emails have actually been sending despite the error message.

Second, there appears to be a bug in the try-except block posted in the official SendGrid Quickstart Guide for Python. The solution is to simply comment-out/disable the response and error message code. Here is what the quickstart guide should look like with the buggy parts commented-out:

 
# using SendGrid's Python Library
# https://github.com/sendgrid/sendgrid-python
import os
from sendgrid import SendGridAPIClient
from sendgrid.helpers.mail import Mail

message = Mail(
    from_email='from_email@example.com',
    to_emails='to@example.com',
    subject='Sending with Twilio SendGrid is Fun',
    html_content='<strong>and easy to do anywhere, even with Python</strong>')
try:
    sg = SendGridAPIClient(os.environ.get('SENDGRID_API_KEY'))
    response = sg.send(message)
    # Comment out the response, and print something else instead
    # print(response.status_code)
    # print(response.body)
    # print(response.headers)
    # print('SUCCESS!')
except Exception as e:
    # Comment out the e.message, and print something else instead
    # print(e.message)
    print("ERROR: PC LOAD LETTER") # Cryptic Error Message

PLEASE NOTE, the WordPress plugin which I’m currently using to post code snippets here on the blog has some issues so the line numbers and what not appear to be off on the example above. Will need to look for a better solution here in the future. Maybe Github Gist Embeds?

 

Beating the Apple Card to Market: MoneyPhone Launching Memorial Day 2019

This blog post is brought to you by the developer of BitBudget. BitBudget is an automated budgeting app for Android and iOS which syncs with your bank account and helps you avoid overspending. If you’d like to quit living paycheck-to-paycheck and get a better handle on your finances, download it today! https://bitbudget.io

On March 12th 2019 I began working on my latest project, MoneyPhone, a personal finance app that monitors your spending habits to help you save money. Two weeks later on March 25th I woke up to discover (while surfing YouTube) that Apple Inc. has been working on essentially the exact same app— Apple Card. At first I was a little bit upset by the news, but now it’s actually got me fired up. If one of the most valuable companies in the world happens to be working on the same app idea that I’m working on, it must be a good idea right?

Apple has announced that Apple Card will be launching this Summer, however, I just wanted to take the opportunity to announce here on my blog that I plan on beating Apple to market– launching MoneyPhone by Memorial Day (May 27th, 2019)! Watch out Apple, under-employed millennial in his parent’s basement is coming for you 😉

 

Creating Secret Keys in Python for use with the Flask Web Framework

This blog post is brought to you by the developer of BitBudget. BitBudget is an automated budgeting app for Android and iOS which syncs with your bank account and helps you avoid overspending. If you’d like to quit living paycheck-to-paycheck and get a better handle on your finances, download it today! https://bitbudget.io

Working on a little web-dev project this afternoon and am diving into sessions for the first time with Python and Flask. Apparently when working with sessions in Flask you need to create a secret_key comprised of random bytes represented in hexadecimal. I’m sort of a high-level guy myself and am not used to working with bits, bytes, hexadecimal and whatnot, so I had to do a little googling to get up to speed and wanted to share what I learned here on the blog.

According to the official Flask documentation, you create your secret_key by assigning it a string value with this funky letter ‘b’ prefixed in front of your string literal:


# Set the secret key to some random bytes. 
# Keep this really secret!
app.secret_key = b'_5#y2L"F4Q8z\n\xec]/'

Okay, so how do you go about creating this hexadecimal code? I suggest heading over to repl.it and simply entering the following Python 3 code from my github gists to generate your hexadecimal:

topherPedersen’s Hexadecimal Conversion Tool

Generating Random Bytes in Hexadecimal

 

# TODO: Learn Docker

I’ve been having a lot of trouble over the past few days messing around with deploying my latest Flask application from my development environment, a Windows 10 machine, over to an Ubuntu Virtual Server running Apache on DigitalOcean. It seems like there must be a solution for all of this pain… Docker maybe? Also, another loosely related solution I’m considering is moving my MySQL database over to it’s own server? I don’t really know. One of the things I really liked about PHP was doing all of my development on an actual live virtual server, so I never really had to mess with moving my application from a local development machine over to live production server. It seems like Docker might be able to solve this problem so I think I ought to check it out here in the near future.

Docker tutorials for future reference:

Dockerize Simple Flask App

Dockerize your Flask Application

 

Notes on Deploying a Production Flask App to an Ubuntu Virtual Server Running Apache2 on DigitalOcean

Unfortunately I broke my Linux/Apache/MySQL/Python-Flask app last night. I simply wanted to change the name of the directories from FlaskApp to the name of my latest project, and also wanted to change the main python file from flaskapp.py to something more like my_latest_project.py. I figured this would be fairly easy, just change the Apache configuration file, restart Apache, and I should be good to go. Well, I was wrong! And now everything is broken and I either need to spin up and configure a new virtual server instance, or accept the file structure and naming conventions of the generic server image that I already have. So I just wanted to bookmark a few blog posts here for my own personal reference regarding setting up Python/Flask on an Ubuntu Virtual Server running Apache:

How To Deploy a Flask Application on an Ubuntu VPS

mod_wsgi (Apache)