Funny thing about bugsā€¦

2008-09-18 3 min read Programming Xslt Eddie

They just keep popping up.

I just scrolled down my own blog, and saw a post titled “Down to three bugs.” Funny enough, three months later, we’re still trying to push the website out. (Wow, those were some really big bugs!!! Haha, jk…) In fact, I’ve been pressing for the last 2 days, trying to expedite a few last-minute bugs so that QA testing could begin (for about the 18th time, now in snapshot 21). Kinda odd, when QA finds bugs in round 20 that they didn’t find in round 10… despite no code changes in the meantime…

But I’m not going to complain. Programming is still a lot of fun when you’re actually doing it. It ends up being almost therapeutic when you’ve got other stuff going on that you’re trying to ignore. Not only that, but there’s always room to improve. A co-worker came to my desk yesterday and schooled me on how to write code. When you’re young, you’re stupid. He had lots of experience, and was… well, right… most of the time. I was boxed into a corner at some points, but also made a few bad decisions. The good thing is that I always learn from my mistakes, and next time will be much better.

I remember writing 3.5 websites before I really got common code working the way I wanted. It was similar to the way I learned how to write CSS. Excerpting common code so that I would only edit once, vs. editing 6 files just to make one update. It was easy when I was using CSS, SSI’s, or PHP includes to simply import exactly what I needed, but I find it is far more difficult when using XSLT’s. Why? Because in XSLT you need to know not only the structure, but the context. That’s what makes it difficult… writing context dependent generic code is difficult.

[Of course, dirty secret (I know you’re skimming at this point, not really reading) is that I’m almost on only my 2 year anniversary (Sept. 20) of doing programming/development work. So my progress is still quite good.]

Alright, I admit that this post was far more stream-of-conciousness than actual post, but it was good for me. It wasn’t intended to be a “I haven’t written in a month, here’s what I’ve been doing” post, but more a “I’m busy, I’ll be back soon, but I don’t know when” type post. So on that note…

Continue reading

Review of "Learning Website Development with Django"

2008-07-07 4 min read Books Django Programming Python Web Eddie

Cover, Learning Website Development with Django
Cover, Learning Website Development with Django
Over the past few weeks, I’ve been playing around with Django. Because of that, I’ve been looking at a few different books on the subject. I first started out with the Django Book, which took me a few days to read. I can’t say I absorbed it all, but I got the general idea. Then I decided to look into other books and found Learning Website Development with Django, by Ayman Hourieh. I started right away.

The book’s subtitle, “A beginner’s tutorial to building web applications, quickly and cleanly, with the Django application framework,” frames the book perfectly. Its target audience is programmers (moderately) familiar with Python, but who are, at the same time, new to Django. The book is really focused towards this audience. The other key word in the subtitle is “quickly.” This book moves along in a hurry while creating the demonstration app. I was quite comfortable (and pleased) by the pace, however, I can imagine that a more novice programmer may have a harder time dealing with the information flying by.

The book centers on building one app, a social bookmarking website similar to del.icio.us, or ma.gnolia. I think type of site was a good choice, since it provides the author with a varying degree of complexity to play around with. It allowed Mr. Hourieh to start with the basics. This book succeeds in starting simple and getting harder as it goes along. I also thought it was good to focus on creating just one website, rather than a bunch of mini-projects or examples, since it models a more real-life situation. The idea of a social bookmarking website, as well, is very useful because its features are currently en vogue, and can be found on many current sites.

Chapters One and Two are the obligatory “what is Django” and “how to install” chapters. The meat of the book starts in Chapter Three when the project is introduced. By the end of this third chapter, we’ve already quickly written three database models (Links, Users, and Bookmarks) and the main page. Chapter Four introduces Django’s built-in user authentication system (django.contrib.auth), and describes how to write login, logout, and registration pages. Chapter Five instructs us to write an additional database model (tags), which is more complex than the models we wrote previously. Here we also write pages to display the list of bookmarks, bookmarks by tags, and a tag cloud. [To illustrate how fast we’re moving, Chapter Five ends on page 91]

Continue reading

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?

Older posts Newer posts