Courses‎ > ‎Software Development‎ > ‎Dyrland-Weaver‎ > ‎


All smaller assignments (those posted here) should be uploaded as submodules to the workshop repository in the appropriate assignment directory.

Make sure to put your submodule in the folder of your period and include your name and the name of your partner(s) (if applicable) in the repo name.

Work 19: Don't forget about Javascript!

posted May 1, 2018, 10:40 AM by JonAlf Dyrland-Weaver   [ updated May 1, 2018, 11:34 AM ]

Pick a year from the available years of US Population data from the following site:
  • Using javascript map/filter/reduce, write code to provide information about the data.
  • You must provide at least 3 different measures, but you may do more.
    • Some things you might consider
      • % gender of the whole population.
      • median age
      • number of minors
      • ...
  • Have an html page that displays the information (don't forget to provide an explanation for what you are showing.
  • Note:
    • Just copy the data into your js code as a string and run JSON.parse on it. This is not an exercise in reading in data from a file.
submit this in the workshop under 19_js_reductio

Work 18: Reductio ad Absurdum

posted Apr 30, 2018, 10:16 AM by JonAlf Dyrland-Weaver   [ updated May 1, 2018, 9:55 AM ]

With your table buddy, pick a book from Project Gutenberg. Then...
  • Use list comprehension + reduce to do the following:
    • Find the frequency of a single word
    • Find the total frequency of a group of words
    • Find the most frequently occurring word
Save in workshop under 18_reductio as alastF-blastF.

Work 16: Set your Pythons to Stun

posted Apr 26, 2018, 10:02 AM by JonAlf Dyrland-Weaver   [ updated Apr 26, 2018, 10:34 AM ]

Consider in python using lists to represent sets, as they are defined in math. If you do so, you can perform basic set operations using list comprehensions. 

Your mission, create list comprehension-based functions that perform the following set operations on python lists:
  • Union of the sets A and B, denoted A  B, is the set of all objects that are a member of A, or B, or both. The union of {1, 2, 3} and {2, 3, 4} is the set {1, 2, 3, 4} .
  • Intersection of the sets A and B, denoted A ∩ B, is the set of all objects that are members of both A and B. The intersection of {1, 2, 3} and{2, 3, 4} is the set {2, 3} .
  • Set difference of U and A, denoted U \ A, is the set of all members of U that are not members of A. The set difference {1, 2, 3} \ {2, 3, 4} is {1}, while, conversely, the set difference {2, 3, 4} \ {1, 2, 3} is {4} . When A is a subset of U, the set difference U \ A is also called the complementof A in U. In this case, if the choice of U is clear from the context, the notation Ac is sometimes used instead of U \ A, particularly if U is a universal set as in the study of Venn diagrams.
  • Symmetric difference of sets A and B, denoted A  B or A  B, is the set of all objects that are a member of exactly one of A and B (elements which are in one of the sets, but not in both). For instance, for the sets {1, 2, 3} and {2, 3, 4} , the symmetric difference set is {1, 4} . It is the set difference of the union and the intersection, (A  B) \ (A ∩ B) or (A \ B (B \ A).
  • Cartesian product of A and B, denoted A × B, is the set whose members are all possible ordered pairs (ab) where a is a member of A and b is a member of B. The cartesian product of {1, 2} and {red, white} is {(1, red), (1, white), (2, red), (2, white)}.
Taken from wikipedia
put this under 16_sets in the workshop

Work 15: Comprehensive Passwords

posted Apr 25, 2018, 11:08 AM by JonAlf Dyrland-Weaver

Practice writing some list comprehensions in Python. Once you're comfortable, attack these:
  • Write a function that uses list comprehension to return whether a password meets a minimum threshold: 
    • it contains a mixture of upper- and lowercase letters, and at least one number
  • Write a function that uses list comprehension to return a password's strength rating. 
    • This function should return a lower integer for a weak password and a higher integer for a stronger password. (Suggested scale: 1-10) Consider these criteria:
      • mixture of upper- and lower-case
      • inclusion of numerals
      • inclusion of these non-alphanumeric chars: . ? ! & # , ; : - _ *
Save in workshop under 15_listcomp, as lastF.

Work 14: I'd kinda' like to be the president. So I could show you how your money's spent

posted Mar 23, 2018, 9:48 AM by JonAlf Dyrland-Weaver   [ updated Mar 23, 2018, 9:52 AM ]

It's federal budget season and we thought you might like to know something about where the money goes. 
  • With your table buddy, use d3 to create a webpage that displays information about the federal budget form 2 different years.
    • Specifically, create a bar chart that shows budget data.
    • Use a transition effect when changing from one year to another.
  • This website has pretty good data on federal budgets going back to the 1900s:
  • Example d3 code has been posted on the notes and code page:
  • This will be due Monday in the AM
Submit this in the workshop under 14_d3-bars

Work 13: I'm the Scat(er plot) man!

posted Mar 15, 2018, 10:06 AM by JonAlf Dyrland-Weaver   [ updated Mar 19, 2018, 10:59 AM ]


With your table buddy:
  • Find some data that you can easily put into some javascript code.
  • Use d3 to create a scatter plot with your data.
    • In order to make a scatter plot, you'll need 2 kinds of data that can be related to each other (for example, temperature and precipitation organized by city).
  • In your groups, look at two different submissions (the two below yours in GitHub).
    • Provide feedback via a GitHub issue with ways the plot could be improved.
  • Look at the feedback for your plot and improve upon it.
submit this under 13_d3-scatter

Work 12: Medallions of Data

posted Mar 13, 2018, 10:10 AM by JonAlf Dyrland-Weaver

Recently, the Winter Olympics concluded. You and your table buddy will use that data to make a webpage showing medal data.
  • Pick 2 countries, each must have at least 1 medal of each type (Gold, Silver, Bronze).
  • Generate an svg element with three circles.
  • Tie the size to each circle to the number of medals won.
    • You can hardcode this data into your javascript.
  • Make it clear how to switch between the two countries.
Submit this as 12_d3-medals

Work 11: Who doesn't love a bouncy castle?

posted Mar 9, 2018, 10:52 AM by JonAlf Dyrland-Weaver

With your table buddy write the following html/js program:
  • HTML needs an svg element and a clear button.
  • When a user clicks on the svg element, a circle should appear.
  • All circles should immediately move around the screen in the same way as in previous assignments (dvd logo style).
  • The clear button should clear all circles and stop the animation
Submit this under 11_svg_bounces

Work 10: I Object!

posted Mar 7, 2018, 10:17 AM by JonAlf Dyrland-Weaver   [ updated Mar 8, 2018, 10:17 AM ]

(This will be due Friday)
With your table buddy: Take your code from work 09 and objectify it.
  • Behavior remains the same. Driving code gets the job done differently.
  • Each dot is an object, with at least these attributes and methods:
    • x-coordinate
    • y-coordinate
    • radius
    • color
    • svg element
    • display()
    • remove()
  • Goal: Each circle an instantiated object, every action accomplished via method call.

Work 09: Is anyone listening?

posted Mar 6, 2018, 9:41 AM by JonAlf Dyrland-Weaver

Create an HTML/JS program with the following features:
  • An SVG container
  • 1 button: clear
  • Enable the following event listeners for the svg area:
    • (Do NOT put all of this in a single event listener.)
    • Clicking on a blank section of the svg area should create a circle at that position.
    • Clicking on a circle once should change its color. (No new circles should be added to the svg container.)
    • Clicking on a circle a second time should remove the circle and add a new one to the svg container at a random location.
Save in workshop under 09_svg-capture,

1-10 of 18