Breaking Linux and returning to Windows

For the past couple of months, I’ve been using Ubuntu Linux. I love it. I’ve been using Windows almost exclusively since 3.1, but I’ve found that Ubuntu 16.04 LTS is amazingly good for development purposes, and so good that I’ve been using it for everything else, too (even though I have my machine set up to dual boot with Windows 10).

I decided I’d try switching from the default Unity GUI to GNOME, which is older and preferred by quite a few longtime Linux users. I used it for a few days and just didn’t get a good feeling from it, so I tried switching back…but I did something wrong and am currently unable to access my Linux installation via GUI (and when I use recovery mode to login as root, it keeps automatically running and returning to the recovery menu). I’m sure I can fix it with enough time and energy, but for the time being I am back on Windows. Oh well. It’s not as fast or convenient, but it works well enough. I already find myself missing Linux’s terminal.

I haven’t been blogging as frequently lately, but I haven’t fallen off on programming. Save for about a week where I was temporarily dealing with Hurricane Harvey (which, thankfully, I made it out of without loss of life or property), I’ve still been working on something code-related every day. I’m about 26 days into the 100 Days of Code challenge as of writing this post, and that’s the primary reason why I haven’t updated here more.

Between logging my progress for that project (which you can read here), actual coding, reading, raising a baby, applying for jobs, interviewing for jobs (not code-related, at least not yet), and doing everything else required of me in the Real World™, it’s hard for me to get around to posting here as often. Speaking of which, I’ve got a third interview today with a law firm (following a positive phone interview and in-person with the firm’s owner and associate attorney). After three months of unemployment and a diligent effort to get a job in an unfamiliar city, I’m hopeful that this will be my way back into the work force. The good part about it is I’ll no longer be stressed out about having no income; the bad is that I’ll have less time overall to devote to advancing my skills, but I’ll still try to squeeze in at least an hour a day. I’ve developed a pretty good habit of near-daily learning and I wish to keep that going so I can achieve my ultimate goal of breaking into development as a professional.

I’ll write a post in the near future detailing what I’ve done on my first game, Chicken vs. Egg!, but in the meantime you can catch up via my 100 Days log or try it out yourself via Github. It’s bare bones, but as it stands it’s an actual playable game. I’m pretty proud of my progress so far, but there’s still quite a lot of stuff I’d like to improve upon.

I’ve got to go get ready for my interview now, but I’ll be back with more updates soon!

P.S. Fun fact: WordPress just informed me that this is my 10th post!

Advertisements

Further experimentation in Python and OOP

While there are no notable updates regarding my first game, Chicken vs. Egg, I did write a new Python script today in an effort to hone some of the skills I’ll need to use as I move forward.

It’s called “Dogs,” and it serves no real purpose aside from being a teaching tool for myself. It’s a command line-based demo which works like this:

  1. It prompts you to enter a dog breed and a name
  2. It creates an object instance of the Dog class using the provided parameters and adds it to a list of dogs you’ve created during the program
  3. A menu prompts you to list all created dogs, to create another dog, or quit

You can check it out on Github if you’d like. There’s no real-world application for this program that I can tell, but it was a valuable learning experience that helped me work through a problem I encountered when thinking about the CvE source: how to create an undefined number of objects without explicitly declaring a variable in which to store each one. What I mean is, using the Dogs program as an example, I wanted to find out how to avoid doing something like dog1 = Dog(“collie”, “Sparky”) for each dog I wanted to create.

It turns out that the solution is to create a list and append a new class instance to the list each time it’s created. This will be indispensable as I develop CvE – I have no idea how many different eggs I’ll need to create for any given game, so it would be impossible for me to manually instantiate the various Egg objects. However, if I can populate them into a list as they’re created, I can easily cycle through and update their positions, check for collision, check when they’ve gone offscreen, and remove them once they are no longer needed.

I’ve been missing JavaScript these past few days, but I think it’s best for me to focus on one thing at a time. I’ve made some good progress in JavaScript in the past month or so, and now my goal is to make a game. I do want to continue my journey toward JS mastery, but I think the path of least resistance for my current goal will be Python using Pygame. If I decide to create another game after that, there’s a really cool JavaScript game framework called Phaser which I’m interested in trying out; it would allow me to make a browser-based game using HTML5’s canvas, but I think it would also require a lot more overhead to learn.

Before I wrap up the post, I’d like to add that I’m 10% of the way through my 100 Days of Code challenge (I just posted the log for day 10 here). I’ve still got a long way to go, but I’m encouraged that I’ve made it as far as I have already.

100 Days of Code Progress: Day 5

It’s been a while since I’ve posted here, but I’ve been actively working on code every day all the same. I’ve been pouring most of my thoughts into my 100 Days of Code log in lieu of  posting here (but I’m now seeing that I’ve got a handful of readers, so I wanted to check in and let you know what I’ve been up to).

When I first heard of 100 Days of Code, I thought it was a series of code problems you had to solve 100 days in a row. It’s actually much simpler: you code whatever you want, but you do it for at least an hour each day for 100 days straight. I am in the process of securing a full-time day gig, so I’ll no longer have as much free time as I have had up until now to work on my coding skills, and this sounded like a great way to keep my momentum going.

I forked the official repo on Github and got started about five days ago. Lately, I’ve been going through the coding challenges on CodeWars.com using JavaScript to solve them. Each problem is called a “kata,” and I was making pretty steady progress until the kata I started on around the time I started the 100 Days challenge. (As a side note, you can click here to join my team on that site!)

I worked out all the syntax errors and got the program to run, but the output was totally wrong. I struggled to modify the logic to get it working, but kept hitting a brick wall. So I just decided to erase the meat of the function, work through it in plain English via pseudo code, and start again. And it worked! It’s such a great feeling to finally break through after being stuck on a persistent problem. Part of me wishes I picked everything up without getting stuck in the first place, but another part realizes that perhaps getting stuck is a valuable educational experience in its own right.

I am gearing up to create my very first game in Python using the popular Pygame library. The idea of creating video games is what piqued my interest in computer science/programming in the first place, and even though I know what I crank out will inevitably be rudimentary, I’m still excited to get my first little demo up and running. I’ll be sure to keep you posted as it develops. It won’t be anything innovative or revolutionary, but it’ll be mine, and I’ll be proud of it all the same.

I don’t know if I’ve mentioned this previously, but about a month ago I installed Ubuntu on my laptop alongside Windows 10, and I haven’t logged back into Windows since. The overall environment is so much more amenable to programming. I love it. I have to Google how to use certain features a lot more regularly than I did with Windows, but I’m excited to be learning new skills. I actually wrote my latest log for 100 Days using a very stripped-down editor called Vim; it’s anything but intuitive, but from what I’ve read, it’s very powerful. I’m looking forward to getting further acquainted with it, though I’ll probably still be heavily using Atom for the foreseeable future.

As for now, I should probably try to get some sleep. I’ve got to return to my week-long temporary day job tomorrow. Believe me, I’d much rather be coding, but I’m still not to the point of getting paid to do it.

Not yet, at least.