PHP and Me

2008-04-01 2 min read Programming Xslt Eddie

I just finished writing a not-so-simple, not-so-complex PHP script. First, lemme say that I had a good time with it, since it isn’t either XSLT or Portal (my workplace’s homebrew) code. It’s kinda refreshing to look outside of my multi-month project. Exciting, in fact… despite how insignificant (in the grand scheme of things) it is.

I’ve got to admit, thought, that I don’t really like PHP. I’m not going to bash PHP outright (as I’ve heard MANY people do). It is a programming language, and it certainly has it’s place. I’ve used many things written in PHP. In fact, I feel bad about the way people dismiss PHP. That said, I still don’t like it. My problem is that I feel PHP is simply too verbose. There seems to be a function for everything. It is the total opposite of Scheme, where every function is a based on a handful of core functions. I have had to deal with a number of languages in my life, and I certainly prefer languages with as little syntax as possible.

I spend a lot of time googling the functions. And then the parameters. And then the return types. And then I run across another function that is kinda like the first one that I saw, but slightly different (maybe even described as more or less efficient!) And then I have to research the return types. I’m mostly bothered by the related functions. Just give me something I can use in different ways. Don’t give me the kitchen sink and tell me to choose the faucet type.

This is the same problem that I have with XSLTs. It is a rather verbose language (which happens to usually be interspersed in XML/HTML). This makes it hard to pick-up in a hurry, and makes it unintuitive. This is important. Unintuitive. I spend a major part of my work day making sure that all of the webpages, all of the components, all of the behavior… even the URLs of my work are intuitive. So I don’t like to accept much less from the tools I work with.

To extend the analogy slightly further… I have seen that when websites are unintuitive, that said websites can fail. Is the same thing the case for programming languages?

Random February Thoughts

2008-03-01 5 min read Classical Music Xslt Eddie

In an effort to inspire me to write something else, I am throwing a few thoughts out from the last month.

My orchestra, The Columbia Orchestra, is playing Beethoven’s Ninth Symphony for our next concert. The orchestra is trying to make at least a small cultural event out of it. There is a website (embracingthemillions.com) a flickr discussion group (flickr.com/groups/embracingthemillions), and a number of artists (not just musicians) participating in the event. Since I threw together the website (no comments please, I’ve been very busy), I know the statistics of people visiting it. And there are quite a few people visiting. What I can’t figure out is with 30 or so people visiting per-day, why hasn’t anyone a) commented, b) written something on the discussion board? I made a post in the discussion group. It took me a few minutes at best. No one else has posted. Are people’s lives really so busy that they can’t be bothered? I’m confused by this. Technology aside, I am delighted to be playing Beethoven, he was simply a genius.

I went to see the Ingmar Bergman film, The Magician the other day at the AFI Silver Theater. I liked the quirky nature of the film, and found it to be totally engaging (I’ve yet to see one of his films that isn’t). I regret not being able to see more movies from the first part of the Bergman Retrospective they are doing now, as I have been ridiculously busy of late. However, I do own most of them on DVD (I don’t own the Magician). I look forward to the next few parts of this retrospective, as I don’t know as many of his later works.

I have been working extremely hard on the next version of My NCBI, the preferences section of the NCBI website. This is where you can set preferences for PubMed, Blast, and all of the rest of the NCBI sites/databases. It is hard, writing everything in a internally-created language, which is slightly buggy and tends to make easy things easy, but hard things very hard, with XSLTs completing the system. I haven’t had to write a ton of recursive XSLT functions or anything, (mostly because of the inclusion of EXSLT extensions), but development time is still very slow. It also seems that with every step I take forward, I discover 4 new things I have to do. Throw in the fact I made time estimates without knowing the language, and the NCBI announcement that the budget fell flat (and actually decreased) this year and people were dismissed, and that makes my life particularly fun. I knew what I was getting into when I signed up, and I wanted to do a LOT of work, but that doesn’t mean I feel that way every second of every day.

Continue reading

XSLT Class

2007-10-23 3 min read Xslt Eddie

Last Monday through last Wednesday I attended Mulberry Technologies’ XSLT course. I had a fun time, and learned a bunch.

To prepare, I looked through a few books. I looked through Jeni Tennison’s Beginning XSLT 2.0 book, but it wasn’t for me. I didn’t like how wordy it was… I got lost in the dialogue, and it distracted me from the points and the examples. On the otherhand, Doug Tidwell’s book, XSLT-Mastering XML Tranformations was precisely what I was looking for. It was concise and organized very methodically. PLUS, it only cost me $7 with shipping from Amazon. Heh, gotta love that!

[note: because we only use 1.0 on the job, older books were better, as I didn’t have to figure out what was a 2.0 feature and what was a 1.0 feature… and again, the books were cheaper]

Fun stuff aside, XSLT is a pretty cool language. I’m too new to it to debate if it is a functional programming language or simply based on those attributes, but I’m happy to get to play with its functional aspects. I am kinda thrilled to dust off my recursive-function-writing skills. I hope to use it early and often, so I can get a good amount of practice in.

The class was useful because it showed me things I didn’t pick up from the books. First was the concept that the root node is placed above what I called the XML root node. The class called the XML root node the “document node.” Solved one problem that I had been having. The other really enlightening aspect was the axes. When I read the book and saw that there 13, I simply skimmed it. It was good to sit down with , as the following:: and preceding:: axes were not what I thought.

Debbie Lapeyre and Wendell Piez, the instructors, were great and worked with us to answer all of our questions… even my weird set theory questions. Wendell, in particular (because he led the third day) was helpful, showing me some of the common “hacks” people use to make 1.0 do things it wasn’t intended to do [despite my incredibly poorly phrased question!]. Now that I can understand XPath a little better, I can break down the pieces of the hacks… so things like the Muenchian method actually make sense now.

Hopefully I will get to keep working with XSLT’s, I’m definitely not an expert from three days. But since they’re core to the portal system I work with, I expect to get a lot more practice in. If I get good enough, I’d love to post some information that may be useful to others. Stay tuned!

Continue reading

Class over

2007-10-18 1 min read Xslt Eddie

I am finished my XSLT class, and learned some very interesting things. Very cool the way some of the features of the language fit within the context of Scheme (and Lisp, for that matter). More to come.

catching up

This is my appropriately named “catching up” post. As most know, I’ve moved over the last month. Despite my early action, I still had to do a lot of work at the end of the month. C’est la vie, that’s what moving is. Aside that, I’ve also been focused on various work related things (css, xslt, and the “portal” system), as well as the end of baseball’s regular season and the beginning of the post season.

On my list of things to touch in full… 1) Advanced DOM Scripting. I finished the book (a while ago) but haven’t had a chance to review it yet. At the risk of ruining the surprise for my one (hopefully) reader, it was teriffic, and I highly recommend it. I will do a full write-up later. 2) My comments on The Little Schemer. This is simply an amazing book that’s opened up a number of paths in my brain. I’m afraid that any review wouldn’t do it justice. Maybe some thoughts on the book everyone should read. 3) Random thoughts on Bethesda, Kensington, Rockville (my new home!), riding my bike again, the Tchaikovsky concert coming up, my xslt class coming up, my recent css exploits… as you can see, I’ve got a lot of things that I am thinking about, but nothing to put down on paper… yet. (Yes, I know, really, there is no paper… shut up!)

Contrast that with the time that I MUST spend with friends, and the potential Boston trip coming up… and I’ve got a lot to do!! Better get started. Washing my clothes now…

Newer posts