My Lockdown Project: Plestacks

Today is day 17 of a four-day lockdown. Lots of extra time on my hands means time to devote to my hobbies. This week I combined two of my hobbies, learning Chinese and web programming, to make a new flashcard app.

If you are learning Chinese, chances are that you’re using an app called “Pleco.” It’s a great dictionary app, really the gold standard of Chinese dictionary apps. And it’s loaded with features like live OCR, animated character drawing, and flashcards. I’ve been a happy user of Pleco for over ten years.

One of my many personality quirks is that I am a collector. The Chinese language, with tens of thousands of unique characters, is a hoarder’s dream nightmare. I have many, many “collections” of words that I’ve come across, and want to remember. When it comes to saving Chinese characters for later reference, I’m like that eccentric person who keeps every newspaper and magazine he’s ever bought, for years and years, cluttering up his house, just in case I want to read them later. Pleco enables this quirk with the function to create custom collections of words that you can review later, using the flashcards app. I have many, many collections.

I diligently organize my collections of Chinese characters, but each collection has hundreds of characters in it. If I use the flashcards function, it can take too long to get through a whole stack. Sometimes I have a few minutes, and want to spend it reviewing some of my collections. With Pleco’s flashcard system, you have to do the whole collection, no matter how many words it contains. It’s too cumbersome.

So I made my own flashcard app, that imports cards made with Pleco, and makes custom stacks of words to review. I call my creation Plestacks.

Plestacks is a web app; you can use it on a phone or a desktop computer. If you don’t use Pleco, then it’s pretty useless for you. I estimate that about seven people in the world will find this useful. However, I am one of those seven people, and in the immortal words of Dr. Frank N. Furter:

This was a fun project. I learned some new database functionality of modern web browsers, and applied some new web programming skills that I’ve been learning. If you’re a learner of Chinese and a user of Pleco, feel free to use Plestacks. You can access the program here:

My Lockdown Project: Resurrecting Audio Recording on the Web

In my previous career in academia, I developed software programs to facilitate language teaching and learning. It was a rewarding job. I loved putting my programs into the hands of teachers and students, and seeing the students benefit from my work.

I found a niche to specialize in: web-based audio recording. Our center’s most popular tool was a simple audio recorder that a teacher could put into any web page. Students used the “audio dropboxes” to submit their speaking homework for the teacher to evaluate.

The technology required the Flash plugin, because plain HTML didn’t have a way to access the computer’s microphone. Flash was THE technology in the early 2000s.  But it didn’t last.  The introduction of the iPhone was the death sentence for Flash.  It probably isn’t an overstatement to say that Steve Jobs killed Flash. Apple made the decision not to support Flash on the iPhone. When mobile started to overtake desktop computers, Flash was in trouble. So was my suite of tools.

Fast-forward several years. Flash is now disabled by default on desktops. I doubt any cell phones support Flash. Adobe recently announced that Flash will officially die (again) at the end of this year. But while Flash was dying, HTML was growing up.  HTML’s capabilities have largely caught up with Flash. The HTML specification has matured so much that it’s possible to do a lot of what Flash had been used for. Including native audio capture.  Even on the iPhone!

Like the rest of the planet on lockdown, I have some extra some time on my hands lately. Because I’m a nerd, I recently decided to see if I could reproduce Flash’s audio capture functions with native HTML. My goal was to be able to capture audio on my iPhone, and then upload the file to a remote server. All in native HTML.  Essentially, I want to reproduce my old Flash-based functionality on an iPhone.

It’s been several years since I did any serious web programming. Javascript has matured and advanced.  My old brain has matured and decayed. Besides refreshing my programming knowledge, I had to learn some new programming protocols before I could dig into the guts of the new WebAudio specification. It all came back to me, though (eventually). After several weeks of work, mostly on evening and weekends, my universal audio recorder is ready for beta testing. I call it the Dencorder, because shut up, it’s mine, and I can call it whatever I want.

The Dencorder, beta release, as it appears on an iPhone. This is 100% HTML, CSS, and Javascript. Even the graphics are generated by Javascript code.


The code is as pure and standards-based as I could keep it.  I didn’t use any frameworks or libraries (not even JQuery).  It’s just plain, vanilla HTML, CSS, and Javascript.  On desktop computers and Android devices, this should just work.  If you’re using an Apple device (iPhone or iPad), you will have to make a setting change in Safari to enable the new MediaRecorder function. But once that’s set, the recorder should work fine.   And the whole thing, Javascript code and web page, is all less than 600 lines of code.  I could probably shave another 100 lines off if I were a good programmer.  But I’m not a good programmer, just a clever amateur.

Feel free to play with it.  See if you can break it.  There is an “upload” function, which will put your audio file onto my server.  If you choose to upload your audio file, please don’t record anything naughty.  You can access the Dencorder here:  I had a lot of fun making this, and to experience how far HTML has come in the last ten years.

Staying Fully Charged

I demand perfect performance from my technology.

I’ll never forget the time my cell phone died while on a trip. I was traveling with a friend in China. My friend didn’t speak Chinese, and was depending on me to navigate. About half an hour before our train was to depart for the trip back, I glanced at my phone’s battery indicator, and was shocked to see it was at 6%. In China, if you don’t have a cell phone, you are severely handicapped. You can’t order tickets online, you can’t call a car, you can’t check on the status of your train. It’s a big problem.

Now, there are many possible reasons why my cell phone battery suddenly developed a charge problem. Maybe it was just old (it wasn’t). Or it could have been because earlier in the day, we happened to visit a park that overlooks a military base, and I happened to have seen some stuff that the Chinese military probably wouldn’t want a foreigner to see, especially a foreigner with my job. I promise that I’m not a spy, but that’s a hard sell to certain governments that have trust issues. China is (in)famous for electronic eavesdropping, and they’re really, really good at it. So I’m fairly convinced that my phone was infected with some malware, and even wiping the phone and reinstalling everything couldn’t disinfect it.


The experience of being electronically cut off from the world was pretty annoying, and I vowed never to be stuck in that situation again. Now, every time I travel, I carry my phone charger and a battery, which the Chinese call a “fill electricity treasure.” I’m love my Anker fill-electricity-treasure: it’s cheap, small, light, and can charge my phone at least twice. Because of that experience, I have never been caught without a fully-charged phone…

…except for that time last year when I was in the press van on a mountain in Vietnam, waiting for a certain cabinet member to visit a certain world leader, and I realized that I forgot my battery back at the hotel, and my phone battery was down to 12%, and the reporter in the van needed to file a story and needed my phone’s Internet connection. After a stressful 20 minutes, he managed to file his story, and my phone still had 2% charge, so all was well.

I really need to remember to bring my battery with me at ALL times.

I love my current phone, it’s a real workhorse, and 100% reliable. But it’s more than two years old, and I use it a LOT. A few weeks ago, the battery started draining quickly. The diagnostics showed that it was only holding 84% of its original charge. Since I demand perfection (from everything but myself, apparently), it was clear that it was time for a new phone or a new battery.

I got a recommendation for a cell phone store in town that replaces iPhone batteries. I contacted them, and they offered to come to my place and replace the battery. Said it would take five minutes, and cost about $30.

Gotta love Vietnamese customer service. Sign me up!

The guy arrived an hour late, and had to go back to his shop because he brought the screwdriver for the iPhone 6, and I have an iPhone 7, and apparently the screws are a different size. But within two hours (not five minutes), I had a new phone battery. I waited for a few weeks before I declared the operation a success. But indeed the battery is holding a charge, everything seems to work just fine, and if I am ever again caught without a fully-charged phone, it will be my own fault, not my phone’s.

And no sign of spyware. Yet…

Took a study break, wrote an app

How do nerds blow off steam? By shifting the stress over to computer code, of course.

I’m studying hard for (yet another) progress evaluation in the Vietnamese language, and I promise that I’m working hard. But I needed a little study break, so I put the final touches on a little iPhone app that I started last week. The app takes a photo with the phone’s camera, then uploads it to my server. Finally, it emails the photo to me.

The app isn’t ground-breaking in concept. I just wrote it as an exercise in learning the technology.

Here’s a little movie showing the app in action.

Yup, I’m a nerd.

I have tamed my cables

Nerd Alert: this post is about a product that will appeal to nerds (and possibly only to nerds).

I have a lot of electronics cables: power cords, connection cords, headphones, etc. It’s important to tame your cords, otherwise you may end up with a terrible mess. This is especially important to me, for some reason. I just can’t stand messy cables.

Photo source: Simon Brass via Flickr

Don’t let this happen to you!  Photo source: Simon Brass via Flickr

For years, I used metal twist ties that you use to close garbage bags. They are ugly and break eventually. They get the job done, but it isn’t an elegant solution.

ugly ugly ugly!

ugly ugly ugly!

Several months ago, I found these cable tamers. I love love love them. They are tough, durable and reusable.

They come in different sizes. I bought a box of 3-inch ties. I use them for my phone charging cord, headphones, and various USB charging cables.

tamed cables!

tamed cables!

My cables are tamed, and my control-freak, borderline OCD need to tame my cables is satisfied. Cheaper than therapy, and less stigma than Prozac!

When is the last time you backed up your computer?

A former coworker once told me that there are two kinds of people in the world: those that have lost data, and those that will lose data. That was back in the 1990s. Back then, losing data meant losing some email, WordPerfect documents and Lotus 1-2-3 spreadsheet files. In the modern world, though, more and more of us have our entire photo collection, music collection, and movie collection on our computers. Losing that data is more serious. If When your computer dies, will you lose your data forever?

I have been a victim of digital data loss in the past, and now, I have a lot of photos and music on my computer. I have a paranoia about losing my data. I am pretty good at backing up my computer. For the last several years, my backup system consisted of an external hard drive. I’m a Mac user at home, and I like a program called Carbon Copy Cloner. It clones my hard drive, making an identical, bootable copy onto the external hard drive. If When my hard drive dies, I can boot from the external hard drive to access all of my data.

Hard drives are cheap and high-capacity. Many of them just require a USB cable, which serves as the power supply as well as the data connection.

The old: an external hard drive.

The old: an external hard drive.

Recently I used some of my BestBuy reward points to buy a flash drive. I’m amazed at how much capacity these buggers have, and how small they are.

We used to call these things “thumb drives.” This one could be called a “thumbnail drive.”


The new system: a flash drive.

This little thing holds 128 gigabytes of data, and only costs $30.

It’s small and fast. Because flash memory has no moving parts, unlike a traditional hard drive, backing up is fast. It’s still bootable, so disaster recovery should be easy as well.

I’ve looked into online backup systems, where your data is backed up to the cloud. But  my lifestyle probably doesn’t make that an option. I spend long times in countries that have low connection speeds and local governments that are “curious” about my data. So for the time being, physical backups will be the best choice for me.

How about you? When is the last time you backed up your computer? What’s your excuse for not backing up? More importantly, do you dare not to back up?

How I reset my Windows password

I’m a Mac user, but I have Windows running (via Bootcamp) for those rare times when I need to use Windows. Those times are very rare. So rare that yesterday when I needed to boot into Windows, I had a big problem: I forgot my Windows password.

I’m usually good a remembering my passwords, because I have a mental system for generating secure passwords that are easy for me to remember. But in this case, my system failed. I just couldn’t remember my password, so I couldn’t get into my Windows partition.

So I asked my friend the Internet for some help. My friend the Internet knows just about everything, and it solved my problem for me. After a few misses, I found success with the utility program called the “Offline Windows Password & Registry Editor.”

I downloaded the ISO (CD image) file, burned it to a CD, then booted my computer from the CD. The program found my Windows partition, and cleared the password. I was then able to log into Windows. Success!

The program didn’t show me my password, though. It erased it and let me log in without a password. So although I was able to get into Windows, I don’t know what the old password was. That’s a little annoying. I would have liked to have known what the password was, so that I could reverse-engineer my thinking when I made the password. If I knew what I was thinking, I could possible avoid making that mistake again. Oh well…

Website problems and visa delays

My website was having some responsiveness problems over the last several days. You may have noticed it. I logged a troubleshooting ticket with my hosting service, and the good technical support people managed to find and fix the problem. So the site should be back to normal now. Happy face.

My diplomatic visa has still not been issued. The office at the State Department that helps with passports and visas recommended making a trip to the China visa office and asking in person. They said that sometimes helps. So the three of us who are all heading to China at the same time made the trip this morning. One of my classmates was lucky. He had applied for his visa a few days before me, and his visa was ready. Mine was not. Sad face.

I am scheduled to leave for China next week. If my visa isn’t ready in time, I will have to change a lot of my arrangements, and that will cause some inconvenience for a lot of people. I’ve arranged to consult with the Department of Homeland Security office and Customs and Border Protection  in California on my way to China. In addition, my future coworkers in China are meeting me at the airport. Worried face.

I do not like not being in control. Of my website or my visa. Angry face.

Rage against Windows 8

The place were I work is in the process of migrating to Windows 8. We are currently using Windows XP, which first arrived to market in 2001. This upgrade is not a step forward, but a huge leap across the chasm of Windows Vista and Windows 7. For us, then, Mao’s Great Leap Forward was a baby step compared to this advancement in operating system adoption.

This afternoon I tried to get some work done in Windows 8. Emphasis on the word “tried.”

Windows 8 interface is quite different from previous versions of Windows, especially with the Metro interface, which tries to behave like a cell phone interface. In my opinion, the huge advantage that a desktop computer operating system has over cell phones is that desktop computers are much more accessible. You have more direct control over the data on your computer. If you need a file that is on your computer, you can open the File Manager and poke around your directories until you find what you’re looking for. On a cell phone, your searching capabilities are much more limited. You can’t browse through the operating system’s files on your cell phone.

I can understand the thinking behind making the operating system behave more like a cell phone. Computers are too hard to learn. All of us who have tried to teach our mothers how to set up Skype will agree with that statement. However, I am not my mother. I consider myself quite comfortable using computers, and when I can’t do what I need/want to do, I get frustrated. Windows 8 sent me over the bend this afternoon.

I needed to use the calculator. I couldn’t find it.

Mutterings of frustration.

Every operating system has a calculator. Calculators are the basic function of computers. For crying out loud, “compute” and “calculate” mean the same thing. The Chinese even use the same word for computer and calculator (計算機). I know few people use the calculator every time they use their computers, but I have to believe that it’s a commonly used program, so I expect it to be available to me when I need it. I couldn’t see the icon anywhere.

Indignant exasperation.

The nice Metro interface mocked me with its real-time weather updates from London and Rome, news and sports headlines in the little square panels. No calculator.

Then I saw a panel that sported an icon that looked like a calculator. The label started with “ca” and ended with “r.” In my haste, I though that it said “calculator,” and I clicked it. Big Mistake.

I was prompted to sign in to my Microsoft account. The wording on the screen said that after I signed in, all my settings would follow me around, and be there on any other computer that I signed in to. That my calculator settings would follow me around seemed a little strange and unnecessary, but the phrases “Strange And Unnecessary” and “Microsoft Windows” have always been on pretty friendly terms.

I have a Microsoft account, but I never use it, and I couldn’t remember the password. No problem, Windows reassured me. We’ll send you an email with a link to a page where you can reset your password. Just type your email address here and wait for the mail.

To its credit, Microsoft’s system sent me a password reset link instantly, and prompted me to enter a new password. I have a system for making passwords. I figured that I hadn’t used my algorithm when I set up my Microsoft account, which is why I couldn’t remember it. So I used my system to create a new password. The new password was denied.

Microsoft’s password policy is that your password can’t be longer than 16 characters.

Think about the absurdity of that policy. We have been told for years that passwords have to be complex enough that they can’t be guessed. A longer password, by definition, is harder to crack, no? So why would you limit the level of security? It’s like telling someone that having a lock on your door makes your safer, but then saying that you can only have one lock, not two or three.

By this time, I felt like characters in the old-fashioned cartoons with giant question marks and exclamation points shooting out of my head.

I was fed up with the process. I really wanted to say forget it, I won’t use Windows 8 any more. But then I realized that I couldn’t really do that. Not using Windows 8 isn’t an option for me. Eventually, this will be my main OS, so I had to figure it out. I sighed and created a password, reset my account, and was back to Windows.

That icon wasn’t a calculator, and the link wasn’t to the calculator app. It was a link to the calendar app.

Howls of rage.

I still couldn’t find the calculator. So I did what every modern person does when we need an answer. I Googled “Where the bloody hell is the freaking calculator on Windows 8?”

Here is the answer that I got: you have to move the mouse to the lower-left hand corner of the screen. Don’t click! Hover it there, and you will get the hidden Start button. Don’t click it! RIGHT-click it, then choose “search.” Search for the word “calculator.”

If there is a more messed-up way to find a program on a computer, someone please show me, so that I can hate Windows 8 a little less.

So now I had the calculator on the desktop, ready to work. I then realized that I had forgotten why I needed the calculator in the first place. All the steps of trying to navigate Windows 8 pushed my thoughts about work completely out of my brain.

My experience with Windows 8 is not off to a happy start.