On this page:
Fundamentals I
DrRacket

Fundamentals I

teach vs. learn

This website is for a prior semester of CS2500. Please go to http://www.ccs.neu.edu/course/cs2500 for the current semester, and update your bookmarks accordingly.

Welcome to Fundamentals I at Northeastern University, College of Computer Science.

This course is an introduction to computing and programming. Its major goal is to introduce students to the principles of systematic problem solving through programming and the basic rules of computation.

The course does not assume any prior programming experience. It is therefore suitable for all freshman students—majors and non-majors alike—who wish to explore the intellectual ideas of the discipline. It does assume a basic familiarity with arithmetic and algebra, and it demands a basic degree of curiosity, self-discipline, and willingness to work with others.

image

Blog

Wed Dec 3 20:24:00 EST 2014

There was a typo in the previous blog post, that has now been fixed. The old signature and purpose statement read
; make-all-updated-paths : [List Path] -> [List Path]
; For each path, make all more progressed paths
; Note that the most progressed state for a path is at the FRONT of the list
and has been updated to
; make-all-updated-paths : Path -> [List Path]
; find all paths that are possible one-step advancements of the given path.
; Note that the most progressed state for a path is at the FRONT of the list

Wed Dec 3 14:55:49 EST 2014

The homework is extended 24 hours, until tomorrow at 7pm.

Below is some help with problem 7. You should write the helper functions for which we have given you signatures/purpose statements for below.

; A Path is a [List State]
 
; get-a-final-path : [List State] [List Path] -> Path
; Get a path to a final state if possible
(define (get-a-final-path most-progressed-states all-paths)
 (cond [(any-final-states? most-progressed-states)
        (find-the-path-with-final-state all-paths)]
       [else (local [(define new-paths (foldr (λ (p sofar)
                                                (append (make-all-updated-paths p) sofar))
                                                '() all-paths))]
               (get-a-final-path (map first new-paths) new-paths))]))
 
; any-final-states? : [List State] -> Boolean
; Are any of these states, final states?
 
; find-the-path-with-final-state : [List Path] -> Path
; Find the path which contains a final state
 
; make-all-updated-paths : Path -> [List Path]
; Find all paths that are possible one-step advancements of the given path.
; Note that the most progressed state for a path is at the FRONT of the list

Mon Dec 1 16:15:49 EST 2014

There is lab this week!

Despite rumors to the contrary, we are indeed having lab this week.

Mon Dec 1 16:15:49 EST 2014

Did you leave a backpack in exam 2?

Someone did. If you are that person, your backpack awaits you in the CCIS main office (WVH 202).

Thu Nov 20 21:44:10 EST 2014

We have made a slight change to the weight we will assign to quizzes and homeworks when computing your final grade. The changes are shown in red:

exam 1

   

25%

   

exam 2

   

30%

   

problem sets

   

30% 35%

   

we will drop the worst homework grade

daily quizzes

   

10% 5%

   

whim

   

5%

   

Thu Nov 20 21:41:13 EST 2014

Code from Prof. Ahmed’s 11/17 and 11/20 lectures: interpreter and Y combinator.

Thu Nov 20 18:06:57 EST 2014

Here’s the code from the regular-track lecture this morning. It’s the first half of an interpreter; we’ll finish it off on Monday.

Fri Nov 14 17:52:09 EST 2014

Code from Prof. Ahmed’s 11/13 lecture: generative recursion and accumulators.

Fri Nov 14 16:52:13 EST 2014

Exam 2 review sessions will be held Sunday Nov 16th 4:00-6:00 PM, at the following locations:

105 SH: Prof. Ahmed’s section

168 SN: Profs. Shivers and Lerner’s sections

108 SN: Prof. Razzaq’s sections

Exam 2 Time and Locations

Exam 2 will be held Monday Nov 17th 6:00-9:00 PM, at the following locations:

210 and 212 WVH: Prof. Ahmed’s section

108 SN: Profs. Shivers and Lerner’s sections

101 CH: Prof. Razzaq’s sections

Tue Nov 11 22:00:00 EST 2014

On problem set 10h (honors), we forgot to include the structure type definition for bigger. It should be the same as on problem set 9h, namely:

(define-struct bigger (lego left right)).

Tue Nov 11 12:57:55 EST 2014

This week Phillip Mates will not be holding his Wednesday 4-6pm office hours. He will hold additional office hours on Thursday the 20th from 2-4pm.

Mon Nov 10 09:29:39 EST 2014

Here is a sample exam2 for you to practice with.

For students in the honors section, here is a sample exam2 honors supplement.

Mon Nov 10 09:29:09 EST 2014

Code from Prof. Ahmed’s 11/10 lecture: graphs and sorting.

Mon Nov 10 11:35:46 EST 2014

No appointments / office hours on Veteran’s Day.

If you made an appointment with Prof. Shivers for Tuesday 11/11, send email and reschedule – it’s Veteran’s Day.

Mon Nov 10 11:35:46 EST 2014

We’ve posted the in-class code for the last several lectures in Prof. Shivers’ section of the class.

Fri Nov 7 10:52:55 EST 2014

For this week only, Julia Ebert will be holding her office hours from 4-6pm on Saturday (instead of 2-4pm Saturday).

Fri Nov 7 10:52:00 EST 2014

Code from Prof. Ahmed’s 11/6 lecture: more BST and graphs.

Tue Nov 4 23:06:09 EST 2014

Correction on Problem Set 9h (honors): There is an error in the data definition of Lego. The label of a Lego should be a String (not a Number). That is:
(define-struct lego (label color width))
; A Lego is a structure:
;    (make-lego String Symbol Number)
; interpretation: (make-lego l c w) is the lego brick
; with label l, color c, and width w (in pixels).
The text of Problem 9 as well as all examples in Problems 8 and 9 have been updated to reflect this change.

Clarification on data definition of [Sequence X] (given in Problem Set 8h): Some students were confused by the interpretation for [Sequence X], specifically the clause of the interpretation that explains what sequence a String represents. We have made a minor change to clarify; see Problem Set 8h. The interpretation now reads: "a String s’s sequence is its individual characters (substrings of length 1) and is a [Sequence 1String] (where 1String is a String of length 1)".

Tue Nov 4 22:58:40 EST 2014

Code from Prof. Ahmed’s 11/3 lecture: trees, binary trees, and binary search trees.

Tue Nov 4 17:07:07 EST 2014

Exam 2 We have set the date of the second exam: it is Monday November 17, 6-9 pm. We’ll post the location(s) of the test at a later date...

Fri Oct 31 23:52:10 EDT 2014

Code from Prof. Ahmed’s 10/30 lecture: cartesian and S-expressions.

Thu Oct 30 15:30:00 EDT 2014

In PS8 we ask you to change the game mechanics for Tetris. If you decided to update the scoring logic to match the new game mechanics then, a) you are awesome and b) please document the adaptations in your homework submission.

Thu Oct 30 13:55:00 EDT 2014

It is time for a homework partner switch! You will work with this new partner for the remaining problem sets, starting with PS9. You have the option to choose your partner this time around. This partner must be from the same lab as you, but can be a partner you’ve previously had. You have until 2pm Friday Oct 31st to choose a partner and inform your lab’s head TA, via email, of your partnering. Your lab’s head TA will be sending out an email with all of this information shortly. You can "Reply" to the email with your preferred partnering, CC’ing your new partner, so you two are on the same page.

These are the instructions from the TAs, who are being more flexible and awesome than the professors gave them credit for in class ;-)

Sun Nov 2 23:58:57 EST 2014

Homework 9 is up.

Mon Oct 27 21:37:10 EDT 2014

Here is code from Prof. Ahmed’s 10/27 lecture: biggest, sets as lists, sets as functions.

Sat Oct 25 11:29:22 EDT 2014

We’ve slightly altered homework 8 to bring the game spec into full compliance with Tetris: when any row of the board is completely full of blocks, that row of blocks should be deleted, and everything above moved down a row.

Fri Oct 24 22:59:36 EDT 2014

Homework 8 is up.

Fri Oct 24 22:52:17 EDT 2014

We have posted more code from recent lectures: the fast and slow biggest code, and the definitions and signatures of several loop functions.

Note: Code posted for one section of the class is frequently code that also appears in the lectures of other sections. For example, Prof. Ahmed has posted code for the snake game – which may be of interest to students in Profs. Lerner, Razzaq and Shivers’ sections.

Fri Oct 24 14:50:13 EDT 2014

Here is code from Prof. Ahmed’s 10/23 lecture.

Thu Oct 23 23:44:11 EDT 2014 Here is the code from Prof. Shivers’ 10/23 lecture, and the code from Prof. Lerner’s 10/23 lecture.

Thu Oct 23 15:30:11 EDT 2014

Problem 1 of homework 7 is confusing everyone. The problem has a definite answer, but it requires exploring some concepts we haven’t really gone into in detail in the course. Feel free to take a stab at it... but we aren’t going to grade it. Wrong answers, no answers, right answers – none of the above will affect your grade.

Tue Oct 21 22:47:00 EDT 2014

Here is code from Prof. Ahmed’s 10/16 lecture and her 10/20 lecture.

Tue Oct 21 21:20:00 EDT 2014

Many of you are Mac users, and many of you Mac users have heard the news and jumped on the new OS, 10.10 Yosemite. In addition to the pretty new flat UI, and iOS interrogations you may have found one of the best new features of the OS is the crash you experience when trying to load DrRacket.

To solve this problem follow the steps listed below.

1. (Optional) Remove your copy of Racket, by dragging the whole folder into the Trash.

2. Download and Install a nightly build from Northwestern University.

3. Possibly reinstall the course plugin.

For those of you interested, here is the bug causing the problem.

Sun Oct 19 22:09:19 EDT 2014

The new homework assignments are up. Note that we are back to Thursday due dates.

Thu Oct 16 10:43:43 EDT 2014

Missing your phone? If you left your phone in Prof. Shivers’ lecture this morning, send him email.

Or you could call... oh. Better send email.

Wed Oct 15 23:28:30 EDT 2014

Exam time and location

The exam will be held 6:00-9:00 PM, at the following locations:

10 BK: Prof. Ahmed’s section

200 RI: Profs. Shivers and Lerner’s sections

108 SN: Prof. Razzaq’s section

Tue Oct 14 15:03:09 EDT 2014

Homework correction: the initial release of homework 6 provides a language level of "ISL" (that is, "Intermediate Student Level"). That was an error.

There’s no harm in using ISL, but we had actually intended "BSL" ("Beginning Student Language"). We’ve fixed the homework assignment itself. You can successfully write the assignment using the Beginning Student Language. (However, if you used features from ISL, due to our error, it will absolutely not count against you.)

Mon Oct 13 17:57:06 EDT 2014

Review sessions!

There are no labs this Tuesday (10/14). However... your friendly Fundies 1 tutors and TAs will be on hand to hold review sessions at the lab times. Attendance is optional — but if you’ve got problems or issues related to material in the class, and you’d like some help or review before the big test on Thursday, bring them to the review session and get some help.

Mon Oct 13 14:24:13 EDT 2014

The exam1 review session for HONORS students will be held Tuesday, Oct 14, 8pm to 10pm in Shillman 135.

Fri Oct 10 10:56:10 EDT 2014

Here is code from Prof. Ahmed’s 10/9 lecture.

Fri Oct 10 18:30:31 EDT 2014

Homework 6 is up. Have fun! (No, really.)

Thu Oct 9 19:24:42 EDT 2014

Here are the versions of the snake game from Prof. Lerner’s Monday, Wednesday, and today’s lectures.

Tue Oct 7 00:16:05 EDT 2014

New homework partner pairings were sent out last Friday, Oct 3rd, by TAs. You are expected to work on PS5 and the subsequent problem sets with your new partner. If you did not receive a partner pairing email (check your spam folder), please contact the head TA of your lab.

Tue Oct 7 00:10:39 EDT 2014

Here is a sample exam for you to practice with.

For students in the honors section, here is a sample exam1 honors supplement.

Tue Oct 7 00:10:39 EDT 2014

Here is code from Prof. Ahmed’s 10/6 lecture.

Tue Oct 7 00:07:40 EDT 2014

Sadruddin Saleem will be holding his office hours from 3-5pm today (Tuesday) instead of 5-7pm.

Mon Oct 6 19:26:02 EDT 2014

Homework 5 has a small bug: we said "The sum of a box’s height, weight and length must be 62 inches or less," when we meant to say "The sum of a box’s height, width and length must be 62 inches or less." The assignment has been fixed.

Fri Oct 3 18:54:27 EDT 2014

Homework 5 is up.

Fri Oct 3 11:50:13 EDT 2014

Here is code from Prof. Ahmed’s 10/2 lecture.

Thu Oct 2 13:24:11 EDT 2014

The code from Prof. Shivers’ class this morning (with the data definitions for the snake game) is available.

Wed Oct 1 21:28:22 EDT 2014

Please note: Exam 1 will be held at 6:00 pm - 9:00 pm on Thursday 10/16, at 10 BK, 200 RI and 108 SN.

Wed Oct 1 18:43:01 EDT 2014

Some students have had some questions regarding the relevance of the Design Recipe to the grading of homework 2. We did not require strict adherence to the Design Recipe, but we did require you to code to the standards we were showing in class. In practice, this meant that we required unit tests, purpose statements and so forth, but we didn’t require templates.

Tue Sep 30 22:36:13 EDT 2014

Here is code from Prof. Ahmed’s 9/29 lecture.

Tue Sep 30 13:48:44 EDT 2014

Sadruddin Saleem will be holding his office hours from 3-5pm today instead of 5-7pm.

Sun Sep 28 23:48:44 EDT 2014

Homework 4 is up.

Mon Sep 22 14:48:48 EDT 2014

Here is code from Prof. Ahmed’s 9/25 HONORS lecture.

Here is code from Prof. Ahmed’s lecture in Prof. Lerner’s section.

Thu Sep 25 12:15:10 EDT 2014

The current homework asks you to show "box representations" for structures. How? We’ll be perfectly happy with simple ASCII art, e.g.

;;; Here's a box with three compartments:

;;; +----------------------+

;;; | Top/left | Top/right |

;;; +----------------------+

;;; |        Bottom        |

;;; +----------------------+

Tue Sep 23 12:25:10 EDT 2014

This week, office hours held by Elin Carstensdottir on Tuesday (today) from 2pm to 4pm will be moved to Wednesday 5pm to 7pm. Her normal Tuesday office hours will resume next week.

Mon Sep 22 14:48:48 EDT 2014

Here is code from Prof. Ahmed’s 9/22 lecture.

Thu Sep 18 22:24:42 EDT 2014

Here is code from Prof. Ahmed’s 9/18 lecture.

Thu Sep 18 11:17:18 EDT 2014

Homework two asks you to use the Design Recipe. As we’ve only introduced the design recipe this Wednesday, we are going to relax that. So you do not need to show templates. However, we still expect good, well-designed code – a poorly-designed program that works perfectly is not going to get full credit. (Such code in the real world would get you either fired, or – how to put this diplomatically? – shifted over to the Q/A team.)

So we will expect your submissions to be clear, well indented. We would expect you to include tests, since we’ve been doing that in lecture for weeks.

If you do show templates, that will only help you – for example, if you make a mistake on your final code, but you show a correct template, that would get you some partial credit.

Going forward, e.g., on homework 3 and after, we will expect you to follow the design recipe.

Wed Sep 17 11:21:42 EDT 2014

Prof. Shivers’ office hours have moved to Monday 10:30 am.

Wed Sep 17 11:21:42 EDT 2014

Homework 2, problem 1 named the input to the favorite-star function l. That’s an "ell," the letter occurring after "k" and before "m" in the alphabet, not a one, the digit occurring after zero and before two. But it looks a lot like a one, in a sans serif font on your web browser, so it’s easy to get confused.

We’ve changed the name from "l" to "sq-len" to make it less confusing.

Mon Sep 15 19:13:25 EDT 2014

The links to the second edition of How to Design Programs (also known as "2e HTDP") were pointing to a different book. These broken links have now been fixed – they point to the right place.

Mon Sep 15 09:51:31 EDT 2014

Joey’s office hours will be switching from 6pm-7pm to 5pm-6pm tonight to accomodate the Arduino workshop. Regular schedule will resume next week.

Sun Sep 14 14:48:48 EDT 2014

Homework 2 is now posted on the web site.

Sun Sep 7 18:34:19 EDT 2014

This message is for students in Prof. Ahmed’s section who are also enrolled in Enhancing Honors. To avoid the conflict tomorrow (Monday, Sept 8) between Honors lab and the Enhancing Honors class, we have have moved Honors lab TOMORROW ONLY to an earlier time: 4:40pm to 6:20pm. The Lab locations are the same as those listed on the Class Schedule.

Fri Sep 5 17:56:46 EDT 2014

Homework 1 is up on the web site. It is due in this coming Thursday.

Thu Sep 3 18:03:26 EDT 2014

Welcome to CS2500. This is section of the course web page is the "blog" – we recommend you check it daily, as we post news about the class here.