Tag Archives: jQuery

jQuery, more like jDisaster

This has been a very frustrating week to say the least! While I was able to complete the jQuery Codecademy lessons before the last class, I have been unable to follow along with how to create the slide show. I felt unprepared. My current code doesn’t work, at all. I’ve spent three days trying to figure out how to do this, so I’m hoping someone can look at my jQuery/JavaScript code and help me out! I think the hardest part was finding out where to start because it wasn’t as straight forward as some of the other assignments and wasn’t part of the Codecademy lessons. That being said, I went into this assignment thinking I had a good understanding of jQuery (not JavaScript), but now I feel as confused and behind as I did when we learned JavaScript. I’m not sure what the missing pieces are that I don’t understand, but there are definitely a few. Something I kept asking myself in researching guides on creating a slideshow was if I should put the images in a list or not? Everyone seems to do it differently. The captions were there when I initially ran the code, but are now hidden. AHH!!! It was not a successful coding weekend this weekend. I’ll have to give it a try next week and hope that things start to make better sense and get easier! (And I hope next week doesn’t involve 9+ hours of work!)

Midterm: For my midterm, I will be interviewing Lauren Soni who is the Webmaster and web developer for HHMI’s research campus, Janelia Research Campus in Ashburn, Virginia. I don’t work directly with Lauren and our paths only cross during team meetings since HHMI has a webmaster and web developer for our own site. Lauren has been a web developer for about 3 years and is also in the process of completing her Master’s degree at Northwestern University Online. Through our interview, I want to learn a few things—1) learn how Lauren transitioned her career from Biomedical research to web development, 2) her advice for learning different types of code, where to practice and how to begin, 3) talk about her involvement in creating a responsive site for Janelia and other major projects.

JavaScript — Difficult, But Not Impossible!

The JavaScript assignment this week was complex, yet simultaneously the most logical for me to follow. One of the Codecademy lessons pointed out that a lot of the JavaScript functions are very straight forward statements – “if” something then do [blank], otherwise, do [blank2]. The logical of that set-up, for me, is much easier to internalize than some of the CSS or HTML code (such as the difference between a class and id, still unclear why those need to be separate). Similarly, I found a lot of the functions to be relatively understandable. With if/else statements, for example, depending on the variable, the function will run though “if” “else” or “else if” statements until it finds the correct variable and then execute the appropriate statement.

Where the confusion, for me, came in was actually executing the code. Reading the Codecademy explanation, and reviewing the code provided by Codecademy, while time consuming, made sense after I read each line a few times. I struggled, however, when trying to recreate the code for a new set of variables, specifically when we got into functions.

Last week, my inability to execute the code would have been very concerning for me. However, this week I realized that my understanding of HTML and CSS has already greatly improved. I was able to build a new homepage with different fonts, colors, pictures, sizing, and overlapping images in a relatively short amount of time, which took me numerous hours last week. Thus, I am hopeful that with time and practice I will gain a similar familiarity with JavaScript.

I am excited to learn more about JQuery as I think that will simplify a lot of my confusion be de-cluttering the code. Sometimes I think I get lost in the numerous statements, variable, numbers, etc. I have a feeling I am overcomplicating the code, but I think the introduction of abbreviations will help me understand where I can cut back on wording.

Also, as a final side-note, I am interested to discuss in class how everyone’s slideshow is coming thus far. I feel relatively confident that I have built the CSS and HTML blocks correctly for the slideshow, but am struggling with (as mentioned above) actually executing the JavaScript code and wonder how others progress is coming along.

JavaScript: Even More Difficult than I Thought it Would Be

Echoing the thoughts of some of my peers, I found this week’s Codecademy lessons to be the most difficult to really understand. In particular, the lessons on functions, arrays, and looping really confused me, and I needed to go over practically each hint to figure out the correct code.

I think what I am struggling with most in learning JavaScript is understanding the purpose behind some of the pieces of code we are learning. I am still not exactly sure what a function does, which is the main thing I am struggling to understand, but I also don’t quite understand the purpose of elements like .pop() and .push() – why not change the initial array to include or exclude the items you specify in .push() or .pop()? I think seeing more real-world examples, like we did last week, will help me now that I’ve gone over the basic foundation laid out by Codecademy.

Another thing I struggled with was understanding how to correctly write pieces of code inside of code. Codecademy would ask me to write a for loop inside of a for loop, and I would have no idea how to set that up or where in the code to begin. It also made it hard to differentiate where one element of the code ended and another began.

As we go along, I am interested to learn more about how JavaScript, HTML, and CSS can work together. In Codecademy, it was really cool to see how you could use all three to make elements clickable or make them disappear. I know we went over a real-world example in class, but I’m excited (and slightly scared) to delve into making the gallery for next week’s assignment. I think it will be the best way to help me understand what I’ve learned. I am also looking forward to learning more about JQuery, since anything that can make JavaScript easier to understand and execute will be a big help. 

Logic, or JavaScript?

I struggled mightily with this week’s Codecademy lessons. I knew that JavaScript relied heavy on logical values and statements to perform its functions, but I did not anticipate just how difficult these things would be to comprehend.

I worked on lessons one, two, and three prior to the June 7 class so that I could at least have a basic understanding of what our lecture that night was going to cover. I was able to make it through lessons one and two fairly easily and with few issues. Lesson three, however, proved to be a different beast. No matter how many times I re-read the descriptions and instructions, there were certain steps that I was unable to perform correctly and move past. For the first time this semester, I was forced to use the “get a hint” and “get the code” tools during this lesson module. I’m not happy about having to do that, to say the least, but it was a necessary step in order for me to proceed through the exercises. I went back through each lesson and looked at the correct code, which helped me to see where I went wrong when trying to complete the exercises.

Completing the first few lessons prior to class enabled me to follow Greg’s lecture more easily. As we looked at the JavaScript code of the slideshow sample, I was left wondering where exactly the console.log property comes into play. This is something that figured heavily into the Codecademy exercises, but I don’t recall seeing it come up during our in-class analysis of the example of JavaScript code. Is the console.log something that is specific only to Codecademy when printing the output to the screen, or does it have real-world applications?

I thought the lessons on JQuery were interesting, and I appreciate that there is an easier way to interact with elements in the DOM that does not require us to write such lengthy JavaScript code. I am dreading having to memorize the JQuery commands, as they are difficult to understand (I needed more hints during this lesson, too). I find it difficult to memorize and truly learn the concepts as I work through them on Codecademy, because referring back to an earlier concept requires hitting the back button and navigating away from your current page. I’ve started copying and pasting the entire lesson into a Google document so that I can refer to earlier parts of the lesson while working on the current module. My Google doc for the JavaScript and JQuery lessons 1-5 is 41 pages long.

I’m hoping that our June 14 class lecture will help me make more sense of the concepts I encountered in the Codecademy lessons. I look forward to applying these concepts through the slideshow exercise in the coming week.