Preventing spam in comments/contact forms with TypePad AntiSpam
2010-01-10 22:16:05
Another few hours of my life lost due to spammers. (And a few Mac OS quirks i don't want to get into now : ) ). Anyway.. If you have any kind of form on your website you are guaranteed that you will receive spam in one form or another. To make it the least annoying for your real customers and users I think it's the best way to employ some kind of passive spam checking.
I previously only heard of Akismet which is only free for non-commercial users. But since i don't want to get into trouble I made a quick google search and found TypePad AntiSpam - The nice thing about it? It is completely free (at least right now) - but provides the same API as akismet.
So I simply downloaded the Python Akismet library and created a very simple utility function and base form in django to do the checking. So only when spam is recognized the user will have to fill out the captcha.
The whole magic lies in simply changing the baseurl:
You can also take a look at my full code for the form, which uses the Captcha Field from SCT.
I previously only heard of Akismet which is only free for non-commercial users. But since i don't want to get into trouble I made a quick google search and found TypePad AntiSpam - The nice thing about it? It is completely free (at least right now) - but provides the same API as akismet.
So I simply downloaded the Python Akismet library and created a very simple utility function and base form in django to do the checking. So only when spam is recognized the user will have to fill out the captcha.
The whole magic lies in simply changing the baseurl:
from akismet import Akismet # base url for TypePad AntiSpam would be: # api.antispam.typepad.com/1.1/ Akismet.baseurl = settings.AKISMET_BASEURL
You can also take a look at my full code for the form, which uses the Captcha Field from SCT.
Hey, we have Signatures !!! Great, isn't it ? 
Posted by Herbert Poul
0 CommentsShort history of my own Wiki applications
2009-12-29 14:23:57
After a short discussion yesterday about CMS's I remembered the history of my own web applications. Usually when talking about Wikis I am pretty convinced I have developed three - The first in perl around 2002, another in java in 2005 and my current wiki in 2008 with python. But this is actually not true.
There was another really basic wiki script which dates back to 2001 - developed in perl as well. It has no copyright comments and no timestamp whatsoever. Only the articles were timestamped, the oldest dating back to early 2001. It used flat files to store the articles, generated static html pages and was not really sophisticated. but it had the basic functionality of a wiki. Everyone could create new pages, edit old pages, preview page edits and they were instantly seen online on the website. This 120 line script would basically do
As you can see, it was a pretty sophisticated Wiki about Startrek knowledge
Most articles were actually contributed by visitors, and not by myself. So the wiki concept was actually a success even back then.
Unfortunately I lost interest and hence the script got lost in one of many server migrations.
(Btw. My first usable program I remember has celebrated it's 10th birthday this year. It was a nice TCL script for eggdrop bots for a nice RPG game you can play on IRC channels (one channel representing one startrek space ship
): http://yourhell.com/~kahless/scriptrpg.tcl *sniff* - so another three years and my programs are half the age of myself. this is getting weird. )
There was another really basic wiki script which dates back to 2001 - developed in perl as well. It has no copyright comments and no timestamp whatsoever. Only the articles were timestamped, the oldest dating back to early 2001. It used flat files to store the articles, generated static html pages and was not really sophisticated. but it had the basic functionality of a wiki. Everyone could create new pages, edit old pages, preview page edits and they were instantly seen online on the website. This 120 line script would basically do
As you can see, it was a pretty sophisticated Wiki about Startrek knowledge
Unfortunately I lost interest and hence the script got lost in one of many server migrations.
(Btw. My first usable program I remember has celebrated it's 10th birthday this year. It was a nice TCL script for eggdrop bots for a nice RPG game you can play on IRC channels (one channel representing one startrek space ship
Hey, we have Signatures !!! Great, isn't it ? 
Posted by Herbert Poul
0 CommentsSurfcamps24 - Making Of
2009-11-15 20:47:32
Sometimes it is getting really frustrating to search for, or create the perfect generic product which can be used for every possible website and purpose. Be it an open source django forum and wiki or a web content management and portal software. So it can be really refreshing to reset and implement the simplest possible solution for a very simple problem: Getting content on the web.
Well. That sounds easy. I have done it dozens of times and written three frameworks for it - in Perl (MHP), Java (Galena) and lately Python (SCT).
Okay. Screw it. Start from scratch and do the simplest solution possible. (And well, do it in portugal.. it helps)
The result?
- Content editable using a simple wysiwyg editor
- Navigation, advertisings, headers, etc. editable in the administration interface
-
Surfcamps administration, listing, categorizing
- News section editable using wysiwyg editor, in categories and with permissions (obviously)
- Ratings of surfcamps by guests
- Comments for news and contest entries.
-
Contest page to upload images and vote for them - with facebook sharing and everything
- simple user management with a very easy registration, email validation & co - so you are basically registered before you know it
- Booking form - with customizable fields for every surfcamp.
- Sending HTML validation emails and newsletter (including images) - managed right from the admin interface
-
improved surfing skills
(Well .. kinda)
Or in bare metrics ..
- 1700 lines of python code (based on django)
- 1000 lines of html code
- 3-4 weeks of work
- Who cares about metrics?!

Hey, we have Signatures !!! Great, isn't it ? 
Posted by Herbert Poul
0 CommentsWeb Content: Modifying Markup vs. WYSIWYG
2009-07-06 09:37:37
I recently got very disappointed by any markup language i was using for my django forum, wiki and blog - basically because BBCode and Markdown are all easy to write but very limiting, while (X)HTML is powerful, but hard to write by hand. (Actually I found it easier to write HTML than to work around bbcode limitations for another part of my blog (which is still not finished, but not due to html
))
So when someone on the SCT forum started to ask why I was using markdown in the wiki I sparked a small discussion about the pros/cons of WYSIWYG vs. editing markup by hand. I even carried it over to another thread.
So what are the pros and cons of WYSIWYG?
So - does anyone have other pros/cons for wysiwyg vs. markup editing? any experiences?
So when someone on the SCT forum started to ask why I was using markdown in the wiki I sparked a small discussion about the pros/cons of WYSIWYG vs. editing markup by hand. I even carried it over to another thread.
So what are the pros and cons of WYSIWYG?
- +: Very userfriendly (if done right)
- +: Very powerful (you can add custom features, like wiki links, inserting attachments as images, resizing/alt texts of images, etc.)
- +: You don't need to learn a new markup language for every forum, wiki or blog
- -: Security might be a problem - you need to validate (X)HTML very carefully to avoid XSS
- -: Some might want to edit pages offline, or manage them in a text based version control system.
- -: Diffs are not that straight forward
- -: Hard to do "right" (WYSIWYG is not that simple and might require extra work for every browser - and you need extensions for your forum/wiki/blog features)
So - does anyone have other pros/cons for wysiwyg vs. markup editing? any experiences?
Hey, we have Signatures !!! Great, isn't it ? 
Posted by Herbert Poul
4 CommentsUpgrading the Hard Drive in my MacBook Pro
2009-06-17 09:44:36
There is actually quite an easy guide on how to upgrade the hard drive of a macbook pro (which obviously voids warranty). So if you have 3 hours to kill, buy a new 500 GB hard drive and play around with your macbook pro. (Although the hardest part was finding a fitting T-6 Torx screwdriver - i didn't even knew something like that existed.)
I'm pretty amazed that time machine worked perfectly (after a few back/forth in the recovery dialog because it doesn't recognize partitions you create while the dialog is already open.. ie. create your partitions and AFTERWARDS start the recovery dialog
). It just took about 1.5 hours to restore the 90 GB backup, and I could continue working just as i left off on my old HD (Just faster and without those annoying "Your startup disk is almost full" warnings).
I'm pretty amazed that time machine worked perfectly (after a few back/forth in the recovery dialog because it doesn't recognize partitions you create while the dialog is already open.. ie. create your partitions and AFTERWARDS start the recovery dialog
Hey, we have Signatures !!! Great, isn't it ? 
Posted by Herbert Poul
0 CommentsNot enough time for my todo list
2009-05-18 16:39:17
I once had the problem of having no ideas when i needed a programming project. Somehow this changed significantly ..
Things i would LOVE to code, but have no time:
Any advice on how to prioritize these would be appreciated
(and no.. there is no money in any of these projects
)
Things i would LOVE to code, but have no time:
- 38 issues for SCT
- BBCode WYSIWYG editor including support for attaching images (i NEED this one ASAP)
- Treez - Changelog manager and (what's more important for me right now) code review tool - (Yes, I still know no useful alternative)
- Billmonk application for the iphone - I am too lazy to enter all my bills, I need this one. I already started coding, but still far from anything useful.
- ShelfShare - I very much need to improve this one - improve performance, add integration into facebook, etc.
- Let alone finishishing my personal "blog" of april's surfing action
Any advice on how to prioritize these would be appreciated
Hey, we have Signatures !!! Great, isn't it ? 
Posted by Herbert Poul
3 CommentsReleasing ShelfShare - Share, manage, rate and review your books, dvds, you have read ..
2009-03-14 17:41:51
Then check out ShelfShare. It is a simple application hosted on google app engine which will allow you all that and more - like exporting all your ratings and reviews using a CSV file, or subscribe to the shelves of your friends using RSS feeds.
I would love to receive feedback if this looks useful, or what would make it useful
Thanks to gerhard for testing it as a first user
Hey, we have Signatures !!! Great, isn't it ? 
Posted by Herbert Poul
0 CommentsPerl library to fetch activities from connect.garmin.com
2009-02-22 08:28:03
I have just uploaded my first perl module to CPAN!
It is called GPS::Garmin::Connect and provides users with a very simple API to download their own activities from connect.garmin.com. This is the same code i am using for my list of runs.
Unfortunately Garmin has not yet released a public API to do this (and it doesn't look like it will in the near future) - so this module authorizes using the default login form and than uses a simple JSON call to fetch the data (just like Garmin's flash interface). It wouldn't be hard for Garmin to break the interface, but hopefully they won't mind that people actually use their own data...
It is called GPS::Garmin::Connect and provides users with a very simple API to download their own activities from connect.garmin.com. This is the same code i am using for my list of runs.
Unfortunately Garmin has not yet released a public API to do this (and it doesn't look like it will in the near future) - so this module authorizes using the default login form and than uses a simple JSON call to fetch the data (just like Garmin's flash interface). It wouldn't be hard for Garmin to break the interface, but hopefully they won't mind that people actually use their own data...
Hey, we have Signatures !!! Great, isn't it ? 
Posted by Herbert Poul
0 CommentsKernel panic on Mac OS X
2009-02-14 16:11:13
I already had enough kernel panics on linux (nice 80x25 console with backtrace) as well as enough blue screens on windows.. (everyone knows how this looks?), but i always felt as if i'm still missing something..
Now, after experiencing a kernel panic in Mac OS X 10.5 i finally feel completed
(yep, that's a windows running in virtualbox and virtualbox was probably the cause for the crash.. but .. anyway)
So, what's next? How does a kernel panic look on FreeBSD? anyone knows? (yep, i'm not really interested enough to google it)
Now, after experiencing a kernel panic in Mac OS X 10.5 i finally feel completed
(yep, that's a windows running in virtualbox and virtualbox was probably the cause for the crash.. but .. anyway)
So, what's next? How does a kernel panic look on FreeBSD? anyone knows? (yep, i'm not really interested enough to google it)
Hey, we have Signatures !!! Great, isn't it ? 
Posted by Herbert Poul
0 CommentsORF Skichallenge 09 finally over
2009-02-08 12:53:12
After six long racing weekends the ORF Skichallenge 09 finally came to a close.
I finished on place 4 241 in the world cup of 5 races, and on place 12 151 in the final championship (in which i obviously invested not enough time
). Unfortunately i forgot my ranking in the last two years, which is why i am now archiving it here
I finished on place 4 241 in the world cup of 5 races, and on place 12 151 in the final championship (in which i obviously invested not enough time
Hey, we have Signatures !!! Great, isn't it ? 
Posted by Herbert Poul
0 CommentsPage 1 | Next
Archive
- January, 2010 1 posts.
- December, 2009 1 posts.
- November, 2009 1 posts.
- July, 2009 1 posts.
- June, 2009 1 posts.
- May, 2009 1 posts.
- March, 2009 1 posts.
- February, 2009 5 posts.
- January, 2009 4 posts.
- December, 2008 2 posts.
- November, 2008 1 posts.
- September, 2008 2 posts.
- August, 2008 2 posts.
- July, 2008 1 posts.
- April, 2008 1 posts.
- February, 2008 3 posts.
- January, 2008 2 posts.

