Aug 23

So, I decided to finally do something with my laziness and make something productive. I've had the idea of making a simple bandwidth tester for a while since none exist (to my knowledge) so far.

The idea originally came to me when I was trying to test how fast my EV-DO connection was relative to the speed of our southerly neighbours on Sprint. I realized that the best thing to test this was using a mobile version of a site. 

Seriously?!

 

So, here we are, laziness finally confronted, and app finally created in about 8 hours of nonstop work. 

 

netSpeed

 

The app works by downloading a small (1.2MB~) file from a private server owned by me. It then tracks the progress and calculates the overall KB/s (kiloBYTE). There is an unusual bug with the screen transitions sometimes flickering white, but that seems to be a bug with Ares (the online palm web development tool) and nothing I can circumvent. While on the topic, I think I should spend a moment to really talk about how awesome Ares is. The first thing I did (and the thing I knew I wouldn't have much trouble with) was the backend code. But I really wasn't looking forward to designing something graphically pleasing. Thankfully, I was able to quickly prototype some styles and piece together a nice but simple looking app with almost no effort. If you haven't tried Ares yet, you need to do yourself a favour and give it a shot.

 

The app is pretty straightfoward but it's my first venture into the Paid app scene. Since the homebrew scene was fun if not extremely unprofitable, I decided to wet my feet in the cheap-o paid app business. How well the app does will ultimately decide whether I continue developing for webOS or not.

 

So, hopefully, this time next year I'll be rollin' in the benjamins!

 

...Right?

 

 

Keep an eye out in the app catalog for netSpeed, provided it gets approved.

 

Update: It's approved! Go get'r now!

Tags: | | |
May 07

As you may have read before, I've been having a real hard time with spambots picking up and exploiting this site's open comment system. It was getting ridiculous to the tune of over 900 spam comments per week.

 

I finally had enough and decided to put in my "Ghetto Captcha" on the site. 

It was actually very easy to implement, and I'm going to post the code here in hopes of helping other BlogEngine.NET users combat spammers.

Basically what you need to do is change the CommentView.ascx (control) design-view code to bypass the default post validation and insert an intermediate javascript validation.

 

Step 1: Add the new text field:

<input type="checkbox" id="cbNotify" style="width: auto" tabindex="7" />
<label for="cbNotify" style="width:auto;float:none;display:inline"><%=Resources.labels.notifyOnNewComments %></label><br /><br />
What is the name of this blog? <input type="text" id="captchaTest" />  <=== ADD THIS
<input type="button" id="btnSaveAjax" value="<%=Resources.labels.saveComment %>" onclick="return preTest()" tabindex="7" />    <== change onclick
<asp:HiddenField runat="server" ID="hfCaptcha" />

 

 

Step 2: Add the new preTest() javascript

function preTest()
{
    if(document.getElementById("captchaTest").value == "futurepr0n")
    {
        return BlogEngine.validateAndSubmitCommentForm();
    }
    return false;
}

Step 3: There is no step 3

 

SO that's it! Spammers be gone, and very little code change.

 

I realize it's hard to follow code like this out of context, so I've attached the source code for the CommentView.ascx that we're using on this site. Hopefully you can use it to your advantage!

 

CommentView.ascx (6.85 kb)

Tags: | |