On Comment Spam…

As many people with blogs may know, comment spam can be a problem. Some of it is harmless, but other comments insert links to lead you or your readers to sites that sell high end brands at a low cost (fake of course). To prevent this, you either need to moderate all comments, or have a spam filter to prevent it from becoming an irritant and stop people from visiting your site.

The way they are spread is through a ‘script’ (or software program) that is run by either a person or a ‘bot’, though usually automatically on a regular schedule. A bot is a computer compromised by software known as ‘malware’ or a ‘trojan’ – installed without a users knowledge, through a rogue ad (on the more adult sites usually) or an illegal download of software or video from a peer to peer network. This scans the internet for blogs, looking for comment forms and posting a message to your posts.

The comments that are posted are usually full of compliments (wonderful, clever, interesting), appealing to a persons ego so they approve them.To attempt to bypass spam filters or encourage them to be approved, there are often positive words in the comment that are interchangeable and one of them chosen before posting. I have been using the internet long enough to spot spam and hoaxes quite easily, but it can be quite interesting to see what is written sometimes. I received one recently, but this time the string replacement was not performed and so I got the raw text instead. Here is an extract of the comment:

{I have|I’ve} been {surfing|browsing} online more than {three|3|2|4} hours today, yet I never found any interesting article like yours.
{It’s|It is} pretty worth enough for me. {In my opinion|Personally|In
my view}, if all {webmasters|site owners|website owners|web owners} and bloggers made good content as you did, the
{internet|net|web} will be {much more|a lot more} useful than ever
before.|
I {couldn’t|could not} {resist|refrain from} commenting.
{Very well|Perfectly|Well|Exceptionally well} written!|
{I will|I’ll} {right away|immediately} {take hold
of|grab|clutch|grasp|seize|snatch} your {rss|rss feed}
as I {can not|can’t} {in finding|find|to find} your {email|e-mail} subscription {link|hyperlink} or {newsletter|e-newsletter}
service. Do {you have|you’ve} any? {Please|Kindly} {allow|permit|let} me {realize|recognize|understand|recognise|know} {so that|in order that}
I {may just|may|could} subscribe. Thanks.|
{It is|It’s} {appropriate|perfect|the best} time to make some plans for the future and {it is|it’s} time
to be happy. {I have|I’ve} read this post and if I
could I {want to|wish to|desire to} suggest you {few|some} interesting things or {advice|suggestions|tips}.
{Perhaps|Maybe} you {could|can} write next articles referring to this article.

New Site

A new website is in the works, I have not updated it for a long time and am now using a new system to update it. I hope to post more in the future. Code (for Web Development, HTML, CSS, JavaScript etc), writing, photos and more.

I am migrating my content over from my old site, so there may be things missing or not working correctly. The design is likely to change as well.

WebSlide

What is WebSlide?

WebSlide is a JavaScript based web application front-end for presenting mockups and other images in a web browser. Click in the demo area and either click buttons with your mouse, or use shortcut keys →, ←, z, x, and n. For more information on using and setting up a WebSlide, view the online documentation.
Features

  • No server-side requirements
  • User-configurable
  • Create custom themes with CSS
  • Keyboard navigation
  • Zoom images in & out
  • Optional password protection

Visit WebSlide | Full Screen Demo

Rules for School Leaver’s

Got this in an email recently. It’s been on the internet for a few years, but still true now.

It can be summed up as:

Feel-good, politically correct teachings creates a generation of kids with no concept of reality and this concept sets them up for failure in the real world.

The rules:

Rule 1: Life is not fair – get used to it!

Rule 2: The world won’t care about your self-esteem. The world will expect you to accomplish something BEFORE you feel good about yourself.

Rule 3: You will NOT make $60,000 a year right out of high school. You won’t be a vice-president with a car phone until you earn both.

Rule 4: If you think your teacher is tough, wait till you get a boss.

Rule 5: Flipping burgers is not beneath your dignity. Your Grandparents had a different word for burger flipping: they called it opportunity.

Rule 6: If you mess up, it’s not your parents’ fault, so don’t whine about your mistakes, learn from them.

Rule 7: Before you were born, your parents weren’t as boring as they are now. They got that way from paying your bills, cleaning your clothes and listening to you talk about how cool you thought you were. So before you save the rain forest from the parasites of your parent’s generation, try delousing the closet in your own room.

Rule 8: Your school may have done away with winners and losers, but life HAS NOT. In some schools, they have abolished failing grades and they’ll give you as MANY TIMES as you want to get the right answer. This doesn’t bear the slightest resemblance to ANYTHING in real life.

Rule 9: Life is not divided into semesters. You don’t get summers off and very few employers are interested in helping you FIND YOURSELF. Do that on your own time.

Rule 10: Television is NOT real life. In real life people actually have to leave the coffee shop and go to jobs.

Rule 11: Be nice to nerds. Chances are you’ll end up working for one.

If you agree, pass it on.
If you can read this – Thank a teacher!

DataBinding to an Enumeration / enum (C#, ASP.NET)

Enumeration types in C# can be used for many purposes. One such use is to reduce repetitive typing as they can be bound to server controls (e.g. Repeaters).

In code behind:

public enum WeekDays
{
 Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday
}

In your page:

<asp:Repeater runat="server" DataSource='<%# Enum.GetValues(typeof(WeekDays)) %>'>
 <HeaderTemplate>
 <table>
 <thead>
  <tr>
   <th>Day</th>
   <th>Start Time</th>
   <th>End Time</th>
  </tr>
 </thead>
 <tbody>
 </HeaderTemplate>
 <ItemTemplate>
  <tr>
   <td><%# Container.DataItem %></td>
   <td><%# GetStartTime(Container.DataItem) %></td>
   <td><%# GetEndTime(Container.DataItem) %></td>
  </tr>
 </ItemTemplate>
 <FooterTemplate>
 </tbody>
 </table>
 </FooterTemplate>
</asp:Repeater>

GetStartTime and GetEndTime are just examples (so would just need writing in the code behind).

protected string GetStartTime(object day)
{
....
}
protected string GetEndTime(object day)
{
....
}

Sleeping makes you smarter

As detailed in the article: Sleep on It: How Snoozing Makes You Smarter. When you sleep, your brain is still active – it processes the information that was absorbed during the day, in a more efficient way than during the day, thus improving memory recall. So when you have difficulty solving a problem, it really is worth ‘sleeping on it’, even if just for a couple of hours.

Maybe I should get more sleep…