Sunday, July 24, 2016

Summer Break

So, I had started an update when the tablet I was working on decided to stop working. I decided to give it a couple days to run out of juice to see if it would reset. It did, then went back to a blank screen after I started the first app. So, boo.

The update I had started was about how little I had done. I need to make this a bigger priority, or decide it's not going to be a priority.

I still want to learn JavaScript, and I still think that this it's the way to keep me accountable, but is this the time to do it?

In fact I just showed to myself that it is trivial to move the script to it's own file, by copying the code to a separate file and removing it from the html file. I'm not completely happy with it because I have references to html objects in the code, it will be a rewrite to remove those.

What I have learned so far.

Some of this is stuff I have known, but it is stuff I have learned to this point.

There are two types of programming languages (plus machine language which is written in a form a computer can understand). Languages are either compiled or interpreted. Compiled languages are written in a human readable form and then compiled into a machine readable form one time, creating an executable that will be run when necessary. Interpreted languages are written in a human readable form and then interpreted at run time into machine readable form, and will be interpreted every time the code is run.

The advantage of compiled languages is the executable tends to be faster and smaller in memory. The disadvantage is that the program will have to be recompiled to target a different architecture (PC, Mac, mobile) which may also require some changes in the program as well.

The advantage of interpreted languages, also commonly called scripting languages, is that they can be run, often without change, on many platforms. The disadvantage, is the programs can be larger and slower and often are limited in their ability to access the hardware of the machine.

That was then. Now there are languages that are compiled and interpreted, like Java. Also some languages are transpiled, written in one language and the transpiled into another language, often JavaScript.

The advantage of a language that is compiled to a bytecode and then that bytecode is interpreted on the machine is speed closer to a compiled language and the ability to run on any machine. Disadvantages include a limit to access to the hardware.

Now, transpiling, is a completely different issue. Much like human languages, computer languages affect how you think and how you can express things. So if you need to do certain things, it might be easier to write it in a different language, then transpile it to the language needed. These are usually done with languages designed to transpile, for example CoffeeScript and TypeScript both transpile into JavaScript.

I did not think I would end up writing this much about languages alone, so I will try and put more of what I have learned in future updates. I am a little reluctant to make such a promise, though, for some reason (-cough- -cough- complex math -cough-).

No comments:

Post a Comment