Posts

CST 370 - Module 1

 Week 1, This course is known as "Design and Analysis of Algorithms". As you can guess, this class will cover material about algorithms and how or when to implement them. The first week serves as more of a refresher on what we may have learned over the course of starting our computer science journey. Some of the refreshers include the basic yet fundamental data structures such as arrays, linked lists, stacks, queues, etc. Others include important problem types that can be solved by algorithms. There can be sorting problems which require algorithms to organize items in a given list, which in turn can benefit searching problems which algorithms would be used to find specific items in a list. There are graph problems which can vary depending on the goal. For example, one graph problem would be the traveling salesman problem (TSP) which, in short, requires us to find the shortest possible route through different and interconnected nodes once. There are other problem types, such a...

CST 336 - Module 8

  Week 8, This is a short week, without any new material. The reason for this is because it is a short week and we were given time to complete our group project. The group project needed to represent the material we learned throughout the class. My team decided to create a trivia game for our project. The trivia game utilized all aspects of what we learned, from using external web API’s, MySQL, password hashing, sessions, etc. Users would be prompted to create an account or sign into an existing account, they can choose a category/topic to take the quiz on, their scores would be recorded, and there would be a leaderboard where they can compete for the highest score. There is even a separate quiz type for music, where the user can select their favorite artist and guess the song’s name based on lyrics. Additionally, the user can change their name/password, and admins can add/edit questions and answers that are in the database. Overall, this was a fun class and shows how much thought ...

CST 336 - Module 7

  Week 7, This week’s module covers authentication using sessions. A problem with loading different pages on a web application without sessions is the fact that information is only being obtained for that page specifically. In other words, if a user logs in then loads a new page, then the user wouldn’t be logged in anymore. Using sessions solves the problem in an easy way. In short, we can use sessions to keep track of information we would want to remember across multiple pages. Much like global variables in a program. Sessions are useful when it comes to keeping track of which user is signed in at that moment. Besides using sessions, we were also introduced to using BCrypt to hash passwords. When creating an account, we send that information to the MySQL database. Normally there isn’t a problem with sending data to a database such as images or random information about a character in a show. However, with user’s creating accounts with their private passwords, there is now an issue ...

CST 336 - Module 5 - 6

  Week 5 - 6, This week’s material covered the use of connecting to MySQL from the Express app mentioned last week. The material served as a small refresher on how to use MySQL and write its queries, however what is new shows how to implement it in the context of web applications. This is important to use because it allows users to have their own accounts with the web application. For example, you can create an account with Amazon to keep track of your purchases and to save your info to make purchasing more streamlined. Or if you want to make a web game, you can create an account to save your scores. In this week’s lab’s we implemented an application that allows the user to find quotes based on the author’s name, number of likes, etc. Additionally, an admin can add, update, or delete quotes themselves.  Aside from the typical labs and homework, we also got started on our group projects. More on that in the coming weeks.

CST 336 - Module 4

  Week 4, This week’s material covered the use of Node.js and the express app. What is important to know is that up until now, we have been dealing with client side programming. When we wanted to use a web API, we made calls to external web API’s. The user would receive the HTML, CSS, and JavaScript file.  Now we are going to dip our toes in server side programming. Where we will be working with front end and back end development. The front end would include the things that the user will receive such as the HTML, CSS, and JavaScript file. However the back end includes the Node JavaScript and dependencies that allow us to work more robustly. There are benefits to backend programming, such as hiding Web API keys, answers (for quizzes and similar programs), and variable values. We also have the ability to template file structures, use databases and create our own Web API’s. One of the main benefits to this is the use of libraries to make programming easier. There is a lot that go...

CST 336 - Module 3

  Week 3, This week’s material covered the use of Web API calls. A Web API (Application Programming Interface) can contain data that may benefit a web page or application. The data is sent and received using a request and response system and is typically used in JSON format.  An example of one such use is having a Web API hold a large number of images (links to images), which may also take requests to send a random image. If one would like to have their web page have a random background image every time the user loads the page, the creator can make a call to the Web API containing those images and request a random image. Another way to look at this would be to visualize a database of objects. In this case, a database of images. Obviously, web API’s can contain more than links to images. For example, the web API I used for the assignment this week was the Rick and Morty API. This API had information for each character that was introduced in the show, including all the side char...

CST 336 - Module 2

  Week 2, This week in internet programming, we were introduced to incorporating scripts to our web pages. The scripting language we use here is JavaScript and the material for this module serves as a refresher on using JavaScript and shows how to use it in the context of a web page. To use a javascript file with a web page, the HTML file needs to include a script tag with the source being the JavaScript file you want to use. Within the JavaScript file, you can select specific elements from the HTML file you would like to use to perform tasks. One common example, which was used in this week’s assignment is the quiz, where the main goal was to take the user inputs and grade the quiz. The tasks themselves are implemented by using event handlers which listen for certain actions to be performed, such as on an element's value changing or being clicked on. These are important because we need to know what the user clicks or changes after the page has already loaded. Using the quiz example...