Many portable devices these days have the means to browse the Internet, meaning they have some kind of Web browser installed, whether it’s Safari on the iPhone, the mobile version of Internet Explorer on Windows Mobile devices, or the browser on the Sony PSP. What this means is, they can view HTML files and can usually also read the JavaScript language. The goal of this project is to give you a JavaScript file you and your child can edit (even if you’re not a true “coder”) to create your own decks of flash cards to carry and access anywhere on a portable device.
But let’s take a step back to the beginning. This project started with my friend Bill Moore, a buddy of mine since high school and a groomsman at my wedding. Bill is a good geeky dad in his own right. He would faithfully help his son prepare decks of flash cards to learn school material, but he was troubled by the inefficiency and downright environmentally harmful nature of the task. The cards were usually of value only for a short time—once the subject was quizzed and done with, the cards were not useful any longer and they became a terrible waste of money, effort, and trees. He and his son tried writing them in pencil so they could erase the text and then reuse the cards, but that became very annoying very quickly. They didn’t want to abandon the usefulness of the flash-card method of learning, but they needed to figure out a better way of doing it.
Then one day, Bill had a brilliant idea. Considering that his son carried his Sony PSP just about everywhere he went, Bill realized doing something electronic could be the solution. Since it was what he was familiar with, he started with a Perl script that would generate a file viewable on the PSP’s Internet browser, and then worked out how to save and access that file in the root directory of the PSP’s internal storage. The proof-of-concept worked, but it was a little ungainly for repeated use, so he did some research and figured out JavaScript could be the answer he was looking for. With a bit of work, and about 30KB of coding, he had a functional script with which to build “decks” of electronic flash cards.
The full script is available online for free, as an open-source project, at
www.geekdadbook.com
.
Most of the code builds the look and functionality of the tool (features which, if you are a scripting guru, you are more than welcome to improve and share), but the important part to understand is this stretch:
This is where the actual data is stored. Everything between “function initCards() {“ and the last ”}” is the contents of the deck. The structure is pretty simple: “newSubject” creates a new subject listing for a stack of cards on a particular topic (in this case, Science—with the quotes); “newChapter” starts a sub-subject (or, um, chapter), and then “addCard” starts a new card. In between the parentheses goes the front side text, in quotes, a comma, and the back side detailed info, in quotes. Like this:
What’s very cool is that you can do as many subjects, as many chapters, and as many cards as you want, simply by repeating the basic script over again on new lines and changing the titles. You could, if you and your geeklet wanted to, have a stack for every school subject (say Science, Math, English, Foreign Language, Social Studies). In each of those, create a chapter for every chapter in his textbook for the given subject, and then as the school year progresses, add the cards for a given chapter as it was learned in class, so that by the end of the year, the deck would represent all the key facts your child learned, and be the ultimate study guide for finals.
But more important, once you and your kids have learned how to build the electronic cards, work with them to choose what goes on a given deck, but have them do the coding. Just like making handwritten cards in the “old days” provided half the educational benefit (tactile learning—going through the experience of writing or typing the information, is just as valuable as auditory—listening or speaking it), building the electronic cards may hold just as much import in the learning process.
The last step is getting the file (probably named “flash-cards .htm” or something like that) onto your portable device. Since the project was first devised for the Sony PSP, let’s look at that:
ELECTRONIC FLASH CARDS ON A SONY PSP
1. Use a USB cable to mount the PSP as a drive on your computer (may require a trip to the devices settings to allow it).
2. Create a folder in the root directory with a short, easy name (like “local”), and drop your flash card file in there.
3. Unmount the PSP.
4. Go to the PSP’s Web browser and manually open the following URL:
file:/local/flash_cards.htm
. Please notice there is only one forward slash in the URL. For the savvy Web-heads, no, this is not a typo. It is rather a quirk of the Sony PSP’s root access that took some deep Googling to uncover.
5. Having accessed the file, you should be up and running with the flash cards. I suggest you use the PSP’s bookmarking ability to save the URL so you don’t have to reenter it manually each time. I will also point out that knowing all this about root access of the PSP opens up the ability to save and access music, movie, and other files locally on the system. However, hacking your PSP is not what this book is about, so I’ll leave it to you to explore some other time.
ELECTRONIC FLASH CARDS ON AN I-PHONE OR I-POD TOUCH
Devices from Apple are notoriously less accessible than their counterparts from other manufacturers, for both good and bad reasons. For our purposes, though, it doesn’t matter. Indeed, the process is easier than the PSP but slightly more expensive, because you’ll need to pick up a helper application. There are a variety of file storage and viewing apps available on the iTunes App Store for a variety of prices, but the two with which this project has been tested are Files and Pogoplug. Files costs $4.99 but is a great utility for accessing the storage available on your iPhone, and it allows you to upload files from your desktop/laptop computer to the phone for viewing. Pogoplug is free, but it requires you to own the $99 Pogoplug device for turning an external hard drive into network and Internet-accessible storage. Both these apps will let you store the flash card file on your device and run it. As more apps are tested, they will be listed on the
www.geekdadbook.com
Web site.
ELECTRONIC FLASH CARDS ON OTHER PORTABLE DEVICES
Realistically, any portable device with a browser and local file access should be able to use this tool. This includes all manner of smartphones as well as (rather obviously) netbook and laptop computers.
ELECTRONIC FLASH CARDS HOSTED REMOTELY
The alternative to actually carrying the file with you is, since the portable flash cards tool is in its essence a Web page, to host it on a personal Web site or other remote-access file storage and call it up whenever you have Internet access.
The portable flash cards tool is intended to be an open-source project, and you are welcome to take it, improve it, and adapt it for your needs.
Wi-Fi Signal Booster
M
ost modern households, especially those with geeky parents and children who spend copious amounts of time connected to the world via the Internet, have wireless LAN setups with a router so the whole family can enjoy a wireless connection from anywhere in and around the house.
At least, that’s the idea.
The reality is often something less functional. If a router is set up in the den/office, and Mom wants to connect and check her stock portfolio while sipping a mai tai in the sunroom, her connection may be fuzzy. Or if one of the kids wants to do research for his report on quantum vibration from the tree house out in the backyard, the signal may not be able to keep up with him. This is because the strength of the radio signal from a Wi-Fi base station drops off in steps over various distances (assuming nothing reflective gets in the way), and each step usually also degrades the available bandwidth. You need to maintain a strong signal to have a strong, higher-bandwidth connection with the base station.
It is possible to use repeaters—additional routers placed elsewhere in the house to repeat and amplify the signal—if you have a large house to cover, but that means buying extra hardware to place in additional locations, which could be a waste of money if you need the extra-strength connection only occasionally, or in a variety of locations. What if you could make yourself something with simple materials to boost the signal to your laptop and that you could move around the house with you as needed, and for less money than an extra wireless router? You can!