2018-04-30

Dvorak + Pinyin on Chromebook



So I bought a Chromebook, and found out that I couldn't via normal settings get it to use Dvorak with pinyin input. Luckily someone else also had this issue, and already found a way around it.


Warning: The method to update this is dangerous. You will delete everything, and could break your system. 


Also if you have never used vi before, practice somewhere else first. It is an advanced editor with a learning curve.

So before you can use the previously mentioned method you have to turn on developer mode. This will wipe the chrome book, so backup anything that's that important.

Here is a link explaining how to turn on developer mode.


I am extremely appreciative of the person who submitted the fix. I wanted to add 3 minor updates to their procedure.

  1. To open a crosh shell, press CTRL+ALT+T after you log in.
  2. After you do step 2, you need to reboot before you can do step 3.
  3. The Dvorak mappings are also in the .../symbols/us file you need to edit. Just look farther down. Use vi's visual copy feature to more safely copy those lines into the first section. 


Once you have done that and rebooted you should be good to go. Don't forget if you disable developer mode you will most likely loose this hack.

2016-01-31

Perl 6, Worth A Try

TL;DR; Perl 6 is fresh, and fun to use. The Perl 6 community is nice, don't be afraid. Also, I released a Lending Club API wrapper written in Perl 6.

Nice People


A butterfly against the sun.
In case you missed it, Perl 6 is officially out. Christmas has arrived. We use Perl 5 at work and I enjoy it immensely, but, I have been looking forward to Perl 6 for a while. I attended talks given about it at past conferences, and I read various blogs that showed off some of it's shiny bells and whistles. I even installed a version of it before it was officially out to play with it.

After seeing the Christmas announcement, I eagerly installed it, and began going through a tutorial website to get acquainted with it. At some point I came across a part of the tutorial where I thought it wasn't working. I decided to brave IRC for the first time in a few years, and to ask about my issue. A Christmas miracle happened, no one bit my head off. This was so wonderful, I ended up lurking even after my problem was solved to see if this was normal, and it was. Of course, not everything changed. After a few questions, back and forth, as usual the problem was revealed to be one of my own making.

Modules


A little known fact, I have always wanted to publish something useful on CPAN. Of course, life, the learning curve, an excuse, more excuses, and me not making it a priority, has held me back from completing this goal. Anyways, near the end of the tutorial, they talked about the community made modules that are available in Perl 6. And on that module page was a link to how to contribute.  I immediately skimmed this doc. The distributing part was only a page long, and didn't involve any arcane incantations, just some modern day ones. All of a suddenly contributing seemed a lot more doable.

Maybe, it was that contributing to Perl 6 was simple enough it didn't feel daunting. Maybe, it was that new car smell that kept me plugging away at it. Either way, I decided I was going to scratch my own itch and for better, or worse share some of the code that came from that.

What to share..


I recently became a digital nomad. With that came the awareness that managing money isn't as simple as pay the bills first, and spend the rest on fun. There is a whole other blog post in that statement I will save for later. The problem I have been struggling with for the last few months is understanding my retirement and investments. The tools I have make it about as clear as mud. I needed to write some code to help me look at the whole picture in one place. I figured if I had this problem others might too. With this in mind, I wrote a very small module to help me calculate a few different numbers related to compound interest. I even managed to throw in a few tests. Everything went well, and my first ever Github pull request was accepted!

This success totally psyched me up. So I went ahead and worked on another pain point of mine. That was taking control of my Lending Cub investments. Currently, I am using the automated investing tool in conjunction with custom search criteria, to pick my investments. While this is better than manually picking, there are some drawbacks. For the second module, I wrote a wrapper for Lending Club's API.

One big hurdle was, while that intro website had given me a basic, understanding of Perl 6 there is still a lot more you can, and should do with Perl 6. For me specifically, there was a lot more I needed to learn about Perl 6 subroutine signatures, and data types. Happily after reading the documentation, and experimenting a bit, I was able to get it all figured out. I even found and fixed a typo in the documentation, giving me my second ever pull request on Github!

This module turned out to be a LOT more ambitious, than the first. I needed the help of other modules, to keep my code simple, and clean. I had to try out several modules, before I found the right foundation to build off of. After finding two good modules, and about half way through writing the code, I found out, one of these lovely modules, needed a feature. This prompted my third ever pull request on Github! Happily the author was really cool, and accepted it within less than a day, with just a few modifications.

So after two weekends of working on it, the Lending Club API module was thrust upon Github, and accepted into the fold of Perl 6 modules.

Conclusion


I guess what I am trying to say with that little recount of events is: If you want to try a new shiny programming language, and have some nice people help you, Perl 6 is a good choice. As for me, I have quite a few more pieces of my financial puzzle to work on, and I am sure that will create new code, and improvements to the two I have already released. 

Thanks Perl 6 people for being awesome!

2015-03-08

Spanish Study Plan

So as I am preparing to start my Spanish learning I have been gathering materials and planning. I am modeling my study plan after both some of what I did while learning Chinese and some suggestions from others. I have also decided that I am going to try and be as transparent as possible with the process.  So here is my current plan. Each week I will recap what I did and didn't do and we can see how close reality matches up with expectations.
  • Daily
    • 5-15 minutes: SRS practice.
    • 5-30 minutes: Listen to the target language.
  • 5 Days/Week
    • 30-60 minutes: Learn something new.
  • 3 Days/Week
    • 30-60 minutes: Interact with a Teacher
  • 1 Days/Week
    • 30-60 minutes: Language Practice/Exchange with a native speaker.
    • 15-30 minutes: Vocabulary, and Grammar Test or Recap.
  • Misc
    • Work on any homework.
    • Attend special events like cultural happenings.
    • Enter new stuff into SRS, and copy notes.
    • Every month do a comprehensive review.
  • Beginner Specific
    • Learn the writing system inside and out.
    • Practice listening to the hard to hear sounds in isolation.
    • Practice listening to and deciphering natural conversation.

If you add that up, I will end up studying between 6 and 10 hours per week. That is a small, but tangible time investment. In my previous post I mentioned aiming for 10 hours a week. The above is my general plan until November. I will probably have to tweak various points here and there, but overall it shouldn't change much. During the first 3 months, I will spend some of my new learning time and review time going over beginner specific points. These should hopefully help my accent to be more understandable, and my listening comprehension to rise faster.

So what exactly am I doing?

SRS stands for Spaced Repetition System/Software. In short it is flash cards software that tries to guess the best time to show me the card again before I forget iTalkiit. I oupfrountnly use Anki for my Chinese SRS needs, but it could be used it for anything including study math, or chemistry facts. I will use it some for Spanish also, but one of my "Learn something new" resources has it's own built in SRS that I will try out. Usually I can review a term card in 5 - 15 seconds. Either I know it or I don't. If it is a sentence or a grammar card it can take longer. Learning 50 words a week in Chinese I spend the most time on that first day memorizing and understanding, probably 15 minutes or so. After that, that It is usually less than 5 minutes a day of reviewing.

My other daily item, listening to the target language is about exposure. A simple example of what I might do would be listening to a couple of Spanish music videos on YouTube. I could also get ambitious and watch one of the Spanish channels on TV for 5 minutes and see what I can understand. It can even be something more clever like getting seated in a Mexican restaurant near the kitchen so I can overhear the cooks talking.

Learn something new is basically focused learning. You can do this pretty much anyway you want. Some examples are: using a textbook, attend a class, listen to audio lessons, translate texts by hand. and so on. For me I am looking at several angles. I plan to work through Duolingo's Spanish tree. I also plan to use SpanishPod101 to pick and choose lessons that are interesting, or useful for filling gaps. Our Library has several different audio Spanish courses available to check out. I also bought 3 books to help me.

I plan to use the iTalki teacher more as a coach than a teacher. Their job is to answer questions I have, point out any major flaws they see, and help me run some drills. I wan't guidance, not hand holding. I envision our first sessions starting out mostly in English, where I recap what I have done since we last spoke, and then we role play some scenario. They give me feedback, maybe some new vocab to help flesh out my responses, and then we can do drills on problem points. At the end of it they may or may not assign me some homework.

Once a week I want to test myself on everything I have learned, and practice using it. I think this step is really important. After ensuring I have learned something, I think then moving on to an exchange helps me attempt to use it in the wild and get some independent feedback.

How much am I spending?


I toyed with the idea of not paying a dime and learning the language as best I can. I think that that is definitely possible for someone with internet and access to a decent public library. I think they wouldn't have no problem finding material until they got up into the upper intermediate levels. 

I decided to grab a few things to hopefully help me along the way. All the below links are Affiliate links (I get paid if you buy something on Amazon through them).

The books costed me $64.58, and the website subscription costed $168.00 at $7/month for 2 years paid upfront. So combining those I have spent $232.58 upfront for this Spanish project.

Lets get started!

I had planned to not start until the beginning of April, but because things here have been going so smoothly, I don't have a good reason not to start ASAP. So I have decided to start tomorrow! Every Sunday henceforth I will update my blog with a weekly summary of what happened. 

Wish me luck!

2014-06-15

Taiwan Mandarin Institute Review

Roddy over at Chinese Forums asked me to do a write up on my experience at Taiwan Mandarin Institute. I went there last summer for a 4 week period. I hope this write up will be useful. I am cross posting this on their forum.

Tuition

I did a 4 week intensive course. The cost was $35,000NT(~$1,166.66USD). The PAVC 2 book and workbook came with the course.

Registration

The registration process was fairly simple. I used the online form to register ahead of time. We e-mailed back and forth with a couple of other questions to narrow down my level and schedule. While I could specify I wanted the 2pm afternoon classes, I was informed I wouldn't get an exact schedule until a week before classes started. The schedule came on time, and all but Monday classes started at 2pm. Monday started at 1:30pm. Once I had arrived in Taipei I showed up about 30 minutes before my first class and we handled some administrative stuff like emergency contact, introducing me to my teacher, giving me the books, and showing me the facility. This is a smaller language school and I wasn't over crowded by a bunch of other people also needing to register at the same time.

Courses info

They have a couple of different course types. They have your regular group course which consists of two hours of instruction per weekday. Then there is the intensive course which is 4 hours per weekday. They also offer Private one on one, and custom classes. Checking their website today it looks like they have added an online class as well.

The courses are further broken down by level. I was in a lower intermediate class. Unless you form a special class all the classes use the PAVC books. I had completed the first two Integrated Chinese books before that summer. Based on me telling them roughly how many words/characters I had learned up to that point, and a link to the IC table of contents they guessed I was around PAVC book 2 Chapter 6. This turned out to be a good starting point for me. While these two books don't directly match up, there was plenty of new vocabulary, and grammar.

Classes

Class sizes are small. While I was there doing afternoon classes in the summer I observed in passing one beginner class and an intermediate class. Both classes had about 5 – 7 students. My class was interesting, while it was originally scheduled to have 5 students, 3 students rescheduled for different dates leaving just an Irish student and I.

The classrooms themselves are big enough to hold 8 – 12 comfortably. They all have a white board, some conference type tables with chairs around them, and some decent side windows. Each room has it's own window AC unit. If a teacher was going to use a PPT to aid them they would bring in a laptop, and a plain old CRT monitor.

My intensive classes was broken down into about an hour of study, and then a 15 minute break, followed by another hour. Then we would have a 30 minute to one hour break before repeating.

Teachers

All the teachers are native speakers with prior teaching experience. Teaching style varied from teacher to teacher, and you could tell administration if you didn't click with a specific teacher. While I was taking the intensive course they explained to me they wanted me to be exposed to different speaking styles, and teaching styles to help me learn better. While I think this was helpful to me, I also think they were having scheduling issues and needed three teachers to cover all my hours.

One of the cool things about two of my teachers was that during class time we almost completely spoke in Chinese. This was new to me. This was not how we had done it at university. It was a lot of fun, and a lot of work. They encouraged me to talk at length to make my point, and not to just pop out one or two word answers. They were also big on the homework thing. I had 1 – 2 hours of homework most days. The homework was comprised of the workbook, and also handouts the teachers provided.

Living

They offer this service but I did not need to take advantage of it. I lived about 20 minutes away by bus. One of their dorms is in the same building as the school, and the other is nearby according to the website. Pricing on the website at $1000NT/day & $1500NT/day. It looks like you are paying extra for the convenience. If you have the money, I don't think that this is a bad thing, but I also believe if you plan ahead you can find cheaper living arrangements on your own.

Location

The school is in a good location. I wasn't familiar with this area before I started school. It is in the Daan District, on Roosevelt Rd Section 3. There is a bus stop at the street corner next to the building, and subway access not to far away. While I was there I scouted around the area and found all kinds of things. For example, I found a Mexican place, a movie theater, some good coffee shops and pubs, plenty of good food places, and several used book stores.

Criticisms

This is the first language school I have attended.While I was at TMI there were a few holiday's and the administration had a bit of confusion on whether they were going to be off on those days or not, but it got sorted out without causing me any inconvenience, I just happen to hear them talking about it on a break.

I mentioned before we got in detail about what level I should start at via e-mail, and I don't know if there is a best way to evaluate one's Chinese level, but I found their website was a little bit vague in this regard. I think adding that they use the PAVC books could have helped me figure out my level quicker, but maybe not.

Also this is a small business, and like most small businesses ( including the one I work for ) in some respects they attempt to sound bigger than they are. On the flip side because they were so small I felt like I got a lot more personal attention than I would have otherwise.

Conclusion


I had a great experience while I was there. If I get the chance I will go back. I second what another posted said in his post. Make friends with your classmates. My other classmate had been living in Taiwan for several years and he was kind enough to show me me around our school's area, as well as share some interesting stories.  

2014-04-23

Helping Google Pinyin, Windows 7, and Dvorak play nice together

In March I posted about getting Google's Pinyin IME to use the Dvorak keyboard layout as it's default instead of the standard Qwerty. I made that post in part because I had to figure that problem out on my own and didn't want others to have to go through it, and in part so I could find my hack again if I ever needed it. Funnily enough I ended up needing it again less than a month later for another install I did.

Anyhow, I decided to install Google's Pinyin IME onto my Windows 7 computer, and I had the same issue of it wanting to use the standard Qwerty layout. I did some googling and found how someone fixed the issue for the standard Simplified Chinese Pinyin layout, and from that I was able to apply my own fix.

Below are my steps for installing it. With anything you find off the internet, your trying this AT YOUR OWN RISK. Don't blame me if something goes wrong. These steps work for me, and they should work for you, but I am not responsible for you, or your things, your a grown up, don't pout.

  1. Go to the Google page and download the installer.
  2. Install the program. I mostly hit the next button. I did check the box for collecting anonymous stats, and signed in with my Google account, but you can choose not to do those things.
  3. After it was installed, I opened a notepad and verified it worked, and was using the Qwerty layout instead of Dvorak.
  4. Next I opened regedit 
    1. Click the Start button.
    2. Click in the search box to start a new search. 
    3. Type "regedit" without the quotes.
    4. Above it an icon of a blue Rubik cube and the word Regedit will appear.
    5. Click on that.to open the regedit program.
    6. Click, yes when it asks if your sure you want to continue. 
  5. Inside of the regedit program I navigated to the appropriate place by clicking the + symbols next to each of the following words.
    1. Computer
    2. HKEY_LOCAL_MACHINE
    3. SYSTEM
    4. CurrentControlSet
    5. Control
    6. Keyboard Layouts ( There is also a Keyboard Layout directory. This is the wrong directory.)
    7. E0200804 ( Your layout may be in a differently named folder. The best way to tell is by looking at the right side. "Layout text" should say "谷歌拼音输入法 2" or "Google Pinyin" or something similar.)
  6. Once you have found the right spot Double click the "Layout File" words.
  7. In the popup box change the value from "KBDUS.DLL" to "KBDDV.DLL" Upper or lower case should not matter.
  8. Click OK.
  9. Close regedit.
  10. Log Out of windows( not hibernate, or suspend, or lock ).
  11. Log back in and try it out.
  12. Profit. ^_^

I hope this helps. I'm sure it will help me on my next re-install or update. Now for my obligatory inflammatory statement, which is a reminder that Dvorak is a better keyboard layout than Qwerty, not only for English but also for Pinyin. Even if you don't like Dvorak, at least look at what is out there. There are quite a few different layouts available and tailored for different purposes. It is surprising how fast someone can pick a new one up, and start benefiting from it.

2014-03-10

Unity, Dvorak, and Google Pinyin.... oh my!

Just a quick post today.

A month or two back I decided I should try out Unity instead of just using KDE all the time. I did this for a lot of reasons, but mostly cause I like to try new things. I went into this knowing that the newest Ubuntu has some issues with Chinese input. A few I had dealt with on the KDE side. So, I went ahead and just installed it alongside my Kubuntu packages. It 99% just worked, and that was great. One Issue that I ran into was my Google Chinese input seemed to be locked to the standard Qwerty keyboard.

This made me sad. I am a Dvorak guy, and I like typing my pinyin with Dvorak. So, I first tried to find "that setting", you know that one setting that will make everything right if you can just find it. I failed. Next, I went in search of how to fix my problem on the interwebs. I didn't see an answer that suited me. Man, I need to get better at interweb searching. So lastly I deded I would go at it terminal style.

Terminal style means you grep around for configuration files and modify them and see what happens. It's completely scientific. Did I mention I made up the term "terminal style?" Anywho I hit the jackpot, and fixed my problem. Hopefully this little tweak will fix your problem also. I assume your using ibus like me, if not you may need a similar file but in a different location.

  1. try to locate googlepinyin.xml
  2. sudo vi /usr/share/ibus/component/googlepinyin.xml
  3. modify the line that looks like this "<layout>us</layout>" to look like "<layout>us-dvorak</layout>“
  4. restart your ibus-daemon
Then all was right with the world. Now 6 - 9 months from now when I mess up this computer I'll have a record of what needs to be done. ^_^ Hopefully It will help someone else also.

On a related note while I was searching the interwebs I came across a post about Chinese pinyin frequency mapped to Dvorak. The poster shows some heatmaps and keypress frequencies. It's quite fascinating, and if I ever get fast at typing pinyin, Dvorak isn't a bad keymap to do it on.

下次见!

2014-01-30

HSK a.k.a. 汉语水平考试

新年快乐!!

Seeing as it is the Chinese New Year I figured I ought to talk about something Chinese related. I am gearing up for another test. February 16 is an official testing day for the HSK, and I will attempt the level IV test.

What is this HSK you ask? I am so glad you asked! It is a standardized test us non native Chinese speakers can take to test our Chinese language skillz. We have a similar thing here in America for foreigners called the TOEFL (Test of English as a Foreign Language ).

The question I often get next from family and friends is, "Why?" For me personally it is a way to measure myself. See how far I have grown and how much farther I can grow. But, there are other reasons a person may want to take this test. One being the certificate earned is recognized in China. Looks good on Job and School applications. It's your Chinese language street creds. Another reason is that if you get high marks you maybe be able to get short term language study scholarships in China.

At this point they want me to explain the levels. You pick one of six tests. They correspond to six levels. Each harder than the previous. Each with more vocabulary. Here's a simple breakdown in my own words of where you should be before taking each test. Read the detailed outline if your actually gonna take the test.
  1. A very basic test with only listening and reading. Don't worry their reading has Pinyin.
  2. Similar to level one, but double the vocabulary. You're able to speak and respond to simple direct questions and answers. You're considered an advanced beginner.
  3. This is the first level to add a writing component. You got enough to get stuff done, and have basic conversations, but no debating or essays.
  4. I would dub this advanced intermediate.You are passable at communicating with natives, but can't yet fluently read the news.
  5. Even more words. You ar. expected to be able to write and give lengthy speeches. No speeches for the test thankfully. ^_^ 
  6. You are a smooth operator. I think about as fluent as someone born there.
For a detailed explanation of the levels check out the wikipedia page. When I first signed up for the HSK; I thought I would have to pass the first level to take the second, and so on. I was wrong! Thankfully the awesome staff at my testing center helped me fix my mistake. If you are following the Integrated Chinese books, here is how I would tell you to pick your level.
  1. IC book 1, Chapter 6.
  2. IC book 2, Chapter 15. 
  3. IC book 3, Chapter 2. 
  4. Where I am attempting the test at. IC book 3, Chapter 6.
  5. No idea, just a guess. IC book 4, Chapter 20.
  6. No idea.
The HSK vocabulary for III had a 10% chunk of words not covered in the IC books (up to the point I was at). As far as I can remember I knew all of the grammar patterns. With that being said I destroyed the HSK III before finishing the third book. It's possible with a little preparation you could do it before even starting book 3. My two preparation tips would be know the vocabulary, and make sure you can consistently pass the mock test. Here's a link for I - IV for the Anki users.

If you are also wanting to study for the HSK, here is a great blog article with study tips from a guy who has passed level six. If you are not into Chinese, or don't wanna test on the HSK, here's a list of language proficiency tests ordered by language, plenty of options to choose from.

Wish me luck, and Happy Chinese New Year!