On this page:
Software Development
Home
6.5.0.3

Software Development

Software Development

For the Abstract, see tab on the left.

image

Announcements

Fri Apr 29 17:08:05 EDT 2016

The End

The grades are in.

I have published my code for Evolution. Feel free to put up yours, too, and point to it from your resume so that future employers may read it.

Good luck with your future developments.

Thu Apr 28 09:56:50 EDT 2016

I have started an Evolution server on antarctica.ccs.neu.edu:45678. The server will stay alive and run games according to the sign-up protocol (at least 3 players, then wait for about 10 seconds or when 5 more players have signed up). I will post here once an hour on the hour which players have run a game to completion. (I may also change the server so it’ll send one last "survived" message to survivors of the game. I will not post scores.)

Thu Apr 28 17:13:08 EDT 2016

    contact made by several jackfr players

      --- all failed on feed-next due to time out

Thu Apr 28 16:22:01 EDT 2016

    contact made by CRIPPABERGER2

      --- failed, due to prematurely closing sockets for "choose"

    contact made by CRIPPABERGER3

      --- failed, due to "population" field marker

Thu Apr 28 15:03:51 EDT 2016

    contact made by "CRIPPABERGER2"

      --- continues to fail on "population" field marker

    contact made by "sign-up"

     --- continues to fail by prematurely closing sockets for "choose"

Thu Apr 28 13:35:31 EDT 2016

    contact made by "CRIPPABERGER"

      --- failed, due to "population" field marker

    contact made by "sign-up"

      --- failed, due to prematurely closing sockets for "choose"

I had to restart at 12:30pm because I accidentally closed my laptop.

Wed Apr 27 08:31:35 EDT 2016

I will run the Evolution tournament on Thursday evening, 28 Apr 2016, at 6:30pm in WVH 366. See y’all there.

Mon Apr 25 17:58:52 EDT 2016 Mon Apr 25 12:07:01 EDT 2016

Please see Final Code Walks for the revised schedule of final code walks. If the introduction of a catch-up break affects your ability to present code, email me immediately.

All code walks will take place in WVH 164166.

Wed Apr 20 18:36:18 EDT 2016

Please see Final Code Walks for next week’s schedule.

Your votes produced the following translations of our symbolic grades into numeric scores:

ok+

     

98

ok

     

89

ok-

     

81

zero

     

61

Finally, please watch this space for announcements until your final code walk is over.

Mon Apr 18 20:51:11 EDT 2016

Just a reminder that we will have a last make-up session tomorrow evening (Tuesday 19 April) at 7pm in WVH 360.

We owe one pair of students a regular code walk.

Nathan and Steve will also present their Rust solution and explain how they could encode some of the game invariants into the language’s type system.

Fri Apr 15 19:06:07 PDT 2016

Vishesh has released the results of running all valid tests on all programs for 12 — Integration Time. You can retrieve all of these tests as a zip archive.

Fri Apr 15 12:32:38 PDT 2016

During the last code walk, I expressed doubt that species that go extinct during the end-of-turn phase, yield cards for the player. That’s of course complete nonsense on my side; I specified this and I just failed to re-read my own specs.

Wed Apr 13 18:24:02 EDT 2016

Tony’s office hours for Thursday, April 14 are canceled.

Wed Apr 13 08:32:49 EDT 2016

I will hold

what one last make-up class on
when Tuesday night from 7pm till 9pm
where in West Village H 360.

At least one pair of students will present their design. In addition, we will have either a presentation of the Rust solution or mine.

Sun Apr 10 20:57:44 EDT 2016

Vishesh re-ran the test fest based on a revised code base. The new results are available at the same URLs as the old ones. What changed is that my revised code base replaces traits "in place." (This was a known bug when I committed, and I am glad that about four pairs discovered it.)

Sun Apr 10 10:18:21 CEST 2016

Note New due date for 12 — Integration Time

The internal protocol is ambiguous in the feeding step. Naturally, we don’t want the dealer to reveal the complete state of the other players but only the public part of the state, which is the list of species boards. I have corrected the API, and I am requesting that you correct it too.

This affects neither the test harness nor the outcome of the games.

Mon Apr 4 08:45:13 EDT 2016

Remember that there will be no class this week. Also, neither Tony nor I will hold office hours. Email connectivity will be intermittent for both of us, and I will probably be off the ’net as of Friday thru Sunday evening. Class resumes on 11 April 2016.

Vishesh will be available for his office hours.

12 — Integration Time is a complex project. You will need to get started early.

Sun Apr 3 18:39:55 EDT 2016

Several people discovered that my new test harness did not check as many properties as in the past. Vishesh has re-run the test fest for 10 — Refactoring and re-released the results. You can retrieve all of these tests as a zip archive. [These are the same links as before, with new content.]

Why did my test harness fail to filter out bad tests? I moved my contracts from individual functions to the boundary of modules. Internally I protected the tests with appropriate re-imports of these protected functions—except for one of the JSON parsers. As a result, one of the parsers called an unprotected constructor with the wrong arguments.

Sun Apr 3 17:59:34 EDT 2016

Thanks to Alp for pointing out that 11 — Designing a Protocol was missing delivery instructions for the second task. The revised version comes with such instructions.

Sat Apr 2 09:22:10 EDT 2016

Vishesh has released the results of re-running all valid tests on all programs for 10 — Refactoring. You can retrieve all of these tests as a zip archive.

Wed Mar 30 10:10:09 EDT 2016

On some more reflection, I would like to pinpoint one other sore spot in people’s code: data definitions. As Fundamentals I and II should have brought across, if you do not understand your data, you cannot organize your program properly. To get you going on 11 — Designing a Protocol, let me show you what my code looks like for the step4 method:
; Step4   = [Listof Action4]           ; the actions all players wish to perform
; Action4 = [List FC GP* GB* BT* RT*]  ; the actions each player wishes to perform
; FC      = N                          ; the food card
; GP*     = [Listof GP]                ; the growth-of-population actions
; GB*     = [Listof GB]                ; the growth-of-body actions
; BT*     = [Listof BT]                ; the board-acquisition actions
; RT*     = [Listof RT]                ; the trait-replacement actions
; GP      = [List N N]                 ; [list b c] trades card c for growth of population b
; GB      = [List N N]                 ; [list b c] trades card c for growth of population b
; BT      = [List N N^0..3]            ; [cons pc t] pays card pc for new species with traits t
; RT      = [List N N N]               ; [list b cO cN] replaces trait cO at b for trait card cN
 
; Step4 -> Void
; execute step 4 of the Evolution turn
; ASSUME: ;; (= (length players) (length card-actions))
; the actions are specified in the same order as players
(define/public (step4 actions*) ...)
From here the code writes itself almost automatically.

Tue Mar 29 12:45:38 EDT 2016

I have moved the frequently asked questions from here and the individual projects to FAQ on Evolution. I will re-order them later today and possibly rephrase them.

On code Here are two critical pieces of feedback based on the code walks so far:
  1. Tests consist of code. All code deserves design and maintenance. Proper design of code leads to readable tests that your successors can read and understand. Consider this scenario:
    (check-scenario
      #:doc "attacker eats attackee's & kills the latter's only species"
      #:before
      [attacker s-hungry-carnivore s-satisfied]
      [attackee s-satisfied]
      [by-stander (s-vegetarian-pop=1 0) (s-satisfied) (s-hungry-carnivore)]
      #:cards 2cards
      #:pre 1
      #:post 0
      #:after
      [attacker (s-hungry-carnivore 1) (s-satisfied)]
      [attackee (#:cards 2cards) -])
    Now imagine something like this instead:
    (check-equal? (send p-1 species) (list s-1 s-2))
    (check-equal? (send p-2 species) (list s-2))
    (check-equal? (send p-3 species) (list s-3 s-4 s-5))
    (check-equal (dot dealer watering-hole) 1)
    (check-true (void (send (dealer p-1 p-2 p-3) feed1))
      "attacker eats attackee")
    (check-equal (dot dealer watering-hole) 0)
    (check-equal? (send p-1 species) (list s-1+1 s-2))
    (check-equal? (send p-2 species) (list))
    (check-equal? (send p-2 cards) 2cards)
    (check-equal? (send p-3 species) (list s-3 s-4 s-5))
    This second choice is a near-idea approximation of the above scenario description—rendered in a style that was all too common during yesterday’s code walks. Most of the test suites skipped the prelude completely and left it to the reader to go back and find the meaning of p1.

    Even if your language does not permit the formulation of scenarios, a unit test library does not prevent you from choosing meaningful variable names, using functions to abstract over patterns, and adding some documentation that explains the scenario.

  2. The effect statements are rather non-descriptive in most codes. Learn to use English well and articulate ideas concisely. Here are two examples from my code base:
    [json->species
     ; convert a JSexpr into a Species if it meets the JSON and Species specs
     ; EFFECT raise exn:misc:match? otherwise
     ; HINT consider json->opt-species instead
     (-> JSexpr Species)]

    [interpret
     ; (interpret dealer feedbale attackable)
     ; determines the next ordering of the feedable players
     ; EFFECT ask the given dealer to feed the first player in feedable
     ; modifying both the dealer and some players
     (-> Dealer [Listof Player] [Listof Player] [Listof Player])]
When we assigned grades on Monday, we mostly ignored these kinds of things but you must learn to pay attention.

Sat Mar 26 18:11:17 EDT 2016

Move to FAQ on Evolution

Thu Mar 24 18:11:11 EDT 2016

Some of your have suggested more concrete guidelines on how you should present designs and code. I have rewritten the corresponding section in Design Reviews, Code Walks. Please take a look, especially since we will use these guidelines during the final code walks to assess your skills.

Thu Mar 24 13:51:32 EDT 2016

Vishesh has released the results of re-running all valid tests on all programs for 8 — Selecting testable methods. You can retrieve all of these tests as a zip archive.

If you wish to proceed on a comparative basis, revisit the old results.

Wed Mar 23 14:18:06 EDT 2016 extended: Wed Mar 23 20:31:07 EDT 2016

Here are some additional clarifications on the execution of the steps in an Evolution turn, formulated as reformulations/extensions of existing FAQs:

Moved to FAQ on Evolution.

Tue Mar 22 22:59:23 EDT 2016

It turns out that our formulation of the test case made the Silly Player choose the second species, not the first one. Increasing the food storage and the population by 1 each in the first species made the test case fail in the expected manner:
(define (s-with (f 0) (p 1) (with '()))
  (species #:food f #:population p #:traits with))
 
(check-scenarioa
  #:doc "foraging fails, cooperation should fail"
  #:before
  [p1 (s-with 1 2 `(,cooperation ,foraging)) (s-with 0 2)]
  [p2 s-satisfied]
  [p3 s-satisfied]
  #:pre  3
  #:post 1
  #:after
  [p1 (s-with 2 2 `(,cooperation ,foraging)) (s-with 1 2)])
The fix is a straightforward introduction of a Boolean flag that signals whether feed-if-possible actually succeeded in executing the desired feeding:
; Player N -> Void
; a complete feeding for the specified species of this dealer's player
(define/public (feed-a-player-s-species player s)
  (define-values (ok? foraging? neighbor-s) (feed-if-possible player s))
  (when foraging?
    (define-values (ok? 1 2)
      (feed-if-possible player s))
    (when ok?
      (cooperate player neighbor-s)))
  (cooperate player neighbor-s))
 
; Player [Maybe N] -> Void
; hand s the right to eat if it points to a species
(define/private (cooperate player s)
  (when s
    (feed-a-player-s-species player s)))
 
; Player N -> (values Boolean Boolean [Maybe N])
; feed species s of player from this dealer's waterhing hole
; if there is food and if s points to a species
(define/private (feed-if-possible player s)
  (cond
    ; scavenging, foraging, and cooperation must not overfeed s
    [(or (= watering-hole 0) (send player all-fed s))
     (values #f #f #f)]
    [else
     (set! watering-hole (- watering-hole 1))
     (define-values (foraging? neighbor-of-s) (send player feed1 s))
     (values #true foraging? neighbor-of-s)]))
It was awkward to have a method with the name "-if-possible" but dont have it return success/failure information. Thanks for helping me walk this critical part of the code.

Fri Mar 18 11:47:41 EDT 2016

Vishesh has released the preliminary results of running all valid tests on all programs for 8 — Selecting testable methods. We will supply a link to zip archive later today. You can retrieve all of these tests as a zip archive.

Please inspect the test that break on your implementation carefully. They are possibly real failures, possibly serious misunderstandings of the specifications, or they may reveal (unknown) ambiguities. If you think you found one of the latter, send me email.

Otherwise, please make sure to address these failures as you go forward with the implementation of 10 — Refactoring.

Some of you have asked about our Racket on-line code walks. Tomorrow Matthew Flatt will review the Racket byte-code compiler (not the JIT part) at a Google hangout. We anticipate a 2-hour meeting, starting at 10am MDT.

Sat Mar 12 16:07:01 EST 2016

Again, please do consult the FAQ of 8 — Selecting testable methods before you stop working on your project for the week.

Sat Mar 5 17:41:55 EST 2016

Please see 8 — Selecting testable methods for a correction concerning the denotation of false.

Sat Mar 5 09:34:24 EST 2016

Vishesh has released the results of running all valid tests on all programs for 7 — Changing an API. You can retrieve all of these tests as a zip archive. Please make sure to address these failures as you go forward with the implementation of 8 — Selecting testable methods.

Tue Mar 1 16:29:21 EST 2016

Vishesh has set up your new repositories and sent out a notification.

I have posted 8 — Selecting testable methods.

Several students in class noticed that my rendering/reading of JSON tests eliminated a "fat-food" field with a value of 0. In a few extreme (and unlikely) cases, this unspecified treatment of defaults may have resulted in the elimination of your test cases and a reduction in points. If so, please see Vishesh, validate your tests with him, and get your points back.

Sun Feb 28 16:06:10 EST 2016

It has come to my attention that one pair’s test case(7920-7167) adds four traits to a species board. The problem is due to a bug in my JSON checker. Please ignore the test.

Sun Feb 28 14:31:53 EST 2016

Tony has released the results of running all valid tests on all programs for 6 — Incremental refinement, the second step. You can retrieve all of these tests as a zip archive. Since 7 — Changing an API is a mere API revision of this project, you should immediately investigate any of your failures in this test matrix.

To accommodate this revision effort, I have set a new deadline for 7 — Changing an API. As you investigate your implementation’s failures, consider running the following, rather special test case:

    [[["id",99999],

      ["species",

       [

        [["food",3],["body",2],["population",3],

         ["traits",["hard-shell","warning-call"]]],

        [["food",2],["body",3],["population",4],

         ["traits",["carnivore"]]]]],

     ["bag",0]],

     1,

     []]

It specifies the rare case that a carnivore could only eat itself but is protected by a neighboring species with the warning-call trait. I think I discovered this flaw in my implementation’s behavioral contract after Vishesh had run the test fest. In that old implementation, this situation fell through the cracks and produce false instead.

Finally, if you do deliver a shell script for either the compilation task or the test harness, you must add #!/bin/sh to the top; we did it for some of you this time, but that’s inappropriate. Ask Tony or Vishesh during office hours; don't wait till Sunday or the day before the deadline. Also, you may wish to read up on exec and use it in your executable script to give us some more control over your processes.

Thu Feb 25 21:55:47 EST 2016

Tony has just re-run the test fest for 5 — Incremental refinement, a minimal start. Please take a look at the revised results results. You can retrieve all of these tests as a zip archive.

Thu Feb 25 15:23:38 EST 2016

Apparently, some of you asked your "client" to install software because the specified platform does not live up to your development environment. As you can imagine, the client is quite unhappy about this request, because yours is not the only software product that will be installed on this platform.

As a compromise, your client has agreed to provide more disk space to you where you can install private extensions of the platform.

"All CCIS accounts created before Fall of 2015 have scratch space located at: /scratch/username.

This space is double the size of their quota, however the data contained on it isn’t sent to our DR backup site. The permissions by default are also 755 so they should be aware of this too and adjust their permissions accordingly if it is put to use.

Read more on quotas and the rules governing them.

This should provide them with plenty of space should they need to store temp files or compile code.

If there are any students who don’t have this scratch space (which is rare as these should all be juniors/seniors), please have them reach out to us. They will need to note though that as these are network mounts, you won’t be able to see them until you access /scratch/username for the first time on a machine."

Tue Feb 23 09:57:23 EST 2016

You will finish project 7 with your current partner. For project 8, you will start with a new partner. Here are your choices:

You can choose your next partner, and we choose the code base for you.

   

We choose your next partner, and you choose which code base to work with.

I will present this choice for a brief discussion tonight and put up for some kind of vote tomorrow unless I get a consensus.

Mon Feb 22 14:46:29 EST 2016

Tony has released the results of running all valid tests on all programs.

Remember that these tests can only improve your score, not lower it. Every one of your tests that discovers a bug in another pair’s code gets you one point up to a total of five; finding a bug in my code gives you two points, without limits. You may find that some of these tests don’t quite live up to the specifications of the complete game. For example, a species may come with a higher food count than population count. This kind of test lives up the specifications of this project (I promised certain properties of the JSON specs and some cross properties) but will not get through the next stage of the project or the complete game.

Sun Feb 21 19:14:31 EST 2016

I have set a new deadline for 6 — Incremental refinement, the second step. We were unable to run all of your homework 5 tests on all executables in time, and I do not want you to turn in a solution when you haven't had a chance to fix your solution to 5 — Incremental refinement, a minimal start.

I will also write a new homework for next week, simpler than what I intended. The homework will be released after the revised deadline.

Sun Feb 21 14:01:20 EST 2016

Someone asked what I did to run the tests during this week’s Terminal demo. Here is the one-liner that directs (>) some input file into your programs STDIN and pipes (|) the output into Unix’s diff program:

    $ ./xfeed < input.json | diff - expected-output.json

If you handcraft test files and you’re careful with whitespace in your JSON generation, this is an easy way to test your harness and feeding program. (I accommodate all kinds of whitespace and compare re-normalized JSON expressions instead—this gives you more points.) The above line shortens an alternative approach where you re-direct (>) your STDOUT into a file:

    $ ./xfeed < input.json > actual-output.json

    $ diff actual-output.json expected-output.json

The next shell command then uses Unix’s diff to compare the two files.

The same pair also asked where to leave the tests file for a project. You should leave the tests in this week’s folder or, ideally, in a sub-directory called test. As long as you name the tests and the expected outputs in a distinct manner, we’re fine; ideally you use the naming convention from 4 — From interfaces to protocols is acceptable.

Fri Feb 19 21:19:21 EST 2016

  1. Do not forget to re-consult the FAQ in 6 — Incremental refinement, the second step.

  2. Many pairs did not supply programs that consume inputs from STDIN or deliver outputs on STDOUT. Please see the comment on this below and make sure you prepare the proper kind of program for 6 — Incremental refinement, the second step.

  3. The last thing you must do is log into a Linux machine such as login-linux, pull in the latest version of your github repo, and ensure that your scripts work there. We will grant you some slack on 5 — Incremental refinement, a minimal start but as of 6 — Incremental refinement, the second step, we will simply take what you deliver—and if it doesn’t work, you failed your "manager."

  4. Some of you were wondering in today’s office hours about the compile script. The compile script should build your program from source. For example, in languages such as Java, this would involve running javac or other compile tools. In languages such as python, there is nothing to do: simply exiting with exit code 0 is enough.

    The other script asked for, xfeed, should run the program. For Java programs, this would involve running java, the Java virtual machine. For Python, this would involve running "python2.7", "python3.5" or similar.

    The motivation is to separate out the (sometimes very long and slow and complicated) compilation step from the (hopefully simple and fast) runtime step. We run your programs many tens of times in short succession, and the quicker your programs start, the happier we are during grading.

  5. For 5 — Incremental refinement, a minimal start and later, we will provide zip repo with all the tests. Since we will not continue working on 6 Nimmt!, you don’t need source access to those tests.

Fri Feb 19 09:58:53 EST 2016

It has come to my attention that some of you do not understand how to choose a typed data representation for the results of the method specified in 6 — Incremental refinement, the second step. As I said in response to a question in class, this topic is covered in the first two weeks of Fundamentals II. I drafted the complete set of lecture notes some 10 years ago, and I urge you to re-read Part I, Chapter 1, section 4. I know this idea is extensively covered throughout Fundamentals II and OOD.

The reason I do not wish to give specific answers to such question is to make sure that the realization sinks in this time around.

[I will explain how my "opinion" on how to represent real-world information in data sub-languages of programming languages came about. There is nothing obscure about it, and it is the way the Java architects urge you to program, too—contrary to what you may have encountered in industrial co-ops.]

Thu Feb 18 14:30:30 EST 2016

(1) I will hold a make-up lecture on Tuesday 23 Feb 2016 (in SH 325 at 8:10pm).

(2) Two students suggested that I place the FAQs at the end of the project specification because they overlooked an announcement. I will try this approach for 6 — Incremental refinement, the second step, but only as a trial.

Wed Feb 17 08:43:56 EST 2016

The front office was able to reserve Shillman 325 for Tuesdays between 8:10 and 10:10pm for make-up class meetings. (We went through approximately a dozen combinations before they offered this evening slot.)

Tue Feb 16 21:00:43 EST 2016

Tony posted the results of the complete test run. Please inspect and reflect. Future results will include my version of Evolution run against all of your tests, and my tests run against your programs.

5 — Incremental refinement, a minimal start does not mention a requirement for JSON files but requests an executable that reads JSON inputs from STDIN and writes JSON outputs to STDOUT. Given 4 — From interfaces to protocols, I would expect that you include a suite of unit test files that validate this program. Many of you failed and did not provide a single such pair of tests. Why? Unit tests are the beginning and end of Fundamentals I, II, and III. If you have some in your copy of the repo and you did not check them in, I give you 12 hours (tomorrow morning 9am) to push them out and mail Tony about them.

In addition I have modified 6 — Incremental refinement, the second step to explicitly request such test files. No employer will do so; a good employer will expect those files without further ado, and if you happen to go somewhere that doesn’t expect it, quit as fast as you can.

Mon Feb 15 14:32:35 EST 2016

This morning a colleague sent me a link to a story about Target’s failure to expand into Canada. The story is ideally suited for CS-Business double majors; for plain software developers who aspire to build large systems, it is also a big warning sign of the cost of development.

While my colleague has never taught Fundamentals I, II, or OOD, he is intimately familiar with the material and thoroughly supports the approach. In this spirit, he added "check out .. how ambiguities in the data interpretation contributed to this failure." As I say when I teach Fundamentals I, data representations (definitions and interpretations) are the key to building well-designed systems, and it is no wonder that people who do well on this front, earn an order of magnitude more than ordinary devs and have a much more interesting professional life.

Sun Feb 14 20:33:10 EST 2016

The rest of the questions/answers were Moved to FAQ on Evolution.

question

     

answer

What does standard in and out mean?

     

Standard in and out [streams] are widely used mechanisms for writing a program that read from and write to standardized parts of your computer. On Linux/Unix platforms, you can redirect these input < and output streams > to files such as some-json-input and some-json-output, respectively. That’s what
    ./xattack < some-json-input > some-json-output
means. This makes it easy to run the same program on different input files and capturing its output in different output files without modifying the program. All you need to do is connect the inputs and outputs to the desired files.—Understanding these concepts is critical for a software dev, so I urge you to read up on them.

     

Sun Feb 14 16:08:00 EST 2016

Good software development requires that code comes with internal unit tests in addition to external tests, such as required for 4 — From interfaces to protocols.Indeed, such external pairs of files count as tests only if you have a harness that automates their full execution. A proper README file comes with instructions on how to run these tests. I have modified the Read Me instructions.

Sat Feb 13 16:49:40 EST 2016

Move to FAQ on Evolution.

Fri Feb 12 15:53:25 EST 2016

Class on Monday We will have class on Monday. The room reservation office could not give a definitive answer about the availability of our usual class room [, arguing that it is reserved for a CCS class at this time of the day. Go figure].

Grading A couple of students have asked about "extra credit." There is no extra credit per se but your tests are evaluated as follows. We will run every test through every implementation. A test that reveals a bug in some other pair’s implementation means an "extra" point for the creators of the test—assuming the test passes my own implementation. [If your test really breaks my implementation, we will discuss an extra large bonus.]

We will publish the resulting test matrix with links to these tests so that you can improve your implementation of Evolution. Every weekly project will have such test suite tasks where possible. These "cross applications" of tests will hopefully help you understand the value of examples and tests.

question

     

answer

Can we use a .jar file instead of an executable?

     

(1) You should figure out how to write a shell script that runs .jar files so that you can create the desired xttack file. (2) If you place instructions in the README file, we will follow them to run your version of xattackbut do use the name for what you use to execute the code.

     

Thu Feb 11 17:10:32 EST 2016

Move to FAQ on Evolution

Thu Feb 11 10:26:02 EST 2016

Remember to send me email by this afternoon if you object to a lecture on Presidents’ Day.

Important Note on Grades

Keep in mind that the course has two goals: developing so-called "soft skills" and showing you how to enhance your technical skills on your own, not via lectures.

Some of you expressed surprise that so much of the homework grade depends on organizing your repositories according to my specifications. You must keep in mind that we are simulating a company in this course and that you are just a pair of software devs working in a large team. To operate in such a context, you must firmly stick to repository layout specifications (without being constantly reminded about them), to a hygienic use of git (without seeing reminders posted everywhere), and to changing requirements for a specific project or small modifications to general guidelines. In this course you practice finding your way into a team, and the large allocation of points for such "soft skill" behavior reflects this goal. For your real job, doing so and doing it quickly is mandatory; negative first impressions are difficult to eliminate later.

Tue Feb 9 18:30:31 EST 2016

Moved to FAQ on Evolution.

Mon Feb 8 11:40:18 EST 2016

I have incorporated the emailed comments on ambiguities into this course’s rules of Evolution. If I considered a question/issue already resolved, I did not address it. Alternatively, it was straightforward to resolve the uncovered ambiguities; a common sense reading was all that was needed. You may have to read the requirements analysis again, to resolve such issues.

The point of this exercise is to provide you with some insight on how requirements analysts, project managers, and software developers have to deal with large documents. While they are naturally encouraged to ask questions, some questions may uncover complex problems and others may reflect badly on the team. It is your job to figure out over time which is which. Practice will help.

Also, as explained early on this semester, I do not use the exact rules of a game as specified by its producer. Differences between those rules and mine are usually intentional. If you think that such a discrepancy leads to an unresolved ambiguity, let me know.

Finally I have released 5 — Incremental refinement, a minimal start, the first project assignment concerning Evolution.

Sun Feb 7 18:59:03 EST 2016

Important Notice Concerning Server vs Client

It has come to our attention that some of you implemented a server proxy wrapper as required in 4 — From interfaces to protocols (see first paragraph) and others implemented a client proxy as would be sensible for a distributed gaming framework. A server listens to TCP connection requests on a socket and accepts them; a client expects a server to exist and connects to the server.

Since it is late in the game, we will accept bothaccording to the following caveat. If you implemented a server as requested, follow the delivery instructions and you are all set. If you implemented a client instead, simply name your delivered executable remote-client. We will run your executables accordingly.

Happy superbowling.

Sat Feb 6 17:23:04 EST 2016

question

     

answer

Can a sequence of messages start with take-turn?

     

No, this would violate the protocol.

     

What does it mean to shut down on a test case? Does it mean invalid test cases will be used last?

     

We will start your "server" for each individual test case.

     

Does it make sense to call the player (from proxy) if there is only one stack?

     

Can this happen during an actual game of 6 Nimmt!? What should the signature of the choose method be?

     

What happens if a message contains the same card in both a stack and a player’s hand?

     

The constraint in 4 — From interfaces to protocols allow this situation, and none of your existing software is likely to catch this situation. So accept this kind of message.

     

Where do checks concerning JSON messages go?

     

The proxy must translate the messages into valid method calls. Before it can do so, it must check the validity of the messages to ensure the method call is valid.

     

Fri Feb 5 13:37:04 EST 2016

question

     

answer

What does it mean to "ignore all messages that does not satisfy one of the three message formats"?

     

Your proxy shuts down without further ado.—I need to lecture on contracts before we can do better here.

     

What does it mean to "send a return message of false when a message violates the timing protocol"?

     

Your proxy sends out a false message and then shuts down.

     

Thu Feb 4 17:03:12 EST 2016

question

     

answer

Do the test files have to be valid JSON expressions?

     

Yes.

     

Do the test expressions have to live up to the message grammar specified in 4 — From interfaces to protocols?

     

No, but if they don’t, the proxy player better reject them in the specified manner.

     

Does the sequence of test expressions have to live up to the protocol specified in 4 — From interfaces to protocols?

     

No, but if it doesn’t, the proxy player better reject the first out-of-order message in the specified manner.

     

Tony suggested a look at the story about Steve Jobs and his interaction with the Smalltalk crew at Xerox for a particularly good example of single point of control from the real world.A programming system allows app devs to easily access its internals, right here and right now. A long time ago, in a galaxy far, far away, people had created programming systems that were way way ahead of their time. The developers became legends, and their code lived up to standards that we discovered only in the intervening time and that many new people still have to live up to.

Wed Feb 3 18:18:20 EST 2016

Tue Feb 2 10:44:07 EST 2016

question

     

answer

The spec says there are 10 rounds, but does not specify that start-round will give the players 10 cards. Can we assume it does?

     

You may assume that a start-round message delivers 10 cards. The specifications for the player say so; the protocol for the remote-proxy player does not need to repeat this statement.

You may not assume that a remote-proxy test plays a complete round or a complete turn.

     

In homework 3 we changed the game to pick up stacks after 6 cards, not 5. Are we using this version or the original game definition?

     

We are using the original player, plus patches for bug fixes but minus patches for the "single point of control" exercises from last week.

     

Also see the additions to 4 — From interfaces to protocols.

Sat Jan 30 17:23:30 EST 2016

Fri Jan 29 22:37:51 EST 2016

question

     

answer

What is a git patch?

     

I picked up my git patching habits on the web, years ago. Try this for now.

     

I added some notes on design reviews and code walks to Projects, Specifics.

Fri Jan 29 09:04:59 EST 2016

question

     

answer

What do you mean by git-diff?

     

What I call a diff is more commonly called a patch. See revised 3 — Development includes maintenance.

     

Do you really want 12 patches when we failed to live up to the "single point of control" guideline from Fundamentals I?

     

My response to this question on Wednesday was bad. Take this as proof that professors make mistakes too. Apologies.
When you fix a problem that is due to a violation of "single point of control" (whether this is a problem of your own making or a problem due to the chosen programming language), submit a single patch with as many lines of code as needed. Explain the patch in the README file.

     

Does Java really not have type definitions?

     

When I speak of type definitions, I mean "type equations" or "equational definitions" of type names, similar to constant definitions in languages such as C or Racket. For example, Rust comes with the capability to state
   type HFrequency = HashMap<String,usize>
so that you can express your data definitions (see Fundamentals I) inside the language. In C++ or Java, you could approximate such type definitions in round-about ways using interface definitions.You could also use class definitions but interfaces bring across the intent more directly. Specifically, you could write something like    interface IFrequency {}
   class Frequency implements IFrequency {
     HashMap<String, uint> h = ...
}

     

Wed Jan 27 10:48:50 EST 2016

Here are some notes on my memo grading. I graded on a scale of 5 points. The grading focuses on:
  • Content, which means your statements fail your own (chains of) arguments or contradict obvious ("googlable") truths;

    I did not judge your choice of, or your evaluation of, languages, which seems to ignore basic insights from programming language research of the past 50 years.

  • stYle, which refers to basic English writing style rules, say, Strunk & White’s "Elements of Style";

  • Organization, meaning you state your thesis and support it properly for each unit of writing or that you use properly formed lists;

  • Grammar and Spelling.

So when you see one of those capitalized letters in the margins of your essay, it means one of the above problems. You might also seee Warning, which is really just a suggestion that you might have accepted a rumor as a falsehood.

Let me add a couple of simple and easy to follow suggestions on writing memos:
  • The first few lines of text are the most valuable space on a memo. Don’t waste them on trivialities, rehashes of your process, or some other nonsense. Get to the point. State your decisions. Introduce your argument.

  • Avoid useless, flowery, fluffy adjectives and words such as "very."

  • Do not use "believe" and "feel" and similar words. Your decision will allocate a good chunk of wealth (and with it, possibly your job) to a particular investment. You want to have done your background research, and you want to express confidence in your decision.

  • Stay reasonably formal, meaning colloquialisms and contractions are out. As a reminder, "it’s" is a contraction. Apostrophes go with possessive.

Tue Jan 26 13:07:40 EST 2016

You must carbon-copy your partner on email communications with the course staff and, when you come see us, you must come as a pair. We will no longer respond to questions from individuals (who have a partner), and we will not respond to messages that go to the wrong email address.

Tue Jan 26 11:39:22 EST 2016

question

     

answer

Why must we link task 1 in 3/ to our solution in 2/?

     

It’s about code reuse.

     

How do you link modules via relative paths in Python?

     

Did I mention that you will learn to hate your favorite language? Find out about the os and sys package and ways to insert paths via system calls.

     

How will you run the program for project 3?

     

We will run it according to your instructions for project 2. See modified project statement.

     

What does take6 mean in bullet 1 of task 1?

     

The name "take5" is the English name for the game. In this bullet, "take6" is just an allusion to the fact that players must now pick up 6 cards instead of 5. I have struck the sentence from the project description.

     

Sun Jan 24 19:57:56 EST 2016

Be sure to bring at least one network-enabled laptop to class tomorrow, 25 Jan 2016.

Fri Jan 22 10:25:53 EST 2016

question

     

answer

What does it mean to parameterize over the number of bull points on a card?

     

Normally a simulation would assign a random number of bull points (between the legal minimum and maximum)? To test a simulation, you want to be able to assign a set number of bull points.

     

Are the stacks discarded at the end of a round?

     

Yes. A round starts with a new deck of (shuffled) cards.

     

What happens when the deck runs out of cards?

     

The assignment asks about this. Make a sensible decision.

     

When the instructions say that we should parameterize the order that cards are handed out to players, should the order be changeable on a per game basis or a per round basis?

     

Per game.

     

What does it mean to parameterize over the number of bull points on a card?

     

Normally a simulation would assign a random number of bull points (between the legal minimum and maximum)? To test a simulation, you want to be able to assign a set number of bull points dynamically (at the beginning of the run).

     

Tue Jan 19 12:22:56 EST 2016

A front-page article in today’s WSJ reports on the persistence of bugs. Please read the lead-in story and reflect on what it means. Two obvious solutions come to mind:
  1. deliver only bug-free software,

  2. create a delivery mechanism that guarantees the installation of patches.

At which one do you think people are more likely to succeed?

Mon Jan 18 15:28:44 EST 2016

2 — Living up to interfaces is out. By the end of today, your git repo will contain a file for-2.txt, which is the promised interface specification in the second project.

Sat Jan 16 23:21:32 EST 2016

question

     

answer

What does it mean to "link" the player into the rest of the system?

     

I am using the word "linking" to mean all levels of integration of the two components, from plain binary to source code. In your particular setting, it would probably mean "source code" integration, allowing you to fix small things in the player that the Foomanistanians deliver.

     

Sat Jan 16 15:12:02 EST 2016

question

     

answer

When the player picks up one of the stacks, are the cards placed in the hand of the player, or are they discarded?

     

The cards are discarded but someone tracks the bull points of each player.

     

Are the spent cards gathered at the end of each turn?

     

The answer to this question cannot be a part of the requested interface. All the player needs to "know" is that new bunch of 10 cards are handed over at the beginning of each round.

     

Fri Jan 15 10:47:45 EST 2016

When a date says "midnight X" it always refers to the end of X, not its beginning.

Several careful readers pointed out a mistake in the rules for 6 Nimmt!. Fortunately, this mistake does not affect your work on 1 — Your Favorite Programming Language. I am fixing such mistakes in-line with strikes and red additions.

Others asked when I will post assignments. In general, assignment n+1 will appear on Monday morning, after assignment n is due. The primary reason is that a follow-up assignment may simulate just the kind of development request you might experience in the real world.

Finally someone wondered about the workload of Software Dev. As I said in class, I usually develop at least one—often several—solutions for a project a couple of weeks before I hand it out. I use Racket but try to restrict myself to a part of the language that is merely as expressive as Java or Python. I then multiply the time I need by 3, which I consider a likely average time across all students. So, if I need a 10-hour day, I expect you to need 30 hours per week—a reasonable time for the central course in your college career.

Mon Jan 11 19:55:21 EST 2016

GIT Session

Instead of the regular lecture on Wednesday 20 Jan 2016, we will conduct a help session on git: its mechanics and its "hygienic" use. Bring your laptop; this will be a hands-on meeting.

(I am glad you asked for the session, and you know who I mean. Students aren’t supposed to know everything, just the essence of what we taught in prerequisite courses. Most importantly, good students know when to ask for help. And git is just one of those topics.)

Thu Jan 7 16:13:28 EST 2016

Welcome!

Please reflect on all the programming languages you have experienced in the past. Then pick your currently favorite language and make sure it is installed on your laptop. Bring (1) a letter-size sheet with the name of your chosen language and (2) your laptop to the first meeting. Fold the sheet and place it front of you on the table in the classroom so that everyone can see which language you like. We will probably conduct a live-coding session during our first meeting.