• I Refactored Easy Home Directory Backup

    I Refactored Easy Home Directory Backup

    Some time back I wrote an introduction to my newest application available on GitHub at the time: Easy Home Directory Backup. Excitement gripped me as I celebrated the release here on my website and on my social media accounts. Later, when I wanted to add a new feature to the program I discovered something terrible: Some parts of the application didn’t work at all. That meant I couldn’t add the new feature until I refactored Easy Home Directory Backup.

    Why I Refactored Easy Home Directory Backup

    In the first version of the application I gave users the options to perform two types of partial backups:

    • All files except dot (.) files
    • Only dot (.) files

    Well, the first option worked, but not the second. Looking back I didn’t test the second option enough to realize my code was incorrect. Where I messed up was the option I passed into the rsync command:

    subprocess.run(["rsync", "-az", "--exclude=* --include=.*",
                                        f"--log-file={path}/easy_home_directory_backup_{formatted_today_date}_log_file",
                                        home_dir_path, backup_device_path])

    I incorrectly thought the –exclude=* –include=.* code would exclude all the files in the user’s Home Directory, and then back up only the dot (.) files. That didn’t happen when I ran the program on my computer. Thus, I worked to fix my mistake. However, I couldn’t.

    I tried all different combinations, but I couldn’t get this partial type of backup to work. Every time the application would back up both the non-dot (.) and dot (.) files.

    At an impasse I actually thought about this part of my program. I asked myself these questions:

    • Is this type of partial backup actually useful?
    • Would the end user choose this option?
    • Does anyone really want to back up all their dot (.) files?

    After determining this use case was too small I knew it was time for a change. Thus, I refactored Easy Home Directory.

    What Did I Change?

    In total I changed ten files. The file seeing the biggest change was src/partial_backup.py as I removed 81 lines.

    The determine_partial_backup_type function disappeared completely because there wasn’t two different partial backup options anymore. That accounted for 76 lines of code I deleted. This made the partial_backup function shorter in length, and easier to read and understand. The main code runs in these 26 lines:

            else:
                # If the user-supplied backup device path is invalid
                if not validate_backup_path(device_path):
                    partial_backup()
                else:
                    check_free_space_for_backup(path, home_dir_path)
                    today_date: datetime = datetime.today()
                    formatted_today_date_and_time: str = today_date.strftime("%b-%d-%Y_%I:%M%p")
                    # Create a directory on the backup device named after the formatted today's date of the backup
                    backup_device_path: str = f"{path}/{formatted_today_date_and_time}"
                    make_log_file_directory()
                    console.print()
                    console.print("Preparing to start the partial backup in a minute or so.", justify="center")
                    console.print()
                    # Progress bar from tqdm
                    for _ in tqdm(range(100), desc="Backup Progress", unit="GB"):
                        """rsync options
                        a = Archive
                        """
                        subprocess.run(["rsync", "-a", "--exclude=.*",
                                        f"--log-file={home_dir_path}/.easy_home_directory_backup/{formatted_today_date_and_time}_log_file",
                                        home_dir_path, backup_device_path])
                    console.print()
                    console.print(f"A log of this backup can be found in {path}/.easy_home_directory_backup",
                                  justify="center")
                    console.print()
                    sys.exit()

    I made other changes to the additional nine files in the project. Much of it was changing the text in the comments to make the language more uniform. Or I added missing type annotations. Oh, and I added a new file (src/log_file_directory.py) to create the hidden directory containing the application’s log file.

    To review these changes and more, please check out the project’s GitHub repo. That’s where one can download the application too.

  • How I Gave Up Video Games To Study

    How I Gave Up Video Games To Study

    The first time I played a video game I was four years old. Later this year I will turn forty-three years old. Video games is my oldest hobby. And it’s a hobby I don’t actively participate in anymore. I stopped playing video games late in 2024 to use that time to improve my programming skills. In this post I’ll explain how I gave up video games so I could use that time to study.

    Step #1 On How I Gave Up Video Games: Uninstalled All My PC Games

    The first step on how I gave up video games was to uninstall all my PC games from my computer. I went into Steam, Epic, and GoG and uninstalled all the games. This way if I got the urge to play a game I couldn’t because I would have to reinstall it. Even though I have a fast Internet connection, it would probably take about twenty minutes to download and install. By that time the urge to play would probably be gone.

    After I uninstalled all the PC games I thought about uninstalling the game clients. At first I didn’t because I found myself not opening the applications because there’s no games available to play. Later on I deleted the Windows 10 partition on my hard drive because I no longer played video games. Thus, I didn’t need that operating system.

    Another reason I deleted the partition because I needed to reinstall Windows 10 to resolve a Windows Updates error, and I didn’t want to do that. Frankly, I’m done with Windows.

    Step #2 On How I Gave Up Video Games: Ignored My Nintendo Switch

    In addition to PC games, I also own a Nintendo Switch. I decided not to play those games either. Even the ones that are still in the plastic wrapping. Yep, I’m that person who purchases games on sale and don’t play them because life got in the way.

    Actually, I did more than not touch the console; I’m ignoring it. Right now as I’m typing this sentence I’m looking at my Nintendo Switch in its dock, on my computer desk to the left of my computer monitor. Before it is a Pro Controller. I can’t even tell you the last time I touched either except to move them out of the way.

    And, yes, I haven’t turned on the console to run updates. Why install updates when I’m not going to play a game.

    How Am I Doing?

    How am I doing after giving up my oldest hobby?

    Pretty well! I don’t miss video games at all. I do keep up with some news about video games through social media. And my younger brother also informs me about video games from time to time.

    Why has this worked out so well for me? Because I replaced video games with programming.

    Instead of leveling up in a Role-Playing Game and feeling good for a little bit, I learn a new Python technique and feel great. Or I try out a Python exercise, complete it without outside help, and feel great. I rather level up this way than in a video game. While the latter is fun, it’s not going to help me upgrade my skill-set, or help me get a better job.

    Finally, I don’t miss video games because they aren’t going anywhere. I can re-download my PC games, and play my sealed Nintendo Switch games.

  • My Python Study Schedule

    My Python Study Schedule

    In this post I’ll explain my Python study schedule as a full-time employee hoping to apply to entry-level Software Engineer roles at my employer later this year. My objective for writing this post is to help other full-time IT employees determine how to create their own study schedule so they can upgrade in their careers. So let’s get right into it.

    My Python Study Schedule

    My Python study schedule is every day of the week. The only time I don’t study is when I’m vacation, or when I’m sick. I want to enjoy my vacation, which is why I take a break from studying. Thus, I leave my programming books and laptop at home. When I’m sick – and I don’t get sick often – I’m not fit for learning anything. If I try to, I’m won’t remember much. And if I try to code I’ll write so-so code at best. Thus, it’s better to wait for my body to recover.

    Since I’m a full-time employee I don’t have much time to learn on the weekdays. I get about one to two hours to be studious each evening after I get dinner. Usually I break up each session into some combination of reading one of my programming books or technical documentation, and writing code. I may work on an exercise from the book, or work on one of my projects.

    However, on the weekends I can dedicate six to eight hours to study. I can spend more time than that, but I do go outside to get fresh air, go to gym, run errands, stuff like that. Weekends provide me the best opportunity to make extensive progress with my projects due to amount of time I have to code.

    Difficulties With My Schedule

    With my Python study schedule I do run into problems.

    My first problem is I don’t have any time in the morning on the weekdays to devote to learning. This is how my morning starts:

    • My alarm wakes me up at 5 AM.
    • I arrive at my apartment’s gym by 5:30 AM.
    • Perform my forty minute workout.
    • Leave the gym around 6:20 AM to commute to work.
    • Arrive at work around 7:15 AM.

    Yes, I have a long commute. Due to various reasons I live one hour away from the data center. That’s the main reason I can’t devote any time learning in the morning.

    Can I change my living situation to live closer to work? I could, but it’s going to make other parts of my life more difficult. Thus, I won’t make those changes.

    Could I study at work? I can, and have, but not anymore. I used my lunch break to read, but I only take a thirty minute break so I can leave work earlier. Hence, I don’t get much learning done. Also, sometimes I end up using my lunch break to eat and do something else unrelated to learning.

    Ease With My Python Study Schedule

    While I do have some difficulties, there’s three reasons why I have so much time to devote to learning:

    1. I’m single with no pets or any dependents.
    2. All my free time belongs to me.
    3. I no longer play any video games.

    I say this to be fully transparent. I know there are other people who don’t have the amount of free time like myself to learn. My schedule works for me, and I think it could work for others in a similar position like myself.

  • The Posts’ Theme Changes Back

    The Posts’ Theme Changes Back

    Starting Monday, March 3rd, the posts’ theme changes on my website back to detailing my journey from a Data Center Technician to a Software Engineer. The new content about any new programming topics I’m learning returns! Also, updates about any new projects on my GitHub profile. So why this change? I’ll explain.

    The Posts’ Theme Changes Back Because I’m Done Giving Career Advice

    I spent the last two weeks giving career advice about why and how to get a Data Center Technician job. (Which you can read here if you missed any of those articles.)

    Data Center Technician jobs are popular now, and since I’m one at Google I wanted to pass along my knowledge to help anyone interested to get a job. Did I? Only time will tell as someone will DM me on LinkedIn to tell me I helped them get a job at XYZ company.

    I said that change in content was temporarily in this post even though I didn’t give a specific date. I knew it would change for an entire week, but then I decided to extend it for another week. After those two weeks I gave all the advice I had to give.

    During that period of time I continued reading my programming books, working on the exercises in the book, and I refactored one of my projects. Of course I will write a post about that so please return next week. In addition that particular post, I will discuss a new book I purchased, and others I may get the approval to order through my employer.

    Finally, I am using video content on YouTube again to learn. I’ll explain what I’m learning in a post next week, and why I decided to use video content when I switched over to books a few months back. Actually, I have two videos in my “Watch Later” playlist about two different topics related to Python.

  • More Data Center Work Locations In America To Consider

    More Data Center Work Locations In America To Consider

    This post is a sequel to this post about the best data center work locations to work in America. I recorded a video for my YouTube channel about my article. At the end I talked about more data center work locations people should consider. That got me thinking later on: “I need to write another post.” So here it is! Let’s review more cities and states containing several data centers.

    More Data Center Work Location In America For Data Center Techs To Consider

    Here’s the list of the cities and states hosting more data center work locations in America in no particular order:

    • Chicago, IL
    • Oregon
    • Texas

    Chicago, IL

    I put Chicago on the list because there’s about 100 data centers in the city, and about another 50 to 60 data centers in the outskirts. Thus, there’s plenty of jobs for those looking for both entry-level and experience Data Center Technician roles. The city contains mostly the big colocation providers like CoreSite, Equinix, Digital Reality, and EdgeConnex, but there are Big Tech data centers from companies like Oracle and Microsoft.

    One of the best qualities of the data centers in Chicago, IL is the multiple clusters all around the city. There’s a cluster in the heart of the city. Then there’s a cluster of data centers in the suburbs up in the north and west parts of the city. Finally, there’s a scattering of data center running across of the southside.

    Now, one of the worst qualities of working in Chicago, IL is the cost of living. According to Payscale it costs 14% more to live in the city than the national average. Housing is particularly high at 39%. Finally, the city’s total tax rate is the third highest in America at 10.25%! However, it is cheaper if one moves out to the suburbs.

    Oregon

    Why did I list the entire state of Oregon instead of focusing on a particular city? Because most of the data centers are located in two cities:

    • Portland
    • Boardman

    There’s about more than 30 data centers in either city. And if a person travels to a nearby city, there’s additional ones. So if one is looking for more data center work locations I suggest one of those two cities. They contain data centers from Big Tech companies like Google and Amazon. In addition, there are many data centers from major colocation companies like Flexential, QTS, and Cogent. Thus, there are types of roles for interested individuals.

    One of the best qualities of working in Oregon is the beauty of the state. That’s what I hear from many of the individuals living and working there. They love the outdoors, which is a big reason why they continue to stay in the area. I know this reason isn’t directly related to a Data Center Technician job, but it is part of work/life balance which is important.

    This beauty comes at a price. The cost of living is 10% higher than the national average according to RentCafe. Housing is quite high at 22% above the national average. Transportation is the next highest cost, at 16% higher than the national average. Again, living in the suburbs will reduce those costs than living in the major cities.

    Texas

    Just like Oregon I list the entire state of Texas as an option because there’s over 300 data centers in the state! It’s one of the fastest growing areas for data centers. See the new Stargate Project from OpenAI and Oracle as an example.

    The vast majority of the more data center work locations in Texas are in the Dallas / Fort Worth area. In second place is Houston. Finally, San Antonio and Austin almost tie for the number of data centers in those cities.

    I would say that’s one of the state’s best qualities. If someone doesn’t like the Dallas area, that person could choose to live in Houston instead and get a data center job. Or if that person is weird, and wants to stay weird, then Austin is the perfect choice. As for the type of employers in the state, once again Big Tech has a large footprint, along with the major colocation providers.

    The biggest downside to working in Texas is the cost of living. I know, I’m repeating myself, but it’s higher than the national average. That’s thanks to all the people moving into the state. According to Payscale, the cost of living in Dallas is 2% higher than the national average. However, Austin has a 2% lower cost of living in comparison to the national average. However, one may still run into high housing or transportation costs like many other Americans.