Thursday, April 19, 2007

I once was a hard math teacher

I attended the University of Kansas in Lawrence (aka Smallville) from February 1966 to January 1968, where I earned an M.A. in Mathematics. I wrote a thesis, “Minimax Rational Function Approximation.” There is some information on it here:

I also started the Spring Semester 1966 as an Assistant Instructor, and taught two sections of “Math 2A” which was high school algebra. The credits were labeled as “3&” which meant that the grade counted as 3 credits, but 3 hours would be added to graduation requirements because the material was remedial and below college level.

This was a sensitive issue off the bat. This was the Vietnam era, when there was a draft, and flunking out could mean being drafted and sent into combat. Nevertheless, I was hotheaded about it, and, I am sorry to say, a bit of am a-h. The schedule called for four tests and a final, and the first test was given during the third week. I made it way too long, but when I added 45 points to everyone’s grade the scale was reasonable for 90-80-70-60. The second test was more reasonable. I caught one student cheating by comparing test papers, and he was given an automatic F in the course. He even visited me in my dorm room in McCollum hall to beg for “mercy.” At midterm, I gave downslips to aout half the students, which was reasonable for a course like this. Nevertheless, there were multiple complaints to the administration, and I was removed as an instructor, although I was paid for the entire semester.

I worked as a Fortran programmer for the academic year 1966-1967, but was given another shot at teaching in the last semester, fall 1967 (ending January 1968), before I would be “drafted” myself in February 1968. This semester was completed without incident, and the grades were a little bottom heavy but typical for this kind of class. (There were some A’s). Then I would take my own Master’s orals, which I stumbled through but passed.

I had a couple of other grad students sit in my class and pretend to be students. One of them said that he did not think I was trying to “sell” mathematics or algebra to them. That’s an interesting comment, from decades ago, to compare to my recent experiences as a sub, at least in math class.

An earlier blog post here (April 15) talked about the ability of students to relate to abstraction. A book by Ruby K. Payne about the effects of generational poverty on academic learning certainly seems relevant. Review:

If I were to become a permanent high school math teacher (maybe to repair some bad karma from that 1966 semester), I certainly would keep the quizzes and test in the mainstream, and probably use standard tests or straightforward tests prepared with other teachers; preparation for the SOLs comes to mind. (I do have a bone to pick with too much multiple choice.) There would be no attempt to make them “hard”. However, skill in mathematics has to be developed by constant use and practice. Frequent short quizzes, that don’t have to be particularly hard, should help build confidence. They can be given with the intention of dropping the lowest couple of quiz grade or allowing makeups. But I think daily practice is the only way for many students to get over the mental block. Math cannot be crammed.

Wednesday, April 18, 2007

Review topic: CICS, misc capabilities

The RETRIEVE command gets data passed to it from a (previous) starting task, usually from a Queue named in the START command in the starting task.. Asynchronous processing may result on a remote system from a START. On the other hand, Distrubuted Transaction Processing (DTP) simulates a client-server relationship (front and back end).

The ENQ and DEQ command single thread requests (like printing) in a manner conceptually similar to the UPDATE option on the READ statement.

To access storage other than that provided in the linkage section, use the GETMAIN command.

The SYNCPOINT command commits updates, and they are not backed out or rolled back even if there is an abend.

An MRO is a Multi-Region Operation, with a File Owning Region, Application Owning Region, and Terminal Owning Region. Intersystem Communications (ISC) provides for systems on different machines (processors) communicate. ISC’s can enable groups of MRO’s to talk to one another, as could be shown by Venn-like diagrams.

The CRTE command connects a terminal owned by one CICS system to another system.

With function shipping, a concept that often comes up in writing system specs, a command on one system accesses a resource on another. The most common example is a READ or update on a VSAM file whose FCT entry indicates that the file is on another system (SYSID). The application READ command will need to process DFHRESP(SYSIDERR) which will usually mean that the remote system is not up.

EXCI, the External CICS interface, provides the ability to execute CICS programs from a batch program with a CICS LINK. This feature could be useful in quality assurance mass testing of many transactions and looking at the results on a log. We used a similar facility with Datacomm DC at Chilton in the 1980s to test implementations.

CICS web support can provide a sockets listener task to communicate with an HTTP converter, or it can provide its own transaction gateway in Java, with less robust graphics. But XML has become a more flexible way to teleport data to web applications.

Review: CICS and DB2

Literature discusses a “conflict of interest” between design objectives in DB2 systems and CICS online transactions. One reason is pseudo-conversational code. A CICS program ends, and DB2 DROPS any tables that were being used. Without some kind of tedious programmatic intervention, cursor positioning or other processing would be lost.

Murach (CICS for the COBOL Programmer, 2001) suggests a number of strategies. One possibility, if the DB2 resource requirements are great, is to code in conversational architecture, with one DB2 query and one long browse.

In pseudo conversational mode, a program can store data on a VSAM file or, more likely, a temp storage queue between executions. Then a separate query is made between executions, with enough information to indicate how far the user got in any one execution. Or one long query could be made at the beginning of the first execution with all of the data stored in a VSAM file or storage queue and then browsed with conventional CICS commands.

In my own experience, none of this was done. Legacy data was replicated to a mid-tier and processed from that, although sometimes Legacy data was accessed with DB2 direct connect. The tedium of respecting pseudo-conversational discipline in mainframe application environments (and programmers will find this antiquated) may help explain why more and more companies are turning to more modern layered OOP models for managing user sessions, often over the Internet or in large consolidated customer service centers.

Review Topic: CICS: multithreading concepts

Various texts discuss the concepts reentrant, quasi-reentrant, reusable, serially reusable. IBM-Boulder has a comprehensive reference here.

According to IBM, CICS requires that all application programs be quasi-reentrant. Another way to say this is that they must be serially reusable between entry and exit points. IBM also discusses a concept called "threadsafe": "Programs that use appropriate serialization techniques when accessing shared resources are described as threadsafe."

Programs can be defined as running under the quasi-reentrant TCB (Task Control Blaoc) on the CONCURRENCY attribute of resource definition. Quasi reentrant means “reentrant in practice.” CICS normally provides a separate copy of WORKING STORAGE for each user running a particular program (with the same Procedure Division code). This capability is called multithreading.

In compiling command level CICS, normally the RENT RES and NODYNAM options are used.

Here is another good CICS quiz by CORNID on AOL.

Sunday, April 15, 2007

Mathematics education and students -- what math is good for

On a substitute teaching assignment in math recently, there was a test and there was going to be a question on the geometric mean. I went over a very simple example: what is the geometric mean of 2 and 8? You set up the equation 2 / x = x / 8, or x**2 = 16, and get 4. (The generalization is discussed in Wikipedia here. So on the test, there is a question something like, “9 is the geometric mean of 3 and what other number”. It’s easy to set up as 3/9 = 9/x and get x=27. But I noticed when the papers were handed in that many students did something like 3 / x = x / 9. In other words, they parroted what I did on the board rather than reading the question carefully and thinking for themselves. Standardized tests (SOL’s in Virginia) do a lot of this, posing simple problems that have to be read properly exactly as asked.

Another day, a team of teachers come in to help kids with conic sections. These are parabolas, circles, ellipses (a circle is a special case of the ellipse) and hyperbolas. These entities from analytic geometry have various attributes like vertices, diameters, foci, directrixes, etc. The formulas for these in terms of the coefficients of the various functions are well known and available on wikipedia (just search) and in all standard algebra textbooks. In practically any textbook, they are clearly stated, with sample problems. The student needs to learn how to match the components of the function to the elements of the formula. It’s a very straightforward process. Maybe a bit tricky (as whether a parabola opens up, down, or “sideways”, yes, as in the movie by the name.; the same for a hyperbola). And yes, it may be necessary to memorize a few formulas for tests. In trigonometry, you have to know the definitions and it helps to memorize a few identities. In calculus, it helps to memorize a few basic formulas for derivatives and integrals.

But skill in math is mostly practice and mental agility. Compared to other academic subjects (especially in social studies) there are relatively few “facts” to learn, so it cannot be crammed at the last minute the night before an exam. It is learning to think a certain way, according to the rules of logic. That’s especially true in plane geometry, when the student is introduced to the idea of a mathematical proof in statements and reasons. Built up properly, the proof of something like the Pythagorean Theorem becomes very simple.

In one work session, a kid asked, “what do we need this for? The cash register at MacDonalds does the math for you.” Yes, “out of the mouths of babes.” He literally said that. I wondered if he expects to spend a lifetime in the fast food business. But the manager of a Burger King has to plan a budget, determine how many employees to hire, meet a payroll, deal with work schedules, a lot of mathematic concepts that are like the notorious word problems (“story problems”) in Algebra I. In fact, a job where you have to balance the register every day or get fired is no picnic. In the recent hot film “The Lookout” the character played by Joseph Gordon-Levitt says that a good bank teller balances day after day for years.

There seem to be two things that are “hard” about math. One is the tedium and attention to accuracy, and that has gotten easier in the era of computers and graphing calculators. I can recall the strain of getting through Algebra I tests without “careless errors.” I particularly remember one test of seven polynomial long division problems that took an entire 50 minute period. I recall the tedium of arithmetic with logarithms (in the days before calculators) and particularly (in trigonometry) solving triangles with logarithms (in grade school, arithmetic had sometimes been called "number work").

But what seems to befuddle many people is the abstraction. They don’t, as that one student said, see the use for it, since “it” is not physical. Rather, math is a paradigm, a map for how to think and reason, to solve any problem. It says that given a set of facts and postulates, you can draw certain conclusions about consequences, or (in a statistical setting) predict them. On an objective level, this is very important to understanding right and wrong, especially what libertarians call “enlightened self interest.”

Students will say that they can’t work a particular kind of problem because that problem hasn’t been “taught” yet. This excuse seems to come from deference to authoritarian thinking. One does what one is permitted to do, or been told to do. But in a free society, one has to go to information sources, and apply the information to solve new problems. So reading a textbook (or web) discussion of the attributes of conic sections and then parsing the formulas to solve problems is a step in self-sufficiency.

I certainly got a practical lesson in that during the last two years of my traditional information technology career. After the Y2K exercise, I switched from mainframe to “client server” at the beginning of 2000 and was in a position maintaining the midtier (java) and graphical user interface (Powerbuilder) in the “customer service workbench” for a major insurance company. There would be problems with no obvious method for attack. Object oriented code (more so with powerbuilder than java) would be hard to read and follow because it is not procedural (lending itself to “bird’s eye thinking”), but rather a descriptive model of a “real world” of which one cannot see much of (not beyond the “horizon” or over the next “hill”) from any one ground point. Doing this kind of work required an entirely new style of thinking, and accepting a loss of comfort and certainty in one’s work world. The high school math student may feel the same way, that she is expected to work blind, without the usual input from sensory feedback. She will want the security of specific directions and will feel “lazy” about shifting gears to look at the same simple but abstract problem from a different point of view. But to solve real world problems, that is what we must do, look at the same facts, from a different view. In politics, it’s from a different constituent’s point of view.

As for the practical use of these things, these give a pretty good start on the conic sections. In chemistry, you study the gas laws, and find out that they are based on a hyperbola rotated 45 degrees. The first website shows the derivation. The next is the wiki site.

As for the bigger significance of math, some of it can come out of playing with fractals. A favorite geometry test problem is the infinite coil of triangles, with successive applications of the Pythagorean Theorem. In nature, that structure is used by some animals, especially mollusks like the chambered nautilus. The Mandelbrot set (related to Julia and Mantou sets), which comes out of complex variables, generates “buds” infinitely into borders that remind one of biological (or, particularly, viral or retroviral reproduction (or zoological structures like the seahorse tail, or cusps on tentacles). Much of biology follows fractal mathematics, so consistently that it gives rise to the notion that life (or self-replication) is likely, maybe inevitable, on any world with the sufficient elements, perhaps even Titan, even given its cold.

The following link has an applet for displaying Mandelbrot set views. This.

If you go back to the 1950 World Book Encyclopedia (and maybe more recent editions) there is a long article "Mathematics for Fun" with games like how to prove 1 = 2 (by a hidden illegal division by zero, a S0CB on the IBM mainframe!) or how to make a Mobius strip.

As far learning this, it's always hard to be forced to perform at something one is not "good" at. Sometimes, whether in school or at work, this means tackling problems for which one has no reliable crutch, no reliable precedent for solving. If one is doing what one has chosen, that's great; if it's to satisfy someone else's prerequisite in order to earn adult freedoms, it's not good, because it puts one at risk. Being forced to learn unwanted skills and fit into other people's agendas is something I have taken up in other blogs and will take up again.

But, meanwhile, mathematics drives everything that we see in our universe.

Sunday, April 08, 2007

Review topic: CICS, conflicts when updating files; a caution

CICS, in updating VSAM files, can encounter deadlocks or logical contradictions. This sort of problem can really happen with any database management system on any kind of platform, mainframe or client-server.

One situation might occur when a user executes a CICS READ with an UPDATE option, while another user changes or deletes the record. In pseudo-conversational programming, the program would need to save a copy of the record in (a copy of) the communications area in working storage (or in a temporary storage queue) before the program “ends” after sending it to the end user. When it starts a program when receiving the user’s change, it then does the read with update and compares to the save area copy. If not the same, it cancels the rewrite and issues an error.

A deadly embrace or deadlock can occur when two different tasks with different users update the same records in different files and in different orders. The fix is usually to make the order of access and update the same for all programs, all transactions. This was a huge problem (Rollbacks) on a Univac system with DMS-1100 at a big benchmark back in 1974 and took a week to find. This kind of problem can occur in any dbms.

The TOKEN option used to tell CICS when a record is read that it will be held for update.

The MASSINSERT option effectively creates a lock on a record (as well as splitting a VSAM control interval at the point of insertion).

Although these postings should help job candidates prepare for technical quizzes before interviews, the focus is not on any particular quiz. The review topics are generally items that would be needed on the job for a contractor candidate who is to be “job ready” when he or she shows up for an assignment.

Monday, April 02, 2007

Review topic: CICS: pseudo-conversational programming

One of the most important interview concepts in CICS programming is pseudo-conversational applications program.

A program will end (stop executing and using memory) after the end user does a SEND. Later, when the user presses and attention identifier (AID key – such as Enter, a PF key, a PA key, or Clear, CICS will restart the program, most often with a RECEIVE of a map filled in with data.

In conversational programming, the program would not end, and with many users, an installation could go SOS or “short on storage.”

The execution of a specific program (as restarted by pressing the key) is called a task. Restarting a program starts a new “task.” A program is associated with a transaction (trans-id) in an internal table called the PCT, or program control table. The Procressin Program Table, or PPT, monitors each program and whether it is loaded into storage.