Lo-Fi Python

Aug 01, 2017

Algorithms Will Decide The Future

Algorithm: a process or set of rules to be followed in calculations or other problem-solving operations, especially by a computer.

I recently read "Homo Deus", a book by Yuval Noah Harari. It explores the idea that humans may simply be algorithmic decision making systems. AKA self-aware, self-learning algorithms. There are many parallels between a human and a computer algorithm.

The author says there are organic (human) and non-organic (machine) algorithms. Non-organic algorithms will someday have far more capability than organic algorithms. In some cases, such as diagnosing medical conditions, they already do.

He also recaps the history of humanity, which was a trend towards Humanism, the misguided notion that humans can know themselves. The reality is that algorithms will likely know us better than we could ever know ourselves in the future, according to the author. Note: he is very well credentialed in his studies of human history.

Going forward, he predicts a shift from humanism towards dataism or techno-humanism. Basically, algorithms and data will know us better than we know ourselves. Therefore, machine algorithms will be better qualified to make decisions for us than ourselves. And many (if not all) of our choices will be made by powerful non-organic algorithms.

Everything we do, decided by a machine to maximize health, happiness, and optimal living. The idea of a human's entire life being driven by algorithms sounds dystopian to me, but the author makes a convincing case.

Jul 30, 2017

Tips For Creating Useful Ideas

11 Ideas from people who have created great products, businesses, or ideas:

  1. Expertise in a field or product is one of the best assets. Nike's founders started out by making their prototype shoe designs themselves with a waffle iron. Shoe Dog
  2. Scratch your own itch. Create the product that you wish existed in the world. Write the book you want to read. Austin Kleon Indie Hackers
  3. Observe a problem or inconvenience that exists in the world and create a better solution. - Product Development Class
  4. Find a niche and create something useful for that segment of people. Seth Godin
  5. For every attribute, there is an opposite, effective attribute. Law 14 of the 22 Immutable Laws of Marketing
  6. Launch quickly, show to people, get feedback, and iterate your idea. Rework
  7. Use combinatory play. Take ideas from different disciplines and combine them to bring about new ideas. Brain Pickings
  8. Invest in improving your product versus marketing. A great product is obvious to a potential customer. Seth Godin
  9. People remember how you or your product made them feel versus cost.
  10. An idea doesn't have to be revolutionary. Many new businesses or products take an existing product and make a slight modification or add a new twist.
  11. Many of the successful people during the gold rush sold pick-axes to the miners.

Jul 28, 2017

Should You Go To Programming School?

There is no one-size-fits-all answer. Below are some thoughts that may help you decide.

  1. What are your programming goals? Get a coding job? Create an app or website? Become more productive at your current job?
  2. What is your current experience level? Are you starting fresh or do you already know a language or two?
  3. Do you have money saved up? Otherwise, you might need to take out a loan.

A computer science degree is typically most expensive. Coding bootcamps are a lower cost option that pack a wide curriculum into a few weeks or months, but they can still be pricey. The cheapest option is to take a piecemeal approach through various online courses.

School Advantages

  • Wholistic approach. You get the ins and outs of programming from a proven curriculum.
  • Community. You learn with other students and from experienced teachers.
  • Job placement. Often various schools and bootcamps will connect you to a company.
  • Credentials. You gain confidence and the backing of your skills by an established institution.

Potential Downsides

  • Tuition Money. A lot of what you need to know is available for free or cheap on the web.
  • Skill level match. Some bootcamps are oriented for beginners, others are more advanced. If you do a bootcamp, make sure it fits your skill level.

If you want a coding job, school makes sense. The bootcamps look to be effective if you can handle the up-front investment. It's possible to land a job without schooling but much tougher. I am currently considering Full Stack Academy. and Coding Dojo. There are many out there. CodeAcademy is a popular route as well.

If you want to make an app or website, the school or the non-school route may both work. For the non-school route, the following languages are good places to start:

  • Web App or Website: HTML, CSS, Python, Javascript
  • Web App or Website Framework: Flask, Django, FastAPI, py4web, Ruby on Rails, React
  • iOS app: Swift plus Apple's Xcode environment, Beeware Python library
  • Android App: Java or Kotlin, Beeware
  • General Coding: Python or Ruby

If you want to be more productive at work, I recommend learning Python. More on Python and where to start here. Automate the Boring Stuff With Python is a great resource for boosting your productivity also.

It's not easy to decide whether or not school is for you. I'm still unsure after a year and a half of programming on the side. No matter what, continue to learn multiple languages and strive for a better grasp of the ones you know. Good luck!

My decision: continue self-study and learning online for free.

As of 8 months after writing this post, I have concluded that learning for free online was the right choice for me. I've achieved many of my programming goals in the last three years, thanks to materials available from Codeacademy, Coursera, YouTube, Stack Overflow, countless helpful resources,, interesting blogs, and documentation. I've talked with others who need the in-person assistance that a bootcamp offers to learn. Do what works for you. Good luck with your decision.

Update:

Several years later after writing this post, I was lucky enough to land a job where I used Python and Excel for a living! I studied for free online intermittently about 4 years to achieve it.

Jul 28, 2017

Cycles

We move in cycles. Work, rest, re-energize, play, repeat. The rhythm of life.

I began my coding endeavors in the fall of 2015. After 6 months of steady coding practice and studying, I went from no knowledge to a basic hobbyist programmer capable of creating a website with the help of a framework. I published a few of my own primitive apps. Then I relapsed. Coding and my full-time job wore me out. I stayed away from coding for about 6 months.

My ultimate goal to learn to code was to be able to build my own websites and apps. I've done that now. I've found ways to do it more efficiently, which I will share in future posts.

Two of my recent moonshot projects were Social Queues, a social playlist builder for Spotify and Dropcycle, a bicycle on demand pick-up service. Neither went anywhere, or really were that good of ideas, but I was able to get to bare minimum viable product status, with little to no code. Sites like carrd.co work well to build a quick landing page as proof of concept or landing page test. My favorite project might be my Tame Impala website, which I used web2py to build the site and pythonanywhere to host for free.

My aspirations have shifted. Instead of just building apps, I want to build apps that are useful to others and help me achieve financial freedom and the ability to own my time.

I believe in cycles of learning. Similar to being in school: semester of study, then time off to rest, then semester of study, more rest, etc. The time away is as important as the time of study. Earlier this year, I returned to programming and web development. After a long time of not writing on this blog, I'm back at it. New cycle.

May 25, 2016

Ask Tame Impala - My First Web App

My First App is Live!

Try it out here: tameimpala.pythonanywhere.com

What It Does

Ask it a question, and it queries a database of Tame Impala lyrics and pulls a response line from the lyrics based on which words match up. Kevin Parker is the frontman of the band who writes 99% of Tame Impala songs.

Evergreen Traffic

When I first published the app in 2016, per Google Analytics it had 50 sessions from Google and over 200 page views in 10 different countries after a few weeks. In April 2025, the app received nearly 500 visits in traffic according to pythonanywhere. Not too shabby from solely evergreen visits and with no promotion.

SSL Certificates / Start SSL / PythonAnywhere"

An SSL certificate is required for the domain by PythonAnywhere to control the Admin page and set up your app. You don't need this if your domain is "username.pythonanywhere.com".

It was kind of tricky was figuring out how to set up the certificate for the first time. These instructions from PythonAnywhere helped a lot.

I used a free certificate from Start SSL and it worked fine. If you're new to SSL like me, here's a simple explanation: you get certificates aka two text files containing a long code from your SSL provider and submit them to the domain host. The last step is to notify your domain host and have them verify with the SSL provider. If all goes well, you'll be live in a few hours.

"Masking" domains

This means if you type "google.com", it will redirect to "www.google.com". GoDaddy makes this super easy. I set it up for my site as well. Here's a post from PythonAnywhere on this also.

Collaborating with other programmers

Currently trying to install and run GitHub on my Desktop. It's trickier to do on an outdated operating system. Another programmer explained to me how it is the base means of collaboration and managing work flow for programmers working together on a project. Probably will know more about this soon and write a post on it. Git seems awesome and I had not been exposed to this tool until recently.

Apr 30, 2016

Useful Links for web2py Beginners

As I've been grappling with web2py, I've found a lot of useful posts and sites that have helped me along the way:

Update: consider using py4web, web2py's successor

See also: Getting Started With web2py

Apr 05, 2016

On Learning New Things

Most new skills I've tried to learn seem to follow a similar trajectory:

  • Stage One, Beginner's Thrill: A rapid growth and learning pace at the beginning, because I'm conquering a lot of small goals, diving into something new and there are rapid gains which feels great.
  • Stage Two, Amateur's Reality: The pace of learning and accomplishment levels off. I'm still learning, but the leaps forward start following a plateau trajectory. This stage is not as rewarding as the first. The key is to push through and jump to the next plateau and keep improving.
  • Stage Three, Mastery: This is the goal with most things I want to learn, and if I gain enough experience and skill, I'll have the ability to apply the new things I've learned to accomplish my goals.

This is my own way of paraphrasing what I've read a million times on the internet: put in the hours, stay focused and don't stop trying. Right now I'm somewhere between stage one and two with Python. Gotta keep pushing forward. (This blog is also serving as a pep talk to myself.)

Mar 29, 2016

Getting Started With web2py

Feeling really good about my progress with web2py. The tutorial videos are comprehensive, yet easy to understand. For a beginner, the "batteries included" philosophy that web2py has embraced is a godsend. This means everything you need to get creating comes stock. I downloaded the web2py program, ran it, entered a password, and was immediately using a functional development interface.

web2py follows the Model - View - Controller software architecture - which means it separates out the activities of programs into a few different layers (please forgive my oversimplified explanations):

  • Model - Stores data / used in tutorial for database table creation (Written in Python)
  • Controller - Used to define page functions (Python)
  • Views - What the user sees (HTML/CSS/Javascript)
en300

(Image from web2py Documentation)

If you're thinking about trying web2py here's a few things that I've really liked so far:

  • I have minimal knowledge outside of a few basic concepts of server operations. web2py provides a few simple lines of code that allows quick creation of a table (done in model) and corresponding form (done in controller/view) to add entries to the table and display form submissions elsewhere on your site.
  • Right now, I'm enjoying learning about the Database Abstraction Layer (DAL), which is pretty cool because you can rapidly run and test complex server queries within it.
  • It's set up for multiple applications, so I can create and play with several projects at once, whether simple applications or more complex websites.

There are 30 videos total on the web2py documentation page, and I've only watched 11 of them but have already learned a ton. The style of the Massimo Di Pierro is great because you often pick up on some golden nuggets of coding wisdom and programming tips while he walks you through the topic.

It's pretty sweet to be able to create and manipulate a website so quickly; still need to learn more, such as pick up CSS to really make it my own. But for now I'm happy for the many small accomplishments that have been easier to reach thanks to web2py.

Update: consider using py4web, web2py's successor

See also: Useful Links for web2py Beginners

Mar 22, 2016

Choosing a Web Development Path

I have recently finished this HTML course, which recommends using cPanel to configure websites. So I bought a domain and registered with cPanel.

What I thought would happen in trying to create a website:

Buy a domain and use cPanel and Python in perfect sync to create a website.

Reality:

cPanel is configured mostly for PHP. You can run Python scripts with it, but it doesn't seem to be the most effective route from what I've read.

So I went back to the drawing board and I've simplified this down to two basic paths:

Tools Hosting Framework / IDE
  1. Python + Web Framework
PythonAnywhere or Cloudflare Pages FastAPI, Flask, Django or web2py
  1. Javascript + Python
cPanel or Cloudflare Pages React, Angular, Express.js

I'm going with Path 1 because the only language I know is Python. I hope to learn other languages like Javascript and CSS but would like to get building as fast as possible. I found a free web hosting service called PythonAnywhere. There are other free and paid Python-friendly hosts.

I also added in Cloudflare Pages retroactively to this post, since I discovered it many years after writing this post.

A note on PythonAnywhere: 5 stars for the tutorial pictured below. It is very nice to see in the whirlwind of confusion of learning to deal with code and a new environment.

PythonAnywhere Tutorial

Love this opening quote from web2py Documentation:

"I believe that the ability to easily build high quality web applications is of critical importance for the growth of a free and open society. This prevents the biggest players from monopolizing the flow of information."

Instead of the previously mentioned web frameworks, I've chosen web2py as a starter because of its compatibility with PythonAnywhere, its simplicity, easy to read documentation and relative ease of use for beginners. A note on web2py so far: the videos from the creator, Massimo Di Pierro, are super useful!

Update: consider using py4web, web2py's successor

Mar 11, 2016

Discoveries['Random']

Quote of Zen: "Productivity isn't about running faster or pushing yourself harder, but rather, about working smarter and paying a bit more attention to what is really going on." - New York Times Blog

Book I'm Reading Right Now: Eloquent Javascript

Recent Discovery: Integrated Development Environments for Web Programming are another piece of the web development puzzle. An IDE is software that contains the front and back end elements for writing code, compiling and testing. This article from Stack Overflow clarifies the difference between an IDE and a web framework.

"Finally, if you're just beginning Python, let me put in a plug for simple editors: it's best for you to learn the language and its libraries well writing it all yourself, and then if you think an IDE would speed your work along, use it. You'll find that you learn the language faster and more completely if you take this route." - Python Central

Ultimately your approach and tools used for any coding project depends on what you're trying to build, which language(s) used, and your own knowledge.

← Previous Next → Page 13 of 14