in reply to Re^5: aXML vs TT2
in thread aXML vs TT2

I wasn't really comparing it to Lisp so much as considering that Lisp, which does blur the distinction between data and code has managed to be both successful and revolting (perhaps mildly) at the same time. Mostly successful in that it has survived longer than just about any programming language, and has contributed (and continues to contribute) powerful concepts to the programming world. Recursion, currying, lambda functions, ...tools of functional programming leaked out of Lisp into other realms because they were found to be so useful.

So what I was getting at is that even though Lisp has a bad habit of making it difficult to discern code from data, it has sufficient strengths to have remained peripherally successful for almost 50 years, both in academia, among the "smug few", and even in some real-world applications. It remains to be seen whether aXML has sufficient merit and strengths to make people want to use it even though it also leaves the bad taste of intermingled code and data in the mouths of those who understand why that's a serious drawback. For those who don't understand the concerns, the biggest barrier to entry will be figuring out how to deal with Perl (which seems more complex than the audience that aXML targets), and Plack/PSGI (which requires a little more fortitude still to get going). The "Low Rent" languages like PHP are successful because the barriers to entry are low. If you hitch aXML to Perl's wagon and add the requirement of PSGI/Plack you price yourself out of the lowest common denominator market of those the language is designed for.

As for why it's dangerous to blur the distinction between code and data, there are several schools of thought. On the one hand, Lisp, and "functional programming" in general treats functions like first class objects, which is a fancy way of saying that they treat functions as the data that can be processed, shaped, and observed. But there is still a strong respect in many versions of functional programming for what constitutes user data, and what constitutes code data.

If outside data is permitted to become syntax, outside data gains the same control that primary code has. Namespace collisions and code injection become serious security concerns.

Perl has taint mode for a reason; to help programmers assure that they never cross the line. It's not infallible, but it's a big step in the right direction when it comes to helping savvy programmers keep track of where that line is. It's easy enough to abuse. But it's a good tool.

You're proudly stating that erasing the distinction that taint mode seeks to enforce is a good thing. And I don't know enough about aXML to argue; I'm sure it makes simple code really easy to implement. But it is probable that it's also making simple abuses easy to implement and hard to keep track of, much less prevent. Dijkstra said, "It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration" I'm concerned that those who cut their teeth on something like aXML will not only fall into that category, but also into the category of programmers who has no concept of what constitutes secure or unsecure coding practices.

If Lisp does seem interesting to you (It teaches a lot of great lessons in the science of computing), meet Structure and Interpretation of Computer Programs. No, I haven't finished it yet. But every chapter makes me feel wiser (in my own eyes, of course).

That brings me to another topic that I've been meaning to present to you but have avoided until now. I've seen you mention before that you feel that CS degree holders look down upon you with a sort of academic snobbery. I have to take this opportunity to mention a conversation I had a few days ago while sitting down to a social dinner with several successful programmers who work for a well known dot com. We talked for an hour or so, and at one point the topic of education did come up (it was I who brought it up as I was seeking suggestions for a Perl class I may be teaching in the CS department of a local college).

I apologize now if I've mixed the conversation a little, but I'm sure they wouldn't mind. One of the programmers sitting with me said he had an engineering degree, started working on embedded systems, and migrated to Perl (self-taught), which is now his career. Another had a degree in Japanese studies with an emphasis on historical monastic groups in Japan. He also taught himself Perl, and is programming for a living. A third when asked "What did you study?" replied "I didn't." I would disagree; he studied a lot, but maybe not formally. A well known author whom most of us have read and whom I respect a great deal doesn't seem to list a college degree in his credentials. Larry Wall studied Linguistics. Several monks here studied mathematics. And I studied Economics (ok, I took a bunch of CS classes before changing my major to Econ.).

I think there's no reason to let your education be a reason to feel picked on. People here tend to look at what is being said (and how it's being said) a lot more than what degree you have. You don't need a Computer Science degree to learn about higher-level concepts. A formal education may nudge you in the right direction, but honestly, the programmers whom I respect the most have risen far above whatever their college education provided them. A fresh CS degree holder who did the minimal amount of work to get A's and B's is only at the start of the road toward having a real brain. And that road doesn't have to start in a CS degree program for someone to find his way to mastery.

I really have to qualify all of this by saying that I don't feel I've arrived anywhere past the second fill-up and oil change yet. I'm constantly amazed at how broad the experience and deep the wisdom of many of the monks here is. But if there's one thing I do have, it's a respect for the learning process regardless of how participants with sincerity tackle it. But I don't feel that not having a CS degree puts me in a position of being looked down upon. I feel welcome here 95% of the time, and that last 5% is my own fault. ;)


Dave

Replies are listed 'Best First'.
Re^7: aXML vs TT2
by Logicus (Initiate) on Oct 22, 2011 at 07:36 UTC

    Wow, that's quite a write up first off thanks for taking the time to say all that!

    Ok, getting down to the points you raised.

    I never really paid lisp much attention, but now that I have looked at some source code examples I must say I find it utterly revolting and I am glad they didn't teach it at college or I may very well of left.. er.. *ahem* cough cough cobol cough cough

    Having said that I can see how it brought some nice ideas to the general programming table, I am big fan of recusion and recursive structures, but I must admit these things you mention "currying" and "lambda" are currently completely opaque to me. I've heard the term lambda before, once about 5 years ago when a friend of mine who did a computer science degree at York was looking at an early version of aXML. She had quite a big influence on the direction it took tbh and it probably would not exist at all if not for certain suggestions She made at the time. Incidentally and probably a little off topic, that was when She was still a He... (I'm still struggling with that one)

    Regarding basing on Plack and thus raising the barrier to entry, I felt that plack was very easy to get into, and eventually I have in mind to build a module called something like Task::aXML which installs Task::Plack and aXML onto a system from CPAN, and provides a helper script to configure it. When that is done, a novice will be able to just install it, run the configuration helper, and then begin immediately working on their site templates and assets. I see the novice progression path as starting at that point, then learning a little about perl to code their own plugins if needed, then learning to write their own modules etc. I think it will provide a nice shallow learning curve wherein baby-aXMLers will be able to become baby-perlers before graduating to full adult Perl. As you mentioned having a low bar like the one to entering PHP, will work massively in the systems favour if implemented nicely, and I know of a city in the U.A.E (Abu Dhabi) where I can find about 200,000 Indian degree holding PHP spaghetti authors who would lap it up, and produce code for litterally peanuts.

    On the subject of intermingling code and data, that seems to be the only objection left to the system, now that I have fixed the efficiency issue. I honestly can't see where the drawback is to treating code and data as one and the same in this paradigm especially because the code/data involved is highly structured.

    I can hear you about data injection, indeed I came accross that notion quite some time ago and came up with what I feel is a reasonable and secure solution. Sometimes you want users to be able to inject certain aXML tags; for instance on the forum I coded in aXML, I allow for a few tags such as (youtube)video_id/url(/youtube) to be used in the same manner as PHPBB's BBCODES. The (youtube) tag of course simply adds an embedded youtube video of the specified id or url into a page.

    Anyway, the solution I came up with was to wash the input in the query data module prior to processing. Basically I scan for anything that looks like a tag, if one is found it's checked against a list of acceptable tags and if it's not there the brackets are converted to tokens which cause the parser to ignore them. Since the only way for an end user to enter data into the system is through the query data, injection of disallowed tags then becomes impossible.

    In this context and with that data washing in place, there is just no need for an equivalent of taint, in the same way that by using metatags to describe the program there is no need for strict/warnings (except in the system's code itself, and the plugins, where the strictures are turned on by virtue of using the Modern::Perl pragma)

    Finally about feeling talked down to and being subjected to code snobbery and such, what you need to understand is that when I wrote the angry responses which earned me my place in this sites virtual dungeon, I was actually in a lot of pain needing dental work that I couldn't afford, and it felt like I was posting into a space filled with evil laughing self important jackasses who didn't give a s*** about tearing me to shreds and making a mockery of me without actually really even looking at what I was doing or why. I was trying desperately to get the thing running faster so I can start launching some websites and get off the unemployment trap.

    Thankfully shortly after that my Dad interviened and paid for some badly needed dental work. I still need more work but at least I'm out of pain and able to focus more on my work now. (still bloody unemployed tho)

    As for degrees, since I don't have one I'm not certain as to what is taught to degree students. So when various people around here including whoever that tw*t is that keeps trolling me using the anonymous monk function, started throwing around terms I was unfamiliar with to criticise my work, I went off and researched the terms they used. Quickly I discovered that their claims were infact bogus and not actually connected to the reality of what I'm working on at all.

    It seemed clear to me that they were exploiting the fact that they are better educated than me, and can use more technical sounding language than I can simply to put me down and brush me off rather than actually bothering to look at what I was doing and/or offer any useful help with it. There are some real tosspots haunting this forum, and there are some real good people as well, and if I was rude or nasty to any of the latter I sincerely appologise. I think Corion was one person for instance who tried honestly to help out and got a bit of a bad response from me. (Sorry C-man, you rock)

    One tosser in particular tried to suggest that I am clearly no good at programming and should just give up entirely. After the huge marathon of self-teaching and experiments it took to get as far as I have I was less than impressed with that appraisal. Someone else also suggested that as a teacher of cobol they would of failed me, and yet whoever that was came to that concluesion with no real evidence, because if they knew the truth they would know that I was the best programmer in my class by an embarrisingly wide margin, and there was only one other coder in my time at college who even came close to being able to compete with me. (He now works for sony)

    I'm not into boasting, I'm really not... I don't like showing off or sounding off about my high IQ etc, but when I'm being attacked and told I'm stupid or a fool for no good reason other than people have taken a group-think dislike to me then naturally I'm going to fight back. Someone said I was "so dumb" for criticising their solution to some noobies XML problem, I stand by my reasoning, the solution was overly verbose and totally unclear in how it worked to anyone who is not a perl adept. The guy asking the question made it clear he didn't need anything like such a complex answer... blah anyway I'm ranting so I'm going to stop now.

      Incidentally and probably a little off topic, that was when She was still a He... (I'm still struggling with that one)

      Similarly off topic, but this probably happens more often than you might think.

        I'm sure it does, but I still find it a little difficult to deal with, it almost felt like a bereavement. Whilst I accept fully that She is and really always was really female, I still found myself, during a recent phone call, wanting to ask to speak to my friend... as if I was talking to His sister or something.

        Also knowing what a sardonic chap She used to be, whenever I look at a picture of Her as She is now, I can't help but feel like it's all some big joke... like any minute He is going to tell me it was all a prank or something. I know that is not the case in reality, but yeh the news is still sinking in, and hence why I mentioned it because when She was giving input to aXML She was a He and a very close friend and like I said I felt almost bereaved of my friend, albeit with the consolation of an almost exact replacement who is now much more comfortable with Him..er Herself.

        If that makes any sense at all, probably not.