Why Mathematics? > Why Mathematics?
Programming as Mathematics
Nation of One:
Let me just say that I am not always enthusiastic about learning. I still lean strongly in the direction of nihilistic defeatism. It is just that, since I am no longer drowning myself in alcoholic oblivion, for the moment, "particular kinds of programming and mathematics" (as well as particular kinds of philosophy of a defeatist, pessimistic, and nihilistic nature) seem to stimulate this angst-filled brain that protrudes as an appendage of this egg-devouring stomach which is my true inner being, the Will.
It is probable that, because of the career-oriented mentality of industrial society, I am often left wondering what the point is in my "intellectual" interests. In other words, when one is not employed or never has been employed as a "programmer", one does not identify oneself as such.
So, while reading Stepanov's Elements of Programming (a hard copy) away from any electronic devices, focusing on only a few pages of a time, I try to slow down so as to appreciate the beauty of the classic mathematical notation. It really does present programming as a mathematical discipline. The mathematical notation he uses is elegant. The book is dense. It's not a book of tips and tricks. I have stopped collecting hard copies of books, but for this I made an exception. I treat it as a holy book, if there can be such a thing. Maybe "canonical text" is a more appropriate term.
Looking for guidance on how to approach this text, and really wondering what motivates my continued interest in this craft, I found a talk given by Stepanov. While he may be addressing future and current "employees", this does not prevent me (and others out there like me) from being a little bit inspired. If we are stimulated by what we are tinkering with, why should we feel we are "goofing off" just because we are not working in a corporate or academic setting?
I think of my great love for Schopenhauer and testify how one who stood totally outside the halls of academia has made the greatest impression on me.
Maybe I am writing this now as a note to myself, for when I question my motives for tinkering around with the ideas I tinker around with.
I will place a link to the talk here.
Stepanov says that his book presents practical programming as a mathematical discipline. Programming is an intellectually stimulating activity. I sympathize with the youth who may feel drawn to it but are put off by the confusion ... I cannot imagine how agonizing it must be for someone to have to feign interest in some business oriented web-development project as an "employee" when he would be content thinking about number theory.
Ah, I know I must sound like a confused and rebellious teenager. One would think, by the time one reaches my age, one would have surrendered to the economic forces that fuel the industries (gaming, sports, music, entertainment, advertising). Forever outside of all this, it is my destiny to make my way through this life as a stranger in a strange land, as a free spirit who has no profession, no title ... which amounts to having no identity in our world.
Stepanov claims that programming is an ancient activity, that it was not invented by Bill Gates or Steve Jobs ... that it is a thousand year old activity and the name of it is MATHEMATICS. With mathematical notation, Stepanov goes over a dense set of algorithms that date back thousands of years to ancient Egyptian scribes. They were doing PROGRAMMING. I'm not talking about creating video games, but mathematical computation, of course.
Now I know why I am drawn to this man's book. He says that programming and mathematics are literally the same discipline. So, my interests are not tied to finding a "position" in the world, or to putting bread and eggs into my stomach ... it is just a very stimulating activity that interests me, and it would interest me even without the electronic/digital machinery, although I must admit, I do appreciate the complexity of how these ones and zeros (on/off switches) are transformed into meaningful representations for us.
Stepanov says, "Mathematics is a science of numbers and shapes."
This is a controversial statement, since we are told mathematics is a science of formal theories ... He does not believe this. He says Mathematics is about numbers. I like where he is going with this. For too long we have been told that Computer Science itself is a branch of Mathematics, but "programming" is lowly grunt work that does not require any appreciation for mathematical concepts. This is not the case. Arithmetic and basic operations are mathematical by definition. In other words, when one hears "Computer Science" one thinks of higher mathematics, but when one hears "programming" one thinks of trouble-shooting device drivers and creating applications for operating systems.
Anyway, they can throw us off the grass, lock up the libraries, charge money for internet access, and turn universities into business schools and vocational training centres, but they have no locks they can place on our minds. They cannot send us a bill for enjoying our own imaginations.
I am very much interested in this Alexander Stepanov character. Even though he may be employed by a corporation, he belongs to humanity ... I mean, he is a citizen of the world, so to speak.
Stepanov
alternate link: stepanov
Nation of One:
To supplement my reading of Elements of Programming, which, as I mentioned, is quite dense, consisting of mainly mathematical notation - which was why I purchased the hard copy, something I have not allowed myself to do in quite some time, I was very close to ordering From Mathematics To Programming released in 2015. I still may, but I found the draft of the book called "Three Algorithmic Journeys" at "stepanovpapers" ...
I think you may find this one interesting, Holden. These ideas are not original, but ancient.
I can always take notes like a monk into the sketchbook I call "Math Diary / Computational Sketchbook".
Maybe Stepanov's book projects will help me make sense of what I am interested in ... these ideas are ancient, and I think he may be able to help me make some connections ... I can't let my outsider status rob me of this mathematical inheritance.
I guess I had thought that since all my studying never got me any "gainful employment" that I would transform into some crack-pot madman were I to continue in this manner, as if it were perfectly acceptable to spend one's entire life getting nowhere fast. I may have even gone on a ten year binge. Now that the fog is clearing, I realize that employment and a passion for deeper understanding are hardly even related.
As even Stepanov said in the talk I linked to above, "In our society, deeper understanding is not appreciated."
Yes, if what one is studying is not going to lead to financial security, then many people consider it a waste of effort. Maybe instead of "The Cave Is Empty" I should call this message board, "For Madmen Only".
If you click on the above link (this one is worth saving to a hardrive or flashdrive, filed under mathroots or something), notice on page 17 or so where Stepanov is going over some "intuitive proofs" such as the ones for (a + b)^2 = a^2 + 2ab + b^2 and pi > 3.
I wonder if this is related to what you were inquiring about, as far as the relevance of Schopenhauer's call for a revision of Euclid's proofs. He must have been referring to Elements.
Schopenhauer's criticism is that Euclid mixes the genuinely geometrical with the spurious logical proof.
Something that is spurious seems to be genuine, but is false.
At least he took notice of Euclid. Do our so-called "world leaders" bother to read Euclid?
I wonder how one would go about revising Euclid's Elements. Would you just cut out the spurious logical proofs and leave the genuinely geometrical which appeals to our intuition? Leave that kind of task to someone else. It's certainly not MY calling.
What about if someone is born blind? They must still possess some kind of representation of three-dimensional space.
Another thing Stepanov mentions on page 11 of Three Algorithmic Journeys (the 2013 draft of From Mathematics to Generic Programming c. 2015) is that mathematical proofs are essentially a social activity.
Nation of One:
I have to admit, going through From Mathematics to Generic Programming is much more enjoyable than Elements of Programming. Maybe it will be just what I needed to motivate me to forge ahead.
One really has to detach and isolate in order to focus. I don't have to justify the time I spend studying.
Now, when I experimented with pair-bonding, back in the 1990's, my "studies" became very problematic. She resented my interests in math, programming, and even philosophy - unless I was helping her write a paper for English class ... or helping her friend with math.
That's all in the past now. I am free to study Stepanov if I choose. I am left alone in peace.
It is a blessing to be so useless.
Nation of One:
"Canonical Texts"
Elements of Programming
From Mathematics to Generic Programming
Nation of One:
“What do you think of Java?”:
--- Quote from: Alexander Stepanov ---I spent several months programming in Java. Contrary to its authors prediction, it did not grow on me. I did not find any new insights – for the first time in my life programming in a new language did not bring me new insights. It keeps all the stuff that I never use in C++ – inheritance, virtuals – OO gook – and removes the stuff that I find useful. It might be successful – after all, MS DOS was – and it might be a profitable thing for all your readers to learn Java, but it has no intellectual value whatsoever. Look at their implementation of hash tables. Look at the sorting routines that come with their “cool” sorting applet. Try to use AWT. The best way to judge a language is to look at the code written by its proponents. “Radix enim omnium malorum est cupiditas” – and Java is clearly an example of a money oriented programming (MOP). As the chief proponent of Java at SGI told me: “Alex, you have to go where the money is.” But I do not particularly want to go where the money is – it usually does not smell nice there."
--- End quote ---
8)
What a sense of humor Stepanov has! MOP: Money-Oriented Programming. Ha
When I finished at the university in 2002, already "a 35-year old," I went on a handful of job interviews, travelling even into Manhattan to Bloomberg - what a nightmare! After working in a park for 10 years, how could I bring myself to take a bus into the city and wear clothes that made me feel awkward and servile? It was during this job-hunting process after doing well academically that I became severely depressed, and by 2003 or so I was experiencing severe anxiety, hostility, and eventual chronic depression. Forget about that for now, it surely did not smell nice where the money was. The city stinks, the buses stink, the interviews stink.
So now, well over 10 years later ... just by not handing "security deposit" over to yet another slum lord, giving up rental assistance, and purchasing a refurbished computer from Tiger Direct after deciding to join forces with my ageing mother, I quickly became interested in things I had been interested in before and while going to university. It must have been a combination of exploring Number Theory and Abstract Algebra which led me to the accidental discovery of Sage ... which got me very interested in Python ... with NumPy and then SymPy ... . I've been in the process of reconstituting.
How did I stumble upon Stepanov?
There were a series of textbook writers who I was studying when I was enthusiastic about Python (which was written in C/C++ I believe), including Hans Petter Langtangen and, of course, William Stein and others. I did an exhaustive search on related material. Then I even **** open an "ancient" copy of Knuth's FUNDAMENTAL ALGORITHMS from 1973, a book I had managed to hold onto throughout the chaotic journey from 1998 to the present. Everywhere I turned I saw Euclid's Greatest Common Divisor algorithm ... Modular Arithmetic and the Chinese Remainder Theorem.
I have to trace through my notes to find out what succession of events brought my conscious mind to this state of attentiveness, to see just when I became determined to return to exploring C/C++ with a beginner's mind. C++ has transformed somewhat during my 11 year cycle of self-destructive anguish. By the end of September I was starting to do some of the exercises in Knuth's Fundamental Algorithms ... the simpler ones ... and I was only interested in Mathematical Preliminaries. I was repulsed at the thought of putting any effort into learning MIX, Knuth's imaginary (theoretical assembly language).
Stepanov is first mentioned in my notes on October 7th. All my "tinkering" with number theory, abstract algebra, and the algorithms behind the kind of Python code I was studying seemed to lead directly to Stepanov. I became curious about generic programming, and, after so many years of no interest whatsoever, I suddenly felt compelled to pursue some kind of understanding of it. Prior to this sudden "spark," I did not really want to know certain things ... I sensed it could be overwhelming. I started off by acquiring a copy of Elements of Programming (Stepanov/McJones). When it arrived, I felt like I had a holy text of some obscure math cult.
I had been learning about Python for only a couple of months, and I was amazed with the mathematical nature of some of the "scientific packages" ... Now I realize that those couple months of undisturbed leisure was a great experience : valuing the efficiency of IDLE debugger after experimenting with alternative IDEs. I noticed how similar the interface of Sage was to the interface of IPython, IPython Notebook, SymPy, NumPy, z3Py, and even gap. In a very spontaneous manner I was exploring the components of Sage.
And then another spark: I found (freely available on the Internet, of course) the gdb-dashboard, a front-end for the GNU debugger ... it was then I started "tinkering" with C++ again. I was hesitant. I decided to invest in some hard copy books, to make some kind of commitment to focusing on "programming as a mathematical discipline".
Now I am at an age that I don't care about the politics of the question, "Is Computer Science a branch of Mathematics?" I accept that what I studied in the university was "computer science" and not "programming." Learning to write a minimal amount of code was part of some of the courses, but all along this has been somewhat separate. Since reading Stepanov, I can clearly state, I want to relearn how to program, not so much as "computer science" but as a mathematical discipline. I want to study the abstract level of C++ STL, while at the same time, doing something I would have done years ago if not for the sense of the pointlessness of it. I also want to study some Assembly Language. I want some kind of harmony between the higher and lower levels of computing.
Both levels are difficult in different ways. This must be what I wish to explore for my remaining years or days left as an embodied mind: Learning about Generic Programming with C++ STL, along with Assembly Language and, yes, a certain branch of mathematics. When I am studying one of these areas of knowledge, I am enhancing my understanding of the other areas. And why not? Would society (or the representative of the corporate state) prefer I took up arms to attack the enemies of the state and consumerist society? I'm just trying to understand things that have been on my mind for a long time. Fortunately I am well past the age of being turned into an obedient soldier who does the bidding of something as abstract as "the State".
Social revolution? Maybe just by pursuing deeper understanding and not caring about "where the money is" IS my own little social revolution. These interests - mathematics and programming - while there may be plenty of in-fighting between the money-oriented programmers and the deeper-understanding-oriented programmers, are international. While one might be viewed as a "loser" in one's own consumerist society, one may still be a part of this international intellectual community simply by being receptive of their ideas!
Before the end of October I had also gotten my paws on From Mathematics to Generic Programming, "the other" Stepanov book (with Rose), as well as Euclid's Elements. I confess that I only use it as a reference. As for FMGP, I read it once through and will have to read it several more times. I have yet to get through Elements of Programming. It is quite terse. I will chew on small parts very slowly. By November 10th I realized I would want a tutorial/reference to supplement my explorations, hence, the Josuttis text ...
Do you see what is going on here?
I had used the Internet as a resource when tinkering with math and python, and then I gradually became willing and ready for some kind of personal commitment. I want to catch this wave of interest and enthusiasm while it lasts. For a long time I was not interested in anything ... except, well, nihilistic and defeatist philosophy, like Benatar's Better Never To Have Been Born.
So, the question I have to ask is, would Stepanov find it worthwhile to study Assembly Language along with C++ STL and generic programming? I mean, like looking at the assembly code of little programs using the C++ STL ...
--- Quote from: Stepanov ---It is good for a programmer to understand the architecture of modern processors, it is important to understand how the cache hierarchy affects the performance, and it is imperative to know that virtual memory does not really help: if your working set does not fit into your physical memory you are in big trouble. It is very sad that many young programmers never had a chance to program in assembly language. I would make it a requirement for any undergraduate who majors in computer science. But even experienced programmers need the periodic refresher in computer architectures. Every decade or so the hardware changes enough to make most of our intuition about the underlying hardware totally obsolete. Data structures that used to works so well on PDP-20 might be totally inappropriate on a modern processor with a multi-layer caches. Starting at the bottom, even at the level of individual instructions, is important.
It is, however, equally important not to stay at the bottom but always to proceed upwards through a process of abstraction. I believe that every interesting piece of code is a good starting point for abstraction. Every so-called “hack,” if it is a useful hack, could serve as a base for an interesting abstraction. It is equally important for programmers to know.
--- End quote ---
And so ... there is a tempting book called Introduction to 64 Bit Assembly Programming for Linux and OS X: Third Edition by Ray Seyfarth.
What is tempting about this book is that the author has created ebe to help his students learn ... It's an Integrated Development Environment.
--- Quote from: Ray Seyfarth ---Why the name ebe?
Ebe is an integrated development designed to support Assembly Language. After teaching assembly language one semester where the students and I depended on using gdb for debugging, I wanted a better solution. I tried ddd and a few IDEs, but they all suffered from the fact that yasm doesn't provide data type information to gdb. I started trying to write a debugger in python and decided dbe was a nice name for a debugger. Since dbe had a source code window which supported nearly all that was needed in an editor, it became apparent that dbe was almost a development environment. So I decided to expand it to be an IDE and I had to pick a name for a development environment. The name ebe was too hard resist since it already means extraterrestrial biological entity. But just to satisfy my sense of fairness, I can claim that is stands for easy beginner environment. This also explains the alien icon.
--- End quote ---
So ... along with C++ For Mathematics, it appears that I have revolted against my plan to restrict myself to reading pdf and epub files on the computer. Realizing that there were some books that I really wanted to focus on ... and now, seeing that I will be carrying my studies into a "day jail" dystopian "treatment center", I justify this investment as a strategy for not only keeping my spirit from being broken by systematic stupidity, but to actually bring excitement into this intellectual adventure.
Rather than trying to focus on one book at a time, I figured it is best to let chaos and confusion gel together, destroying the dichotomy between "low-level" (assembly) and "high-level" STL/generic, and in the process maybe blurring the demarcation between mathematics and programming ... between freedom and the illusion of freedom ... between money-motivated learning and understanding-motivated learning.
Now I can try to sleep so as to be prepared for the morning. I just wanted to clarify a couple things to myself so that I could acknowledge that this learning project with these books is fairly significant to me. Regardless of what society pushes, such as "any job is better than no job" or "money talks, bull**** walks" ... I feel I am making some personal breakthroughs. It is as though I want to study as much as possible before my life falls into severe chaos.
What do I call this Learning Project I am investing time and funds into?
"Programming as a Mathematical Discipline"
Navigation
[0] Message Index
[#] Next page
Go to full version