Laptop Failure

Shortly you will see a benchmark for a Fedora building the text editor. My Windows laptop failed and I couldn’t figure out how to fix it. Tried a few things myself. The last time it failed, it was the ram card. That was pricey. It was an old laptop, so used Ebay to get the part. If it is the ram card again, I don’t want to even look to see what prices are for ram.

So now I switched to Fedora on an even older laptop. I had to figure out how to get around the bios problem I was seeing, but I now got Fedora working. I was able to get an adapter to get my files I had for werevim (a text editor I am making) unto a working laptop to upload to GitHub. How to say “werevim?” You know werewolf. That is the same “were” sound to say out werevim. It is a transformation of Neovim into a monster that I am not sure if anyone is even ready for. Really, I tried many names to name the text editor, but they were all taken.

New Text Editor

I am going to work on a new text editor made in Odin programming language. The backend engine will be Neovim and the front-end engine will be in SDL2. I will be posting my work to cybertengu/werevim: A front-end engine made in SDL2 and Odin to run neovim with.

I got tired of the Visual Studio (VS) Code opening a new page when it gets updated. I also hate how Vim shortcuts don’t work, and I keep forgetting which ones. I don’t need all the bells and whistles of VS code. Also, I want to make something, so this is something that will benefit me in the process.

A text editor is harder than I thought it would be. Learning about how to handle messages to and from Neovim. I hope to be able to actually type something and see it show up shortly.

Getting SDL2 Working

I am not going to get any payment for any of the below products mentioned below. I also paid for them with my money. I am following a tutorial from Parallel Realities. I am using Windows. I did try to get Linux subsystem working on my computer in order to run the Make file to build the project. I couldn’t figure it out. I did get it working in a Linux environment. That was quite a journey to get that working. I was humbled by how little I understand a Linux environment.

I read through the Make file. It looked pretty simple, so I decided to try to get SDL2 working on my Windows machine and Visual Studio 2022 Community edition. I downloaded several zip files I need for SDL2 and tutorial to work. I needed SDL2 Mixer, SDL2 Image, SDL2 TTF, and SDL2 itself. I had to pull out files of Mixer, Image, and TTF into their respective folders. For example, there are x86 and x64 library files that need to be in their x86 and x64 folders. I then had an environment variable to point to directory that store the SDL2 files and folders.

Visual Studio 2022 Community is slow on my machine. I decided to use 4Coder and RemedyBG. I had 4Coder for a while, but kept pushing using it off. I bought RemedyBG recently and wanted to try it out. So I watched a tutorial on how to start using 4Coder. I was able to make a batch file to create a x64 executable. I was able to get it working easily for x86 executable, but RemedyBG doesn’t support x86 debugging.

Once I got RemedyBG up and running, I was shocked on good and smooth it runs compared to Visual Studio 2022. I will admit there are a few quirks I encountered with 4Coder and RemedyBG that Visual Studio is better at. Visual Studio 2022 Community is free. 4Coder doesn’t seems to support copy and paste the first time something is copied (not quite sure if that is bug, but it’s a tad annoying). RemedyBG doesn’t have syntax highlighting for the source code.

I was struggling to find the URLs where I downloaded the files I needed to run SDL2. This is the true reason I am writing up this blog post, so I can go back and find them: SDL2, SDL2 Image, SDL2 Mixer, and SDL2 TTF. People might be wondering why I was struggling when you can Google for them. I agree except for SDL2 TTF. It was telling me to go to Github and build it for my machine. I couldn’t figure out how to build it correctly. Luckily, I was able to find the release builds for TTF.

I still need to improve my understanding of both RemedyBG and 4Coder. I also haven’t master the keyboard shortcuts for 4Coder. I still want to add in Vim keyboards into 4Coder, however I might break 4Coder and I don’t trust my ability to fix any errors. I am not sure how to find the documentations I was looking for. Despite the challenges, I am excited to continue to go through the SDL2 tutorials for game development.

Switching Gears

I had to make some changes, so I don’t got time to learn odin programming language as I wished. I need to start getting better at a popular language. I looked into different fields I could focus on for a career. I am settling on graphics development.

I bought an used textbook that I remember I used back in my college years learning about computer graphics. “Fundamentals of Computer Graphics” by Peter Shirley. I wonder what my professor would think if they found out I was reading this again. I even tried to see if their course was still being hosted online, but I cannot remember the URL. Too nervous to ask for the answers for the questions in the book to see if I understand the material.

I hope to implement what I learn to build up a portfolio to show to others. I am excited since it is graphics, so it will be slick to show off. Well, I better get back to reading.

Integrating with odin-imgui

I followed Odin getting-started documentation to get Odin language on my machine. I wanted to use Dear ImGui, so odin-imgui is a wrapper for me to use. I pull down the code and put it inside my odin shared folder. I am not sure if that was the ideal spot. I tried to compile the example sdl-opengl code. I got several issues that I had to work through, which is why I wanted to write this up.

It couldn’t find two projects. I made the mistake to point to projects inside odin itself within vendor folder. I was having so much issues. I decided to back out of that. I then went to github for these projects I needed, then I put those into the shared folder.

Luckily the compiler helped me fixed the rest of the errors. I learn you must have semi-colon for if-else single-line code. Nothing in the documentation that said one way or the other. I am proud that I have been trying to spend more time reading documentation. I used to only read up on what I need at the moment. There is a lot, so I will be sure to research again on how to do certain things in Odin.

I got the window to come up. I feel proud of myself. I am brainstorming now on what I want to create. Thinking of current problems I got that I could attempt to solve for myself. I am leaning toward working on making a custom game engine. I got an idea that would require as much computing power that I can give it. Not sure if I can squeeze that out of other engines out there.

The Odin Project

Yep, the name sounds awesome. The starting line is “Your Career in Web Development Starts Here” and so far it is very insightful. Here is the link: https://www.theodinproject.com/. I forget exactly how I found it, but I think it was from a Reddit forum related to programming. I kept avoiding web development due to getting really confused in my web programming class in college.

I honored the site to not skip around and proceed from the beginning with getting into motivation and mindset. I learned from one of the resource on how a programmer said he doesn’t memorize the language syntax, but he knows how to get the information he needs. This reminds me of Casey in Handmade Hero where he pulls up the specs for Win32. In the past, I felt back when I could articulate how to implement something in a language right on the spot. Now, I tell people I would double-check the language specs to make sure I used the method correctly.

I wanted to skip over HTML and CSS, but I read through them. That was a good refresher and the exercise showed me how little I understand about CSS and its power. Some stumped me. I had to search online for tips and then do my best before looking at the solution. I was so close to matching the solution.

I am now at the Flexbox section and I am shocked that I haven’t hear about this from my team at work. Flexbox is really cool and I am excited to learn more about how to use it. It is a method to position elements on the screen.

I wished I went down embedded software development, however I plan to go with web development since it should be a good way to change my career into software development in the shortest amount of time. I did wish I could be as good in C++, but I will put that on hold until I get into a financial stable place.

New Year

A new year 2022 has come in. I was thinking about my past year as I try to think about what new year resolutions I want to set. I have so many ideas. However, keeping to a small list of goals is more achievable. I’ll write out goals and a plan on accomplishing them.

I want to work on improving my programming skills. I have been watching “Handmade Hero” about creating a custom-built C++ game engine. As I watch, I am coding along with the presenter.

I will exercise more. I have a treadmill, so I will walk on my treadmill while I watch a show. Why walking? I haven’t been exercising and I want to enjoy easing back to an habit. In my experience, if I tried to do intense exercise, I injure myself and lose motivation.

I plan to continue to learn more about Kubernetes. I have a book and a course to go through. I plan to set a daily reminder to start with 15 minutes until this becomes a habit. That is how I got into watching “Handmade Hero.”

I took two courses from Animation Mentor and I really enjoyed animating. These courses took a lot of my time, which is why I haven’t been posting on my blog or doing any other projects. I do plan to continue doing animation as a hobby. I set up a goal to animate a squirrel slapping its tail like a beaver. Why a squirrel? It is one of the few rigs I have. I want to work on re-learning overlapping action and this would be a fun experiment to do so. I find myself wondering what the motion is going to look like.

Lastly, I want to spend time with my family. They’re growing up fast and I predict I will regret not spending more time with them. My above goals are for them because if I can get better at what I can do, I hope to advance in my career to provide for my family. I hope you all have a Happy New Year and good luck on your New Year’s resolution!

Kubernetes In Action

I bought “Kubernetes in Action” 2nd edition. It’s in Manning Early Access Program (MEAP), but I figured Kubernetes had updated since the first edition of the book. I am blown away by what Kubernetes and Docker does. I also learn more about Linux operating system.

I decided to watch portion of Dockercon 2021 back in May 27th. The one I watched had the speaker talking quickly. I realized I do not understand enough about Docker to follow what he was presenting. Halfway through, I decided to stop watching. I read in the comments that the videos will be available for watching later. I’ll come back when I am further in my reading.

I enjoy working with the terminal within Linux and Windows. Reminds me of growing up with an old version of Windows where we had to use command-line to interact with games we wanted to play. I still remember my sibling accidentally typing “del *.*” in the wrong directory. We definitely learn our lesson and will be super careful with running that command.

I am excited to continue reading the book to get better at using Kubernetes and Docker. I would like to add this to my skill-set.

Local Web Hosting Journey

I wanted to try creating a web server in my spare time. It took me a night to get a Linux distro installed. The bios kept ignoring my USB drive, so I had to make a few changes in the bios settings to enable me to install a new OS over Windows 10 Home edition. I’d rather not risk ruining others’ bios, so I am not going to share what settings I modified.

I tend to be on my laptop often, so I tried to figure out a way to remote desktop into the Linux computer. Apparently there is a bug with the OS and Nvidia driver where I kept getting a blank screen. I should have known to try looking through existing issues to save the time spent trying to trouble-shoot it on my own. I tried AnyDesk app, but it’s looking like it’s not DPI aware because of the tiny text. So I installed PuTTY to allow me to SSH into the machine.

I proceeded to install Lighttpd, MariaDB, and MyPHPAdmin. I couldn’t get MyPHPAdmin to render without getting a 500 error. I tried a wide range of suggestions on how to fix it, until I decided to reboot the computer. MyPHPAdmin started to work.

Next was getting my laptop to hit the web server. It was struggle to figure out what was wrong, before I realized it was a firewall issue. I felt so proud when I saw the default website show up on my laptop knowing it’s hosting from my other PC.

I was showing it off to people and they asked if I could do rainbow text. I know people can do some really cool stuff with CSS, so I looked online to see if someone already had a solution. I used the following from https://w3bits.com/rainbow-text/:

.rainbow-text {
  background-image: linear-gradient(to left, violet, indigo, blue, green, yellow, orange, red); -webkit-background-clip: text;
  color: transparent;
}

Well, this is embarrassing, I don’t know enough of WordPress to try to demonstrate in this page. I tried to use the code editor to include the code in a tag, but it doesn’t like “-webkit-background-clip” part. If I take that out, the whole section is just a rainbow background. Hopefully the above link will continue to work and people can see the example there. If not, I will have to include this code in some other HTML page outside of WordPress for now.

The whole web server experience has been fun. I encountered quite a few roadblocks, but luckily I was able to find answers online. I will be forever amazed by people’s ability to work without any outside help in implementing new features that no one knows the answer to. I still need tutorials and code examples to implement stuff, then I modify the solution to do what I need.

Hello world!

I used to create my HTML post by scratch. I really thought I would enjoy creating blog post and learning how to modify the CSS to improve the look. It became more tedious to create new post. I started to create a template HTML post, where I can replace the content. It was problematic where I had to update the navigation links and messing up on the tags in the file.

I find myself not posting for months. I decided to install WordPress. My impulsiveness caused me to lose my original home page. I don’t think I will put in effort to add a way to review my old posts.

The footer was bothering me. I know programming well enough that it got to exist somewhere in a file that is rendering the footer. I search online on how to remove the footer and discover it’s in a file called “footer.php”. However, there are eight “footer” files. I modified a few with no luck updating the footer in the page. So I did another search on how to modify the theme footer through WordPress interface. When I tried, the site informed me that I most likely want to use a child theme to modify anything.

Took a few tries of following the steps in getting the site to honor the child theme I want to use. I know I will be making more changes to the site as time goes by. I haven’t used PHP since my college years. Even then, I only used it a little bit. I thought I would never be using PHP again. I typically using JavaScript and C# for web development.

I learned a few lessons. I should store copies of my original setup. I have git experience, so it’s on me for not storing this somewhere so I can retrieve anything I lost. I am learning how to use WordPress. I learned how to modify my site’s theme. Relearning how to use PHP.