2024-08-11
So obviously I didn't do any of that stuff I talked about lol. I just follow my whims at the moment, which shouldn't be a surprise if you've read other parts of the site. I have been still doing technical work as I've spent the past few weekends working on building out a Plex server. I've done a bunch of research and learned a bunch of new concepts like audio/video formats and containers, transcoding when the client device doens't support those formats. I learned a bit about what Docker is finally. Containerization to me sounds like the same reason you use virtual environments in Python. I did research into the various RAID options and looked at a NAS as well. However, I wanted to use what I had, namely my Linux laptop, so I bought a pretty simple HDD enclosure for an 18tb enterprise drive, bought a cheap 14tb refurbished drive to serve as an offline back-up. My main goal is to plug the 18tb drive into the Linux laptop that will run 24/7 as a server in a Docker container. From my understanding, the CPU in that thing should be able to handle hardware transcoding for multiple 4k video streams at once.
It's not exactly what I planned to study, but it's going to greatly benefit my family in the long-term, which is the best kind of project!
I feel that it's important to get a broad, generalized view of tech from end to end, and then specialize as needed. I've always tried to approach life with the "learn a little about a lot" approach, becoming a jack of all trades and all that, and it's served me well.
2024-07-04
Been grinding out a few problems just to get back on it. Now that I know better coding practices, I try to follow best practices, even when throwing together new website pages and too casually pasting chatgpt overly long scripts directly into my code. I created a new post template with proper indentation and spacing, all scripts right before the body tag closes, and eventually a far better stylesheet. Between my chill mode button project and other random scripts in action, and seeing CSS Zen Garden, I'm now realizing the importance of smartly assigning classes and IDs to the various elements. This makes adding differently styled content much easier. I was having trouble branching out because my early choices to speedily get the website up and running produced a sort of spaghetti code. Refactoring my past code like this still makes it feel like good programming practice, even if HTML and CSS aren't considered programming languages. I don't fully agree with that. If you can learn HTML and CSS, you should still be proud. Same with SQL. If you can do that stuff, you can learn "real" programming languages, too.
Beyond that, I started setting up for the roguelike tutorial. It's funny, I actually had 2 different instances today of file/folder structure giving me fits. Got stuck on that for a while, came back and resolved it in 30 seconds. Sometimes you just have to step away.
Also learned about creating a requirements.txt file in my Python project. Running pip install from that file is nifty. A couple folks suggested a few libraries for the Roguelike to help with linting, a term I did not know (Lint is the computer science term for a static code analysis tool used to flag programming errors, bugs, stylistic errors and suspicious constructs).
I almost wish I was doing the project in Godot. But, I decided to learn Python so I'm gonna keep doing it.
2024-07-02
Added a chill mode button to hide the sidebars. I wanted a sliding animation but this'll do for now. I still want to figure out a way to double the width of the main body when the chill mode button is hit. I would also like to double the width of the Youtube video, but that might require reloading it entirely. I think doubling the width like that may be harder than I thought without breaking the page. It almost might be easier to just load an alternative version of the index all together, but that isn't very scalable. Maybe it makes more sense to create a cozy hangout page instead of having the index serve that purpose.
Found a neat annual /r/roguelikedev event where they create a roguelike from scratch over 8 weeks. This is perfect for me, since the tutorial uses Python, it gives gamedev experience, and in a genre I was already interested in. I am super excited for this! I'm gonna start over the long weekend!
Damn dude, I got some real spaghetti code up in this place. Poorly indented, scripts loading all throughout the code instead of at the bottom near the ending body tag, forgetting to update the title tag...Far too much CSS that's targeted too broadly on elements, not enough classes and IDs. It's not conducive to all the stupid javascript I want to add in. It makes refactoring difficult. So I think that'll be another task for the long weekend in between the Python roguelike. Should be fun! I'm spending a lot of my after work time on playing with the site. I really like how it's coming together. Eventually, I'll create a more sanitized professional portfolio site. All my whacky AI generated javascript can continue to live here.
2024-07-01
I am continuing to use Claude to speed up my website development. The downside is I am not actually learning anything, but the website is dope at least! I find that I am trying to use my existing skill-set to improve my workflow. I have an easy time articulating what I want. Writing functional specification documents which are handed over to developers to code is literally my day job. I find this translates pretty well to feeding prompts to LLMs to get what I want. I think it's ok as long as I make an effort to understand each line. I'm usually pretty good at reading code, which I also picked up at my day job. I'm more focused on learning Python right now instead of Javascript as well. Ultimately, whatever I choose to do in this space is ok, because I get to decide if it is or not :)
I really like my little gallery of Youtube videos on the main page. I think I'd like to modify it to pull from a playlist. Claude told me this required a Youtube API, so that'll be my first time using an API in my coding journey.
I have another idea for a maximum chill mode button which pushes the sidebars out to the edges of the screen and increases the video size. I like the sidebars but having looked at them so much over the past couple weeks, they can be intense! They are busy now, so I need pages where I can give the site room to breathe.
2024-06-30
Back on that grind today. Fair amount of website updates and now just working my way through the mooc.fi problems. Currently in section 3. Before, I was selectively skipping exercises in the first 2 lessons, but not anymore! I do every problem now, since practice is key. My mechanical keyboard makes coding even better! It feels so good to type...I can't wait to write a long article using it.
2024-06-28
Still brainstorming projects. I'm thinking of a Retro game of the day thing that spotlights a new game from my collection each day. I want it to email me the game each day to collect my thoughts on the game, then take my inputs, store them in a database, and update a section of the blog. I'm not sure yet if Python or Javascipt is the right tool, though I think both should be able to handle it just fine.
This idea came about because of my ongoing data preservation project. I think it'll be a fun one.
2024-06-27
Claude strikes again! I came up with a project idea for a hypothetical bar that has a daily rotating menu and needs a CRUD app with a drink database. My intent was to have some sort of SQL database with a GUI of sorts. I gave Claude the scenario and asked for the best technologies to handle it. Claude suggested the Python libraries SQLite for the database and PyQT for a simple front-end. I haven't run the code yet but I read through it and it looks sound. I'm curious to see how well it's going to work. A great usage of LLMs is to figure out the art of the possible. As a newbie, I don't yet know what all the various Python libraries are, so this is great. I think this would be a good prototype to translate into a full stack app using a real SQL database (think I hear Postgress get thrown around a lot) with a front-end, maybe in Javascript? I think Django is often used in this context based on what I've read. Regardless, I'm excited to mess around with it this weekend.
2024-06-26
No coding yesterday, but lots of brainstorming. Starting to see code in my head which I think is a good sign. Even on days I don't code I still try to immerse myself in it. Read programming subreddits, watch Youtube videos, etc. It keeps the content fresh. This weekend I plan to focus on creating another automation project.
I'm thinking of some projects that would help me learn things relevant to the real world. Something with Rest APIs and a database for some basic CRUD action. Started a section in my OneNote to keep project ideas.
2024-06-25
So, it turns out I have been re-inventing the wheel! There's a tool called Jdownloader that can download directly from internet archive directories and extract the files all in one go. However, I'm glad I didn't find out about it until after, because yesterday was an incredible learning experience. My downloader had a timeout last night, unfortunately. I've downloaded quite a bit from Archive the past couple days, not sure if I'm getting limited there or if everyone else is panic downloading stuff. I'm normally against gatekeeping, but I think it might have been the correct move for roms. Ever since Delta came to iOS...that's why I'm loading up now. The masses will likely ruin it haha.
2024-06-24
I have decided upon my first real world Python project that helps my workflow! I'm going to create a program that extracts zip files and moves them over to a specific folder. I am excited to start tonight after work!
Holy shit, am I a programmer now? This was so fast I was able to do it on break. I installed the Py7zr library to extract 7zip files. This involved installing Pip and then creating and activating the virtual environment. After a little bit of research, virtual environments are recommended when dealing with external libraries, so that the packages are not installed globally. When I have multiple projects and multiple libraries, this will make more sense as it reduces potential conflicts between libraries. Then I created a script to extract them from my downloads folder and move the extract to another folder. It's working! It's moving very slowly, like slower than it would take me to do it manually, but at least it's saving me clicks! I feel very powerful right now. I now need to find out why it's running so slowly..
3rd update for the day! The answer was to import multiprocessing. Claude 3.5 knew that shit right away. The new GPT 4o model didn't have a clue! Gotta say I'm really impressed with Claude. I had it add several new features to my code, then asked it to change the code to work with regular zip files instead of 7zip. Holy shit, it worked perfectly, instantly. I am very impressed! LLMs are definitely a force multiplier for learning programming. Of course, with the caveat that one should still attempt to actually learn, which I am doing. In order to cement my understanding of the changes, let me summarize:
- First, I wanted to add a file counter to show the number of zip files in the directory. This was done with a simple for loop looking for all of the files ending in .7z in the folder and then applying len.
- Next, I wanted a counter that ticked up by 1 for each iteration of the main for loop. Pretty simple. I actually knew how to do this one instantly but let Claude do it cause I was lazy.
- The next thing to address was the speed. Claude imported time to start the timer when the main loop started, and stopped the timer when it completed. So now I can see exactly how many files were extracted and how long the entire operation took. Claude said it was adding a timeout for each extraction to prevent hanging on problematic files, but that was not actually implemented. Just a timer.
- Claude imported multiprocessing and from concurrent.futures import ProcessPoolExecutor, as_completed. I don't really know the details on these, but it seems to have allowed engagement of all of my cores instead of single-processing. Gonna have to do a bit of studying here. I only have a surface level knowledge of CPUs, tbh. Like I said, complete beginner.
- I then asked for another new feature - to delete the zip files after the extraction was complete. Claude actually recommended that instead of deleting the files, I could opt to move them instead to a "Processed" folder so that I could safely review the results. This seemed like a good suggestion so that's what we did. Claude imported shutil in order to move files, so that's another thing I need to read up on.
- My next ask was bigger. I wanted it to re-write the whole program for zip files instead of 7zip. I read over the new code to validate everything looked right, loaded a few test files and ran it. Damn if it didn't work perfectly the first time! Tbh, I didn't even test all of the features I detailed out. I just had Claude keep adding on. I am certainly impressed.
Today was incredible! Best day of my coding journey so far.
Update 4 of the day!? I installed another library, this time the one from internet archive! It's quite simple to use, though I will say Claude was a little less helpful with this one. My current use case is simply for downloading all of the files in an archive. I think I'm into data preservation now. Seeing all of the corpos coming after archive and Vimm has radicalized me. I reckon most of us on Neocities feel a certain way about the ever increasing corporatization of the internet. Well, this is one of the tools we still have. If you like something...back it up. Make sure you own it, not that you've just been leased a temporary license, or granted temporary acces by your corporate overlords. Maybe I'll figure out how to create an executable that I can share. Or, maybe I'll just create a github repo...but I suppose it'd be nice to have a simple GUI for it. I think this would be an excellent project to work on.
I have this 14TB hard drive just begging to be filled up. Soon enough, I'll be configuring a RAID array or something. I barely know what it means but after today? I'm confident that I can figure it out. The ability (and willingness) to learn truly is one of the most important skills in life.
2024-06-23
Felt like making some site updates today! It's kinda messy in here. Dead links, browsers blocking my guestbook iframes, half written posts all over the place, the guestbook site shutting down...lots to clean up! I almost started yet another post about my experience with CRT TVs in the modern era, but I felt maybe I should finish what I've already started. On the Python side, not much since I'm feeling a bit under the weather, but I did learn about the lambda function today. I don't see many use cases for it at the moment, but maybe one day I will. It just seems like it makes readability worse but what do I know? Not too much yet.
2024-06-22
Nothing much new to report, still working on the same problem sets. Just finished lesson 2 which ended on an intro to while loops. Practice helps so much! Gonna keep grinding and see if I can get through lesson 3 this weekend. But, I'm not gonna stress about it. I didn't sleep well last night so my brain is firing a little slower today. I am also having a little trouble with the built-in editor on mooc.fi. The last problem in lesson 2 was not working correctly. To confirm, I even pasted the code into my own editor and ran it and it behaved as expected.
2024-06-20
Funny article: I will fucking piledrive you if you mention AI again
Didn't get much done yesterday thanks to discovering Dark and Darker. But, today I am back on the problem sets! I can definitely tell the repetition is helping. Highly recommend the mooc.fi course!
2024-06-18
Not much progress in the past week besides some random Youtube videos but I've been hitting it hard today! I do at least try and immerse myself in programming even on days where I struggle to write code. I find it helps to keep my mindset engaged. I'm currently bouncing back and forth between refactoring my Craps app to be more efficient and grinding out problem sets online. I find the mooc.fi course to be very helpful! I just finished the first lesson which dealt with easy stuff, but honestly that's where I'm at! I needed practice just writing code, even if it's simple. I was overestimating my abilities a bit, possibly. But I'm on the right path! Stay immersed in the topics, at least 1 video or article about programming per day. And if we can squeeze in any coding, that's a win. I don't have a regimented schedule yet since it's periods of work, followed by learning new concepts, taking time to think about and integrate those concepts into my mind, then practice implementing them. But at my stage, just hammering out code is going to be most beneficial. I think I'm gonna try to do that every day from Thursday to Sunday. Benefits of being a forest hermit - I don't have too much going on, so I should have plenty of time to continue this journey!
2024-06-12
Learned about type annotation to keep track of variable types. I've seen list comprehension brought up in several videos I've watched recently so I'm gonna try to learn more about that, next. The game I want to make is going to have a fair amount of large lists (enemy lists, item database, loot tables, etc.) so this will be a good foundation skill to practice.
2024-06-11
First devlog entry! I got my craps app working pretty good but then I made too many changes too fast without testing and now I can't get it to stop doing weird things. I decided to start working on a roulette app in between working on craps. I'm struggling to properly use loops. I understand the concept now but my implementation still needs work obviously. I'm also struggling to properly track the value of a variable that gets updated via almost every one of my functions, in this case the player's money balance. But, I'm actually writing code now which is great progress from where I was last week!