A new semester

I just started a new semester at UIC and, with one notable exception, it’s starting off well.  This is my last full semester at UIC, so I’m almost finished with my Computer Science requirements and starting to shift into my BioE classes.  The classes I’m taking are:

Artificial Intelligence (CS)
Object-Oriented Languages and Environments (CS)
Neural Modeling (BioE)
Discrete and Continuous Signals and Systems (BioE)
American Civilization Since the Late 19th Century (Gen Ed)
Industrial Desing I (auditing; fun!)

The AI class is taught by an Eastern European joker who sounds like Ah-nold and goes by Piotr.  He’s got a hilarious teaching style, but comes to class ~10 minutes late every time.  I’ve been told that the teaching style gets old at some point and that this class is kind of disappointing, but for now I’m enjoying it.

I took the OO class less out of interest than schedule fitting, but now that it’s started I’m starting to get excited about it.  We’re learning Smalltalk right now, a programming language that’s pure Object-Oriented (everything is an object!) that I’ve (idly) wanted to learn for a while.  One of my interests is Physical Computing, and it seems like a pure OO language might be ideally suited to that sort of interface.  We’ll see if I still feel that way once I actually start writing code in Smalltalk, but for now I’m hoping to do some sort of experimentation in that direction.

The two BioE classes are what drove the shape of my schedule this semester.  If I want to complete my minor I’m going to have to let it control my schedule until I graduate, more or less.  The Neural Modeling Class is taught by Dr. Jim Patton who also teaches at Northwestern and has a lab at the Rehabilitation Institute of Chicago.  Last year he gave me a tour of his lab and they’re doing some great research on brain plasticity and learning (and they’ve got some great toys!).  We’re going to spend most of the class learning how to model neurons in Matlab.  Needless to say, I’m really excited for this class.  The Signals and Systems class looks to be another mildly interesting ECE class.  It’s the first one that really incorporates differential equations, so I’m interested to see how much of that math I’ve retained in the intervening year.

American Civ seemed like a pretty decent way to fill a gen ed requirement and flesh out my knowledge of American history and politics.  The  prof is blustery old man who seems pretty full of vim and vigor despite the fact that he’s retiring this year.

I’ve been trying to take an Industrial Design class almost since I started going to UIC, and as you might have deduced, it is the notable exception I mentioned at the beginning of this post.  It is so notable in fact, that I’m going to have to devote an entire post to it.  All I’ll say for now is that I’m drowning in red tape.


4 Responses to “A new semester”

  1. 1 Matt September 3, 2009 at 6:01 AM

    I’ve wanted to learn small talk for a really long time but I’ve never got around to it. That’s awesome, you’ll have to tell me about it.

    Have you ever looked at a functional language? You should check it out, it’s like the polar opposite. I learned scheme myself, but there are others.

    • 2 ashanan September 3, 2009 at 6:10 AM

      We haven’t really done anything yet, but I can tell you this. Smalltalk has some weird ass syntax.

      I don’t really know that much about functional languages. What’s their deal?

  2. 3 Matt September 3, 2009 at 7:04 AM

    Some key features of functional languages: immutable variables, no loops (only recursion!), everything is a list/stack, things like map/reduce/filter.

    It’s pretty bizarre, to compare some javascript to scheme:

    Javascript average function:

    var a = [1,2,3,4,5];

    function myAverage(myIntArray) {
    var sum = 0;
    for(var i=0; i<myIntArray.length; i++) {
    sum += myIntArray[i];
    return sum/myIntArray.length

    return myAverage(a);

    The average function above, in scheme:

    (define (myAverage myIntList length sum)
    (cond [(empty? myIntList) (/ sum length)]
    [else (myAverage (rest myIntList) (+ length 1) (+ sum (first myIntList)))]))

    (myAverage (list 1 2 3 4 5) 0 0)

    Scheme uses "S-Expressions", like LISP. In Scheme, operators come first. So 2+2 becomes (+ 2 2), or a / b becomes (/ a b).

    With S-Expressions, everything's a list. When we add 2 and 2 to get four it's actually a list composed of 3 elements. +, 2, 2.

    You can see how it would be easy to parse, our final project in the class was to write a scheme interpreter in scheme. S-Expressions translate directly to parse trees that can get evaluated, if you were parsing english operators are 'verbs', literals are 'nouns', and lists are sub-trees.

    Variables are immutable, so you can pass length + 1 to the function, but you can't *add* 1 to the variable length. This rules out for-loops, which rely on "accumulators" to help you keep track of where you are in the list/array.

    There also aren't any globals, any variables used have to be passed in, and because variables are immutable functions can't have "side effects", they can only return values. So, stuff goes in, value comes out. Because of this functional languages are very easy to test. You can also see why financial institutions make use of them.

    But it gets cooler! You can use "higher-order functions" like map, which maps a function to every element of a list, or filter which returns a new list of elements from the first list that pass the "filter", or apply which applies a function to each element of a list in turn to reduce it down to a single value.

    (define (mySum myIntList)
    (apply + myIntList)

    (mySum (list 1 1 1))
    ;Returns 3

    Here you pass a lambda function which will be applied to each element of the list:
    (define (myDouble myIntList)
    (map (lambda (f) (* f 2)) myIntList)

    (myDouble (list 2 3 4))
    ;Returns (list 4 6 8)

    This maps the doubling lambda to the list that is the result of the filter operation, which reduces the list to only even numbers;
    (define (doubleEvens myIntList)
    (map (lambda (f) (* f 2)) (filter (lambda (f) (equal? (modulo f 2) 0)) myIntList))
    (doubleEvens (list 1 2 3 4 5))
    ;Returns (list 4 8)

    Once you start thinking about map, filter, and apply (or "reduce" in python) you'll start seeing just how much can be built out of those three basic functions. It's pretty interesting stuff. You might have seen those ideas somewhere else too (http://en.wikipedia.org/wiki/MapReduce).

  3. 4 Matt September 3, 2009 at 7:06 AM

    Man I didn’t realize how much I just wrote, that’s kind of embarrassing.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s



September 2009
« Jul   Jan »

%d bloggers like this: