Saturday, September 5, 2015

the secret

The idea that people generally shouldn't need to code is, well, screwy. It's not necessarily wrong, but it is not by any means that simple, nor is it in fact simple, this question of whether people generally should need to code. I think it could be argued that people generally need to code, period. It's pretty much stating the obvious to say that people who can code have a huge advantage in computing. On the other hand, I was looking at some app, or, well, I was reading about it, and it talked about things you need to do with code, to use the app, and I thought, I mean, it's just obvious you should be able to do those things from a menu, by pointing and clicking, not because that's easier, but because the menu acts as a tip sheet, so instead of needing to remember the command, or figure out what it is, you go to the menu and it gives you the function you need.

Still, code is interesting. I don't know why it feels this way, but it feels like with code you can just do whatever you want, whereas with an interface, you are narrowly limited to what the interface does. I'm not saying this makes sense. It seems to me code and an interface do the same thing. They translate our actions of typing or clicking into, oh, what? Instructions to the computer, let's say. The fact that they do seem to be different, I suspect, originates in the approach taken to interface design. And yet, code does have its own characteristics. I mean, you know what it is when you see it, and if you read it it's a kind of lens that reveals all sorts of things in its own way. It may indeed have its own peculiar power originating in something like that.

Really, here's the issue: code and interfaces are one and the same thing. If you try to separate them from each other you don't get it, but that's what everyone does. True, if the interface were very magical, you could do anything without ever typing, you know, html tags, function declarations, all that kind of thing, but it's not like there's anything wrong with typing code. It's not even that hard to learn these languages, so the idea that we need the interface to remind us of what's available is, at its root, a fallacy. As a kind of aside, I think the cheat sheet function is a big reason so much effort is put into translating functionality to an interface, and it's a fallacy, but there is something about an interface, nonetheless. It's attractive, and there's probably a reason for that. I'm picturing an interface consisting of a panel in which you see graphics that you generate by typing code into a console. I think it's a very attractive idea, although, yeah, there's a kind of coldness to it. An interface is possessed of a certain warmth. But who cares. With this console based interface you can start to build a graphical interface, and then you can use that whenever you want, and the console whenever you want that.

Well, you are going to say these are really duh observations, that, duh, that's what programmers do, and anyone can do it, but code is very complicated, what with its many many lines and all the functions that have to interact with each other, stuff like that, and ordinary people will never be able to master it, and if I, who am whining and complaining, were actually as smart as I seem to think I am, I would figure out code, and if I'm not smart enough, even if it's painful, I should just accept that I'm a less privileged, less capable class, and that it's nobody's fault but my own. Well, I just looked at everything I could stomach in terms of searching for information about how to set up a good console, and control what's displayed in a window from there. A good console needs to have certain specific features, and there are consoles out there that do, apparently, possess those features, but trying to figure out how to use them has been like wading through a swampy jungle. I have yet to be able to access those essential console features. Here's what it comes down to: every existing product is a complete maze of brilliant features, but, in among them, it is impossible to locate the one essential feature. Talk about irony!

Now, and of course this is probably quite incorrect, since you can see I'm an idiot, by console I mean a window - it is that - in which you can type code and from which you can run that code. I do use Notepad, and that's my console. I type in the code, save it, and open the file in a browser, and that's how I run my code from my console.

So, it's great. I'm able to do wonderful things this way. If I were more adept, I could do anything this way. But there is a problem. If I build a file with a lot of functions in it, the code itself becomes very difficult to work with. Notepad lacks the key feature that is necessary for easily working with code, which is code folding. (But I must add that code folding is not quite as simple a thing as you might think. It is not some extremely simple and even simplistic thing that you might be able to do something with, it is a slightly complex thing that is absolutely necessary if you are going to do anything.)

So, I spent the last twenty four hours installing Notepad++, which supposedly includes code folding, and then trying to figure out how Notepad++'s code folding works, completely without success. That's ridiculous! Code folding should be the very first thing you see, anywhere and everywhere.

Well, I am trying to think how to build a proper text editor. It's a code editor, and it runs your code when you perform an edit. It's in JavaScript in HTML and it runs in the browser.