Mathematica vs Matlab/Octave

Matmaticalab

After 6 years using Mathematica, 7 years using Matlab, and 3 years using Octave on a relatively frequent basis for classes and academic research, I felt qualified to make known my personal opinion on their relative strengths and weaknesses — at least as they pertain to the types of things that I’ve wanted to do over the years.

Mathematica is my go-to option for checking and simplifying symbolic maths. Need to solve a system of seven differential equations? Done. Forgot which integration trick to use or don’t feel like differentiating a variable that’s in a deep nest of functions? Done.  Need to factor a giant polynomial or simplify a hideous combination of arctangents and hyperbolic cosines? Done and Done. It’s also pretty good at quickly rendering 2D and 3D plots and animations. The interactive manipulation features have saved my bacon many a time when I’ve had trouble understanding how a function with more than 2 independent variables behaved. Those of you who think that Maple can do everything Mathematica can do are sorely mistaken. While it’s possible to customize things, it’s pretty frustrating and difficult to make anything look nice enough for print (I sometimes wonder if they borrowed some graphic design concepts from MS Excel 😉 ). Plus, the matrix toolbox, I/O, and memory management systems seem to be something of an afterthought, rather than a central design principle. So I almost always tend to use Mathematica as a kind of supercharged engineer’s notebook — great for sketching models and getting intuition on their behaviors, but not so good at presenting or processing lots of numerical data.

For those numbers-processing/plotting tasks, I typically turn to Matlab when it’s available. This is going to be a little bit controversial with some folks, but I actually love how Matlab tries to force you to re-think your programming task to phrase it in a “matrix way.” I say “tries to force you” because the interpreter has pretty poor performance compared to other languages if you phrase the programs in the standard iterative way. However, if you take the time to “think in Matlab,” you’ll reap more than extreme improvements in performance. You’ll be better slated to formally represent and more accurately understand your data processing procedure. The “heavy lifting” in many of my scripts is done in 15 lines or less, and can be easily described as a matrix equation of some form or another. That makes the writeup look a lot more professional, and makes the procedure easy to replicate. As far as presentation goes, the default graphing capabilities of Matlab are reasonably good for most cases, but can still require some fine-tuning adjustment in softwares like Inkscape before they’re print ready.

When Matlab isn’t available, I pull up Octave. In my experience, Matlab continues to be significantly faster than Octave, but generally the functionality and syntax is pretty consistent between the two. Octave doesn’t have any of the fancy GUI interfaces that Matlab does, but the only ones I find myself missing very much are the disttool and the sisotool —  but that’s just a convenience thing. Those were meant to be aids anyway, not crutches.

To those of you who are furious that I haven’t mentioned Python: I’ve used MatPlotLib+NumPy to generate some beautiful and customizeable plots in the past, but in the end I missed the “workspace” feel afforded by Matlab too much. I know Python has that sandbox mode, but it’s not quite as easy to seamlessly switch back and forth between what’s in your script file and what’s in the sandbox and what’s on the graph. Yes, I do realize just how gorgeous the MatPlotLib plots can be; but for the time being, I’m happy giving my Matlab plots a little post-processing makeup instead of the plastic surgery that they probably need.

Top five ways to lose my respect.

respect

  1. Jump to conclusions about people. There’s nothing more shortsighted than failure to afford someone the courtesy of telling his/her own story. People who exhibit this specific form of prejudice make it difficult for me to believe that their intellect is tempered with wisdom.
  2. Be a meanie. Whether you’re doing it to me, other humans, or our environment, unkindness is a really, really unattractive trait. A coldhearted spirit drains the life out of me faster than the crystalline entity, and I prefer not to spend too much time around such toxic forces.
  3. Be shallow. It is nearly impossible for me to look up to anyone who can’t relate the most time-consuming things in their life right now to a larger plan for making the world a better place.
  4. Be conceited. This can be expressed in many different ways, ranging from subtle but intentional neglect, to overt refusal to make small concessions for the sake of a relationship. In any form, this incarnation of pride is really hard for me (and, I suspect, for those who exhibit it) to see beyond.
  5. Be sneaky. I really don’t mind secrets, because they can easily be lumped into the infinite expanse of everything else I don’t know. Heck, I can even tolerate occasional dishonesty, because it can often be handled with the allowances I already make for normal mistakes in communication or interpretation. But, I can’t think of anything more disrespectful to me than an intentional effort to adjust my thoughts, emotions, or actions without my knowledge or consent. I’m a naturally trusting person, but manipulative folks will find that trust incredibly difficult to regain.

Teaching Philosophy

So, I was working on the teaching philosophy statement, and thought it would be fun to copy-paste it onto my blog. Someone I know thought the first paragraph and main analogy of the essay might be offensive to Christians. I feel it’s just an interesting analogy, approached from a secular perspective. What do you think?

The goal of a teacher is to be the advocate of his or her students, to come alongside them, to guide them toward fulfilling their dreams. As intercessors between future employees and their prospective employers, instructors must be well-respected by both students and industry leaders alike. In almost paradoxical contrast to the rigorous requirements and great responsibility of their role, teachers’ day-to-day tasks and compensation are often unassuming. Their success is measured by the success of their students. I believe that while teachers must certainly be recognized experts in their field, the best teachers are not motivated by research fame and personal ambition. In my own education, I have experienced the negative results of professors who view teaching as a “necessary evil” in their path to scientific stardom. Conversely, I have seen that the best teachers view themselves as parallel and active resources for help and learning rather than as Oracles who graciously let slip the gems of truth.

As a teaching assistant, I have had the opportunity to apply this teaching philosophy in a variety of settings for a number of years. During my first lecture, I told the students that I needed their help in knowing how best to serve them. I encouraged them to speak up, not only with questions, but also with suggestions about my teaching style. At first, students were hesitant — but over the course of the semester, and with some coaxing on my part, the students became comfortable enough to be giving me valuable feedback on my presentation and content almost every week. Since that time, I have been able to develop a teaching style that incorporates a good mix of in-class exercises, “big picture” discussion, and theoretical explanations. I still find consistent student feedback crucial because it allows me to adjust my teaching to the needs of each particular class. My philosophy of coming alongside students, rather than talking down to them has been particularly helpful in obtaining this feedback.

Even in grading, I embrace my role as an advocate for students. In addition to professors who care little for teaching, another problem that I have observed in higher education is the attitude that students are like bottles to be filled with knowledge or shapeless bits of clay to be molded into something useful. While the belief that every student should be shaped into an “A student” may seem harmless at first, I believe that this attitude can lead to unintentional grade inflation and other dangerous oversights. By seeking to maintain a parallel relationship with my students, I gain insights into their own goals and expectations from the course — and can tailor the lectures and office hours to address those specific goals. One of my favorite professors as an undergraduate really inspired me by incorporating into his lectures experiences that he had discussed with my classmates and previous students. I also remember being very struck by his bold approach to grading. It was a difficult course, and he mentioned one time that not everyone should shoot for an “A”. He encouraged us to personally evaluate the level of understanding our goals required, and to work toward that, rather than a particular grade.

As a TA, I try to implement this idea by reminding my students that they are essentially paying me for two completely separate tasks. First, to serve as a resource they can use to gain mastery of a particular set of skills and concepts. Second, to provide an objective assessment of their abilities to future employers. To this end, I make an effort to design a rubric that both accurately reflects the student’s ability to apply the associated set of concepts in the “real world,” and provides a vehicle for me to communicate to the students specific areas of concern. My preference is to assign many homeworks, with relatively low weights in order to provide students with a mechanism to self-assess how well they are learning the concepts they set out to learn; and to assign a large weight to a comprehensive final exam, and final project.

In the many computer science courses I have taken, the mode of instruction that has most benefited me personally has always been the “project.” To me, computer science theory is often much like a scaffold. One of its richest beauties is in its versatility of application. I believe that when students are allowed the freedom to choose an application that interests them, they learn to better navigate the theoretical scaffolding provided by the course. As a part of my philosophy of helping students succeed at their own career goals, it is my hope to design and incorporate at least one such student-directed “capstone” project into each of the courses I teach. As an instructor, it is my greatest desire to guide my students toward fulfilling the destiny that they desire.

Edited, as per Gregg’s advice. 🙂

And we’re back!

Thanks to some hard virus-cleaning work by my brother Jedidiah, Josiahland rises from the ashes like the Phoenix! In light of my new philosophy of life, I’ve updated the tag line from the rather depressing “stay if you like, but don’t expect too much — yet” to something inspired by a quote from my Dad. You don’t always get the results you expect from your work, but there’s always a little joy to be squeezed out of what you do get. Instead of being disappointed when things don’t go exactly according to plan, I’m gonna try to extract all the good things I can from however the year ahead turns out.