THE STATES OF JS VS PHP VS PYTHON AND BUILDING COMPLEX STUFF. (When I first star

THE STATES OF JS VS PHP VS PYTHON AND BUILDING COMPLEX STUFF.

(When I first started learning lots of programming languages, books were written by people with significant skills, and the books were all organized the same way, with types, statements, operators, commands, functions and procedures, etc.

And they weren’t very wordy. They just gave examples, including the ‘gotcha’s’ and the recommended syntax. And so, sitting on the T in Boston, for example, i would just read, and re-read the manuals until I’d basically memorized it. And after your first programming language, as far as I can tell, that’s still the best way. to learn.

What I find today, is that aside from w3schools, this whole ‘dummies’ method of tutorial is dominant. And I find it so time consuming. And then the manuals don’t have enough depth by an expert saying ‘do it this way, and don’t do it this way, and here are the gotcha’s’.

The major differences between languages are:

1) whether it’s lingusitic and string based, softly typed, and largely interpreted, or mathematical and type based, and largely compiled. ( I work almost exclusively with problems of user interfaces (human-performance) so I care about linguistic myself. While if I had to write for machine-performance I’d use compiled languages like in the distant past when I wrote graphics routines in assembler.)

2) The scope and organization of variables and procedures.

3) The readability(verbosity) or symbolism(brevity) of the syntax.

4) The amount of existing libraries and resources that you can rely upon rather than re-writing plumbing all the time. (yay for open source).

The rest of it’s architecture. Like the current movement into Node.js, which launches and maintains residency of multiple instances. Or the php equivalent that’s emerging that creates an instance per processor. (ReactPHP and the equivalents).

Now, here is how I look at the current js/php/python stack: (human-interface languages. (I am not particularly insightful here, I’m just stating the obvious for those who are entering the field).

1) Python is a very clear language to write in. And it is easer to write code without bugs. PHP retains the verbosity, but it is harder two write ‘brackety’ code. Javascript loses all verbosity, is the least readable, and is hardest to write in without bugs. Javascript and PHP have enormous code bases to copy/paste, edit, and learn from. So you don’t have to create plumbing every time you want to do something. This is a little less true for Python.

2) The best application frameworks in existence are created in php, and the’re absolutely amazing. If we can begin to see something close in js then that would be wonderful. What I love about js and php is that there is so much available code to use and learn from. (I remember how impossible it was to reverse engineer assembly code that you wanted to copy.)

3) The trend with javascript is to write in one language and compile to browser-friendly-javascript. this is to compensate for the fact that it is difficult to write good, clean, debuggable, maintainable code with it. in other words, we are restoring verbosity to the code base. PHP and PYTHON remain verbose. i wold rather ask, why don’t we write in PHP and PYTHON and compile to javascript, or why don’t we create a verbose and clean javascript interpreter for browsers? I mean, what’s the cost difference in updating the browser for a verbose language, versus having millions of people write verbose code, and compile it to an unreadable format for distribution? i dunno. Maybe I’m too much of an economist, but this just sounds ridiculous to me.

The counter-argument is that we are creating increasingly obscure js code, and shipping compact code to the browser. But given that one image changes all that, and that everyone uses images, I just don’t buy that as an excuse.

Anyway, until there are viable sql and amazon frameworks for node-js, and assuming that no one rewrites php/python for duplicating the running-residency of node-js, then for anything of consequence (and I only build complex things) I am still in the php/python camp, and I’m happy to dispose of Angular, and Angular 2 in favor of React against a php/python backend.

Why? Becuase the biggest risk in any application development of any scale is controlling the quality of the programmer’s code, and the use of frameworks (tested code bases) is the best way I know of for doing that.)

Anyway. That’s my thoughts for today.

And no. I think java was one of the worst things to happen to programming since (a) fortran over lisp, and (b) numerical processing over logical processing, and (c) object oriented architecture versus Pascal architecture. (Even if I prefer to write in OO myself still. Sorry. But I want my code as easy to read as a children’s book.)


Source date (UTC): 2016-10-20 09:19:00 UTC

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *