The Quizlet Blog

Archive for the 'Technical Stuff' Category

Quizlet needs help! Translators and a Systems Engineer needed!

Monday, February 18th, 2008

I just built this super cool system for translating Quizlet’s interface into different languages. You can already use Quizlet to type in data in other languages, but this will actually translate Quizlet’s English interface (the navigation, the instructions, etc.) into other languages.

It’s ready to be translated into any language (except maybe a right-to-left language like Hebrew). So if you’re fluent in any language other than English, send me an email at andrew@(quizlet’s domain) with what language you can translate Quizlet into and a little about yourself and your fluency level. Experience with (very) basic HTML will help you, but it’s not strictly required. You will receive credit in the footer of every page on the site for people using your language. The system for translating the site is super slick - you’ll enjoy it! ;)

I’m also looking for an expert systems engineer to work on making Quizlet faster. If you’re interested, I’ve posted the details on Craigslist, and I won’t repeat them here. Thanks y’all!

Addressing performance problems

Wednesday, November 14th, 2007

Hey y’all - it’s been awhile. I don’t have any new features to announce tonight, but I’d just like to take this time to keep you in the loop about what’s going on inside Quizlet right now.

In the past few weeks - especially the past few days - Quizlet has become intolerably slow at times. The service is sometimes super speedy, but sometimes laggy or even unresponsive.

This morning I made some big changes to some of the database configuration. The reoccurring problem some of you may have noticed with the “Flagrant System Error” appears to be over with. I’ve taken care of the problem (too many mysql db connections) that was causing all of the previous database downtime.

Fixing that problem may have caused other problems - it’s too early to tell. What I can say is that Quizlet should be online a greater percentage of the time, but it may still be slow.

Number of Users by Week

These problems are growing pains - which is a good thing in a way. The problems mostly appear in peak activity times, which is usually the middle of the day on weekdays. Quizlet is averaging about 120,000 page views per weekday - a lot of traffic for a single server.

Moving into the future, these performance problems are my first priority. In the immediate future, I’m putting all my Quizlet time into improving Quizlet’s performance over adding new features. One thing that’s coming in the near future is an overhaul of the Search page, which has a tendency of timing out of late. I use Quizlet all the time too, so it hurts me just as much as anyone when it has problems.

The problem is that while I’ve built quite a few websites in my day, none of them have ever seen the kind of high-performance needs that Quizlet has. So I’ve been feeling around in the dark to some extent up until now when it comes to performance. Now I’m being a lot more proactive about it, and I have several people helping with the site’s performance now. I could still use more help however, so if you are a mysql/apache/solaris expert and you’re interested in getting involved in Quizlet, send an email to andrew/quizlet.com.

Because I discussed it earlier, I thought I’d let you all know that my MIT application is all sent in and done with. I’ll find out. You can bet your boots that Quizlet factored heavily into my application - so thank you all for helping it grow and reach where it is today.

On bugs, and how I recently squashed a particularly nasty one

Saturday, February 17th, 2007

Bugs are a fact of life for software programs, and Quizlet is no different. The extended 450-day testing cycle I put Quizlet through before it was launched to the public helped get rid of a vast majority of them, but there will always be those that get through. The feedback feature at the top-right corner of Quizlet has helped tremendously in rooting out some stragglers.

Someone recently sent me a bug report that said Quizlet wasn’t grading her answers on the Test page, and additionally opening the accents bar would make the page blank. Bizarre, no? So I investigated further…

In the feedback messages, I log what browser people use, so I determined right away that this bug was only affecting Internet Explorer users. So I launched IE and started working on recreating the problem. It certainly didn’t happen every time someone tried to grade their tests in IE. I was able to reproduce the bug when I explicitly had the ‘Matching’ section activated, and only when there were more than 25 questions in the pool, and only in Internet Explorer 6 (version 7 is fine). A pretty obscure scenario, but it was indeed causing problems.

So I rooted around the part of my javascript file that grades the Matching section, and it didn’t have any red flags. Then I looked at my HTML, and realized the problem. To help the grading system determine correct answers, each <li> containing the input boxes for answers had an id with the correct answer (ex. <li id="c">). Apparently a certain one-letter id, I didn’t bother to find out which, was causing IE to have problems. But not big obvious problems, only problems that show up when you open the accents bar or grade your test.

My solution was to change the ids to prepend “iesucks-” to each id (ex. <li id="iesucks-c">). That fixed both bugs, and everything is running silky smooth now. (Yes, this means you can View Source and find the correct answers - shock!) And yes, I realize this isn’t a very good data structure.

Isn’t HTML supposed to be a stable format? Has it not been around for fourteen years? The sad thing is, this is typical of Internet Explorer.

The funny thing is, I saw some form of this bug when I was originally building the matching feature. I made a little workaround, and thought I had it fixed, but I obviously hadn’t seen the whole problem.

Now, can I interest you in Firefox? It’s a rock-solid, free browser that doesn’t have any of IE’s weird problems. IE will always be supported by Quizlet, just because of its dominance, but you will always get the most stable experience with Firefox. And it has spellcheck! Safari will work too, if you’re on a Mac (I use Safari).

If you ever spot bugs in Quizlet, please send them my way. You’ll be doing everyone a big favor. Thanks!

Finally, what you really want to know. Where’s Scatter? It’s coming, along with a big update. I’ve been working hard the last two weeks, and I’ll be releasing a big update soon. I just have a lot of testing to do before then. It’s a good thing I have a week off from school now.

Quizlet on your site - send in your API suggestions

Monday, January 29th, 2007

A lot of people have been asking for some way to hook into Quizlet on other sites to use its data and functionality. This is, of course, a great idea. So I’m in the process of gathering ideas on what an API for Quizlet might do. So far, I think:

Embeddable lists:

  • JavaScript embedded code that displays a list, also with data available via JSON
  • List of your own sets
  • List of all terms for a certain set
  • List of all sets for a certain tag
  • Most recently created sets, most studied sets, stuff like that

Some limited studying functionality would be cool too - maybe an embedded version of the Test mode or Familiarize mode.

If you want to have Quizlet on your website, send in your own suggestions! I’m in the very beginning stages of planning an API, so anything is possible. Let’s hear it.

Mootools: the perfect JavaScript framework

Sunday, January 28th, 2007

Quizlet users - this is a technical post about the wonders of mootools, a programming framework I used to build Quizlet. Feel free to move along.

Short story:

mootoolsMootools is awesome because:

  • Above all, it’s intuitive. You can read mootools code and it makes perfect sense.
  • The code is compact. With every component of the code included, mootools 1.0 is just 35.2k (compressed). I would recommend downloading your file twice, one with compression and one without, so you can employ the compressed code on your site but reference the readable code when developing.
  • The code is modular. You can choose what parts of mootools you need, and which you don’t. So if you don’t need accordion functionality, your own download can be even smaller than 35.2k.
  • It does everything. Effects, Ajax, JSON, drag-n-drop, cookies, DOM manipulation, and more.
  • The code is beautiful. Beautiful code saves headaches. Beautiful code is easy to change.
  • It’s Object Oriented. You never need to rewrite anything, just inherit code from parent classes!
  • It’s superbly documented. The documentation includes full examples and details on every parameter of every function.
  • It has a support forum and an IRC channel (freenode: #mootools).

Long story

Back in October 2005, when I started Quizlet, there was really only one JavaScript framework in the mainstream: Script.aculo.us. So that’s what I started with, and it worked alright. It let me do some neat effects, and I could figure out the code enough to use the basic features. But I never used it to it’s full 150k potential - I used my own AJAX code and didn’t take advantage of many of its features, probably because they weren’t obvious enough.

Then, last summer, I met Valerio, the creator of Mootools. He gave me a demo of the mootools code, then in its early stages. It blew my mind. Walking out of the demo, I fantasized a page of random boxes flying around, changing color and fluctuating widths, in perfect symphonic beauty.

Let’s have an example, shall we?

new fx.Styles('mydiv').custom({
    'top' : [10, 200],
    ‘opacity’ : [0, 1],
    ‘color’ : ['#133ea5', '#8b1616']
});

The above code will make the element with id="mydiv" move its top position from 10px to 200px, change its opacity from 0% to 100%, and transition its text color (with beautiful hue changing) from blue to red, all at the same time!. Tell me that doesn’t astound you!

So I thought to myself, screw script.aculo.us! And I began transitioning all of my Quizlet code from script.aculo.us to mootools (it wasn’t a fun task, but I’m glad I did). I actually still haven’t finished, as the Learn and Combine pages on Quizlet still use script.aculo.us. They’ll be transitioned soon, when I figure out new specs and functionality for those pages.

Mootools is perfect for web applications. It’s small and easy to use, saving developers precious time. I feel clever when I’m using it, and it saves me tons of time. If you don’t believe me, how about some real-world code examples?

  • Discuss.js - for Quizlet’s live discussion box feature. This code incorporates all sorts of cool mootools functionality, including JSON, Ajax, DOM manipulation, the mind-blowing pass() function, and nice height effects.
  • Familiarize.js - for Quizlet’s flash card feature. It’s very simple functionality.

Note: my code isn’t even half as beautiful as the mootools code. If you want to see these scripts in use, grab a free Quizlet account.

So that about sums it up. Mootools is all good.