Password Generator in Python

I recently watched a Tech With Tim tutorial on YouTube about creating a little password generator application in python. I followed the tutorial and it worked just fine for me. Tutorial videos like these are mainly intended to help get new users up to speed with a language and give some actual experience with writing and debugging code. When following things like this, you begin to notice areas where it can be improved. I consider those things as improvement that are “left as an exercise for the viewer.” So, in playing around with it I made a few improvements and am posting them here. ...

February 3, 2023 · 5 min · 964 words · shakiestnerd

Python Factorial Function Time Test

This article illustrates four ways to calculate a factorial function along with how long each method takes. I ran across an example factorial calculation in python using a lambda expression on the Make Tech Easier website. It made me wonder how the lambda function compared to using the factorial function that can be found in the math module. So to do a little comparison, I found a couple more examples of factorial calculations from the Progamiz website and wrote some code to measure the execution time for each example. ...

July 3, 2022 · 3 min · 596 words · shakiestnerd

User Preferences Dialog Example

When building a slightly more complex application using PySimpleGUI, you may run into the need to store user preferences to a file. This allow persisting some information or custom settings for the next time the user runs the application. UPDATE: 08/12/2020 Not sure how I missed this the first time, but the PySimpleGUI cookbook documentation has an example of saving user preferences. Check it out at this link: PySimpleGUI Cookbook Example ...

August 2, 2020 · 4 min · 787 words · shakiestnerd

PySimpleGui Versus tkinter Menus

I was wondering if some advanced menu features were available in PySimpleGui. Mainly, could you have check boxes next to items on the menu to show the state of that item? The screen shot below show menu checks in action in Visual Studio Code. PySimpleGui has the ability to create interfaces like those in tkinter, Qt, WxPython and Remi. It uses a nested list to layout menus, which makes like a whole lot simpler. ...

July 22, 2020 · 5 min · 891 words · shakiestnerd

Stepping out of beginner mode

Beginner Level When learning python, the first thing to do is… well… learn python. There is a lot to learn. A basic understanding of the language covers things like: Basic expressions (variables, statements) What is a function Flow control (if, iterations) Basic data types (strings, integers, floats) Data building blocks (lists, dictionaries, tuples) File Handling Classes (objects, methods, inheritance) Algorithms There are a lot of resources on the web that can help with getting started. You can also waste a lot of time looking around. I think getting a decent book and getting serious about it will you well down the road with getting started learning python. ...

May 11, 2020 · 5 min · 890 words · shakiestnerd

Publishing My First Application

One of my latest goals is to publish applications that I write. It’s called “Pelican Article Generator”. It spits out a template for these blogposts. Publishing an application to the world is potentially embarrassing because I’m showing my horrible code to the world. Oh well. Here are the goals designed to shore up some weaknesses. Publish applications on GitHub under the MIT license Publish the corresponding documentation on readthedocs Include testing code as part of the project Learn to use the tools provided by GitHub Improve the application over time So, my first application is the one I mentioned in my previous PySimpleGUI post. I’ve settled on calling it PelicanArticleGenerator for lack of any creativity. ...

April 28, 2020 · 1 min · 141 words · shakiestnerd

PySimpleGUI - I am in!

A lot of my python work involves writing simple utilities. This means either writing the tool as a command line application or using a minimal GUI. I have been working on a simple python application recently to automate creating article stubs for this blog. I had a working version using tkinter for the user interface. I wanted to add a date picker, to allow selecting the date from a pop-up dialog. Tkinter doesn’t have a date picker in its widget collection. I did find where someone has written a date picker that is available to pip install. (It is called tkcalendar). ...

March 1, 2020 · 4 min · 741 words · shakiestnerd

Course Duck

I had never heard of “CourseDuck” until they contacted me recently through email about mentioning my feeble site in their newsletter. So, I checked them out CourseDuck.com. Course Duck allows you to search and find training courses across a wide range of training sites. I like it, and I’m recommending it to others. Here’s why: Finds training easily All the sites that I have used in the past seem to be represented (Udemy, Coursera, edX, CodeCademy, Lynda.com, Pluralsight), as well of other sites I’ve heard of, but never enrolled in any of their courses. This is good since it helps your compare courses across different platforms. ...

January 25, 2020 · 2 min · 349 words · ShakiestNerd

Doing Tutorials - Flask

I am a life-long learner. This means I always have some kind of learning project in the works. And I find learning python and other technologies through online video tutorials to be one of the best ways for me to learn new topics. Here are some of things I try to do in order to make the learning stick. First off, I have gotten books before and I find it very hard to stick with them and work through all their exercises. Now, If I’m going through that kind of training with a group of people, it makes it a little easier and keeps me motivated (kind of like being in a school classroom). But, otherwise, technical books have not been my best tools. ...

January 25, 2020 · 3 min · 632 words · ShakiestNerd

Pelican - Using the make ftp_upload command

The process for creating blogposts for this site with Pelican is working pretty good. However, once the site was generated, the process was to launch my favorite FTP application, Filezilla. Then connect to the can of worms site and copy the content to the server. That is rather a manual process… so, there’s got to be an easier way! When I set up Pelican, it created a “make” file that automates a lot of actions. You can find documentation about the make command on the Pelican site. ...

January 9, 2020 · 3 min · 427 words · ShakiestNerd