Showing posts with label cs. Show all posts
Showing posts with label cs. Show all posts

Sunday, June 2, 2013

On the Other End of Spring Semester

After suffering through putting a lot of effort into Intro to ChemE, multivariable calculus, and Honors General Chemistry fall semester, I found spring semester more relaxed, especially since I only ended up taking two engineering classes.  I dropped engineering stats a couple weeks into the semester for multiple reasons, one being that it was in a somewhat inconvenient time slot.  This way I got to eat lunch on Mondays.

Out of my remaining classes, one was Intro to Microeconomics, which didn't require a whole lot of outside work, and another was my writing seminar, which I just didn't care about mainly involved reading.  That left differential equations and my intro to computing class – I took MATLAB.  I wouldn't say either class was easy, but compared to Schrodinger’s equation and triple integrals in spherical coordinates, spring semester on the engineering front was definitely less ridiculous mind bending.

Here’s the rundown:

Introduction to Microeconomics: Since I had AP physics credit and didn't need to struggle through force diagrams and circuits again, I decided to get started on fulfilling my liberal studies requirements. The way this class was run spring semester, instead of problem sets we had to do online quizzes; that combined with the fact that I’d taken half a year of economics during my senior year of high school meant that this class wasn't too high on my I’m-going-to-fail-this-class-if-I-don’t-start-studying-yesterday list.  The material was interesting, and I did still learn some things, especially about consumer/firm theory and market structures.

American Voices: Monumental America: My second and last first year writing seminar.  I liked the discussions and content of this writing seminar better than the one I took fall semester.  However, my last writing seminar probably did more to improve my literary analysis in my writing.  But I’m an engineer, and among other things, I've been told to write entirely in passive voice before.

Differential Equations for Engineers: From what I can tell, a large difference between engineering math classes and math classes for other people is the proofs.  In over eighty math lectures, the closest thing I saw to a proof was a “proof.”  It went something like this: “So this leads to this, which we’re going to assume is true, and then you should believe this because I say it’s true, which means that this is the answer we’re looking for.  Now let’s do an example.”  Not much else to say about this class except that I now know how to separate variables and the professor I had takes some getting used to (including his inability to actually press down hard enough with the chalk on the chalkboard to make visible lines).

Introduction to Computing with MATLAB: or something like that. Everyone just calls it MATLAB. Definitely an intro class, since I did fine without having coded a single program before taking the class. My favorite projects were the ones with graphics (including a MATLAB valentine and several fractals), but MATLAB blackjack was pretty amusing as well.

And lastly,
Basic Rock Climbing: I've said it before, but this is the best PE class I've taken. I technically don’t have to take any more PE classes to graduate, but I've already jumped into cold bodies of water and climbed out of windows. A little more exercise couldn't hurt. Right?  So I enrolled in hiking for next semester.

Sunday, May 19, 2013

The Time Space Paradox

In my recent studies in advanced quantum physics introductory course to computer programming, I have come to the conclusion that you can either be fast or small.  Your program will either take half a millisecond and the memory of a supercomputer or the memory space of a pocket calculator and three years to run.  (Figures may be slightly exaggerated.)

I do have to say that I enjoyed my brief foray into the world of computer programming.  Not enough to become a CS (computer science) major, but enough to maybe take another programming class in the future.  Maybe.  If I’m not too busy memorizing carbon groups and maximizing yields from chemical processes.

Meanwhile, the last month or so of spring semester at Cornell managed to speed past, be incredibly time consuming, and require approximately one hundred percent of my available memory space.  How’s that for a time space paradox?  Besides finishing up my second round of prelims, I had work assignments every week, spent too much some time at the climbing wall, went to almost every pep band event, and ended with finals.

It was a little busy up on the hill.  But spring finally came to Ithaca, and it was a good month overall.

Spring on campus

I didn't fail any of my prelims, heard some good concerts at Bailey, had a lot of fun at lacrosse games, started working on some routes at the climbing wall, and . . . took finals.  No, I don’t really have anything good to say about taking finals.  I had two of my finals in Barton – the gym has an indoor track inside, to give you some idea of how big the space is.  The other one was in the Statler auditorium and the professor and the TAs didn't show up until five minutes after the final was scheduled to start.

All things considered, it was a solid finish to my first year of college. Don’t worry, you’re still going to hear about what I did in more detail. I’m kind of behind on posting, so this is partly a quick update on my life and partly an explanation for the drop off in posts during May. Still to come: a report from the pep band’s day trip to Maryland, some of my more athletic endeavors, several recaps on the semester and year, and probably more about food. . . . Definitely more about food.

Friday, May 3, 2013

Math and Music

It’s said that there’s a connection between the logical realm of math and the more abstract land of music. Scientists have done studies analyzing the rhythmic and structural underlyings of music to try and understand how they help to enhance math skills. They've got the research. I have the real life experience. Now presenting: How to become a math genius in three easy steps with the three Bs: Bach, Brahms, and Beethoven. That time in MATLAB I was reminded of pep band. Which isn't that hard, because a lot of things remind me of pep band.

Anyway, it was the last MATLAB lecture of the semester, and we were finishing up with sorting methods. We’d just done recursion, so the last sorting method we were learning (after insertion and bubble sort) was the merge sort. To start our discussion of the merge sort, the professor asked us if it would be easier to straight up sort a thousand items or merge two sets of five hundred items that had already been sorted. Well, this one time in band . . .

Actually, it’s been a lot of times in band. So the pep band “folders” are stacks of half sheets of music shoved into a pocket-type holder made of construction paper and/or duct tape. Normally, people keep their music alphabetized so they can find it more easily. However, during our busier events (hockey), most people don’t have time to put their music away between sets, so after the game there’s the folder, and then there’s the giant pile of music outside the folder . . . that needs to be sorted.

At this point, you have three options: one, take each piece of music and go through your folder to find out where it goes; two, alphabetize the music outside of your folder and then combine (hint: merge) the two piles; and three, ignore the giant stack of un-alphabetized music by shoving it into your folder and regretting it the next time you have to find a piece of music. Well, if you ask me, options one and two sound a lot like the insertion and merge sorts.

Speaking from experience, if around half your folder is sitting in a heap waiting to be put back into the folder, alphabetize it first so you don’t have to flip through the a’s seven billion times. (Merge sort) Otherwise, just sort each song in the order you find it. (Insertion sort)

And that is how math (okay, computer science, which needs math) is like music.

Thursday, February 14, 2013

For Want of an Asterisk

Saturday morning.  Nemo has just blanketed Cornell’s campus with four inches of fresh snow.  When I step out of my dorm, the snow is fresh and untouched.  That’s because it’s nine in the morning of the first full day of our weekend.

That’s right.  Nine am and I’m about to embark on a two and a half hour coding journey with MATLAB.  I’m a morning person, so I leave my 7:15 alarm on all weekend and go to bed when people are heading out for the night.  Which is why I had no problems when a friend and my current MATLAB partner suggested meeting early on Saturday morning to take a look at the homework.

Since my parents wouldn’t pay for MATLAB I didn't buy MATLAB for my computer, we went over to the lab at RPCC.  Another plus of starting that early was that the lab was empty except for one other person, and he left after a few minutes, so we didn't have to worry about bothering anyone with our talking.

Two and a half hours . . . sounds an awful lot like our Intro to ChemE homework sessions.  Anyhow, I’d looked at the first problem beforehand, so we got that one done in . . . an hour, maybe.  The second problem I hadn't looked at, so I was doing all the coding as I figured out the problem.  I handwrote the code, typed it into MATLAB, and was trying to test it when I kept getting an error message.  Usually, MATLAB’s good about giving you the problem and which line is causing the problem, and it did this time too, but I couldn't understand what MATLAB was trying to tell me.

I turned to Google to explain the error and got something about an array.  What array?  I don’t even know what an array is or how to program one.

Sixty-seven trials later (and extensive use of the pause function – I was told this would be useful in debugging, but I’m not sure the professor would have expected its use this soon), I found the error.  I was trying to multiply a variable by a quantity and typed it as x(2*k+1).  Yep, I forgot an asterisk.  (It should have been written as x*(2*k+1).)  I typed in the asterisk and the program worked perfectly.

Wednesday, February 6, 2013

MATLAB Troubles

I know I did say I was going to write about my first week back at Cornell, but it’s actually not all that interesting, so I’m going to focus on my Intro to CS class.  It’s technically called Introduction to Computing Using MATLAB, but I will refer to it as either Intro to MATLAB or MATLAB from here on out.

I’ve never taken a programming class before, so everything has been completely new to me.  So far I really like the class, especially the actual programming.  During lectures, it’s a little weird learning about how to code without actually getting to code, but the professor is enthusiastic about the class, which is always a positive.

As of a few days ago, I coded my first entire program (we calculated the surface area of an oblate spheroid) with the extensive help of MATLAB’s error detection system.  Honestly, if anyone got a nickel for every time I forgot to end a line with a semicolon, they’d probably be rich by the time I finish this class.  Or at least have enough money to pay for next semester’s textbooks.

Then there’s all those things that aren’t necessary, but are “good form.”  When creating my Intro to ChemE spreadsheets last semester, I was in the camp of people-who-don’t-want-to-scroll-a-lot, so everything would kind of be shoved into whichever cells I could see on one screen of Excel.  Similarly, if I didn’t have that 80-character-per-line good form limit, why waste time scrolling when you can jam five short lines of code into one long line the width of your computer screen?

By the way, who decided that we need both a slash and a backslash?  I found out the difference when I was trying to do a line return after a printed statement.

I’m really not complaining about the class or MATLAB, but rather, pointing out my sometimes utter disregard for style.  Apparently things not only have to work, but also look pretty.

Can’t think of a good way to finish this post, so I’ll go with this one:
end