kitscodingblog
kitscodingblog
Kit's Coding Journey
8 posts
Don't wanna be here? Send us removal request.
kitscodingblog 3 months ago
Text
Long Time No See!
Sorry I've been radio silent for so long! I've been super busy. I don't even remember when my last post was.
Anyway, more under the cut
I haven't really got much time to code. I started my new job back in January and it's taken up a lot of my time. I've also had to adjust to working again and balancing both my home/work life. Including my own happiness and yada yada. Which has led to not many streams and other things too.
As for coding, I pivoted to Javascript and SQL, but I've had to shelf that too. So I'm not sure I'll be keeping this as a coding blog. We'll see.
As to why? It's mostly for work reasons. I've been trying to figure out what I need to focus on, and to stay at my current company and climb the ladder, it's better for me to pivot over to IT Certifications. I really like this company and I'd like to stay, so coding will probably be on the back burner.
There's a lot of stuff I want to do, and trying to find time for it all is really hard. You gotta figure out where to sacrifice stuff, and that's been a challenge. Especially if I want to be happy and sane.
This may just become a blog blog, or a tech blog, but we'll see.
Anyway, that's all I got for now. I'm studying for the A+ cert and then making my way into the Network Cert or Security. I haven't decided. I hope you all are staying wonderful. +2 to your next Charisma check!
4 notes View notes
kitscodingblog 6 months ago
Text
Coding Update 7
I'm gonna try to keep this blog updated at least once a week so I make sure I'm always doing SOME sort of coding.
Something something read more.
So the Alien Invasion game is coming along pretty well. I'm learning a lot of tools very quickly. Which also means I'm forgetting a lot of stuff quickly sometimes haha.
Tumblr media
So here's some of it. AlienInvasion is basically the whole game stuff, including all the sprites and other key information. It had me do a lot of creating Classes in separate files, then importing them into the main file to keep things clean. Which I get is mostly to keep everything clean and organized.
I'm also, as a full disclosure, mostly just writing the code it wants me to write. So this isn't wholly my own or anything.
Also I have NO idea what sprite group is. I think, if I'm understand it right, it's basically creating a stored group/list thing for the bullets and aliens?
Tumblr media
Also there's this. The super().__init__() . I have, literally, no idea why that gets called. It never explained it or made an reference to why its used in the Sprite function. It just said "we call super() so it works properly" and I was like but WHY?? What does it MEAN??
I still don't know.
Tumblr media
Also as you can see here, this is everything slimmed down to make the code easier. It had me write out what each of those events do first, under run_game(self), then it was like "we'll refractor this so the code is easier to read." Plus it makes it 100x easier to adjust the code.
I could go into the specifics of them but nah. Just know that they do what they are supposed.
Though while writing the bullet function, it originally let me spawn as many as i wanted as i spammed Spacebar. As I was testing it, I was like "huh.. Those bullets are off screen but I'm pretty sure they still exist. Which means eventually this will be a huge problem." And sure enough, the next part was like "those bullets will add up and slow down everything, so let's fix that." Which means I'm at least thinking about the right things sometimes! Yippie!
So as of right now: I have a moving ship, a bunch of aliens, the ability to shoot up to 3 bullets on screen, and I can close the game. The next part I think is making the aliens move and get blown up!
I did have a hard time doing the on-your-own problem though. It wanted me to create a bunch of stars, like I did the aliens, which worked fine AT FIRST. But then it wanted me to randomly space them, so it looked more like a real night sky.
The problem? If a star spawned outside the borders of the game, my whole thing FROZE. It became completely unresponsive. I also couldn't figure out how to get it to choose a random number for EACH star. It basically chose a random number when loaded and stuck to it.
I ended up looking up the code for how they did it, but i still didn't really understand it. Oh well. I'll go back to it some other time.
I also tried to do an easy Leetcode problem, the famous "two sum" interview question. Basically, it needs to pull numbers from a list to add up to the target sum, then print out their location within the list. so if its two numbers that equal 9, and they are in the list spots 0 and 4, it'll print [0, 4].
I know WHAT it wants me to do, and I know WHAT i want IT to do, but not HOW to do it. Which...made me really frustrated. I think its just cause I don't know how to use sorting algorithms, or any of the search ones. Which is a whole nother beast to manage. I'm honestly not sure how to even APPROACH that. Or where to study it. So I'm putting a pin in it for now.
I think I might learn some of it when I do some of the other projects, but I guess we'll find out. If anyone has any advice to learn that stuff please feel free to send it my way.
I think the other thing is it's gonna start making me think in math terms I don't know or understand. Like I was watching a show about programming and they were talking about uh.. Lambda math or something? and I was like "nope I have no idea what you are referring to." I'm under the impression I might be OKAY without knowing a ton of math, but uhhhh. We'll see I guess?
Anyway, I'll keep you posted. The most important part is ya gurl isn't giving up. We gonna do it to win it!!!
-Kit
7 notes View notes
kitscodingblog 6 months ago
Text
Coding Update 6
I think its been a while since I've updated. I fell behind a little on my learning cause life has been really difficult lately.
Hope y'all had a good Thanksgiving and having a good start into the holiday season!! Yadda yadda more under the cut.
So I just finished Part 1 of my book. This mostly contained the introduction to Python, obviously, while learning a lot of the major functions of the program. I think it took me a bit to get into the swing of coding, especially cause it felt like I've had to rewire my own brain doing this haha.
The good news is I feel a LOT more comfortable with Python now. Not like "i can do anything!" yet but enough that it's actually super fun and I'm excited to work on projects!
The last part of the chapter taught me to use the "pytest" ability. I.E: writing test code so that I can make sure my programs are working properly and as intended. That part was really interesting, mostly because it was super duper busted at first for me.
That ended up being because where my "default folder" is set is like my main python hub, so i have to use the uh. What's it called? True access link? Where I write the entire string to the code's location.
Which also taught me that in the Terminal I have to use quotes for the location cause before I learned proper coding practices, I used spaces in some of the initial folders.
We're good now though.
The next part, Part II, is all about learning to build fully functional projects!! I'm so HYPED. There's four projects, of which it was like choose whatever you want! But I'm gonna start with an Alien Invasion remake. You know, the game where you're the little ship at the bottom shooting at aliens as they slowly decend on the screen. I should learn a lot from this one.
The other project I'm looking forward to is a simple online blog database. It'll have users create accounts, be accessible online, and you can make little journal posts! That should actually teach me a lot of stuff that I want to do.
There's another for data visualization, which I think I'll send to my cousin. He works in a lab at MIT and I know they use python for their programs. Maybe I can work my way into his work by doing that lmao.
Anyway, I'm really excited for all of this. It should teach me a ton of usable skills, and then i can add these projects to my portfolio to show off. Also I can spin off and make my own stuff.
Also also, if anyone wants to help me test my projects, feel free to let me know! I already know a few who are more than willing, but I'd appreciate any and all feedback as I go.
Oh! It also recommended learning version control, which I know almost nothing about. So I'll learn how to use GitHUB to store projects and recall old ones as I go if things break horribly. Which will be fun! Cause I know that for sure is going to be an important skill to have.
For a last fun fact, did you know places are like "requirements: typing 30 words per second." Do you know how fast I can type? At my peak I'm like over 110. I baseline at like 95. I don't know if that's actually fast but it makes me feel like the specialist little guy.
I hope you all have a good holiday season. Sorry no code in this post, I'm writing it so I can give you all an update, and I'm dog tired today. But but I promise to snip actual code for you as I go forward. And It'll be fun, especially cause this alien project will teach me about making VISUAL things!
Seasons Greasons Tumblr! -Kit
6 notes View notes
kitscodingblog 7 months ago
Text
Coding Update 5
I am a little bit procrastinating by doing this but I'm tireddd.
Apparently a lot of coders keep a rubber ducky to talk to about their code, so I got one too. Did you know it actually helps? Thanks rubber ducky.
More below, as per usual.
I solved my first problem all on my own yesterday.
Basically, I had to write a program to make a collection of Albums based on user input. At first it worked fine, but then it wanted me to amend the code to allow users to input the number of tracks. As soon as I tried to do that though, my whole code exploded lmao.
Tumblr media
See that comment after records? I was trying to figure out why my code was only printing the last input. That ended up being because the dictionary was being created in the while loop, so it was endlessly resetting. You live and learn.
But anyway, how I solved the songs input?
Tumblr media
I couldn't figure out how to put the songs ALSO into the dictionary, so I ended up creating a second list to store the track numbers. So each input creates the (artist, album) and then the tracks are stored in the song list.
Tumblr media
Then it just pulls (pops) the first number in the list for each input. It lines up perfectly, no matter how many inputs it takes.
I don't think it was QUITE what the problem wanted me to do, but it worked out and that was all that matters.
Blocks of code are for you Beau, since you asked! Also enjoy my comment lines haha
I also mentioned at the start about talking to rubber ducks? From what I understand it started because programmers were getting frustrated and breaking things. So someone got a rubber ducky to talk to, cause you can't get mad at a rubber ducky. And apparently it worked! Talking about your code out loud helps you walk yourself through it (or to someone else if you've got someone to listen).
It worked for me too! I was getting super frustrated, so I walked away from my code for a bit, got a drink and a snack. Then I sat down and talked through my code and was like "WAIT A SEC!"
And here we are. Problem solved.
Is it the cleanest or most efficient? Probably not. But I'm really proud of figuring this one out on my own, without looking at someone else's code to figure it out.
Anyway, now I'm learning about classes and I have no idea what any of that is! So here's hoping I don't fry my brain!
Enjoy your weekends everybody!
-Kit
10 notes View notes
kitscodingblog 7 months ago
Text
Coding Update 4
Today has been a good productive day again. Being able to simplify my code into neat two or three lines gives me a huge burst of the happy chemicals.
Yadda yadda more under the cut.
I've gone through two chapters of my coding book. I'll be super honest, this one has been an absolute blessing.
I've learned a lot in a very short time. I've been keeping documents to test the code as I go, and going back to see at what I was doing and what I can do now is awesome.
I just learned about dictionaries and sets, which has been super interesting. I like thinking about how they are used in everyday life, or how I can possibly use them in the future. I mean I can't do anything super cool yet, but it's nice to see the real world application of a lot of these things.
My major project that I'm going to work on, once I get my hands a little dirtier, is I want to make a text based adventure game. The goal is to allow user inputs to do things, and then have the program check if they can, and if they have certain items/objectives met.
It doesn't involve a lot of COMPLEX code, but it will be a fun way to test my skills. It will also be a good way for me to work on my writing, that I actually really desperately miss doing. I've been really flexing a lot of my creative genes lately and I'm hoping to keep that up.
That's a big part of this blog too. It's mostly for me, but it's nice to log the adventure and keep me in check. That way I will (hopefully) keep up with a lot of this.
The other thing is I'd like to get a job in programming of some kind, and getting this done asap will really help me apply to some jobs. Cause the clock is ticking haha. Job hunting fucking sucks friends!
Hope you're Monday's have been great! I'm going back to working on some projects! Treat yourself today to a little snack!
-Kit
3 notes View notes
kitscodingblog 7 months ago
Text
Coding Update 3
You know what's super frustrating? Having a broken three key. It only comes up sometimes but it makes gaming on my laptop almost impossible.
Did you know you can type the # sign by holding alt+3+5 on the numpad? I sure do.
Anyway more news under the cut!
I spent all of last Thursday coding. I woke up, let my dog out, and then sat in bed with my laptop and did coding for like 10 hours (excluding a small trip to Target to get some pants).
It was another productive session I think. I did a few chapters of my Crash Course book, of which only two of the projects did wonky things. I made my computer endlessly print BLUEBERRIES and then I broke it different and had my computer printing FOX instead. Coding!
I did end up fixing it though. Took some practice.
I also fixed some old code that I couldn't get to work quite right. The only addition I had to make was change the way the print statement ended and all was well!
It's really fun to mess with things to figure it out. I feel both smart and really dumb at the same time, but it's an interesting journey.
I can't remember if I said, but I'm focusing on learning Python as my language of choice. There's a whole mess of reasons, but personally Python is a lot easier to code/understand than the others I've dabbled in.
You know what language I do hate though? Fucking C. I hate literally everything about it. I don't understand it at all and I feel really dumb coding in it. I have yet to solve any problem from the class I was doing without googling the answer.
Which, related, I did try to solve one of my class problems in python now that I know more. However, I haven't gotten it to TOTALLY work yet.
Basically, you get a height input from the user and then its supposed to print a pyramid using #, but ascending up to the right. I can only get it to print descending to the left. I'm not QUITE sure what I'm doing wrong, but that's a problem for future kit. The fact that it's mostly working is a nice win in my book.
Once I get a hand on Python I want to dabble in Javascript I think. The end goal is to maybe be a backend programmer, or a pen tester for Cyber Security? It's hard to say. There's so much I still need to learn and do. And not having a job is giving me a lot of time to play around, but is also getting more stressful as my bank account slowly dwindles. I feel like I should be more concerned but I'm feeling...not stressed? Like it'll all work out?
Anyway that's not the point of this blog.
Today I'm hoping to code some more and maybe do a small project or two. Once I get like. 50% through my book I think I might start taking on leetcode challenges (a website that gives you problems to solve with code). That'll really test my skills I think.
But one thing at a time!
I hope you all have a code-tastic day! Whatever that means!
-Kit
13 notes View notes
kitscodingblog 8 months ago
Text
Update 2
These updates will probably not be consistent, but only people who are like, actively following will even know so why would I even say that?
Anyway, more under the cut!
I've been coding off and on some more, and today was another feel good day. I'm using two books simultaneously, "Automate The Boring Stuff" and "Python Crash Course". Automate is a little more in-depth and intense, teaching me a lot of stuff slowly. Crash Course is, well, a crash course. So its much faster paced, but what I DO like is it has me do some quick small projects after each new skill, so I actually learn how to use the code!
That has honestly helped a lot. Every video and article I've read has pretty much drilled in the same bit of advice:
"You have to actually code. Don't get stuck in tutorial hell."
Watching and copying peoples code only helps you learn so much. You have to figure out how to use the code yourself or you'll just end up getting nowhere.
I can't remember if I mentioned it before, but for one of the lessons in "Automate The Boring Stuff" it had me make a rock, paper, scissors game. It showed me the code and broke it down what each line did etc.
But while looking at it, I was like, "Wait a minute. This can be more efficient." So I ended up cutting down on like 10 lines of code and it still worked just fine! It made me feel like I'd actually learned something!!
Then today, I was learning about lists (a really basic skill). It wanted me to make a list of people and then print a message for each person. I remembered something I'd learned from anther video, and wrote a really simple one line code to do it. Which was great! I'd remembered stuff! I was using it! I understood how it all functioned!
Even though it's nothing like, ground breaking, it's nice to see improvement from myself and understanding how the code actually works for once. In some of the other projects I've tried it felt like I just had no idea what I was doing, but now it's starting to stick! Progress!
My side project right now is to make a really simple text based adventure game. I think I have enough understanding to do it, but we'll see how it goes. I specifically want to recreate something similar to a game I used to play like 20 years ago haha. I'll keep you posted!
If anyone else is coding out there, I wish you the best of luck! To everyone else I also wish you the best of luck in whatever you pursue!
-Kit
3 notes View notes
kitscodingblog 8 months ago
Text
Welcome to my Coding Adventure!
So after a bunch of big changes in my life I decided to start coding and learning Python. For what reasons? I'm not sure, beyond the fact that I really like it. I also found out that its used a lot in Network Security (Ethical Hacking and all that) so I've been diving into that too.
I was reading something about keeping a blog to help keep a record of your own personal journey, and I figured its been a long time since i kept a blog, so why not start one for this?
So if you're interested, feel free to follow and keep up with me. I don't know how well I'll keep this up so here's hoping! I'm really enjoying it so far!
More under the cut (a lot more)
I started a few weeks ago (maybe longer, but for real-real like three weeks ago) after uplifting my whole life and moving up the East Coast. I've always wanted to learn to code, and I really enjoy working with computers, so this felt like a good time to give it a go.
I tried to code while I was in college, but it always made me feel really dumb and I never could get the hang of it. I wasn't the kind of person to push through the difficulties, and being surrounded by people who were so, so much better than me didn't help. I felt like I was way, way behind everyone and there was no way for me to catch up.
If I could tell my old self one thing, it's to just keep trying. We will actually start to get it, it just takes time.
I've been using a few books to help me, and like with most things I do, while following along I totally understand, but as soon as I'm left to my own devices, I suddenly don't remember anything. I was struggling to do basic problems, and I felt like I just wasn't grasping it. How can I do these problems when I don't know what I'm doing??
And after a few weeks of beating myself up, I finally felt like I got it with this last problem.
I had to make a code that would use the Collatz Conjecture. At first I had no idea what it wanted from me, but after looking up what that even meant I got it. The code ALMOST worked so I googled and found a few examples online, which helped em trouble shoot my code and I did it!
This was the first time I felt like I had a rough idea of not only what to do, but how to do it! It felt like taking my first steps forwards and I feel a lot better now. It made me feel like I can figure this out!
Anyway, we're gonna do more coding today. I might create a Virtual Machine on my laptop or desktop and try the network hacking thing out. It seems really cool and also terribly, scary haha!
I hope you enjoy my ramblings about coding! if not uhh. Sorry I guess?
4 notes View notes