Tag Archives: JavaScipt

PHP is friendly to learn

PHP was a lot of fun to learn and I really enjoyed it. I did, however, find the logic behind it a little bit redundant. I had to go over the code multiple times to understand the logic. I ended up copying the code from the top into the exercises most of the time and running it in order to see how it comes out and why. The language is also aesthetically ugly and has a slow speed. Most recently, however, there have been many changes to PHP and a tremendous speed gain. Generally speaking, PHP is an easy language to learn and tutorials are very common and often quite good, so I was not sure why I had a hard time with it.

I was curious to learn why software developers used PHP so I started reading more about it. Many developers like it, but others really do not. The language is mostly used on the server side, so it runs on the web server software. The name PHP initially stood for Personal Home Page and then later it changed to Hypertext Preprocessor.

You can do anything with PHP including blogs, scripts to process data, writing desktop applications, etc. The bottom line with this particular language is that PHP is everywhere, so a lot of extremely popular software is written in using it. WordPress is the biggest example that uses PHP. It is low cost and accepted globally, so you can use it in all website development. It also supports a wide range of databases.

It is important to note that it is super easy to change PHP to HTML. You would simply have to convert .html to .php and tweak the inside of the code a little bit to include <?php and ?> in the body. PHP is definitely evolving in many different ways since it is that widely used. It is becoming more Java-like object-oriented language. The most important language to compare PHP to is JavaScript. In modern development, we need a little bit of JavaScript for client-side development.

I want to take some time to explore WordPress and see how PHP is utilized there. I have never worked with WordPress before so this is a great opportunity to put the two together in order to understand the bigger picture. I am going to start using Drupal more often so I want to see how PHP is used there as well.

 

Slideshow gallery

For this week’s assignment on the slideshow picture gallery, I found it challenging at times. I think since this was the first assignment in which we applied HTML, CSS, JavaScript and jQuery all at once, it was a bit overwhelming to sort through the differences of each language. What helped me the most was going back through the Codecademy lessons and reviewing all of the different languages to refresh and kind of relearn everything. It was relieving that we went over almost all of the HTML during class period to get the ball rolling on the gallery assignment. I did struggle the most with the JavaScript and jQuery portions of the gallery, which is what I expected from the beginning.

There were plenty of moments of trial and error regarding writing my code, but I did Google search lots of webpages and articles to walk me through similar projects. I personally chose to do my slideshow gallery on various puppies, which did cheer me up when I was getting frustrated and lost on what components were not working cooperatively with each other. At the very end, I added my CSS last — it is very simple, but still I was searching the internet to look for how to do things such as center align my elements, various wordings for colors and so on.

The part that had me most in a panicked frenzy so to speak was getting all work committed and saved on GitHub. I had some issues as I was confused and probably needed a break from the continuous work to look carefully at what I had completed and what was left to do. Despite getting it to work in the end, there are still lots of uncertainties I have about using GitHub and not guessing my way through whether I completed things accurately or not. I’m glad it is finished and I ended up being very proud of what I completed.

Gallery

For the past few weeks, we have been doing various short exercises to learn HTML, CSS and jQuery. We have been doing them separately or only in pieces each time. This week, the gallery exercise was perfectly timed because we got to see a bigger picture of the three languages and see how all work together to create a full project from beginning to end.

It was extremely helpful that we worked in class on the gallery on Tuesday. Since this was our first full project, it would have been hard to wrap our head around the logic of the jQuery code. I would suggest offering more direction in the prompt itself just to give more input into our first project.

The HTML and the CSS parts were doable, but the jQuery part was a little tricky because there were many ways of doing the gallery and it was a little challenging trying to figure out whether to do the long JavaScript version or the jQuery shortcut. 

I used Google a lot to try and find tutorials and all sorts of help online. Many websites mentioned a Lightbox that you download and add into the  code to help make the gallery get set up more easily. Since we are still in the early stages of coding and we have advanced in the learning process, we had to go about it in the long manner and actually explore it step by step. I decided to make the next and previous buttons the focus of my code. The first image was my first slide and the rest followed as we clicked on the next button or the previous button. I found it difficult however to figure out the code needed to have the gallery reset once we go through the entire carousel. I was not sure if I did the first part right but I did not really add anything for the second part. The good news is that my HTML and CSS were not difficult to do and pretty straightforward, but I spent around 3-4 hours a day since Thursday trying to figure out jQuery code. I decided to go with my own logic and something different from the logic we did in class. I realized that I need to spend a few more hours in the next couple of days getting more comfortable with the handlers. I need to become more natural with understand the code and reading it as an actual sentence.  

.showMe more

This week, we had the chance to learn and code using jQuery. It has changed the way people write JavaScript. jQuery is a fast, small, and feature-rich JavaScript library. It makes things like HTML documentation, event handling, and CSS much simpler. What I found hard about learning jQuery is learning all the handlers and figuring the order of the code. For the upcoming days, I need to watch more videos and re-emphasize the knowledge in my mind.

I did a mistake while doing the chapters this week. I did the interactive lessons, then the quizzes for all the chapters and then I went back to do the freeform projects for each chapter. The issue was that I got the concepts all confused and when I tried to do the freeform projects I became confused with all the information and the concepts I had learnt. For the future, I am going to do each chapter fully and separately from one another and I am going to do all the parts of the chapter at the same time and not in pieces so that I apply whatever concepts I learnt immediately. This will help me build one new information in a more organized way.

Week 3 with JavaScript

When dealing with the JavaScript lessons this week in Codecademy, I found it to be easier than last week’s lessons dealing with CSS. The items that I thought were easiest to grasp were adding comments – which isn’t surprising since it’s literally the addition of nothing into the code, or no commands at least. I thought that initially, the random number command in JavaScript was the coolest since it literally generated a random number each time you chose to “run” the code. It kind of changed my mindset with HTML, JavaScript and such. With how we were learning HTML and CSS, it presented itself to me as definitive, rigid commands that were consistent. To be honest, that lack of fluidity is something that I am not particularly used to, so it struck me as too calculated and formulated. However, the random number command via JavaScript was interestingly cool! So, I am excited to see more code that is dynamic.

While learning about the addition of variables in JavaScript, the instructions to the commands seemed very easy, however I kept finding myself forgetting to add another line including the console.log text; I didn’t realize that I had to add semicolons after each line as well since we didn’t have to do that in HTML. When we came to the portion about learning of interpolation, I followed the lesson along with relative ease, but I still don’t really understand the need for interpolation with the ‘+’ sign when you could just use another line of code. Once again, I really liked in Codecademy how they implement the lessons you just learned. It further helps me understand the material and gives me another opportunity to take a second or third look at the sections and items that were not necessarily clear when I first encountered them.

jQuery + ONA = inspiration.

jQuery was a relief for me. Last week, I struggled with JavaScript. I was, as the kids say, shook. It felt like high school math class all over again. I should’ve known that those tricky little web developers, the same guys who follow the DRY principle, wouldn’t leave it at that. Once I got out of my head and got a hang of it, I realized it wasn’t that bad, but it can still be shortened.

Enter jQuery. A fast, small and feature-rich library designed to make JavaScript easier. Also, the beginning of creating code I can see utilized in the websites I actually visit. I felt like I was doing something big once I saw all the interactive features, like sliding elements and toggles.

At the time that I finished the jQuery lessons, I had just come back from the Online News Association (ONA) Conference on the HBCU Digital Media Fellowship. At their annual Online Journalism Awards, I saw a world of new possibilities. The student category particularly surprised me. Seeing the websites for Aftermath by UNC School of Media and Journalism and Alone by Misyrlena Egkolfopoulou of UC Berkeley Graduate School of Journalism made me realize that there is more out there than just words-on-paper journalism. These pieces create experiences that put the audience in the shoes of the afflicted. This, along with the design thinking workshops and training in alternative storytelling methods by Michael Grant, made me realize the untapped potential in Howard’s journalism department, the audience’s role in the story and the possibility that we may be behind the curve.

How do we bring a comparable curriculum to our HBCU? I think this class is a step in the right direction. I think Howard needs a modern journalism curriculum that strays from the traditional.

But back to jQuery. It was easy to grasp and it was intuitive. I believe that’s also what contributes to a good story. The audience can understand and interact with it. I will say I’m inspired. I want to take my new insight back to our school’s new ONA chapter.