codingforzach
codingforzach
Untitled
1 post
Don't wanna be here? Send us removal request.
codingforzach · 4 years ago
Text
Post 1 part 1
Its April 29th, 2020, I’m in day 3 of phase 1 at flatiron. Some parts of the current situation with Flatiron’s online learning program are frustrating but that’s probably inevitable to a certain extent. I think I like coding, like even as an activity that I would do in spare time. Thoughts I have recently (this is still the beginning) are that video games teach you in a way how to think about code. For example, if i’m controlling a character using two joysticks on a controller, there’s probably some event listener that’s checking if I’m pressing the buttons it’s listening for, then moving my object/character model through some space designated as a map(I’m only a few days into the initial program so that might be something completely different). Point being that everything in those games are code-based, so it’s helpful to think of what a button press or an item selection, ammo pickup, etc. would look like considering you know that it’s already actually been written as a program. Anyway, my next thought is that if function callbacks exist, maybe a program in javascript is actually one giant function? I tried messing with a repl.it to try to confirm it. Ended up with:
function skidoosh(){  return function heyo(){    return function alakazamZ(){      return "Hello, World!"    }    }} console.log(skidoosh());
But that ran into just a result of “[function: heyo]”, which I wasn’t expecting at all. Then realized I could use:
function skidoosh(){  return function heyo(){    return function alakazamZ(){      return "Hello, world!"    }    }} 
console.log(skidoosh());
Which returned Hello, world!. But I’m not sure how much that really proves my thought, unless maybe programs are read by one large function that uses a file name as an argument to complete a process. I don’t know enough yet to know. Realized I have a lot more to learn, I’ll probably ask tomorrow whether the theory is true, but I’m sure the answer is more complicated than I know how to process yet(or just wrong). I do have a lot more left to learn, but excited to be at the point where I’m able to test theories by entering the code myself and finding the exact right question to ask.
3 notes · View notes