Learn new words new way

My wife (and myself, of course) keep studying new words in English. Initially my wife would print them out on paper and study this way. But I though I could come up with a better idea. Since we are Netflix-addicted movie lovers we got ourselves a HDTV and a device to run Netflix on it. So I thought: if we already have this TV why not connect to one of my old notebooks to show words automatically on it? Which we did and I wrote a simple python script to show words and translations from file in full screen mode on the main screen.

Now because we were constantly plugging and unplugging HDMI cable to/from poor notebook, at some point it just couldn’t bare it’s hard luck anymore and decided to kill itself. Poor thing. I dogged another even older one (with VGA, no HDMI) but that one was also already dead. In the face of this mass computer suicide we decided to purchase something silent and VERY cheap and Bingo! NewEgg brilliant website helped me to figure out that I can have a “Barebone” fanless PC. Sounds awesome. Double awesome because all we had to buy were the barebone system itself and 4Gb of memory. We got this ones:

barebone GIGABYTE GB-BXBT-2807 for $123

and memory 4GB 204-Pin DDR3 SO-DIMM for $43

and kept HDD from dead notebook body. So the whole computer cost for us was $166! I think it is and achievement of modern technology for new PCs πŸ™‚

There are several of catches though:

  1. Despite the description of the barebone everywhere which says that it will support 8Gb, it will actually support only 4Gb because of Celeron N2807 processor limitation;
  2. Also you need to make sure that you have the memory with the right specs which is SO-DIMM PC3 10600 low voltage 1.35V memory. Since on most websites they wouldn’t give away voltage information I went with newegg itself which was very helpful;
  3. In order to setup Ubuntu on it you need to get to setup (by hitting “Delete” button during load) and select OS type as Windows 7 and boot device as your flash drive;
  4. For some magical reason (I couldn’t figure out why) you will not be able to get sound through your HDMI. It will show there like you’d have it, but no sound will actually sound on your TV at least in Ubuntu. This ended my dreams to make this magic box an ultimate media centre machine πŸ™‚

Now the annoying part was that I had to convert whatever words my wife would give me to the text format my program would support and keep updating the file. So why not read it directly from Google Spreadsheet with those words which my wife share with me anyway? I researched the topic and found that yes, thanks to a cool Python library gspread it is possible!

So now it is super fancy: my wife would get new words on her phone from free Google translate app, copy-paste them with translation to again free Google Spreadsheets app, potentially add/edit them on her computer online in Google Drive and they would automatically be updated on HDTV when she is at home! Awesomeness of the technology! πŸ™‚

Here is how it looks like:

And yes, you can see the code which I wrote with installation instructions here. I’m new to Python and never used GTK before, so the script might look not so cool to you if you are a pro, but it does the job.

Disclaimer: it actually took me probably more than a day in total to build this, since I needed to figure out all that full screen/label/font thing stuff and it potentially should work as a screensaver which I never tested though. I also tried to figure out how to use OAuth2 tokens with Google’s oauth2client library and couldn’t find it. They do have the code which would work perfectly with your website (worked for me) but tokens there expire in 1 hour, so it was not what I looked for and I didn’t find the code for desktop/longer living tokens, so had to end up with just username and password which I find more user-friendly anyway.


Author: Artem's Blog

Working on software and more...

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s