Jesse’s Newsletter

Share this post

고인물 [ Goinmul ] | Perpetual Education: 008

jessedevs.substack.com

고인물 [ Goinmul ] | Perpetual Education: 008

The standing water.

Jesse Felix
Jun 13, 2022
3
Share this post

고인물 [ Goinmul ] | Perpetual Education: 008

jessedevs.substack.com

Hey!🕵🏼
We went over some PHP stuff and it reminded me of something…
Kind of a strange title huh? I hope it is, so that I can explain it… right now!

The term comes from a Korean phrase that has a tricky translation that generally means “ standing water .“ This development came from the gaming world and was often used to describe someone who has studied a game to a high level. Similarly to water becoming toxic and difficult for someone unfamiliar to enter.

With the recent reveal trailer for Street Fighter 6, the next iteration of Street Fighter from Capcom. I’ve been on Youtube watching fighting game videos to explore my excitement and came across one of my favorite channels that discusses various topics in fighting games and their relation to things in everyday situations. This video specifically discusses people who enjoy honing their skills and those that choose to innovate the standard. I’m a pretty big fighting game fanatic so you could say I educate myself willingly on the topic. There’s many aspects of fighting games that I could relate to coding, design, and life. Critical thinking, reading the situation in front of you, mental fortitude, spacing, execution, and consistent practice of skills are just some things I’ve taken from devoting time to playing fighting games.

The video:

Watching this video made me consider my current situation and what it takes to be the best, well at least someone respectable in the industry. I currently went through my first week learning PHP. The first step to what some people would call actual coding and programming.

“PHP is a server scripting language, and a powerful tool for making dynamic and interactive Web pages.” - from https://www.w3schools.com/php/

So far, there is a lot to learn and take into account. We’re at this point where there is a way to accomplish something… I just don’t know how to get there. This means that I need to do more research on documentation and practice on how things operate. The video reminded me about this because it feels as though there is a bunch of tools presented for us to use but we have to learn how to use them. Derek, for the past two weeks has been pushing a lot of opportunities for practice. Practice. Practice. Practice. Enough practice and PHP will be another tool in my utility belt ready to be used to solve problems, enhance creativity, and make my life easier.

The cool thing about learning all these programming tools in PHP is that… it will translate over to other languages that we will be learning in the future. (Looking at you Javascript 😉).


Day 1 of PHP:
I learned about templating! Sorry if you don’t like math but thats what I thought of when going through this exercise. We mad some madlibs ( you remember those right? ) that needed some variables to be filled. So I made some nouns, verbs, and adjectives all equal to x, y, and z. Then we used PHP behind the scenes of our webpage to fill in the variables. The variables then suddenly appear where I want them to when I call for them.

Day 2 - 3 of PHP:

I learned about if statements and making arrays and objects. If statements are just like they sound, I can execute certain code if it meets the criteria that I set for it. It is followed by an else statement, the code that will execute if the criteria is not met. The interesting thing is that following an if statement you could add as many else if statements which will help you go through various possibilities.

if ( the traffic on my street is empty) {

      "I will make a left."

} else {

      "I will go straight."

}

Next I made some arrays which are pretty much just a list. A list could contain $numbers = 1, $strings = “Jesse”, $objects = [“name”, ”age”, “weight”, “height”], or even other arrays. Yes, lists within lists within list. If it sounds like it could get complicated… well it can.

Day 4 of PHP:

LOOPS. So we have these lists right? Now how do I go through all the list and get all the data from it. LOOPS.
For example I have this array ( a list ) of fruits and then I am going to loop through the array and get the name of every fruit. To do this we use:

foreach ($fruits as $fruit){

       “Whatever I want”

};

So for every individual item inside this list.. I want to do… whatever I want. You could see the array, the loop, and the results below.

With this information in mind we could make HTML documents with many items pretty easily now, don’t you think? We’ll I’m actually going to show you! I was able to put some of this work into practice with a Monster Adoption page.

Every monster started out as an array full of data. This is where I started to combine some of the weeks previous work. I made an if statement, based on their adoption status I made the button and their description say something different. I was able to loop through 8 monsters pretty easily and created a card layout for each of them. The best part of PHP is getting out all these cards with all this data into HTML and doesn’t take much effort, just some knowledge.

Day 5 of PHP:
Pseudo-code! We took some time to nail this into our heads.. basically being able to lay down our plan for programming in simple terms and then convert that over into actual code.

Benefits:

  1. Being able to explain things to ourselves and others would help me understand topics and how to use it.

  2. Laying out goals of a program would make it simpler to write the code.

  3. Rewards me by separating the code into smaller more manageable sections.

An example I thought of recently was:

Hey I want this car to go forward.
I want this car to make a left on the big street only if there is no traffic coming in front of said car.
Also, if there is traffic on the big street when the left is made then it would be best to go straight.

Following so far? After that I would make something like:

$car = “ “;
if( $traffic = none & $traffic-on-big-street = none){
$car = Make a left
} else ( either traffic ){
$car = Go straight
};

PUTTING IT ALL TOGETHER!

Taking into account everything we learned and then applying to something I’m interested in.

I made a page that contains data on video game characters. A long array of data that I looped through. Check out the legends!

Alright cool. No personal section. I talked about fighting games enough as it is. 😅

That wraps up the first week of PHP. I think it’s pretty cool and it is building on to bigger and brighter things. Excited to show you more.
Until then……… Catch you next time!🕵🏼😉

Share this post

고인물 [ Goinmul ] | Perpetual Education: 008

jessedevs.substack.com
Comments
TopNewCommunity

No posts

Ready for more?

© 2023 Jesse Felix
Privacy ∙ Terms ∙ Collection notice
Start WritingGet the app
Substack is the home for great writing