Coding Improvements
As my article, Computer Chips Demystified states,
- "In a computer, the complicated is reduced to the very simple & repeated billions of times over!"
- -- Everett George
Computer Ethics - An Example
Gerrymandering- "the political manipulation of electoral district boundaries with the intent to create undue advantage for a party."- -- Wikipedia.org
A programmer documents code for maintenance by posterity. A "happy medium" exist between too much & too few comments in code. However comments are important:
- "Programs must be written for people to read and only incidentally for machines to execute."
- -- Hal Abelson
These ideas are still being developed. However, I will try to outline how to write code that instructs best, in my opinion.
JavaScript Apps: The following applets are written in JavaScript, the programming language designed for web browsers. I developed the applets to support my knowledge cards:
Lorentz Force Equation | eduLForce.pdf | EE/Phy |
Newton’s Laws of Motion | eduNewton.pdf | ME/Phy |
My code has drawn from oPhysics models. However, my applets use only html / css / JavaScript W3C code. The html pages will probably work on a browser for many decades. I took a course in Flash years ago, all the bells & whistles of embedded graphics until hackers made it unsafe & obsolete.
Of the many designs, only a few programming languages have seen heavy applications. Below is listed the timeline & knowledge flow of JavaScript that runs on many web browsers. Several listed computer languages are still in use. Notice the incremental advances made with each language.
- source file 🡆 compiler 🡆 computer specific executable
- FORTRAN was created by IBM
- abbreviation for FORmula TRANslation
1969:put the US on the Moon- used in high-performance computers for STEM
- current: Fortran 2023 is from ISO/IEC 1539-1
- source file 🡆 compiler 🡆 computer specific executable
- SmallTalk was created by Xerox
- uses OOP (Object Oriented Programming)
- coding uses defined objects that interact
- current: SmallTalk 1998 has limited use
- source file 🡆 jit compiler 🡆 web browser executable
- JavaScript was created by Netscape
- adapted from Java with limited direct memory control
- browser jit (just-in-time) compiler executes source .js
- current: JavaScript is ECMA-262
- -- Wikipedia.org
JavaScript Modeling w/Numerical Analysis
My idea came from the sliding block app @ oPhysics.com. Educators would embed JavaScript Apps in their teaching tools. The JavaScript code would be well documented using Doxygen (free) with technical references. Just as important, the js source code becomes a teaching tool just as the applet. For file data, all of the style parameters would be in a css file, all of the javascript in a js file w/Doxygen comments.
Numerical Analysis code would duplicate that of GeoGebra.org. Mini-library classes would be utilized for these apps: Runge-Kutta, Transformation Matrices & 2D vectors. |
API documentation of the classes would be ZIP file assessible for student exposure & use. Unfortunately, Doxygen does not specifically support JavaScript. A 3rd party script would be developed for JavaScript support. |
In the future, web browsers will access the Ubiquitous Web via laptops, tablets, smart phones ... practically any electronic device. Most browsers have JavaScript engines. In time, the best applications of Jupyter & other software should be incorporated into a JavaScript / STEM package. My JavaScript proposal brings Numerical Analysis to browsers. This addition should give free & greater access of these tools to the public.
In my opinion, my coding proposal is a step into the inevitable destiny of JavaScript & Numerical Analysis pairing. Let's get started!
Preliminary
Preliminary
Preliminary
The Calculation Library of Templates (CalcLib) Applications Programming Interface (API) is a collection of mathematical calculation classes & class templates.
The classes are written in the C++ programming language. The files carry the Lesser GNU License, which allows for derived software sales.
For most CalcLib classes, documented examples are included. The source code is supported through an API specific Doxygen annotated |
Chebyshev curve-fit implementing calculus. | |
definite integral of test function. | |
least squares polynomial of test data. | |
3-axis Runge-Kutta (full |
The documentation at the following links provide Version 1 data for the CalcLib API. This download of the CalcLib ZIP file with software is dated 07/19/2006.
CalcLib.html | Documentation (existing) |
CalcLib.zip | Template Files (07/19/2006) |
The documentation at the following link provides Version 2 (proposed) data for the CalcLib API.
CalcLib.html Documentation (proposed)
The improvements would implement the following:
- Incorporate
std::complextemplate class in examples. - Incorporate 3-Axis Runge-Kutta of Special Relativity in the
calc::Odeexample using a variable mass rocket. - Incorporate contour integration in the
calc::NIntgexample to prove calculus of residues. Consider sin(1/z)/(z²+a²) with poles @ z=0,ia,-ia. (ref: Arfken) - Remove
calc::OptIntpinterpolator optimization class. - Rename
calc::Baseclass tocalc::Calc. - Add
calc::Romboandcalc::Carpotocalc::Odeincorporating the Romberg method of extrapolating to zero. - Collapse inherited classes of
calc::NIntpinto the parentcalc::NIntpclass through a call back function usingcalc::Intpoffspring. - Collapse inherited classes of
calc::Chebinto the parentcalc::Chebclass. - Put the inherited classes of
calc::Intpunder an intermediatecalc::Dataclass. Placecalc::Cheb&calc::Dataunder acalc::Intpparent class. - Allow
calc::Intgto accept yType dependent arrays along with functions.
Note:For external software accessed on this webpage:- $20/yr - Doxygen code documentation maker.
- $50/yr - GNU Licenses for free software.
- $25/yr - W3 Consortium character standards.
- $70/yr - Wikipedia online encyclopedia.
- $50/yr - GNU Licenses for free software.
- Please make a modest donation if you find any above software useful. (full list @ lstFreeware.pdf)