Mike Borozdin's Blog

A blog about programming, web and IT in general

The *Intelligent* Blog Spam

Nowadays, the comment spam isn’t those dumb messages that just used to contain an URL to scammers web site. Today, the comment spam is aimed to for SEO. Usually you receive a commentary that at first sight doesn’t have anything suspicious, it may have just a couple of words or “Thanks”, but if you look closer, you will notice that the URL field of the comment author is filled in and the web site doesn’t have anything in common with the topic of your blog post. By doing this they are trying to increase the Google PageRank, so it’s reasonable to add rel=”nofollow” to the URL field. Of course, if it happens once, it may be a real man, but if you are always receive such comments, then it can be nothing else, but spam.

Moreover, such comments usually have some words and phrases that present in the original article, for instance I usually meet spam comments with “ASP.NET” or “Internet Explorer” in their text. But what amused me most of all is this particular comment:

ASP.NET has gone in unmanaged and unstable state where we have 100s of project coded in ASP.NET 2.0 and when we open them in 2008 nothing opens, upgrading to 3.5 are mere nightmares. And finally so many new technologies just to boost the marketing headlines. But come on guys, its easy for one blogger to just blog about able to mix technologies with writing 100s of lines of code which one geek can understand. Have you even worked on any project involving more then 5 developers? Practically we are spending more monty to train new things to our staff, more money to buy new tools, more money to manage projects and more and more money to sit and search world of forums to find why one thing doesnt work then actually doing simple development.

It is really hilarious, considering that fact that it was posted under article called “Is PHPLinq As Cool As Real LINQ?”.


Tags:
Posted by Mike Borozdin on Monday, August 17, 2009 4:10 AM GMT
Shout it Kick it!  
Permalink | Comments (1) | Post RSSRSS comment feed

Spammers Hit Trackbacks

It’s really sad, but true. Spammers hit trackbacks. Recently, you could prevent spam in comments by enforcing registration or adding a CAPTCHA or by simply enabling comment moderation. Now it’s getting harder and harder. Spammers post trackbacks links that lead people to their scummy web sites, most of them are porn web sites. In fact, I don’t think they are going to attract visitors to their web sites in this way, instead they are trying to increase their PageRank, I thinkl.

I’ve been blogging for about a half of a year. Everybody can comment on my posts, however comments have to be approved by me first, but I have never forced people to register or pass a CAPTCHA and I don’t remember receiving any spam posts until the recent times, when some Busby SEO Test started posting comments. I must admit it was a pretty clever bot, but it still generated scum comments.

Anyway, the amount of spam was pretty tolerable besides it has never gone approved. But everything changes. In the past two days, I’ve been getting spam posts disguised as trackbacks that is really nasty, because trackbacks don’t need to be approved, they become visible to visitors after they get posted.

It’s really unpleasant that such a useful service as the trackback can get a bad reputation because of the spam abuse.

After Googling for a while, I found out that this problem isn’t a new one, I came across the mentions of it that dated back to 2005, this basically means that I just didn’t face it, because I wasn’t a blogger.

So, it’s crucial to prevent trackback spamming, I wonder if anybody knows a good solutions that works with BlogEngine.NET 1.4.5. It’s also interesting to know who anyone fights with the trackback spam.


Tags:
Posted by Mike Borozdin on Sunday, December 28, 2008 5:52 AM GMT
Shout it Kick it!  
Permalink | Comments (3) | Post RSSRSS comment feed

Useful Live Writer Plug-Ins for Developers

Although Windows Live Writer is a great tool that simplifies the life of every blogger it doesn't has all the needed features by default. Hopefully there are many plug-ins that can be found in the gallery. If you write about programming that you must be particularly interested in the plug-ins that allows you to paste formatted code snipped, links to MSDN and some other things. I decided to make a categorized list of such plug-ins.

Code:

Console output:

This plug-in allows you to paste a formatted text from the console output, either from Windows PowerShell or from cmd.

Links:

  • MSDN Locator - this plug-in allows you to simply paste a link to a MSDN article by specifying a class or a method name
  • XFN Link Editor - this plug-in allows you specify the XFN attributes of links

There must be some other very useful plug-in, so feel free to share some links :-).


Posted by Mike Borozdin on Monday, August 04, 2008 9:54 AM GMT
Shout it Kick it!  
Permalink | Comments (0) | Post RSSRSS comment feed

Windows Live Writer Simplifies Your Blogging

Finally, I have installed Windows Live Writer and got amazed by its features. It does really simplify your blogging and save your time. With Live Writer you don't have to write a post in Word and then paste it to your blog, sometimes you even have to paste it to a another editor in order to get rid of Word text formatting. Now you don't have to do that.

Windows Live Writer supports many blogging platform, from Live Spaces to BlogEngine.NET and WordPress

Windows Live Writer has a built-in spell checker, so you don't need Word to check your spelling, it has nice formatting features, it supports different plug-in, so you can get a syntax highlighter, which is not available by default unfortunately. 

You can preview your posts, post preview is integrated into your blog design that looks awesome.

The only thing I didn't like is that it's not very obvious how to add new tags, because when your click the "TAG" button it only lists the existing tags, you can add new ones in the "Keywords field in the properties section.


Tags:
Posted by Mike Borozdin on Sunday, July 27, 2008 8:54 AM GMT
Shout it Kick it!  
Permalink | Comments (2) | Post RSSRSS comment feed

Dzone Instead Of Digg

If you have a blog, then you want to promote it. It doesn’t matter whether you are motivated by money or by recognition.  It you release your writings to public, then you want people to read them. Nowadays one of the most popular promotion techniques is sending links to social bookmarking web sites. The most popular social bookmarking web site is Digg.com. But does Digg work perfectly for every blog? I mean, can you promote every blog with Digg?


The answer is no. Some blog posts can never reach the front page of Digg, not because they are bad, but because they don’t fit Digg, they don’t fit their audience. However, these posts can do well on Dzone. Dzone is real paradise for developers. If you have an excellent post on programming, then submit it to Dzone, you won’t get dissapointed. It was created by developers and for developers. I really love it. There are really interesting articles. The article describing some features of ASP.NET and PHP can hardly bring traffic from Digg, but they will bring you a lot of traffic, if you submit it to Dzone.


Am I obsessed about Dzone? May be ;-)! I didn’t always do well with it, but I was really happy to discover this web site, when someone submitted my store there.


Tags:
Posted by Mike Borozdin on Thursday, July 24, 2008 2:36 PM GMT
Shout it Kick it!  
Permalink | Comments (3) | Post RSSRSS comment feed

BlogEngine.NET: Making The Archive Work Without Categories

As you may notice I don’t use categories in my blog, only tags. Whether it’s good or bad – is a matter of another topic.  Now I’m going to talk about how to make the archive work properly if you don’t have any categories, because it doesn’t display any posts unless they are filed under some category. I hope this will be fixed in the next versions, but you can fix it yourself, it’s not difficult.


Open archive.aspx.cs, find the Page_Load() method and remove the line containing CreateMenu() that we don’t need, because this function just prints the list of the categories, but we don’t have any. Then, go to the CreateArchive() method. Can you see that it only returns the posts assigned to some category? That’s no good, just remove the foreach statement and change Post.GetPostsByCategory() to Post.Posts that will just return all the posts, no matter whether they belong to a particular category or not.

So, CreateArchive() should look like this:

private void CreateArchive()
{
  List<Post> list = Post.Posts;

  HtmlTable table = CreateTable("");

  foreach (Post post in list)
  {
            if (!post.IsVisible)
                continue;

    HtmlTableRow row = new HtmlTableRow();

    HtmlTableCell date = new HtmlTableCell();
    date.InnerHtml = post.DateCreated.ToString("yyyy-MM-dd");
    date.Attributes.Add("class", "date");
    row.Cells.Add(date);

    HtmlTableCell title = new HtmlTableCell();
    title.InnerHtml = string.Format("<a href=\"{0}\">{1}</a>", post.RelativeLink, post.Title);
    title.Attributes.Add("class", "title");
    row.Cells.Add(title);

    if (BlogSettings.Instance.IsCommentsEnabled)
    {
      HtmlTableCell comments = new HtmlTableCell();
      comments.InnerHtml = post.ApprovedComments.Count.ToString();
      comments.Attributes.Add("class", "comments");
      row.Cells.Add(comments);
    }

    if (BlogSettings.Instance.EnableRating)
    {
      HtmlTableCell rating = new HtmlTableCell();
      rating.InnerHtml = post.Raters == 0 ? "None" : Math.Round(post.Rating, 1).ToString();
      rating.Attributes.Add("class", "rating");
      row.Cells.Add(rating);
    }

    table.Rows.Add(row);
  }

  phArchive.Controls.Add(table);
}

archive.aspx.cs (4.62 kb)


Posted by Mike Borozdin on Friday, July 18, 2008 10:37 AM GMT
Shout it Kick it!  
Permalink | Comments (0) | Post RSSRSS comment feed

I'm Getting Back To Blogging

I have just returned from my great journey! It was marvelous! Besides Czech Republic and Germany I also visited Austria, its beautiful capital - Vienna, although I didn't plan that before.

Anyway, after a week break, I'm getting back to blogging.


Tags:
Posted by Mike Borozdin on Sunday, July 13, 2008 8:58 AM GMT
Shout it Kick it!  
Permalink | Comments (0) | Post RSSRSS comment feed

I'm On Vacation

I’m on vacation for the next week, so I won’t post anything. I’ll be travelling to the centre of Europe – Czech Republic. I’ll be in Prague mosly, but will visit some other beautiful small towns, like Cesky Krumlov. I’ll also visit Germany for a day.


Yeah, I’m looking forward to going there :-)!


Tags:
Posted by Mike Borozdin on Saturday, July 05, 2008 2:39 PM GMT
Shout it Kick it!  
Permalink | Comments (1) | Post RSSRSS comment feed

Getting BlogEngine.NET To Work With The Local Time Zones: Part II (in case JavaScript is disabled)

In the article called "Getting BlogEngine.NET To Work With The Local Time Zones" I described how to convert the times of the posts to the local time zones of users relying solely on JavaScript. However I got a complaint that if JavaScript is disabled for some reasons, then no date and time are displayed.


It can be fixed, I’ll explain how, but in this case – if JavaScript is disabled, the time will be in GMT, so just put the following code to PostView.ascx that basically outputs the time in GMT and if JavaScript is enabled it replaces a GMT time with a local time.


<span id="postDate_<%=Post.Id %>" class="pubDate"> on
    <%=Post.DateCreated.ToLongDateString() + " " + Post.DateCreated.ToShortTimeString() %> GMT
</span>
<script type="text/javascript">
    $("postDate_<%=Post.Id %>").firstChild.nodeValue = "on " + ConvertToLocalDate('<%=Post.DateCreated.ToLongDateString() + " " + Post.DateCreated.ToShortTimeString() %>');
</script>


Posted by Mike Borozdin on Friday, June 27, 2008 3:26 PM GMT
Shout it Kick it!  
Permalink | Comments (0) | Post RSSRSS comment feed

Getting BlogEngine.NET To Work With The Local Time Zones

I noticed that the times of posts and comments were displayed in my local time zone. It must be very confusing for the users, especially if those times were the times of the comments they posted.


The first idea that came to my mind was just to use the GMT time zone. I set up the time zone offset in the blog settings, changed the templates, basically, I just put “GMT” after the time.


Anyway that still wasn’t good enough. I wanted the times of the posts and comments to be displayed in the local time zones of my readers.

Since it’s not possible to get the time zone offset of the user in ASP.NET without interacting with JavaScript, I decided to solve the problem in pure JavaScript. I just wrote a function that converted the string that represents the date and the time in GMT to the date and time of the local time zone of the user.

function ConvertToLocalDate(gmtDate)
{
    gmtDate = gmtDate.substr(gmtDate.indexOf(",", 0) + 1);
    
    var days = new Array("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday",
        "Saturday");
    var months = new Array("January", "February", "March", "April", "May", "June", "July", "August",
        "September", "November", "December");    
    
    var localDate = new Date();
    localDate.setTime(Date.parse(gmtDate) - localDate.getTimezoneOffset() * 60 * 1000);
    
    var sLocalDate = days[localDate.getDay()] + ", ";
    sLocalDate += months[localDate.getMonth()] + " ";
    sLocalDate += localDate.getDate() + ", ";
    sLocalDate += localDate.getFullYear() + " ";
    
    var hours = localDate.getHours();
    var amPm = "AM";
    if (hours >= 12)
    {
        amPm = "PM";
        if (hours >= 13)
        {
            hours -= 12;
        }
    }
    
    if (hours < 10)
    {
        hours = "0" + hours.toString();
    }
    
    var minutes = localDate.getMinutes();
    
    if (minutes < 10)
    {
        minutes = "0" + minutes.toString();
    }
    
    sLocalDate += hours + ":" + minutes + " " + amPm;
    
    return sLocalDate;
}


I placed this function in blog.js. Then I changed PostView.aspx and CommentView.aspx. I replaced:


<%=Post.DateCreated.ToLongDateString() + " " + Post.DateCreated.ToShortTimeString() %>

with


<script type="text/javascript">
    document.write(ConvertToLocalDate('<%=Post.DateCreated.ToLongDateString() + " " + Post.DateCreated.ToShortTimeString() %>'));
</script>


Posted by Mike Borozdin on Thursday, June 19, 2008 2:37 PM GMT
Shout it Kick it!  
Permalink | Comments (4) | Post RSSRSS comment feed