Tag Archive for 'web-development'

Unsubstantiated Hype: Python and Web Development

March 8th, 2008 by peasleer

This past academic quarter I elected to do an independent study. A lot of hype has been surrounding web development over the past few years, and the python scripting language for even longer than that. Figuring it was time to immerse myself in both subjects and the technologies related to them, the independent study turned into a full four credit project aimed toward creating a web application for administering quizzes. Because I only had ten weeks to learn everything involved with developing a web application on top of the language, I coerced my good friend David Brenner into doing it with me. Development is done, and I now feel like I can talk intelligently about my experiences.

The project was developed using straight python, utilizing the mod python Apache module to serve Python Server Page (psp) files. Python isn’t my favorite language to code with, it is lacking some things that I’ve come to expect from a scripting language, and some things are just silly. Examples of lacking features include the ability to get an iterator for a collection. Iterators that grant references both to the next and previous element of a collection grant superior control and the ability to keep state while iterating. Python only allowing you to move forward through a collection with its “for x in collection:” construct really hurts while parsing large sequences of text, and having to revert to array notation and keep an index is much less human readable than just manipulating an iterator.

Annoyances with the language include python being a scripting language that doesn’t default to printing the string value of non-string objects, and using procedural style method calls intermixed with object-oriented style. For example, to print an object (say an array), you can’t just do print(“Array contents: “ + arrayName). You have to manually return the string value by using print(“Array contents:” + str(arrayName)) in order to avoid an error that print() was expecting an object of type string. I know python’s mantra is “explicit over implicit,” but languages are tools that you learn how to use. As I learn more, I expect to gain proficiency with the tool in order to save me time in the future. Python is easy to learn and easy to use, but I have yet to find any tricks with the language that save me time or make my job easier than it would be with another language. One last thing that I simply do not understand is the necessity to include a reference to “self” in method and constructor definitions. I strongly prefer the method signature to match the required call, python’s decision to branch from that convention is one that I can’t imagine will have a justification strong enough to alter my opinion of the practice.

As it goes with web development, we also used javascript, a MySQL database backed with InnoDB table engines, LDAP for authentication, HTML, and CSS. Development was utterly boring. Being a computer science student, I enjoy working on new things that present challenges and reward creative solutions. The most thought intensive part of this project was the parser run on imported quizzes using a format we decided on – and that was developed in the fourth week. Everything else was the brainless transfer of requirements to code. Some of the people I go to school with are attracted this kind of development, and I think I know why: frontend web dev is easy. Writing the backend logic isn’t bad, but the interface code and associated handlers could be composed by a high school student with some spare time and only rudimentary knowledge. The things learned in computer science definitely aren’t applied in that domain.

Finally, to wrap up loose ends: object relational database design is neat and very handy, javascript is odd at first but easy to pick up, dealing with web requests and forms is tedious, debugging web applications is a *bitch,* and Debian Linux with Apache, Subversion, screen, and vim makes for a great development and hosting environment.

Web development has its place, but it isn’t for me. I’m capable with python, but I’ll stick with ruby. And if you introduce yourself to me, try to be more descriptive than “I’m a web developer” so my experiences don’t tarnish my opinion of you – because I bet you are more skilled at writing code than that title would suggest.

Reciprocal Traffic and the ‘Jump’

September 24th, 2007 by peasleer

I use the StumbleUpon firefox plugin to try and find those ‘gold nugget’ webpages in things I am interested in. One of those things happens to be (surprise!) technology. Now, probably two out of every 5 sites is some ’search engine optimization’ or ‘how to improve your blog’ blog post that offers zero-science techniques for improving your pagerank and increasing traffic.

As far as I can tell, the only people these posts appeal to are other bloggers. So the traffic these sites are attracting are bloggers, who implement the changes, who then attract the bloggers they got the idea from. All I see here is a bunch of reciprocal traffic. Kudos, blogger. Your site is a raging success among other bloggers doing the exact same thing you are.

And as far as techniques used, who invented the ‘insert advertisement in the middle of an article’ technique? And furthermore, who was the idiot that decided to call it a ‘jump’? It is not a jump, it is an advertisement in the middle of your content. I strongly believe the concept was the result of a blogger angry that the blink tag they were so fond of is no longer supported in most browsers. “Hey, I can’t annoy people with blinking text. Time to come up with something new.” Viola, the ‘jump’ is born.  Bloggers: if I think your content is good, I’ll probably keep reading despite the annoyance (yay adblock). But if your content isn’t fantastic and I see the word ‘jump’ in your post, I’m leaving your site and am likely to never return.

Stop being silly.

All of you. I mean it. You are ruining my StumbleUpon experience.