Skip to content

Commit

Permalink
Final draft of course notes!
Browse files Browse the repository at this point in the history
  • Loading branch information
chicagoscala committed Dec 2, 2010
1 parent 4de4770 commit f4828d7
Show file tree
Hide file tree
Showing 7 changed files with 271 additions and 208 deletions.
334 changes: 178 additions & 156 deletions PragmaticsOfIndustrialSWDevelopment/html/all.html

Large diffs are not rendered by default.

103 changes: 59 additions & 44 deletions PragmaticsOfIndustrialSWDevelopment/html/lecture1.html
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,29 @@ <h1>Course <em>Administrivia</em></h1>
</table>
</div>
<div class="slide">
<h1>Schedule</h1>
<p>(Revised 10/26)<br />
| 8/31 | Course Intro and Scaling Computation, Part I (Multithreaded Programming, Actor Concurrency) |<br />
| 9/07 | Scaling Computation, Part II (Agents, Software Transactional Memory, Memory is the New Disk) |<br />
| 9/14 | Scaling Systems, Part I (Vertical vs. Horizontal Scaling, Distributed Systems like <span class="caps">HTTP</span>, etc.) <em>Last day to withdraw without a W grade.</em> |<br />
| 9/21 | Scaling Data, Part I (<span class="caps">SQL</span> vs. NoSQL databases) |<br />
| 9/28 | Scaling Data, Part II (Example NoSQL databases) |</p>
<h1>Schedule (Revised 10/26)</h1>
<table>
<tr>
<td> 8/31 </td>
<td> Course Intro and Scaling Computation, Part I (Multithreaded Programming, Actor Concurrency) </td>
</tr>
<tr>
<td> 9/07 </td>
<td> Scaling Computation, Part II (Agents, Software Transactional Memory, Memory is the New Disk) </td>
</tr>
<tr>
<td> 9/14 </td>
<td> Scaling Systems, Part I (Vertical vs. Horizontal Scaling, Distributed Systems like <span class="caps">HTTP</span>, etc.) <em>Last day to withdraw without a W grade.</em> </td>
</tr>
<tr>
<td> 9/21 </td>
<td> Scaling Data, Part I (<span class="caps">SQL</span> vs. NoSQL databases) </td>
</tr>
<tr>
<td> 9/28 </td>
<td> Scaling Data, Part II (Example NoSQL databases) </td>
</tr>
</table>
</div>
<div class="slide">
<h1>Schedule (cont.)</h1>
Expand Down Expand Up @@ -160,7 +176,7 @@ <h1>Schedule (cont.)</h1>
</tr>
<tr>
<td> 12/07 </td>
<td> Student Presentations on the Code Project, Course Review </td>
<td> Student Presentations on the Code Project </td>
</tr>
<tr>
<td> 12/14 </td>
Expand Down Expand Up @@ -195,19 +211,19 @@ <h1>Course Components: Readings and Lecture</h1>
<div class="slide">
<h1>Course Components: Project Exercises</h1>
<ul>
<li>Start with a &#8220;running&#8221; 3-tier Scala application<br />
* Hosted on <a href="http://github.com">GitHub.com</a> at <a href="http://github.com/deanwampler/AkkaWebSampleExercise">github.com/deanwampler/AkkaWebSampleExercise</a>. <br />
* Uses <em>actors</em> to scale computation over a <span class="caps">NYSE</span> data set.<br />
* Add features during the semester.<br />
* <em>Refactor</em> the code to improve it and accommodate new features.</li>
<li>Start with a &#8220;running&#8221; 3-tier Scala application</li>
<li>Hosted on <a href="http://github.com">GitHub.com</a> at <a href="http://github.com/deanwampler/AkkaWebSampleExercise">github.com/deanwampler/AkkaWebSampleExercise</a>.</li>
<li>Uses <em>actors</em> to scale computation over a <span class="caps">NYSE</span> data set.</li>
<li>Add features during the semester.</li>
<li><em>Refactor</em> the code to improve it and accommodate new features.</li>
</ul>
</div>
<div class="slide">
<h1>Course Components: Project Exercises (cont.)</h1>
<ul>
<li><em>You are encouraged to work together.</em><br />
* Like you would in an industrial setting&#8230;<br />
* I expect the solutions to look &#8220;similar&#8221;.</li>
<li><em>You are encouraged to work together.</em></li>
<li>Like you would in an industrial setting&#8230;</li>
<li>I expect the solutions to look &#8220;similar&#8221;.</li>
</ul>
</div>
<div class="slide">
Expand All @@ -217,21 +233,22 @@ <h1>Course Components: Project Exercises (cont.)</h1>
<li>1/2 the grade differences will be based on GitHub checkin logs and the quality of those checkins.</li>
<li><strong>If you <em>pair program</em>, include <em>both</em> names in the commit comments!</strong></li>
</ul>
h1. Course Components: Project Exercises (cont.)
</div>
<div class="slide">
<h1>Course Components: Project Exercises (cont.)</h1>
<ul>
<li>5% will be based on an <strong>oral presentation</strong> on 12/7.</li>
<li>15 minutes or so, with time for questions and discussion.</li>
<li>Topics to be worked out with me.<br />
<br />
</div><br />
<div class="slide"></li>
<li>Topics to be worked out with me.</li>
</ul>
</div>
<div class="slide">
<h1>Midterm and Final Exam</h1>
<ul>
<li>Will cover the reading, lecture material, and concepts learned in the exercises.</li>
<li>Final exam content weighted:<br />
* 2/3 of the material since the midterm <br />
* 1/3 material before the midterm.</li>
<li>Final exam content weighted:</li>
<li>2/3 of the material since the midterm</li>
<li>1/3 material before the midterm.</li>
<li>Midterm: 10/19 (first half of that evening&#8217;s session).</li>
<li>Final exam: 12/14 (usual class time).</li>
</ul>
Expand All @@ -249,9 +266,9 @@ <h1>Miscellaneous</h1>
<div class="slide">
<h1>Scaling Computation, Part I</h1>
<ul>
<li>Two models of concurrency compared: <br />
* Multithreaded Programming.<br />
* The Actor Model of concurrency.</li>
<li>Two models of concurrency compared:</li>
<li>Multithreaded Programming.</li>
<li>The Actor Model of concurrency.</li>
</ul>
</div>
<div class="slide">
Expand Down Expand Up @@ -283,7 +300,7 @@ <h1>Is This Safe?</h1>
public int getNext() {
return value++;
}
}</pre><p></div><div class="codeurl"><a href="txmt://open?url=file:///Users/dwampler/projects/Loyola/COMP388-488/Presentations/PragmaticsOfIndustrialSWDevelopment/code/UnsafeSequence.java">code/UnsafeSequence.java</a></div></p>
}</pre><p></div><div class="codeurl"><a href="txmt://open?url=file:///Users/deanwampler/projects/Loyola/COMP388-488/Presentations/PragmaticsOfIndustrialSWDevelopment/code/UnsafeSequence.java">code/UnsafeSequence.java</a></div></p>
<p>(credit: all Multithreading examples adapted from &#8220;Java Concurrency in Practice&#8221;)</p>
</div>
<div class="slide">
Expand All @@ -297,7 +314,7 @@ <h1>This Is Safe</h1>
public synchronized int getNext() {
return value++;
}
}</pre><p></div><div class="codeurl"><a href="txmt://open?url=file:///Users/dwampler/projects/Loyola/COMP388-488/Presentations/PragmaticsOfIndustrialSWDevelopment/code/SafeSequence.java">code/SafeSequence.java</a></div></p>
}</pre><p></div><div class="codeurl"><a href="txmt://open?url=file:///Users/deanwampler/projects/Loyola/COMP388-488/Presentations/PragmaticsOfIndustrialSWDevelopment/code/SafeSequence.java">code/SafeSequence.java</a></div></p>
</div>
<div class="slide">
<h1>Things Can Go Wrong</h1>
Expand Down Expand Up @@ -329,7 +346,7 @@ <h1>Deadlock Example</h1>
synchronized (right) {
synchronized (left) { doSomethingElse(); }
}
}</pre><p></div><div class="codeurl"><a href="txmt://open?url=file:///Users/dwampler/projects/Loyola/COMP388-488/Presentations/PragmaticsOfIndustrialSWDevelopment/code/LeftRightDeadlock.java">code/LeftRightDeadlock.java</a></div></p>
}</pre><p></div><div class="codeurl"><a href="txmt://open?url=file:///Users/deanwampler/projects/Loyola/COMP388-488/Presentations/PragmaticsOfIndustrialSWDevelopment/code/LeftRightDeadlock.java">code/LeftRightDeadlock.java</a></div></p>
</div>
<div class="slide">
<h1>Other Deadlock Hazards</h1>
Expand All @@ -351,11 +368,10 @@ <h1>Livelock</h1>
<p>A thread is not blocked, but it can&#8217;t complete work because of trying operations always fails.</p>
<ul>
<li>A common example is repeated execution of a transaction that never succeeds.</li>
<li>One scenario is two contenders with identical strategies for trying again, often colliding in the same way. If one is <em>greedy</em>, both may succeed.<br />
<br />
</div><br />
<div class="slide"></li>
<li>One scenario is two contenders with identical strategies for trying again, often colliding in the same way. If one is <em>greedy</em>, both may succeed.</li>
</ul>
</div>
<div class="slide">
<h1>The Importance of Immutability</h1>
<p>What about access to <em>immutable</em> state? All the synchronization issues go away. Immutable objects have these virtues:</p>
<ul>
Expand Down Expand Up @@ -391,7 +407,7 @@ <h1>Actors in Scala (Akka)</h1>
case Start =&gt; managedActors foreach (_ ! Start)
}
}
</pre><p></div><div class="codeurl"><a href="txmt://open?url=file:///Users/dwampler/projects/Loyola/COMP388-488/Presentations/PragmaticsOfIndustrialSWDevelopment/code/manager-actor.scala">code/manager-actor.scala</a></div></p>
</pre><p></div><div class="codeurl"><a href="txmt://open?url=file:///Users/deanwampler/projects/Loyola/COMP388-488/Presentations/PragmaticsOfIndustrialSWDevelopment/code/manager-actor.scala">code/manager-actor.scala</a></div></p>
</div>
<div class="slide">
<h1>Actors in Scala (Akka)</h1>
Expand Down Expand Up @@ -440,7 +456,7 @@ <h1>Starting an Akka Actor</h1>
import se.scalablesolutions.akka.actor.Actor_
// Creating an actor (one way...) and starting
val manager = Actor.actorOf[Manager]
manager.start</pre><p></div><div class="codeurl"><a href="txmt://open?url=file:///Users/dwampler/projects/Loyola/COMP388-488/Presentations/PragmaticsOfIndustrialSWDevelopment/code/manager-actor2.scala">code/manager-actor2.scala</a></div></p>
manager.start</pre><p></div><div class="codeurl"><a href="txmt://open?url=file:///Users/deanwampler/projects/Loyola/COMP388-488/Presentations/PragmaticsOfIndustrialSWDevelopment/code/manager-actor2.scala">code/manager-actor2.scala</a></div></p>
</div>
<div class="slide">
<h1>Actor vs. ActorRef</h1>
Expand All @@ -460,7 +476,7 @@ <h1>Sending a Message to an Akka Actor</h1>
case class Unregister(actor: ActorRef)
case object Stop
case object Start
</pre><p></div><div class="codeurl"><a href="txmt://open?url=file:///Users/dwampler/projects/Loyola/COMP388-488/Presentations/PragmaticsOfIndustrialSWDevelopment/code/actor-messages.scala">code/actor-messages.scala</a></div></p>
</pre><p></div><div class="codeurl"><a href="txmt://open?url=file:///Users/deanwampler/projects/Loyola/COMP388-488/Presentations/PragmaticsOfIndustrialSWDevelopment/code/actor-messages.scala">code/actor-messages.scala</a></div></p>
</div>
<div class="slide">
<h1>An Asynchronous (Fire and Forget) Message</h1>
Expand All @@ -473,7 +489,7 @@ <h1>An Asynchronous (Fire and Forget) Message</h1>
case Start =&gt; managedActors foreach (_ ! Start)
}
}
</pre><p></div><div class="codeurl"><a href="txmt://open?url=file:///Users/dwampler/projects/Loyola/COMP388-488/Presentations/PragmaticsOfIndustrialSWDevelopment/code/actor-asynch-message.scala">code/actor-asynch-message.scala</a></div></p>
</pre><p></div><div class="codeurl"><a href="txmt://open?url=file:///Users/deanwampler/projects/Loyola/COMP388-488/Presentations/PragmaticsOfIndustrialSWDevelopment/code/actor-asynch-message.scala">code/actor-asynch-message.scala</a></div></p>
<p>If a response is required, the receiver can send a message to the sender.</p>
</div>
<div class="slide">
Expand All @@ -490,7 +506,7 @@ <h1>An Synchronous (Wait) Message</h1>
}
}
}
</pre><p></div><div class="codeurl"><a href="txmt://open?url=file:///Users/dwampler/projects/Loyola/COMP388-488/Presentations/PragmaticsOfIndustrialSWDevelopment/code/actor-synch-message.scala">code/actor-synch-message.scala</a></div></p>
</pre><p></div><div class="codeurl"><a href="txmt://open?url=file:///Users/deanwampler/projects/Loyola/COMP388-488/Presentations/PragmaticsOfIndustrialSWDevelopment/code/actor-synch-message.scala">code/actor-synch-message.scala</a></div></p>
</div>
<div class="slide">
<h1>An Synchronous (Wait) Message (cont.)</h1>
Expand All @@ -513,7 +529,7 @@ <h1>An Asynchronous with a Future Message</h1>
case None =&gt; "Error!"
}
}
</pre><p></div><div class="codeurl"><a href="txmt://open?url=file:///Users/dwampler/projects/Loyola/COMP388-488/Presentations/PragmaticsOfIndustrialSWDevelopment/code/actor-future-message.scala">code/actor-future-message.scala</a></div></p>
</pre><p></div><div class="codeurl"><a href="txmt://open?url=file:///Users/deanwampler/projects/Loyola/COMP388-488/Presentations/PragmaticsOfIndustrialSWDevelopment/code/actor-future-message.scala">code/actor-future-message.scala</a></div></p>
</div>
<div class="slide">
<h1>An Asynchronous with a Future Message (cont.)</h1>
Expand All @@ -537,7 +553,7 @@ <h1>Another Way to Write the Last Example</h1>
case None =&gt; "Error!"
}
}
</pre><p></div><div class="codeurl"><a href="txmt://open?url=file:///Users/dwampler/projects/Loyola/COMP388-488/Presentations/PragmaticsOfIndustrialSWDevelopment/code/actor-future-message2.scala">code/actor-future-message2.scala</a></div></p>
</pre><p></div><div class="codeurl"><a href="txmt://open?url=file:///Users/deanwampler/projects/Loyola/COMP388-488/Presentations/PragmaticsOfIndustrialSWDevelopment/code/actor-future-message2.scala">code/actor-future-message2.scala</a></div></p>
</div>
<div class="slide">
<h1>Achieving Immutability</h1>
Expand Down Expand Up @@ -697,9 +713,8 @@ <h1>Add New Functionality (cont.)</h1>
<h1>Add New Functionality (cont &#8211; sort of&#8230;)</h1>
<p>How could we modify <code>filter</code> to filter by instruments? (To make it easier, assume there is only one instrument in the list, as in the test.)</p>
<p>This is not easy, as we really need to parse the <span class="caps">JSON</span> into some representation, filter out the records (which are of the form <code>{"timestamp": 1283233404995, "symbol": "A", "price", "40.0"}</code>) using the <code>symbol</code>, then convert back to a string.</p>
<p>Can you figure out how to do this with the Lift <span class="caps">JSON</span> APIs used in the application and <span class="caps">JSON</span> helper types provided, or using other 3rd-party <span class="caps">JSON</span> libraries?<br />
<br />
Actually, the right way to implement this feature is to support this filtering at the database level, which we will learn how to do with MongoDB.</div></p>
<p>Can you figure out how to do this with the Lift <span class="caps">JSON</span> APIs used in the application and <span class="caps">JSON</span> helper types provided, or using other 3rd-party <span class="caps">JSON</span> libraries?</p>
<p>Actually, the right way to implement this feature is to support this filtering at the database level, which we will learn how to do with MongoDB.</div></p>

<!-- Syntax Highlighter -->
<script language="javascript" type="text/javascript" src="../lib/scripts/shCore.js"></script>
Expand Down
2 changes: 1 addition & 1 deletion PragmaticsOfIndustrialSWDevelopment/html/lecture13.html
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ <h2>August 5, 2010</h2>

<div class="presentation">
<div class="slide">
<h1>Lecture 13: Complexity vs. Simplicity Part <span class="caps">III</span>: Simple Systems</h1>
<h1>Lecture 13: Complexity vs. Simplicity Part II: Simple Systems</h1>
<p>First, we complete last week&#8217;s content on Agile software methods. Then we finish the course lectures with a discussion of the importance of simplicity in software systems.</p>
</div>
<div class="slide">
Expand Down
15 changes: 14 additions & 1 deletion PragmaticsOfIndustrialSWDevelopment/html/lecture14.html
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,20 @@ <h2>August 5, 2010</h2>

<div class="presentation">
<div class="slide">
<h1>Lecture 14: Student Presentations on the Code Project and Course Review</div></h1>
<h1>Lecture 14: Student Presentations on &#8220;Mini&#8221; Projects</h1>
</div>
<div class="slide">
<h1>Mini-Project Presentations</h1>
<p>Each of you does a 15 minute presentation, with questions, on your mini project.</p>
</div>
<div class="slide">
<h1>Final Important Dates</h1>
<ul>
<li><em>12/10 (Friday)</em>: <strong>Last</strong> day to turn in any other remaining assignments (by Midnight&#8230;).</li>
<li><em>12/14</em>: Final Exam Due</li>
</ul>
<p>I will hand out the take-home, open-book final exam at the end of class today. It will be due at the <em>beginning of class on 12/14</em>. (I&#8217;ll be in our classroom at the usual time.)</p>
<p>If you&#8217;re running late to class, call or send me email.</div></p>

<!-- Syntax Highlighter -->
<script language="javascript" type="text/javascript" src="../lib/scripts/shCore.js"></script>
Expand Down
3 changes: 2 additions & 1 deletion PragmaticsOfIndustrialSWDevelopment/html/references.html
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,8 @@ <h1>Off Topic: Career Advice</h1>
<p>You might find useful&#8230;</p>
<ul>
<li>Matt Might, <a href="http://matt.might.net/articles/books-papers-materials-for-graduate-students/">matt.might.net/articles/books-papers-materials-for-graduate-students/</a>.</li>
<li>Nathan Marz, <a href="http://nathanmarz.com/blog/how-to-get-a-job-at-a-kick-ass-startup-for-programmers.html">How to get a job at a kick-ass startup for programmers</a>.<br />
<li>Nathan Marz, <a href="http://nathanmarz.com/blog/how-to-get-a-job-at-a-kick-ass-startup-for-programmers.html">How to get a job at a kick-ass startup for programmers</a>.</li>
<li><a href="http://infoq.com">InfoQ</a>. My favorite tech news site. Other good ones are <a href="http://arstechnica.com/">Ars Technica</a> (especially for in-depth reviews) and <a href="http://news.ycombinator.com/">Hacker News</a>.<br />
</div></div></li>
</ul>

Expand Down
7 changes: 3 additions & 4 deletions PragmaticsOfIndustrialSWDevelopment/slides/lecture1.slides
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,8 @@ h1. Course _Administrivia_
| twitter: | "@deanwampler":http://twitter.com/deanwampler |
| office hours: | Tuesday, 6:45 - ? and by appointment |

h1. Schedule
h1. Schedule (Revised 10/26)

(Revised 10/26)
| 8/31 | Course Intro and Scaling Computation, Part I (Multithreaded Programming, Actor Concurrency) |
| 9/07 | Scaling Computation, Part II (Agents, Software Transactional Memory, Memory is the New Disk) |
| 9/14 | Scaling Systems, Part I (Vertical vs. Horizontal Scaling, Distributed Systems like HTTP, etc.) _Last day to withdraw without a W grade._ |
Expand All @@ -60,7 +59,7 @@ h1. Schedule (cont.)

| 11/23 | Complexity vs. Simplicity Part I: Effective Software Development Processes, including Scrum, XP, and Lean |
| 11/30 | Complexity vs. Simplicity Part II: Simple Systems |
| 12/07 | Student Presentations on the Code Project, Course Review |
| 12/07 | Student Presentations on the Code Project |
| 12/14 | Final Exam (regular class time) |

h1. Readings
Expand Down Expand Up @@ -107,7 +106,7 @@ h1. Course Components: Project Exercises (cont.)
* 1/2 the grade differences will be based on GitHub checkin logs and the quality of those checkins.
* *If you _pair program_, include _both_ names in the commit comments!*

h1. Course Components: Project Exercises (cont.)
h1. Course Components: Project Exercises (cont.)

* 5% will be based on an *oral presentation* on 12/7.
* 15 minutes or so, with time for questions and discussion.
Expand Down
15 changes: 14 additions & 1 deletion PragmaticsOfIndustrialSWDevelopment/slides/lecture14.slides
Original file line number Diff line number Diff line change
@@ -1 +1,14 @@
h1. Lecture 14: Student Presentations on the Code Project and Course Review
h1. Lecture 14: Student Presentations on "Mini" Projects

h1. Mini-Project Presentations

Each of you does a 15 minute presentation, with questions, on your mini project.

h1. Final Important Dates

* _12/10 (Friday)_: *Last* day to turn in any other remaining assignments (by Midnight...).
* _12/14_: Final Exam Due

I will hand out the take-home, open-book final exam at the end of class today. It will be due at the _beginning of class on 12/14_. (I'll be in our classroom at the usual time.)

If you're running late to class, call or send me email.

0 comments on commit f4828d7

Please sign in to comment.