Spring 2017 – Week 3 Class Notes

After this week, the review time for all the classes will be over. Next week – all new things!

Computer Programming

This week we covered more about interacting with web pages. We worked with manipulating HTML elements on the page, including adding events to divs and inputs. The onclick event for buttons allows us to attach a function to a button. The onmouseup event allows us to perform an action whenever someone types something in an input field. The onmouseover and onmouseout events allow us to track when the mouse is over any HTML element. There are numerous events you can use. They all pretty much have are used the same way – use document.getElementById() to find the element in the page, then set its event function to be whatever function it is you want it to do. You can also use the function() keyword to create a function right there and it doesn’t need a name.

You can also access an HTML element’s style information through its “style” property. You can do elem.style.backgroundColor to set the background color to whatever you want. It can use pretty much any CSS value, you just have to convert the dashed named to camelcase (i.e., “background-color” becomes “backgroundColor”).

Also, we covered document.createElement() to create new HTML elements and using appendChild to attach them to existing elements on a page.

We also talked about the Model/View/Controller paradigm. The “View” is what you see – the HTML page. The “model” is how you conceptualize what is happening. Then, the “controller” shuffles data and actions back and forth between the model and the view.

We are doing chapter 15 again, trying to get further on the problems. You can save #3 for next week.


We reviewed diodes and covered power again. Most complicated circuits in the “real world” are really just the simple circuits we learn here put together in a variety of ways. Therefore, being familiar with how these different circuits operate, and being able to spot them, will help you beyond just this class.

For diode circuits, we talked about using them to (a) regulate the direction of current, (b) provide a fixed voltage reference, and (c) using LEDs to make lights. Current limiting resistors are almost always needed in diode circuits because otherwise the diodes will form a short circuit.

For power, we talked about energy, work, and power. This week, read chapter 15 and do the problems on power.

Next week, we will begin our look at small-signal AC circuits, looking at how capacitors work.

I forgot to do videos last week. Here are some diode videos:

Here are some videos on electric power:


This week we covered integration by parts. That is chapter 21. Remember, integration by parts doesn’t solve the integral, it rewrites the Integral into a new one that is hopefully easier to solve. Also remember that you may have to do integration by parts multiple times!

Comments are closed.