MrDiscountCoupons.com – We’ve Only Just Begun…
Mr. Discount Coupons is a project I'm currently developing. The idea is simple: create a way for people to save big bucks while making sure I profit a smidgen in the process.
Of course, there are a number of ways to do this and I'm sure this is just the beginning, but so far I have three ways for people to save (a toolbar, actual daily updated coupons and a few affiliate offers that promote specific services). I got the idea from a buddy of mine who runs the Printable Coupons Guide. He gave me the thumbs up to create a "competitor" website, so this is my hack at it.
Thanks, buddy ... now let the games begin!
Dropbox – Web Developer’s Best Friend
Recently, I happened to see an ad for Dropbox while I was browsing. I'd seen the logo before but I didn't really have any idea of what it was besides the obvious implication, so I decided to check it out.
Dropbox starts you off with a free 2GB, which is nice, but will give you more if you refer people (right now, it's 250MB per referral). At the moment, I'm up to 4GB and am trying to get up to the 10GB maximum for free accounts. Paid accounts allow you to get either 50GB ($9.99/month) or 100GB ($19.99/month).
In any case, as it turns out, Dropbox replicates the functionality of iDisk. If you aren't familiar with iDisk, the idea is that you have a hard drive on the web and can access it as a regular folder on your computer. Dropbox takes this a few steps further though.
Cross-platform Support
As I was surprised to find out, Dropbox works for Macs, PCs and they even have an iPhone app. As far as I know, they don't have an application for Windows mobile devices yet but they've got it on their to-do list. Incidentally, I already use it on all of my computers (work and home) and got my wife to start up an account for herself. So far, it has worked flawlessly across all of the devices it's been installed on.
Revisions
Everything you save to your Dropbox folder will have a 30-day history of revisions (change history), so you are able to revert back to older versions. They call it an 'undo history,' which makes sense. For developers, this is an indispensable feature.
Shared Folders
Not only does Dropbox support public folders (like iDisk does) so you can share your files with friends/family, it also gives you the option to have a shared folder. A shared folder will show up as a folder in the Dropboxes of all parties involved, just like all of their other folders. So if you're collaborating with other people on anything within reason, Dropbox makes for an excellent solution. It's as if you're both working on the same hard drive ... with a slight delay for sync.
Back-up Solution
Like iDisk, Dropbox is an excellent solution for back-ups. Currently, I use Mozy which is about $5/month per computer you back up but they offer unlimited space. I'm considering switching to the $9.99/month 50GB package just for the simple reason that I can back up any of my files and access them from anywhere (even my iPhone).
So far, I've been using the site as my 'local' folder on a few sites I develop and it works 99% flawlessly. Once in a great while, I'll try and save while it hasn't finished syncing yet and it will give me an "Unable to upload" error. But I just wait a second, upload again and everything works perfectly.
Needless to say, I highly recommend Dropbox as either a Web Development solution or a Back-up solution (or both). Click here to try Dropbox. Oh and by the way, if you use my link, we both get an extra 250GB.
CheckBoxer for Google Chrome
CheckBoxer is an extension I wrote for Google Chrome. Based on the CheckBoxMate plugin for Firefox by nrlz, it does ... well.. exactly the same thing: you draw a rectangle around the check boxes you want to toggle on or off. Magic.
Here it is in action:
As you can see, it has selected all of the check boxes within the selected area. No need to hold any other buttons as it only works when you've dragged over the starting checkbox.
Click here to check it out.
CheckBoxMate for Greasemonkey
Ever had to check off a bunch of checkboxes one by one? It's a grueling and tedious process, especially when you have to do more than .. say .. five. Never fear! That's why nrlz came up with CheckBoxMate.
What Is CheckBoxMate? This script allows you to check multiple checkboxes just by drawing a box around them.
It doesn't get any more elegant than that and it's one of those tools you don't use every day but when you need it, it's a godsend. The trouble is, it doesn't seem to work at all (without tweaking) with Firefox 3.6+. That's where Greasemonkey comes in.
In a desperate attempt at making my precious CheckBoxMate work with my updated Firefox script, I decided to look under the hood to see if I could figure out the solution to the issue. After an hour of poking and prodding, I was able to troubleshoot and fix the problem using the Add-on's javascript in Greasemonkey (pretty handy way to diagnose Add-on problems in general, actually).
Summary: CheckBoxMate stopped working, so I jammed it into Greasemonkey, fixed it and released it on userscripts.org.
I'm currently using CheckBoxMate for Greasemonkey with Firefox 3.6.3 on Mac OS X 10.6.3 with absolutely zero problems.
P.S. I've done all of this essentially without nrlz's permission at all, so if he tells me to take this down, I will.
*** UPDATE***
I've tested this on my Windows 7 box at work (Firefox 3.6.3) and it works perfectly. Please let me know if you have any issues.
ShareThis Sucks for Greasemonkey
After becoming repeatedly annoyed at how the ShareThis button would pop up and just stay there at any hint of a mouseover/hover, I wrote this short Greasemonkey script to banish ShareThis from my sight:
And here's a link directly to the file:
Enjoy!
-Scott
Reddit Tabbed Links
Put simply, I was just tired of shift+clicking the links on Reddit, so I made a Greasemonkey script that does it for all the main links and comment links:
Here's the direct link to the script:
Enjoy.
MemcacheD + PHP + MySQL = Dream Team
When using development frameworks like CakePHP, Zend or even Smarty, I always took their ability to cache data for granted. After all, I hadn't built all of my applications using frameworks and those that were lacking didn't seem to be hurting too badly. It just seemed like a bonus for using their environments and while I was very aware of the fact that caching reduces stress on the database, I hadn't really built anything that was in dire need of caching as a means of improving overall functionality.
Once I started learning about memcached, I actually started to think about my non-frameworked applications and whether there were any noticeable lags. It wasn't long before I had thought of a few glaringly obvious examples where (mem)caching could be used to significantly improve performance. But before I go into those examples, here is a brief explanation of what memcached does for you (taken directly from memcached.org):
What is Memcached?
Free & open source, high-performance, distributed memory object caching system, generic in nature, but intended for use in speeding up dynamic web applications by alleviating database load.
Memcached is an in-memory key-value store for small chunks of arbitrary data (strings, objects) from results of database calls, API calls, or page rendering.
Memcached is simple yet powerful. Its simple design promotes quick deployment, ease of development, and solves many problems facing large data caches. Its API is available for most popular languages.
So first on my list was Blogflare.com, with its MySQL-based statistical cruncher running on regular intervals and its PHP-based image tickers, the load on the database was strained on a very regular basis. I noticed if I just adjusted the simple database calls to push updates to memcached and then check memcached for data before I even touch the database, performance significantly increased on the front-end. Additionally, this same improvement was helpful in terms of serving out ticker images that are normally database-driven. With these two simple changes, load on the database dropped enough to make scaling much less of a pain. This is relevant, too, as the site has grown steadily over the past few months and shows no signs of stopping.
The next item on the list is one I can't actually link you to but an application that I've built for the University's Art School to handle finance planning and reporting for graduate students. After a few moments of thinking about its structure I realized the database is very read-heavy, particularly in the reporting area. Reports are generated from stored procedures and perform some pretty heavy calculations on each student's data in order to provide administrators with a very accurate picture of spending and planned spending. Updating the database calls for insert/update/delete methods to perform calls to memcached first proved to be ENORMOUSLY effective at speeding up use of the database. While this helps to reduce load on the server, the most important factor in this case was how much better the overall user experience was. Lagginess became intermittent rather than constant.
When I was researching memcached and wondering about how such a thing would scale, I found a clipping from this article entitled How to Dramatically Speed Up Your Web Application: An Introduction to memcached very helpful-
No doubt if you took Computer Science in school you were cautioned of the temptation to abuse caches because there is a law of diminishing returns in regards to the size of your cache: the larger your cache gets the more costly it is retrieve and store information within it. Memcache however is not heavily constrained in this way, because the cache at large is made up of lots of little caches. This allows memcached to be much more responsive even when the cache itself begins to reach sizes that might be really inefficient in other circumstances.
So this little bit managed to assuage my fears and give me the confidence to jump right in and start testing it with my lesser-applications. The results, even this early, have been astounding and I can now see how they are a very vital part of modern web application development.
I am a Web Ninja
I doubt I'll be applying for a job in Amsterdam anytime soon, but I thought I'd see if I could work my way through this test anyway. It doesn't really involve any sort of real web development prowess, really, but it does require some reasonable know-how with Firebug (one of my most favorite tools ever).
The test took me about five minutes (four of which was spent on number three), the last minute was spent on the other questions. That's pretty decent in my mind, but who knows how well other people did?
I really like this style of interviewing though, and I think more companies should use it to weed out the riffraff. It does require a lot of creativity on the design end but, I'd imagine, reduces man hours (spent interviewing and processing) like crazy. If I ever hire more developers, I plan to come up with a puzzle test like this.
If you're interested in seeing how you'll do, click here to take the web ninja test.
-Scott



