FlySpray: A great quick Issue Tracker

So I wanted to write an article about an issue tracker I have been using called FlySpray. When I created UltimateBackpacks I wanted people to easily be able to post suggestions and bugs in a single place without having to create an account. FlySpray is awesome for this, it is a simple PHP application that is easy to setup and allows for the posting of issues and bugs anonymously. It also has a really easy to use templating system, so I was able to add a Project Wonderful ad spot on the page. You can also configure it to only have one project on it (but it can keep track of more than one project) and make those issues on the front page. This just gives a simpler experience for people looking to use it to track only one project.

However, there is one big problem people should be aware of before they use it. It doesn’t have a CAPTCHA system!

No CAPTCHA system?
That’s right there is no CAPTCHA system and if you want anyone to be able to post an issue without an account this is a big issue. I remember trying to load the UltimateBackpacks tracker after not looking at it for a few months and the request eventually just timed out. I decided to check the database and to my surprise there was over 50,000 issues in the database. All of them had links in them and looked like they had been posted SEO bots. After I cleaned out the database within a day there were over a 100 more and I realized I had to find a real solution to this.

Solution
So the solution here is to implement reCAPTCHA. Google’s reCAPTCHA is extremely easy to signup for and implement into your FlySpray site. Once you signup for it they will give you some code to add to the front-end of the site that will display the CAPTCHA.

Integrating reCAPTCHA into FlySpray (Frontend)
Add the script tag to the header.tpl file and the div to newtask.tpl. Make sure you modify the template files within your theme. The default theme is CleanFS so by default the path is themes/CleanFS/templates. Now you need to implement the backend.

Integrating reCAPTCHA into FlySpray (Backend)
I wrote a very simple PHP code snippet that checks with reCAPTCHA a while back. I recommend you use this if you are new to PHP or want to save time. Now you are going to need to put that check in the “includes/modify.inc.php” file underneath case “‘newtask.newtask’:”. And rather than wrap all the code to add a task in an if statement I simply added a check if the CAPTCHA was incorrect that gave them an error message and kicked them.

if(!$captchaSuccess) {
Flyspray::show_error(‘Incorrect CAPTCHA.’);
break;
}

Unfortunately the blockquote messes up the formatting, but hopefully you get the idea.

Conclusion
Hopefully this helped you protect your issue tracker against spam, if you have questions feel free to leave a comment.

Links
Issue about this on FlySpray
My reCAPTCHA PHP code snippet

A powerful Chromebook?

When I started college I figured it was important to get a good laptop, up until that point I had just been using my desktop. I was interested in getting the best price-to-performance ratio I could find and I decided to look into Chromebooks.

My budget was $300-400 and I wanted a laptop that was powerful enough to handle everyday tasks like playing music, browsing the web as well as programming. After some research I decided to go with Toshiba Chromebook 2 – 2015 Edition (CB35-C3350) because of the 1920 x 1080 display, small size, good quality speakers and the fairly powerful processor inside (I chose the i3). It also has an LED backlit keyboard if that’s a feature that interests you. My workload usually entails Spotify, Firefox (with a lot of tabs open), a MySQL server, an Apache server and PHPStorm. I can run all these at once without any lag.

If you are curious the Octane Scores are below in the spoiler tag:

Octane Scores

  • Octane Score: 20476
  • Richards: 18237
  • Deltablue: 35783
  • Crypto: 18533
  • Raytrace: 47507
  • EarleyBoyer: 25796
  • Regexp: 3097
  • Splay: 13805
  • SplayLatency: 19325
  • NavierStokes: 20632
  • pdf.js: 13474
  • Mandreel: 15028
  • MandreelLatency: 29153
  • GB Emulator: 36439
  • CodeLoad: 10594
  • Box2DWeb: 34022
  • zlib: 39143
  • Typescript: 25496

[collapse]

However, it is a fairly extensive process to install Linux on the Chromebook. There is a great guide that I followed to do this setup which I will link to at the end of this post.

As soon as I got the Chromebook I replaced the puny 16 GB SSD with a 128 GB SSD so that I could have more space. I installed ElementaryOS on top of the new SSD, but that requires you install new BIOS firmware called SeaBIOS, an open source firmware designed to replace Google’s restrictive BIOS. Overall, the the whole process from installing the SSD to flashing SeaBIOS and finally installing Linux took me about 3-4 hours, but I had never worked on the inside of a laptop before and was going slow.

I found it a great learning experience and it gave me a much greater appreciation of my laptop after I had done so much research and custom work on it. I highly recommend this for anyone who wants a budget laptop with great performance and doesn’t mind putting some effort in.

Guides I followed:
Native Linux on Toshiba CB35-C33X0 Chromebook
Upgrade the SSD in a Toshiba Chromebook 2 (2015)

SuperScriptJS: A powerful chatbot tool

Recently, I discovered SuperScriptJS, which is a powerful set of libraries and tools that can be used to create chatbots. Unfortunately it does not seem to be in wide use and it has great potential due to how easy it is to customize.

If you plan on creating a chatbot, you should definitely start by looking at SuperScriptJS. It adds many new features to RiveScript allowing you to cover even more situations with fewer patterns. Due to the fact that it is written in NodeJS it is really easy to extend and there are already many different clients programmed that it can handle requests from.

It can also easily store all the knowledge it learns in a database and using the plugin system it is really easy to save and retrieve this information.

What I would really love to see is someone create a chatbot with a pattern base as large as the A.L.I.C.E chatbot with SuperScript. As far as I can tell there are no full fledged chatbots that have been created using these tools and it is somewhat disappointing.

So I would like to encourage anyone who has an interest in creating a chatbot to check out SuperScript and use it as a framework. I plan to start working on my own chatbot eventually, but right now I have too many other projects.