qp

My web development blog

Where I sometimes also write about other stuffs.


Sundry matters -- first edition!

Since starting this website in the earlier part of this year, I haven't been adding content to it with any regularity. From today onwards, I'll be committing to posting here at least once every other week. Even when nothing in particular comes up, I'll be posting here about miscellaneous thoughts and whatnots.

First I'd like to talk about jQuery. For some time, I've held a bias against the use of jQuery over regular native JavaScript. Recently it occurred to me that the negative view I have is pretty much without much basis at all, other than perhaps some personal desire to keep to pure JavaScript.

Also, jQuery is sometimes, even often it seems, spoken of as if it is some improvement over JavaScript. This just bugs me. jQuery is a JavaScript library. jQuery is JavaScript. Open up a jquery.min.js file and it's all JavaScript.

Anyway, none of this is any fault of jQuery the library itself, and from what I can tell the library can be quite useful for simplifying various tasks in JavaScript. I'll be reading up on some of the library features and possibly putting up a few demos sometime soon.

Next -- I've recently been working on a project in Django to get some experience with the framework and it is quite the refreshing experience. I particularly like how the framework handles it's separation of concerns, that is, the Model-Template-View concept ("MTV") used by Django. I think I may even be using some form of that in the future for projects in other languages.

On another note, "Quentin Pan", when entered into Google Search, does not show this website anywhere near the front at all. Perhaps "Quentin Pan" doesn't appear often enough in this website for Google to register it as a keyword. I could possibly start speaking in third-person? Quentin Pan thinks that's just sad. Indeed it is. Why, Google? Bing sees fit to put this site on the first page of the search results for "Quentin Pan" -- why not you?
Permalink | Posted 5:29PM 4-12-2011 by Quentin.

The motivations of comment spam and what to do about it?

Recently I've been spammed in the comments of one of my blog posts on this site very heavily. (I am barely getting any eyeballs on this site as it is but somewhy I am getting spammed by bots? Sigh...) Before putting up any proactive anti-spam measures I am deleting all detected spam manually as I see them. However this has led me to consider about the possible motivations of comment spam -- the better to fight it with.


"Search engine optimisation"

I put this in inverted commas because SEO isn't just about getting pages to link you but nevertheless link-building is what some people mean when they say SEO. This is perhaps the most widely-discussed reason for spamming other sites. Links to a website increase its search engine position, pushing it nearer to the front of the search results the more incoming links there are. Comment sections sometimes allow links, therefore it would seem like common sense to post your links on them. If this process could be automated all the better. Therefore, spam bots.

Link spamming is done pretty openly. You could actually post an ad on a freelance job site and pay some guy in India for, say, $50 to post a link to 100 sites. The Indian guy might even ask you what keywords you'd want to post it under if he's friendly.

I suspect also, though I haven't ascertained this, that some of the "submit your webpage to x number of sites" services are actually based on spam bots finding exploitable forms on webpages that allow submitting links. I'm just basing this suspicion on the practicality of the idea; this is what I'd do too if I ran a link submission service and I had no soul.

SEO is likely the main reason for comment spam. No, it's not like I'm going to give any actual references to back that up or anything.


Shotgun marketing

It might seem to an aspiring web entrepreneur that any way to get word out about your website is better than leaving it to stagnate without any eyeball traffic. Calling most link spam "marketing" might be pushing it a little. "I agree with what you said about Extreme Programming! Your girlfriend needs a ten inch long blood engorged organ in her baby maker!" isn't exactly a great marketing message to be putting out there. Nevertheless, this is similar to the motivation behind email spam (or even regular junk mail for that matter) and I can only imagine this to be one of the reasons for link spamming given how ubiquitous it is and how hard some spam bots work to fill comment sections with links.


Sabotage?

With the effect that linking has to search engine ranking, it is possible -- if you felt like it -- to spam links with a certain keyword to affect the results for that keyword. For example, the spammer currently attacking my site is linking to pages about various drugs -- the usual: Viagra, Cialis, blah -- with the word "USA". Theoretically, one could make a Viagra-related page appear as the first result when you search "USA" on Google.

Sure, "USA" is a hard keyword to attack given its popularity, but if attackers could have "miserable failure" link to George Bush (not using bot-driven link spam by the way), I think you can see how it isn't exactly hard to exploit this. I should note that the popular search engines have over time made it harder to exploit this, but given sufficient resources and ingenuity, it can still be pulled off.

Then there is a slightly different way to affect search engine results for a website through comment spam. Search engines use a mix of different factors to determine how they index and list any particular webpage, such as the previously mentioned inbound links from other sites, and the keywords they find on the site itself. If a certain word appears often enough on a webpage (or, with more relevance to this post, the webpage's comment section), "cocks" for instance, the search engines are going to list it as a keyword for that page, and all of a sudden search engines associate the page with male chickens. Oh joy.


General evilness

Because why else would you do something so obnoxious?


Yes yes, Quentin, you're being terribly long-winded about this. So what???

So, taking the above hypothetical motivations into consideration, how might one remove or reduce comment spam? There are the popular ways of using CAPTCHAs, automated spam filtering like Akismet, or simple questions that the commenter must answer before he can post a comment. While they all work to some extent, they are either inadequate or just plain annoying for the potential commenter.

Requiring human approval for comments before they're posted on the page will generally stop all spam from appearing on the actual webpage but introduces potential confusion for the commenter. ("Huh? I thought I pressed Submit? Why isn't my comment appearing? *refresh**refresh**refresh* Oh what the...")

Alternately one could require visitors to register to post comments but that's just troublesome. Plus, unless you're running a website of fairly decent size (read: not most blogs), why would anyone care to register just to post a comment that they'll forget about two days later?

It would seem that since linking for SEO is the main motivation for spam, removing the ability to link should deter most spammers. It might, but there are some problems with this. Linking is something you want actual human contributors to be able to do, being as important a part of the World Wide Web as it is; not allowing people to link themselves just seems uncourteous in my opinion. Non-link spam does exist, so clearly there's reason to spam other than SEO (perhaps to annoy people?). Furthermore, even if the other motivations aren't as strong as SEO, one might still want to protect against them just in case; just as one should protect against database attacks even if it really serves hackers no significant benefit to be hacking a minor site.

I suppose for a site that is regularly checked, by its owner or moderators, requiring approval for comments might be the best option since it most reliably stops spam. This sucks for the users of the website, and introduces work for whoever checks the comments, but were there a perfect solution for the problem it would likely have been widely known by now.

For myself, I'll continue to think of some way to stop my own spam problem.
Permalink | Posted 3:28PM 19-10-2011 by Quentin.

Notes from ProtoElis

The web-based prototype for Elis, "ProtoElis" as I'm calling it, currently works by creating iframes of a defined size when the user double clicks on an empty spot on the home screen. These iframes are meant to simulate the windows that might be used in Elis. Each "application" in the list of a new iframe is basically a link that, when clicked, clears the iframe's body content and appends certain HTML elements to it to achieve a particular effect: The "Browser" application is a text box which goes to the address keyed in when the user presses "Enter" and "Note" is an empty textarea element styled with a yellow background and made to fill the frame.

From working ProtoElis, I get the feeling that a lightweight OS that simply boots to a browser interface and works using the same principles -- iframes for "windows" and Javascript for the applications -- could fulfil many of the features I listed for Elis and therefore make a decent LIS OS. However, I am not sure there is a way to handle rotating of iframes, along with the content displayed, in any current browser.

Another problem that occurred to me only after creating ProtoElis, is the potential range of sizes for a window on a LIS device. With windows too small, the user will have to do an awkward amount of scrolling; too large, and the user will be greeted with an uncomfortable chunk of whitespace, or text that requires far too much neck turning to read. The most trivial solution seems to be scaling the content within the window as it is resized.

Given the above issues, it is still possible that a LIS OS may be created by modifying a lightweight browser OS to allow iframe rotation and scaling (EDIT: or so I thought, it seems it might be possible to accomplish these without customisation by using CSS transforms).

Moving along, I'll be making additions and changes to ProtoElis to make the interface feel more natural and "home screen"-like. I might also add code to save the state of ProtoElis sessions (window positions, etc) and load them on subsequent visits since I feel that with some cleaning up of ProtoElis I might personally want to use it as my browser home page.
Permalink | Posted 2:55PM 10-8-2011 by Quentin.

ProtoElis is up

Still have to clean it up and there are a few features I need to add, but the basic idea is there.

Here it is.
Permalink | Posted 3:41PM 30-7-2011 by Quentin.

On developing of a generic operating system for large interactive surfaces

I've recently had an idea that came to me out of seemingly nowhere. More specifically, it came to me, I think, when I was reading Founders at Work, though I can't see how that relates to this idea.

As of the time of this post, there are popular operating systems for two general classes of consumer computing devices, namely: (1) small-to-medium-sized devices, ie phones, tablets, small notebooks and other portable devices, using OSes like Android and iOS, and (2) regular-sized computers, ie traditional desktop computers and notebooks, using mostly Windows with a little Mac OS and others.

It seems that there is a lack of a generic OS for a class of devices which I will call "large interactive surfaces" (LIS for short), namely, any computing device with a screen large enough that two or more people can comfortably use it at the same time standing (or lying, or sitting) side-by-side.

Apparently, the "large interactive surface" concept is not new as I thought; searching for the three words brings up 75 million results on Google (and 1.31 million results on Google Scholar). Really, I should have expected this. After all the term and/or the definition as stated above includes devices such as the Microsoft Surface, interactive whiteboards (IWBs), and those screens that react in some way when you step on them (which in recent years have been appearing on the floor of some shopping centres).

A cursory look through the search results from Google, however, suggests that the basic concept of what I'm considering has not been made -- or at least popularised -- into a practical application yet. The current applications (in this paragraph, I am using this in its wider sense, not in the sense of a computer "app") of the LIS form seem to either focus on one task at a time (say, displaying a pond with fishes, or playing some form of Pong on the surface), or otherwise uses the form for purposes falling well short of its potential given that it is essentially the form of a computer with a big screen.

The form factor of a large screen opens up the possibility for multiple users to work on the same device simultaneously and for a single user to work on many tasks at the same time. Consider how many application windows you'd be able to open and view at the same time if your Windows computer had a screen as big as your wall.

Therefore, I am considering developing an OS specifically for the LIS form, which I will call "Elis" (from "Electronic large interactive surface"), if I ever get around to developing and completing the OS, with the basic features as follows:
- an essentially empty Home screen which, when interacted with in some way (say, double-tapping on an empty part of the screen), opens a new window at the spot with the device's list of applications;
- clicking or tapping on an application in the list opens the application in the same window;
- "flicking" of windows rather than basic dragging since one can imagine dragging a window from one point to another on a large screen can be potentially tedious;
- rotatable windows so that a LIS placed parallel to the ground can be used from all sides.

As you may notice, the Elis system is similar to most windows-based (small letter "w") operating systems other than the manner in which new windows and application instances are opened (and the rotation feature, though that is a common feature in many LIS systems). However, this simple difference allows many possibilities.

Consider the following use cases for a device with this system:
- Web surfing kiosks where multiple desktops are used can have the desktops replaced by a single LIS, possibly tilted at an angle, with the windows locked in position.
- A "notice board" where users may post notices, possibly opening a browser or picture gallery window beside a notice
- A LIS connected to a television set might have a window open for the TV controller, another window open for the TV schedule, and multiple browser windows or games open for when the viewer(s) gets bored with the TV programming.

Now there are a few problems with the thought of developing this OS. Firstly, I am mostly a web developer, not a systems programmer, and I have in fact never written any non-trivial application that is not web-based. Secondly, multi-touch screens of the size that I am thinking of are likely not cheap. Thirdly, given that work on LIS systems is not new, there is the chance of getting hit with lawsuits for patent infringement (I think, I am not familiar with patent law).

However, I figure even if Elis is never completed, or it turns out to be useless, I will be able to learn from working on it. I will therefore start by creating a web-based prototype of Elis.

It occurs to me that many of these things that I think of doing take practically forever to get into a recognisable state, so I am going to make a bet here (though nobody reads this site other than search engine spiders, so it's not like it matters, but hey). I will: (1) create a web page for ProtoElis with at least the first two features above in some form by 8am morning two days from now (30 July), and (2) clean it up and upload it here by 6pm that day. If I fail to do so I will eat my own cock.
Permalink | Posted 5:33PM 28-7-2011 by Quentin.

displaying page 5 of 6
<<First <Previous | Next> Last>>