100 Days of Python, Projects 1-14 #100DaysofCode

I’ve mentioned before about the concept of “always learning”.    One of those thing is coding.  I’d like to think I’m actually pretty good at basic to intermediate level coding, though I am certainly not an expert.  I kind of feel like I am at a point where I would definitely like to “level up” my ability a bit.  So I’ve been working on the Challenge, though a course on Udemy.  Specifically, 100 days of Python, and specifically, this course.

I’ve also been using this as an good excuse to sharpen up my Github skills a bit, so you can follow my progress along in my Github Repository.  I also figure I could talk about about some of my though processes and flow here as well, though some of the projects are very simple, so there may not be a lot to say about them specifically.  Especially since, frankly, I am already beyond the “Beginner Level” of this course.

I thought about making a post for each module, but that’s kind of overkill as well, so instead I’ll just break it up a bit across maybe the skill levels, or whenever I feel like it.

Project 1 – Band Name Generator

This one is pretty basic, and basically, the same sort of thing you see on Facebook trying to steal your information.  I promise I’m not trying to steal your data though.  It takes some simple inputs, the city you were born in, your pet’s name, and outputs them as a combination for a “Band Name”.  You can really put anything you want into these fields and it will just combine them.  Maybe a fun alternative would be to use the letters of the words entered, to pull a different word from a list or something.  

Project 2 – Tip Calculator

This one is mildly more complicated than the Band Name Calculator, but it is still just input fields, but this time, with MATH!  You enter the total bill, how much to tip, how many people ate, and it splits the bill among the various people evenly.  Be sure you order the steak dinner, so your salad eating friends can foot part of the bill for your expensive steak.

Project 3 – Treasure Island Game

I really enjoyed this one, maybe a little TOO much.  The core project is just practice on “if, elif, else” statements.  You build a little “choose your own adventure” game.  Like a very simple Zork Game.  I kind of just kept getting goofier and goofier with the descriptions though.  I guess that’s the “writer” part of my personality or something.

Project 4 – Rock Paper Scissors Game

Pretty straight forward, and mostly a practice for random numbers.  A rock paper scissors game.  One part I like about this game though it that it introduces the idea of using ascii graphics.  I mean, the core idea is simple, but in all the various online coding classes I have done, none have done this sort of thing.  It really helps these little projects feel way less mundane.

Project 5 – Password Generator

More random number practice, this one actually is probably the most actually useful project so far.  You enter how many letters, numbers, and symbols you want for a password and well, it generates it, randomly.  Especially useful because strong passwords are good to have.  Though using a random password, you probably will want a password keeper, and well, most of those include a random password generator.

Project 6 – Escaping the Maze

Project 6 was a little different, since it wasn’t strictly writing pure code, but instead was using a site called Reborg’s World.  https://www.reeborg.ca/index_en.html This site has a few puzzles where you use functions to navigate a little robot through some challenges.  It’s purpose is to help the learner get better at logic puzzles mostly.  It was interesting and I’ve made a note to go back and do the rest of the puzzles at some point.

Project 7 – Hangman Game

Hey, another game.  This one is honestly, pretty full featured, at least for what it’s supposed to be.  It’s still an ASCII based CLI game but it works like Hangman.  Guess the letters, your little man slowly gets hung.  Better save him.

Project 8 – Caesar Cypher

This round is essentially just a sort of “intro to cryptography,” that I feel like may come back around in a later lesson.   This program builds a basic Caesar Cypher.  You enter some text, pick a Cypher, then it just rotates each letter by the number of letters equal to the Cypher number.  It also lets you decode the messages.

Project 9 – Secret Auction

This one was kind of neat, though not overly complicated.  Essentially, you enter your name, place a bit, if there are more people, they do the same, then it announces who the highest bidder is.  My main frustration from this project.  It’s suggested you clear the screen between bidders.   Simple enough.  but it turns out that Python doesn’t really have a built in clear function.  The samples run on the Replit website, and you have to import a special library from Replit.  This doesn’t work in my local VS Code interpreter.  I looked into this, I could write a custom include for it, but it would only work in Windows, or Mac, or Linux, not all three.  Because it’s essentially a command specific to each OS’s respective shells.

Super annoying.

Project 10 – Calculator

This would almost be really cool, if it were actually clickable and not just something you type numbers and operators into.  Still, it’s one of my favorites I think in the end, because it introduces a really interesting and neat concept involving Dictionaries.  Specifically, you have a dictionary

operations = {
    "+": add,
    "-": sub,
    "*": mult,
    "/": div,
}

You can use the key, to assign it’s value to a variable, then call that variable, as the name of a function.  The names inside the dictionary all match the names of functions.  Really slick.  Feels like it reduces code readability quite a lot though.

Project 11 – Blackjack Game

This project was alright to do but it’s a little disappointing because it fakes the cards but just using value.  It doesn’t handle Aces properly, it doesn’t handle splits or anything.   The one mistake I made, that I fixed, originally, I had set it up so the Dealer would always “Hit” of it was below the player score.  Except the dealer wouldn’t know what cards the Player had to know the player score.

Also there is not actual betting, which could make things more interesting I suppose.

Project 12 – Number Guesser

This one almost feels a bit like a filler project, since it’s a pretty straight forward if else level project.  I will also add that the hard mode gives you 5 guesses, which feels extremely low.  The logical method is halving things, so 100 -> 50 -> 25 -> 12 -> 6, so you essentially have a 1/6 chance of getting the answer.\

Project 13 – Debugging

No actual projects on day 13, so maybe it’s not actually “100 Projects in 100 days”. except several of the days have what are two to three projects, so I am sure it makes it up somewhere.   Day 13 was revisiting 3 old projects, using different methods of debugging the code provided.

Project 14 – Higher Lower Game

This game was presented as if it’s super commonly know but I had never heard of it.  It’s almost a variation of the whole Facemash/Hot or Not Idea, but with less focus on looks.  Int he example shown from the web, it uses number of Google Results for a topic, in this version it uses number of Instagram Followers.   The user is presented with two celebrities, and they have to guess which has more Instagram Followers.

It’s all pulled from pre built data, so it’s not current follower counts.   I could see this making a return when the course gets into the Web Scraping portions.

And that’s the end of the “Beginner Section”.  The course has several sections, Beginner, Intermediate, Intermediate +, some Web training, Advanced, and Professional. Most of what I’ve done so far is not really anything new.  i could have worked most of these out.  I’ve actually been spicing them up a bit with my own bits to make things more robust, like most of the inputs have some level of input check to ake sure it’s value.  Like is it a number, or did the user enter “t” or “T” or “True” or “true”.

I’m more looking forward to the next sections as it gets into GUI style training.

Git Gud at Git

Something that I’ve have tried and fail to quite get a hang of is how to use Git, and more specifically, GitHub. I’ve had a GitHub account for a good while, and at one point I “had” a ton of repositories because instead of simply following something, I would fork it to make a copy of it.  I feel like that’s not quite the proper way to go about using things.  At some point I went through and removed all of these forks and was left with only my code projects.  

I still wanted to get a better feel for the proper flow, which I probably still don’t have, and won’t really ever get until I (if ever) have the chance to actually work with a team using Git.  Most of my projects are just single upload drops.  Almost everything I do I just revise and edit locally until it works, then if I want to “show it off” I scrub out any static IPs, usernames, and passwords, and upload it to a repository.  I suppose there really isn’t anything inherently wrong with this method.  I have, more recently been pushing myself to use Visual Studio Code (VSCode) lately and a few other code apps, and thus I’ve been pushing some repositories with those various program’s interfaces.  

I did get to go through the proper, Fork, Branch, Edit, Push process a few times while doing some lessons through Twilioquest, and a follow up afterwards.  

Still, I think my main take away is… it doesn’t really matter how the code gets there.   Especially for single person projects.  I don’t really have any overall “goal” here.  It feels like the common goal is to try to get a programming job, but I am not really sure I would want that, at least not anytime soon.  I mostly just want to show off some mediocre code to the nobody who would look at it.  

Speaking of “showing off”, I also found that the little games I had made last year with Microsoft’s MakeCode Arcade are all browser based, so I set up a little page to specifically show off Code Projects.  Right now, it’s all just MakeCode games, but I plan to add more if it seems like a good idea.

Another motivator for this push to tidy up my GitHub is it’s an excuse to practice using Markdown more.  Like Git, it feels like a skill I should have practiced more much sooner than now.  The main page for each repository is just a specific Markdown file, so having more repositories means I can make many pages of different types.  I’ve also started using Markdown to draft out blog posts as well as for my archive of old writings.

So anyway, if you want to see some random bits of code, some from 20+ years ago, feel free to poke around my growing pile of repositories.   Actual Repositories, where I did some level of work on them.

Lastly, this whole post is annoying full of things I wanted to blog about but have not.  Markdown, MakeCode, Twilioquest, my huge writing archive, to name a few.

On Getting COVID

Technically, I am writing this after the fact, but it needs done. COVID sucks. Omicron seems to not really care about vaccines or masks at all, and while its less lethal, it still is rough.

I don’t know where I got it, most likely while in Chicago, and most likely at the concert. Unlike the CHVRCHES show, there was no mask or Vax requirements. I had worn a mask anyway while inside. I doubt it was the Zoo, that was barely busy due to the weather and mostly outdoors. Where does not super matter. I definitely “got it” first, or at least had symptoms. I had been extra snotty all week, I had assumed allergies. I finally tested Thursday, 6/2, morning with a home test.

It was Positive. I scheduled a test at CVS for that morning and called off work as required.

I also basically camped in the bedroom for the next several days, in hopes that being Vaccinated would help keep my family from getting it. It did not. But their symptoms.basically followed my by a few days.

Things started okish Thursday, but by Friday and Saturday, I had zero motivation at all to do anything. The virus just seemed to make me completely lethargic. I didn’t even have the energy to turn on the bedroom TV and watch anything. I basically just toggled between staring at the wall and sleeping.

By Sunday I was doing better and spent some time downstairs on the computer. Starting Saturday I had developed a killer sore throat that lasted through the next couple of days. Nothing helped it at all, I tried lozenges and sprays and certain foods and nothing helped.

I was technically cleared to come back to work Monday, but I told my boss I would need another day just to be sure. I do not interact with anyone at work at all, and even if I were still mildly contagious, it would be simple enough to go in and shut the door and stay away from anyone else in the building (maybe 1-2 people).

I went back in Tuesday, 6/7. I made some coffee as normal, I was feeling pretty good. I mentioned to my boss over the company messenger I was fine, but my family had it now at home. He checked a bit and well, because they had it, I had to stay away. This was slightly frustrating because I have been working on an important project for work, and already had been off with actual vacation days previously.

So I went back home. I spent a lot of the rest of the week taking care of things around the house. It really didn’t feel like a “vacation” or anything, and while I was not as sick as I had been, I was still a bit miserable. It didn’t help feeling guilty about going on the stupid trip in the first place and bringing it home to everyone.

Blog Consolidation and Feeds

Switching to Mastodon from Twitter has slightly renewed my interest in my blog, and more specifically my blog as a place for all of my stuff, not necessarily a place for “others”. Not that others can’t enjoy it. Maybe that isn’t quite the right way to say what I mean.

Basically, I want this blog to be a bit more of an archive for things I do online. Part of this however, also means making some of it less visible, so things don’t feel cluttered, but the data is still there. It’s probably easier to just give some examples of what I have done recently. Some of which is inspired a bit by things I have seen others do.

Letterboxed Syndication

I have a new category on the side, Feeds, which currently only has one sub category, for Letterboxed. What this does is it creates posts from reviews and ratings and movies I’ve watched, based on my Letterboxed account.

It’s a simple plugin for “RSS to Post”. The trickier part was, the initial import, only pulled the last 51 items. So I had to find a separate plug in that would import an XML export as a WordPress post. This still needs some massaging though, as I don’t think it imported everything. Plus, it did not create the cool Poster images. I may have to manually fix those, if I bother.

Photo Galleries

I’ve also started creating Photo Gallery posts. I had some Photo Gallery software set up but I opted to purge it when I cleaned up the malware on the server, because it was a potential attack vector. The less I have to keep clean the better. Plus for what I’m doing WordPress functions just fine.

I’ll add more older photos over time, but this gives a nice place to just post some of the various photos from over the years.

Micro Blog

There’s something screwy going on with this category, I’m not sure what, but basically, it’s a category, Micro Blog, which is intended to be excluded from the main feed, and often posting more “Twittery” posts.

Currently it’s just a collection of scores from various Wordle style daily games. I hope to use it for a bvit more though in the future. I wouldn’t mind finding a way to syndicate my Duolingo progress or Fitbit stats to the Microblog of Feeds section, for example.

Aurora @ The Riviera feat SubUrban (2022.05.27)

It seems like my brief run (of 2) concerts where I was standing up front couldn’t last forever. I was close, but I was not right up front for the Aurora show. Not a massive deal, except I ended up behind this dude with poofy hair, so I couldn’t see half the stage half the time.

But I’m not really here to complain. I’m here to record things that I want to remember.

This would have been my 4th (proper) concert, but I opted to not go see Dodie back in February, due to COVID going nuts at the time. So far, there has been kind of an interesting progression. Each time I’ve gotten to the venue an hour or so before doors opened. For Sigrid and CHVRCHES in St Louis, I was maybe 15-20 people back from the front of the line. For Aurora I was around the block and behind the venue in a very long line. I’m not real sure Aurora is particularly more popular, especially than CHVRCHES, but more likely Chicago is just a different environment than St Louis.

It certain was different for parking too. Both venues in St Louis had parking lots available. For Chicago, I used an app called Spot Hero and had to walk a mile and a half or so to the venue. Plus, I got to park in the jankiest back alley spot under an El Train bridge. Fun times.

Anyway, the doors eventually open, everyone slowly files in, I end up maybe, 4 people back right up against the right side. I probably could have gone closer to the center but I kind of preferred the idea of having the side rail available because, less people around.

The opening act was Sub Urban. I don’t really know much about Sub Urban beyond, he did a single with Aurora called Paramour. Unlike the opening acts at the last two shows, I don’t see myself rushing out to listen to more Sub Urban. His music was interesting, and it wasn’t bad, but it just… wasn’t really my thing. I think the best way to describe it is sort of Emo Rock Rap, while Sub urban does this weird sort of spastic jerky dance. Like I said, it wasn’t bad, I just wasn’t personally super into it.

I was a bit disappointed that they did not perform Paramour live, or even at all. It was kind of the perfect opportunity. I figure the issue there amounts to a few factors. Either you get Aurora out early, which spoils things a bit. Or you have to drag out Paramour’s band gear out again, which isn’t feasible at all, because it’s a Paramour song.

Anyway, as usual, there was a short intermission while the stage is reset, and then the main show of Aurora starts.

The main thing I feel like mentioning, I enjoyed the show a lot more than expected. And I want to say this because I had doubts about the set list before the show. I enjoy the the newest album that the tour is promoting, The Gods We Can Touch, but it’s not my favorite. I was worried that would slightly sour my overall enjoyment, but it did not. I think part of it is that the songs are frankly, better live.

I also was a bit worried about the sound because recently Silja Sol, who has been doing backup vocals for Aurora for a long time, left the band for her own solo work. I was a bit worried that this may hurt the sound, because Silja and Aurora harmonize so well together.

This is a common thing I have found in general, across acts. Even for songs I really enjoy, the music is better live.

Anyway, the setlist.

  • The Forbidden Fruits of Eden (Recorded Intro) (TGWCT)
  • Heathens (TGWCT)
  • Runaway (All My Demons…)
  • Everything Matters (TGWCT)
  • Blood in the Wine (TGWCT)
  • Warrior (All My Demons…)
  • The Woman I Am (TGWCT)
  • A Temporary High (TGWCT)
  • A Dangerous Thing (TGWCT)
  • Infections of a Different Kind (Step 1)
  • The River (Step 2)
  • Cure for Me (TGWCT)
  • Queendom (Step 1)
  • The Seed (Step 2)
  • Running With the Wolves (All My Demons…)

Encore:

  • Giving In to the Love (TGWCT)
  • A Little Place Called the Moon (Recorded Outro) (TGWCT)

It’s a little thing, but I am really glad Exist for Love wasn’t on the list, because I kind of actively dislike that track in particular. Total tracks were 3 from All My Demons Greeted Me as a Friend, 2 each from Infections of a Different Kind and A Different Kind of Human and 8+2 from The Gods We Can Touch. Not a bad set list. I had been really hoping that somehow Gentle Earthquakes would make it to the set list as it’s my favorite track but it did not.

My personal highlights on this list are Heathens,, Warrior, The Woman I Am, Infections of a Different Kind, Cure For Me, Running With the Wolves, and Giving In to the Love. OK yeah, that’s like half the tracks, and I honestly love them all. I don’t think I’ve mentioned it yet, but Aurora is my top artist of all time, according to Last FM. And as my listening habits tend to be album based over singles, I’ve listened to all of her songs, a lot. I am not sure I could actually pick a favorite from the list, but it probably would be The Woman I Am or Infections of a Different Kind. The latter being particularly notable because it’s a song I don’t listen to a lot because it’s slower, I’m not always in the mood for the slower tracks, and it’s the last song on it’s album, so I don’t always get to it before I stop listening.

Anyway, I am super glad I got to have this experience. I’ve actually seen my top three most listened to (at least per Last-FM) Artists Live now, which is fun.

I’ve added a few photos to this post but a full gallery can be found here.