“Why flask? Why not Django?”
Recently I was asked this after introducing a new subsystem at work. Originally part of a monolithic Django app, this was new micro-service was one of the first pieces to be split out on its own. I had chosen Flask to be the web framework, and now it was time to explain why…
I’m not anti-Django, but…
Me moving an app from web2app to flask
Recently I decided to pull an old project out and use it as the basis of a new exciting thing I’m working on. More on that later! The old code was running on Google App Engine (GAE) and was written using the python web2app framework. Let’s take a look at the why and how of converting from web2app to flask.
GAE is pretty generous when it comes to letting developers run small apps on their service. That is a great way to get developer buy-in on your product. For years I’ve been running a couple of small projects for free on GAE and then talking about them in interviews.
The documentation for GAE used to use web2app as the Python sample code. Over the years they have evolved the service and documentation and today they tend to show Flask and Django when they are displaying sample code.
As a result of this, all of my GAE hosted projects have wound up being on web2app. And in the case of my current project, this is a problem.
Why switch to flask?
Tests are a contentious topic among programmers. Some really like them, others see them as a necessary evil. I think that they are important and if implemented correctly can improve both programmer productivity and code quality. Why? Flow.
Flow. It is the state of being so “in-the-zone” that things just happen. Actions are fluid. Progress is constant. Things are happening. This is where the awesome happens. So why doesn’t this happen more frequently?
Experiments are cool!
I’ve always been curious about the world around me. And now thanks to reading a few great books I understand that I can easily do experiments on the world around me to learn where I can push the boundaries to learn new things!
Framing these things as experiments is a powerful mind hack: If an experiment fails, that’s ok! It was just an experiment. Keep that in mind the next time you find yourself pausing before trying something new or scary.
Let’s take a look at what I’ve been up to!
While doing some performance test on a new flask microservice, I noticed it was not handling very very many connections per second. Additionally, nginx (which we are using as our front end webserver) was reporting a ton of errors. WTF?!? I thought flask was fast. I need a faster flask!
Racing to make a faster flask
Recently I have been describing myself as “A developer interested in entrepreneurship”. And lately I’ve been hearing a lot about masterminds. Inspired by a few podcasts, I threw together an MVP to see if I could find other like minded people who would be interested in a developer mastermind. Lets dive into this fun little experiment!
Recently I was working on a project that involved breaking up a Django app into smaller services. As we looked at the new services it occurred to me that we might be able to use Flask instead of Django. It was pretty straight forward to move things to Flask, but there were a couple of little gotchas that I thought I would share on moving from Django to Flask.
Full stack developmet == swiss army knife developers
“Full stack development” is a bit of a joke. On paper it means that the developer will be touching every layer of the application from the data store to the GUI. In practice it means that the developer is expected to be an expert in several languages and technologies. In reality, its what has been going on forever and it isn’t pretty.
As a programmer I’m usually up to my ears in problems. Problem discovery is something I recently came upon as a technique to help build a business. Basically you find a problem that people have, then build something to address the problem.
But of course its not that simple, how do you even start with something like this? I’d like to share with you a recent experiment I did where I attempted to do some problem discovery on a pain point I was experiencing: Finding a master mind.
I’m super happy to announce that my first book, “Developer Interviews: How to land your dream job on your terms” has been released on Amazon!
Check it out: https://www.amazon.com/dp/B01FLIDC8C
Developer Interviews: How to land your dream job on your terms
In this book I give my tips on how software developers can interview better when it comes to the dreaded job hunt. Some of the things I talk about include:
- What companies are looking for
- What YOU should be looking for in a company
- Warning signs that a company might be a bad fit for you
- Why technical recruiters can be a great help
- What to do if you make a mistake during the interview
The book is available for a very programmer friendly price of $1.28, or if you are a member of Amazon Prime you can borrow it for free on your Kindle! Also, if you are subscribed to Kindle Unlimited, this book can be yours for free!
I would really appreciate it if you check the book out and leave me a a rating and review on it.
Writing this took what seemed like forever, but it was a great exercise. I think I’m going to do a blog post about when “developers write books”. Its a great step in my entrepreneurial journey. But first, why did I write this book?
The motivation for Developer Interviews
Too often I feel that interviews “just happen” or are otherwise taken for granted. Especially by those who aren’t as intimidated by the whole process.
Additionally I’ve observed that while an interview might seem to go great, or the company might really want you to join them, there are warning signs that you should look out for. If you see one of those, then that might not be the job for you!
So if you are looking for advice on what you can do better when interviewing, please check this book out! If you have any questions or comments, please feel free to leave me a comment below.