CSE 154 Section 10

Agenda:

Go over practice final

Exam logistics and tips

CSE 154 Final Exam: Logistics

When: Tuesday December 12th from 2:30 to 4:20

Where: ARC 147 (regular lecture room)

The exam will start promptly at 2:30 so please arrive several minutes early so we can distribute exams and start on time.

There will be a provided cheat sheet included with your exam. You will be able to use this as a reference. The exam is open to paper resources like the textbook, your own notes, and of course the cheat sheet, but you will probably find the cheatsheet most helpful.

Topics Included on the Exam

Topics Not Included on the Exam

  • Memorization of web-related jargon and terminology
  • Basic internet/WWW info from Chapter 1 of the textbook
  • Object-oriented JavaScript/PHP
  • Embedded PHP
  • XML
  • Other frameworks and libraries (e.g., jQuery)
  • git

Please note that you are not allowed to use JavaScript libraries (jQuery, etc.) when solving any JavaScript programming problems.

General Exam Tips

  • Breathe. You're here to learn. You've successfully completed the homework assignments, section problems, and labs, and it's just a matter of applying what you've learned to different problems!
  • Practice early so you don't cram the day before! A clear head is essential to doing well on a CSE exam, as there may be different types of problem-solving involved. With that, it's perhaps most important to get at least 7 hours of sleep the night before to be able to have a sharp mind when the time comes to solve new problems with familiar topics.
  • Work on practice exams on paper, not your computer. This is the first time you will have an exam for web programming, and it's really easy to forget common syntax when you're used to typing it and using autocomplete features. You definitely want to get used to solving these without a screen.
  • When working on the provided practice problems, read the description at least once before attempting. Underline any small details (case-insensitivity, error handling, query parameters, etc.).
  • Then read the problem once more carefully after you've finished your solution. It's easy to forget the small details, and it's worth the 1-2 minutes to double-check. Seriously, this is strongly recommended.

General Exam Tips (Continued)

  • Make sure to give yourself space between statements to account for any last-minute fixes/special cases in your problems.
  • When studying, study what you don't want to study. It's a common habit of students to avoid what they're dreading, but this is unfortunately a recipe for not being prepared when the time comes to solve that type of problem on the exam. For example, if you still don't understand cookies or sessions, watch the lecture video on those again and review the associated section/lab.

HTML

For problems involving HTML, You should be familiar will working with HTML, whether it be reading and analyzing (e.g., finding validation errors) or writing HTML from scratch.

HTML: Tips for Studying

  • Review the different types of HTML tags and common validation errors. You may find the exam cheat sheet and the style guide helpful for this.
  • Make sure you're familiar with the different type attributes of <input> tags (e.g., text, radio, checkbox, etc.) and their different attributes (e.g., checked, value, and name). Remember that <button> and <textarea> are tags on their own so they do not need to be set as the type attribute for an <input> tag.

CSS

These types of problems usually ask you to answer questions about CSS selectors or styles, and/or write CSS to meet given criteria (sometimes given a screenshot) with provided HTML.

CSS: Tips for Studying

  • Take out a piece of paper. Take 5 minutes and 1.) write out all of the CSS properties (e.g., "display", "border", "font-family", etc.) you can recall and 2.) the different values you could give each (e.g., "flexbox" for the "display" property) and 3.) the different HTML tags you might need to set the property on. At the end of the 5 minutes, review any properties you may have felt less confident about and make sure you know how to use them for different elements. You may find the exam cheat sheet and the style guide helpful for this.
  • Use codepen.io to play with different CSS properties.
  • Review the differences between block (e.g., <p>) and inline (e.g., <span>) elements.
  • Review the differences between ID's and classes.
  • Review the box model and how to use it (e.g., flexbox display, padding vs. margin).
  • Visit your favorite web page, copy/paste the HTML and try to duplicate the appearance using CSS. Depending on the complexity of the page, this may be more advanced than you're used to, but it is probably the best practice you could get. Avoid working with HTML pages that use <table> (this is common in older web pages where the <table> was used improperly for layout hacks).

CSS: Common Mistakes

  • Forgetting to handle small details (italic or bold text on one span element, text alignment, overflow, clear, flexbox properties, etc.).
  • Improper use of flexbox (e.g., "flex-direction: row" instead of "flex-direction: column").
  • Treating a block element as an inline element and vice versa. These two types of elements behave differently for different CSS properties.
  • Not taking inherited relationships between elements into consideration. For example, if a <div> inside of a <div> has a width set to 50%, it's 50% of the width relative to the parent <div>.
  • What are your most common errors for these problems?

JavaScript (DOM/Events)

For problems involving JavaScript DOM manipulation and event handling, you should be comfortable implementing functionality of a page given criteria for the page's event-driven behavior. These types of problems may involve input controls, timers, and/or DOM manipulation.

JavaScript (DOM/Events): Tips for Studying

  • Review events and timers.
  • Review JavaScript functions covered in class. You may also find the exam cheat sheet and the style guide helpful for such review.
  • Review how to navigate the DOM with document.getElementById, document.querySelector, document.querySelectorAll, and possible parent/children/sibling DOM navigation.
  • Review how and when to append new elements to the page using JavaScript.

JavaScript (DOM/Events): Common Mistakes

  • Incorrectly accessing values of different input elements (how do drop-down/select, vs. radio button vs. checkboxes vs. text input values differ?)
  • Not handling "case-sensitivity" for text if relevant/specified.
  • Forgetting to use parseInt on strings with integer values.

JavaScript (AJAX with JSON)

This type of problem will involve using a PHP web service (e.g., "quotes.php") by:

  1. Setting up the page and/or getting some value(s) or onclick actions from user input on an HTML page.
  2. Using these values to request data from the web service using AJAX and GET and/or POST.
  3. Outputting the results in HTML using JavaScript and DOM methods.

JavaScript (AJAX with JSON): Tips for Studying

  • Review and practice processing data from PHP web services which return JSON output.
  • Review making AJAX GET and POST requests using XMLHttpRequest or the AJAX Promises introduced in class (you may use either AJAX method on the exam).
  • Creating and appending HTML elements into the page using JavaScript.

JavaScript (AJAX with JSON): Common Mistakes

  • Incorrect syntax for AJAX requests. Refer to the lecture slides and cheat sheet for correct syntax for XMLHttpRequest and AJAX Promise.
  • Not calling your AJAX request method if needed when the page loads vs. only when responding to user input.
  • Forgetting to pass parameters to the URL when building an AJAX request (if applicable).
  • Incorrectly processing JSON objects.

PHP

There may be a PHP problem which does not involve writing a web service or using SQL. Such problems may involve working with or without query parameters to perform some function (using math, arrays, and/or files) and/or working with cookies/sessions.

PHP: Tips for Studying

  • Review common PHP functions (refer to exam cheat sheet).
  • Review array creation, processing, and modification in PHP. Arrays work pretty differently in PHP vs. JavaScript. Knowing the right methods can help save time on the exam.
  • Review file processing and writing in PHP.

PHP: Common Mistakes

  • Improper use of GET and POST query parameters.
  • Improper use of cookies/sessions.
  • If using sessions, missing session_start().
  • If asked to redirect, missing header("Location: destination") and die().
  • Forgetting to use "$" for PHP variables.
  • Using incorrect PHP array syntax (e.g., arr.length or arr.size() instead of count(arr))
  • Using "+" to concatenate strings instead of "."

PHP (Web Services)

This type of problem will involve processing and outputting data in the format of JSON or plain text given query parameter(s) and processing files or folders in a directory.

PHP (Web Services): Tips for Studying

  • Review how to use GET and POST parameters and checking if they've been passed.
  • Review when to use GET vs. POST parameters (most of the time these will be specified in the problem, but it's important to understand the difference between their use cases).
  • Review reading/writing files, getting file names, and checking whether files exist.
  • Review building and outputting data in JSON and plain text formats.
  • Review headers, content-types, and HTTP error codes.

PHP (Web Services): Common Mistakes

  • Improper use of PHP glob and/or scandir and/or file functions.
  • Forgetting to check if query parameters are set (if asked to do so).
  • Forgetting to set content type with header() and printing results after processing your data.

Regular Expressions

This type of problem usually involves writing 2-4 regex expressions (similar to the format you saw in the first part of the regex section).

Regular Expressions: Tips for Studying

  • Practice! Rubular is a great resource to help test different regular expressions.

Regular Expressions: Common Mistakes

  • Forgetting to handle "empty cases" if applicable (e.g., a regex for all strings not containing "dog").
  • Forgetting to use anchors ("^" and "$") when given criteria for beginning and/or ending of strings.
  • Not handling case-[in]sensitivity.

SQL

This type of problem will likely ask you to write some form of SQL, including creating/updating tables and/or querying from tables. For querying, we may ask you to use databases we've introduced in lecture (world, simpson, imbd) which we will provide any necessary schemas for on the exam.

SQL: Tips for Studying

  • SQL Cheatsheet
  • Review problems that join columns from multiple tables - these are the hardest SQL queries to write on the exam. We won't give you super super complicated join problems, but you should still be ready to write queries that join multiple tables.
  • Solve at least 6 practice problems (from sections, labs, and/or practice exams) that require JOIN – do these on paper, and without looking at the solution. When you're certain you've answered it correctly, check your answer on the SQL query tester.
  • Create a few small SQL tables of your choice (e.g., FoodData, Pets, AnimalData, Games, etc.). Review the different types of data that may be appropriate for different attributes (e.g., VARCHAR for strings, INTEGER for integers, FLOAT for decimals, etc.).
  • Use INSERT, DELETE, and UPDATE statements on your created tables on Cloud 9. Make sure you're familiar with how to use these statements to modify tables given certain criteria (e.g., DELETE any rows which have a negative quantity attribute).
  • SQLZoo has a nice collection of SQL exercises and strategies for designing queries.

SQL: Common Errors

  • Forgetting to order the query result as specified.
  • Referring to a column in one table that is instead used in a different table.
  • Missing columns in SELECT or criteria in WHERE.

Good Luck on the Exam!