Math problems solved on computers

Here is a link to an interesting talk/text about how we could get people to like MATH: use computers for the tedious steps.  http://news.ycombinator.com/item?id=4376306

He has a good point, but I still think children should know how to do math with only pen and paper.

Once you see what the computer can do (solve quadratic equation), then you should be able to solve it on your own too. View source, yes, but also explain source.

Come to think of it “explain source” is quite good as a name for what Minireference is meant to be. This could be the turning point in terms of naming. Come to explain source dot com and learn about anything. For any function/operation/algorithm out there, I will give you a js/py implementation and explain the source code from first principles. For example, a physics simulation engine could be used to teach you classical mechanics, wink wink.

Ok. So I hear you saying now “I am reading this blog and there is one guy saying that computers are good and another guy saying that people need to understand the details and be able to do things with pen and paper. A modernist giving a TED talk and the blogger is some sort of idealist who wants people to actually understand math.” and wondering where the story may be going.

In reality, there are not two opposing views. Both points are important. Computers need to be used to do cool math and physics stuff and demonstrations. Afterwords, the interested student can explore what is under the hood of each function/operation/algorithm whenever he wants to learn how it works. But definitely one should always start with the applications of any given concept. This is the pitch part of any lesson. Why would I want to know about that? People really don’t care about what you have to say in general, and on top of this you will be teaching them math which generally doesn’t get warm receptions as people have phobias and complexes. The pitch therefore becomes that much more important.

Ok I will end this with the summary. To teach concept c, you have to start with a really good story about c, to get people interested, then you show some cool applications of c (possibly using a computer for more wow effect) and then you explain what c is all about. Most importantly (in math) you need to discuss the connections between c and other stuff.

Summer progress

As of changeset 135:2b29bc006dbb in the minireference repository, we have a 70% finished book. Still lacking are certain sections in E&M and Linear Algebra. After today’s reading of some of the Mechanics material, it makes me think that another pass might be necessary there too, in order to really give good explanations.

The text is the problem right now though. I would say that the main thing separating me from the v3.0 release on September 1st is the lack of figures and exercises. A figure is worth a thousand words, and so I think I really need to work on that (TikZ? scanned drawings?). As for exercises, it goes without saying that half of the learning happens while solving exercises so it would be a shame not to have exercises.

There are just about 23 days left before September 1st though. How are we going to do that?
Magic. Magic my friends. We are going to use magic, the skill I learned back in my Electrical Engineering days when I was able to put away n exams and m assignments in one week. Three weeks is a lot of time.

Let’s have a draft ready by the end of the week, then focus on proofreading and inventing fun exercises.

Writing documentation

Today, I heard from hacker news, of an excellent website with UNIX tutorials and Perl code examples. The web-dev context is kind of dated, but the UNIX stuff is still good: UNIX hasn’t changed much since the 80’s so UNIX tutorials don’t age.

I also found an excellent piece of advice for technical writing, i.e., the teacher-student relationship:

Understanding the Characteristics of a Student

The first thing that we need to understand before we start writing about some technical issue is that our reader has a few general, stereotypical qualities which we would do well to incorporate into our documentation strategy. The following list reviews some of the characteristics which will greatly direct your writing.

  • Students think that what you have to say is boring
    • Incorporate pictures into your text. If it looks fun, it is fun.
  • Students are intimidated by what you have to say
    • You may be extremely familiar with your product, class library, or code base, but that is because you’ve been working with it for the last few months. Remember that your reader is probably coming at this for the first time.
    • Tell some jokes. Get things off on the right foot. Make the reader feel as if you appreciate the struggle she has agreed to undertake.
    • Use lots of metaphors to explain things. It is likely that the ideas and theories you want to get across correspond to some daily activity that your reader can instantly feel empathetic with.
  • Students are unfamiliar with terminology
    • For goodness sakes, make sure to include more description than seems reasonable to you. The advanced reader can skim through it and the beginning reader cannot live without it.
    • Make sure you leave enough time to compile a good index, table of contents and glossary. If you’ve been a reader of technical documentation you’ll know that these “extras” are sometimes the most utilized resources. Nevertheless, most authors skim through them at the last minute before printing.
  • Students are insightful, give them a way to send feedback
  • Students learn by doing.
    • Only in theory do people learn by theory. In reality they learn by example and participation. Make sure to give them a lot of code to work through. Include the theory in between the lines. Sneak it in so they don’t realize they are learning abstract concepts.
  • Students have a problem
    • Your readers did not pick up the documentation to learn about the product. They picked it up because they needed to do something with the product. Thus, make your examples useful. Make them cut and paste problem solutions. Takes some time to predict the types of things that your customers will be doing with your code and solve those problems as examples.

Measuring readability

The Flesch-Kincaid readability test
is a very simple metric that calculates how long the sentences
and how big the words used in a text are.

Complicated, long words used in scientific jargon will give
low readability scores.
Carelessly written text with run on sentences and lots of which
and that will score low on the readability scale.
Short sentences with simple words are considered more readable.

Toby Donaldson at SFU has an implementation of Flesch-Kincaid in python. I decided to check how the three chapters of the book score.

Continue reading “Measuring readability”

Chapter order

I just had a conversation with a friend which made me rethink the ordering of the chapters in the book. He asked “Why would someone want to learn Calculus if it weren’t for the physics? Why would you care? It is so much better to learn Calculus with examples from Physics.”

So basically, what the current educational system is trying to do is teach the same material several times, so that people can hopefully get it at a deeper level. In high school you are supposed to learn about Mechanics without calculus, then you learn Calculus in first year University and then you re-learn Mechanics as first year class with derivatives and integrals and shit.

Apparently, the educational system is inspired by ideas-men like
Jean Piaget who thought that:

the intellectual development [is] an upward expanding spiral in which children must constantly reconstruct the ideas formed at earlier levels with new, higher order concepts acquired at the next level.

I wish I could have a talk with this Piaget guy. Trap him. In the jungle or some other far removed place and play educational videos to him, while giving him some exotic mind altering drugs. I would get him so high that his brain would “constantly reconstruct the ideas formed at earlier levels” and see how that feels. “Yeah so actually the electrons don’t really orbit around atoms like planets go around the sun. And Jean, have some more of that tea with the branches floating in it.”

I think Jerome Bruner who’s work:

suggest[ed] that a learner (even of a very young age) is capable of learning any material so long as the instruction is organized appropriately,

is much closer to the truth.

My book if for people who don’t want to be babied at each step by repetitive, monotonous and diluted textbooks. Minireference gets straight to the point, and when I teach you something it is not an analogy, but the full truth.

The problem remains though as to the linearization of the material. In which order do you introduce the subjects? Thanks to my friend’s insight, I think I have figured it out.

  1. High school math (keep current ordering)
  2. Kinematics: use functions like
    function x (t) { 0.5*a*t*t + v_o*t + x_o }
    without knowledge of derivatives.
    But where do these equations come from???
  3. Define the basic ideas of calculus and use them to explain relationships between x, v, a. Show how to do basic diffs and integrals (poly up to quadratic function, one over arr and one over arr squared)
  4. Reset of Mechanics. Dynamics (force diagrams and sum of forces, Newton’s laws, work, energy, momentum, circular motion, etc.)
  5. Differential Calculus with all its full and boring details.
    Optimization etc… try to make it sound interesting.
  6. Integral Calculus with all its full and boring details.
    Connect with Physics concepts and give full derivations of
    physical laws.
  7. Sequences and Series.
    Applications to computational stuff.
    Review Differentiation and Integration with series representation of functions.
  8. Electricity and magnetism.
  9. Linear algebra.
    Review vectors and show matrices.
    Theoretical stuff.
    Proofs.

I am not sure any more if the above makes sense. Sure Calculus will be much more interesting if you know Physics, but teaching a preview-to-calculus chapter sounds like a Piaget kind of thing to do.

The current intro to Calculus is based on file downloads. File size = f(t) and
the download speed is f'(t). I kind of like that since it makes Calculus able to stand on its own.

Physics IS kind of delayed in the book though. Delayed because Diff. Cal. is a full 20 pages, integration is another 40 pages and then SeqSeries for 10 pages. Not to mention that I have to introduce Vectors too, or else the whole Force diagrams and 2D motion is going to be tough.

So to answer the question “how early can Mechanics come in the book” I must say I am undecided. Should we split Calculus into parts?

High school math:

Physics: Basic tools, Kinematics, Projectile motion

Easy calculus: Differential calculus (explain where x,v,a rel’ns come from,
fundamental THM, simple integrals.

Vectors:

Mechanics:

Useful calculus: Optimization. Related rates. Polar coordinates. Center of mass. Complex numbers. Sequences and series.

Periodic motion: circular motion, angular motion, sin and cos review, angle = phase, sound and waves.
Bonus topics: Fourier series, filters (too advanced?)

Boring calculus: Differential equations. Integration techniques (for E&M).

Electricity and Magnetism:

Linear algebra:

Next book will start from: Advanced calculus: multivariate calculus, and vector calculus.

Overall, there will be some physics in the math chapters and some Math in the physics chapters.
Math and physics = Yin and Yang.

TOOLS

In web-dev, it is all about the tools. And in the last couple of days I have found some kick ass tools: khan-exercises and  piscript/TikZ.

Several of my first clients insisted on having a lot more exercises to practice on. One girl, cancelled a purchase after I told her that my book was “a whole course, not just an exercise pack”. She said “all I need is exercises.” I had blueprints of a python “exercise generation” algorithm, but what I see in the khan-exercises framework is much much better. Also it is written in js, so can be deployed ANYWHERE. Thank you all. That is, like, the best Christmas present ever.

On the other hand, the book was seriously missing illustrations. I did well so far with Preview on the MAC and results from google image searches, but it is time I started producing my own images. The best tool for this is a programming language for graphics. The specific choice, doesn’t matter too much. It could be PostScript scripted in python (i.e, PiScript) or it could be the high level abstraction TikZ language that works with pgf directly from a .tex file. We will see. Either way, scripted illustrations are the way to go in 2012.

As an example consider this Figure I generated in one evening for my Thesis Proposal:

The code that generates (a) is:

\usetikzlibrary{backgrounds,scopes}
...
\begin{tikzpicture}[node distance=2.0cm,>=stealth,bend angle=45,auto]
    \tikzstyle{station}=[circle,thick,draw=blue!75,fill=blue!20,minimum size=5mm]
    \tikzstyle{every label}=[black, font=\footnotesize]
    \begin{scope}
        % MAC channel
        \node[station] (Tx1) [label=left:Tx1] {};
        \node[station] (Tx2) [label=left:Tx2, below of=Tx1] {};
        \node[station] (Rx) [label=right:Rx, right of=Tx1,yshift=-10mm] {}
                            edge[] node[swap] {$\downarrow$} (Tx1)
                            edge[] node {$\downarrow$} (Tx2) ;
    \end{scope}
    \begin{pgfonlayer}{background}
      \filldraw [line width=4mm,join=round,black!10] (Tx1.north -| Tx1.east) rectangle (Tx2.south -| Rx.west);
    \end{pgfonlayer}
\end{tikzpicture}

 

This is the level of abstraction that I like.

FIX MY BACK

Ever since I discovered python, I have had back problems.
No seriously, the power that is a modern computer and the scripting/programming powers of python (+ libraries) is so amazing that my attention becomes entirely focused on the computer at complete disregard to the rest of my body. Slouched — this is how I am, day in and day out while working on .tex, .py, .c .html etc… files. Not to mention reading.

Bad posture is a serious problem, and I vow to fight. I have had enough. Four years of chronic back pain is enough.

What are you going to do about it?

Stand up straight.

Sit down.

Keep back straight.

Yey. WP installed.

I started at 20:26:54 EST and I am done at  21:18:11 EST. cool.

Welcome to the new wordpress blog. Over the next days, I will import content from the text file, but now I feel like it is manifesto time.

What is minirefernce? Minirefernce is the revolution!