Day 61: I’m Just not Good at char arrays in C

After a bunch of failure and confusion I realized I need to practice with char arrays in C before I can actually write the code that I want to write. I simply want to traverse the tree but rather than printing the values, they will be pushed onto the end of the array. I can then send that array to my pretty print function and produce my intended result – a pretty printed tree. Unfortunately, I suck at C and I have been learning while trying to build things. It’s going to take a bit more time but I think it will pay off in the long run. Being able to perform string manipulation in a language is kind of a big deal. Patience is a virtue that I wish to have at my core so what’s a few more days in exchange for a new skill. Step by step!

TLDR;

Okay, so here are the highlights of what I did:

  • Continued to work on the “Technical Questions” section of the book “Cracking the Coding Interview” by Gayle Laakmann McDowell. Within that, I continued my work on Tree data structures. Started trying to replicate the example pretty print functions provided in the article I am reading through. I had to pause working on my Horizontal Pretty Print project to better understand string/character manipulation in the C programming language. It is a bit of a detour but I imagine it will pay itself off in the long run. So far every piece of coding and design skills have been a benefit so I imagine this won’t be much different. It’s like dying of hunger versus being full. You are a lot pickier with what you eat when you are full as opposed to when you are starving. LOL. I’m starving!
  • I read through the other half of chapter 4, and started reading chapter 5 of the “Eloquent JavaScript” by Marjin Haverbeke. I am starting to read the book to help cover some insecurities I have about my knowledge of the language. I learned JavaScript on the fly through projects and YouTube videos. There are some core questions about the language that I don’t think I can answer, so hopefully this will help. The exercises in chapter 4 were a bit taxing. They felt like recreating the wheel but I understand the reasoning. I actually share that line of thinking. Before you start using the wheel at least try to make it yourself once so that you can appreciate how it was built and how it works. There is something to be said about how much people persuade learners away from replication. The process matter more in my opinion than the result. However, all I have are opinions and failures to my name so I can’t confirm anything LOL.

Conclusion

That’s all for today. This is my sixth round of the “#100daysofcode” challenge. I will be continuing my work from round five into round six. I am currently working through the book “Cracking the Coding Interview” by Gayle Laakmann McDowell. My goal is to become more familiar with algorithms and data structures. This goal was derived from my goal to better understand operating systems and key programs that I use in the terminal regularly e.g. Git. This goal was in term derived from my desire to better understand the fundamental tools used for coding outside of popular GUIs. This in turn was derived from my desire to be a better back-end developer.

I have no idea if my path is correct but I am walking down this road anyways. Worst case scenario I learn a whole bunch of stuff that will help me out on my own personal projects.