It’s been a few weeks now since I have launched the Heisig Helper apps on Android Market. These apps are intended for people who are studying the books “Remembering Traditional Hanzi” or “Remembering Simplified Hanzi” by James W. Heisig and Timothy W. Richardson. I have links to these books on the Heisig Helper site. For each of these books there is suppose to be a second volume which has not been published yet. Once they are published, I hope to put out apps for those as well.
In its present state the app is very simple. It just organizes the characters by less
on and in the order they appear in the book. It also gives you extra information such as the possible pinyin pronunciations, the radical, and number of strokes.
Future revisions of the app should include features such as search, saving your own story, and possibly integration with a more robust Heisig Helper website. Actually, I’m planning on building out the website
and making the app peripheral to the site. I expect to have the first version of the site completed in the next few months. The site will also be free. I’m not sure how I’m going to make any money yet; it may just turn out to be a labor of love instead of a profitable venture.
Now Heisig is most known for his “Remembering The Kanji” books (3 volumes I believe). I haven’t made any apps for the Kanji books as I’m not very familiar with Japanese. However someone has taken interest in helping me push out an app for this and he is currently working on the database for it, so we’ll see.
If you happen across this blog post and are yourself a Heisig student, please let me know what you would like to see in a site or Android app.
Just testing out the Wordpress app for Android, so I’ll keep it short.
Since I had some trouble doing this the other day I figure I would post the solution here for future reference. For some reason if you check in a symbolic link to a directory and then later you want to replace that symbolic link with another type of file (say a directory or regular file) you may come across a problem where Subversion thinks you want to delete the directory that the symlink is pointing to. Here is what you need to do:
svn del --keep-local symlink svn commit -m "removing symlink" rm symlink svn up
I’ve officially switched to using Google Chrome! I installed it today because there was an extension for Skritter that was only available for Chrome. Actually I have yet to install that extension because I’ve been busy getting Chrome to do everything that Firefox does for me. Since Google has allowed developers to build extensions for Chrome for a few months now, there has been a flourishing of productivity and browser-experience enhancing add-ons! Here is my list of extension (or native feature) must haves:
XMarks has been ported to Chrome, as has AdBlock. Instead of QuickProxy I’m using a Chrome extension called Switchy!. The password manager as described above is a feature of the core Firefox browser, however not so with Chrome. While Chrome does encrypt the passwords, there is no master password to the decryption key itself! This is a huge security hole that can be very easily exploited. Enter LastPass. I’ve been skeptical of using hosted password managers however since LastPass actually performs the encryption locally before sending the data I am going trust it.
So far my experience with Chrome has been great. I’ve been able to find all the functionality I need and the browsing experience is super-fast! Much faster than Firefox. By the way, I’m running Chrome on Ubuntu 9.10 64-bit. Chrome itself is 64-bit and I have had no trouble at all installing or using extensions. It seems even Flash works out-of-the-box since I already installed it for Firefox. Nothing special had to be done to get it working in Chrome.
Actually I have not yet used Chrome for web development, and there I might need to stick with Firefox. It seems that only “Firebug Lite” and not the full Firebug is available for Chrome. I might check out the native tools that get shipped with Chrome and see if they are satisfactory. I’ll also need to find some plugin similar to AutoFill Forms.
First, create the interface as a “mixin” (a Ruby module that will be included into another).
module Sociable
@@must_have = [:smile, :feign_interest, :paraphrase, :laugh_at_bad_jokes]
class << self
def included (b)
@@must_have.each do |m|
raise NotImplementedError,
"'#{b}' must implement the '#{m}' method" unless
b.method_defined? m
end
end
end
end
Here you can see we have a list of methods that must be implemented by the including class in @@must_have. Sociable.include is called automatically whenever another class or module includes Sociable.
Below is a class that is to implement Sociable:
require 'sociable' class Salesman include Sociable end
Now the class Salesman won’t load until it has implemented all of the methods in @@must_have. However there is one gotcha! Let’s say we do implement the methods as such:
require 'sociable'
class Salesman
include Sociable
@@paraphrases = ['Totally','I hear that','Absolutely','Uh-hu']
def smile
puts ":-)"
end
def feign_interest
puts ":-o"
end
def paraphrase
puts @@paraphrases[rand @@paraphrases.length]
end
def laugh_at_bad_jokes
"o(∩_∩)o...哈哈" # Chinese for "haha"
end
end
But oops! When we require ’salesman’ we get a huge problem:
NotImplementedError: 'Salesperson' must implement the 'smile' method
What happened? As it turns Ruby does not look ahead to see which methods are defined within the module before it makes the actual call to Sociable.include. This requires us to move that include to the bottom of our class… which is kind of ugly. If anyone knows how to avoid this please leave a comment! In any case here is what the Salesman class should look like:
require 'sociable'
class Salesman
@@paraphrases = ['Totally','I hear that','Absolutely','Uh-hu']
def smile
puts ":-)"
end
def feign_interest
puts ":-o"
end
def paraphrase
puts @@paraphrases[rand @@paraphrases.length]
end
def laugh_at_bad_jokes
"o(∩_∩)o...哈哈" # Chinese for "haha"
end
include Sociable
end
So, how do we ensure that a class does indeed conform to an interface? After all, the class may very well not include Sociable at all. Well, we do have a way to check up on this.
Salesman.included_modules.include? Sociable
This line will return true or false and will allow us to exit gracefully if the module we are dealing with doesn’t implement an interface that we expect it to.
Please leave your comments or suggestions for improvements.
So, Google has finally had enough of the hostile business environment in China and has decided to leave. Actually, Google gave the CCP an ultimatum (one that the CCP would never accept) which is to allow Google to operate uncensored in China or they will leave. This is such an explosive move by Google that it has impacted China-US relations by prompting the current US administration to publicly comment on the situation, and (predictably) causing a furious response from the Chinese government.
Chinese Foreign Ministry spokesman Ma Zhaoxu claims that “The Chinese Internet is open,” in a statement posted on the Foreign Ministry’s Web site.
Now I have first-hand experience of “The Chinese Internet” and it is in no sense “open.” First and foremost, some of the Internet’s most popular and informative sites are blocked by a firewall that the CCP has put in place for it’s citizens. This includes YouTube, Facebook and Twitter. While I was living in China Wikipedia was blocked for more than a year (it was later removed, and the blocks seem to come and go with the weather). I remember YouTube being blocked shortly before the 17th National Congress, and then around the time of the 2008 Olympics in Beijing, and being blocked permanently after the most recent unrest in Tibet (the 50th anniversary of Chinese occupation). While I was in China I think Facebook was still unblocked, and I’m not sure exactly when the block on Twitter came into effect.
Now maybe when Ma Zhaoxu said “The Chinese Internet is open” he meant, the Internet in China. Well, the Internet in China is not blocked by any national firewall of course, so maybe this is how Ma mentally justifies his bald-faced lie. However, in order to even get a website setup within China (behind the firewall) you have to go through a government approval process which mostly involves determining if the web-site will be in any way politicly hazardous to the CCP. On any Chinese website you can see on the bottom there is a number and this is the number you get from the government once your website is approved. For example, Tianya, a popular Chinese BBS has this on the bottom of their site:
ICP证 琼B2-20060032号
This “ICP” number is used to identify and control all web sites within China. However, the CCP’s internal Internet controls go even further. Websites like Tianya mentioned above are required by the government to censor all of the postings made by users on the site. This usually involves a ham-fisted approach where entire threads of conversation on politically sensitive topics get deleted. Moreover, repeat offenders can be tracked down by China’s army of “cyber-police” and prosecuted by the government for illegal speech. In fact the government even requires all internet café patrons to supply a valid national ID to use their public terminals.
The Chinese Internet is not open. It is in fact very extensively controlled. The only people who can circumvent these controls have to be tech-savvy enough to understand how to setup an SSH tunnel or VPN (and they have to be fortunate enough to have a remote box to do that with). So, for the vast majority of the Chinese population large swaths of the Internet simply do not exist.
But how do Chinese feel about this? Do they all feel disenfranchised or do they actually support their government’s policy on information control. Of course there are a lot of Chinese that are quite angry and frustrated with government censorship but you might be surprised to find that quite a few Chinese citizens actually support the policy. Here are a few of the arguments those in support of censorship make:
1) China has a very large population of uneducated farmers. If these people were to be exposed to an unfiltered stream of information it would destabilize China.
The two most important implications being that a) this large population of uneducated people are naive and easily influenced, and b) by exposing them to the information critical of their government they are likely to rise up in physical revolt. While there is indeed a large population of poorly educated people in China I wouldn’t go so far as to say they are naive or easily influenced and I definitely don’t see people rioting in the streets because of an article they read on The New York Times. However, the free and open trade of information online would certainly help this population hold the government more accountable for its actions (and to get a better “education” as well). Even if there were some particular piece of news or information (such as a YouTube video of a misbehaving party leader) that did cause a riot, that event would quickly be brought under control the same way China has done in Tibet and Xin Jiang when riots broke out there. I find it very hard to imagine that open access to information would ultimately lead to the disintegration of China.
2) Foreign web sites (particularly news organizations) are hostile towards China and are essentially anti-Chinese.
This is related to the first argument and even more paranoid but it’s still something you will hear a lot. Also, by anti-Chinese they mean anything that is critical of China in any way. The people who make this argument are not even open to constructive criticism and really all criticism is seen as malice on the part of the critic. Of course this is a very immature point of view and one that is fostered by living in a country where the government has zero-tolerance for criticism. This creates a positive (as in reinforcement) feedback loop, where government criticism is censored, so people are never exposed to such criticism and are highly offended by it when it does occur, further solidifying the public acceptance of such censorship. However, there is another, more fundamental cultural reason behind why people in China are so easily offended at criticism of their government while I will get into later.
3) China has a more conservative society than most Western countries and the government simply wants to censor offending sexual content such as pornography.
While they do also censor pornography, it mostly serves as a casus belli for the censorship program as a whole. I could also get into how the premise of this argument is essentially false as well but I’ll save that for another time.
Again, not every Chinese feels this way. There are many who disagree with the government’s policy on censorship. In fact I would say there are many people who will support the governments policy on censorship only when asked by a foreigner. I would like to talk about this point a little but because it will help you understand why many Chinese try to awkwardly defend their government in spite of the difficulty in doing so. In Chinese culture, the government is almost like an extension of your family. Like your grandparents (and anyone familiar with Chinese culture will understand how important the grandparents are). While individuals in China may disagree with government policy they would never dare to publicly say so since it would be akin to publicly slandering your grandparents. Also, you wouldn’t expect someone to come along and criticize your grandparents and you would probably take offence to such animosity. This familial relationship with the government is something that a lot of Western people can’t get their head around. To us, the government is often viewed very suspiciously and not as an institution that is always looking out for our best interest. It harkens back to the days of Confucius, who saw the individual as fitting within a hierarchy that started with one’s family (at the bottom) and reached all the way to the government (on top).
So, should Google leave China? That’s entirely up to Google. If Google does actually leave because they don’t want to censor content then I can’t deny that I’ll be happy about it. It makes the Chinese people more aware of the negative impact censorship is having on their society and it puts egg on the face of the CCP.
Should the U.S. government get involved and start lecturing China on freedom of information and expression? No. While I agree with everything Hillary Clinton said about the issue, I also feel that she should not have made it a public statement (at least not specifically addressing China). It’s not going to do a god-damn thing but piss off the Chinese government and reinforce the idea a lot of Chinese people have that the U.S. is somehow anti-China. Let the Chinese learn from their own mistakes.
Oh man I wish I found this a lot earlier:
http://uberoptions.net/
I have a Logitech Revolution MX mouse and it is really great except for the lack of middle-click! You can press down on the scroll and it “clicks” physically but it doesn’t send a mouse-button-3 event. After installing uberOptions that button is now configurable and it can be set to send this event. Now I no longer have to copy / paste selected text into Gnome Terminal, just middle-click! Also middle-click is useful for some games, like Modern Warefare 2 where it (by default) binds to grenade tossing.
Lately I’ve been doing a bit of Rails development for an important project at work. While I really enjoy working with the Ruby programming language and Rails (and ActiveRecord) can be huge time savers, I occasionally find myself wishing I was working with Java instead. I have several major beefs with Ruby on Rails, as outlined below:
So there, I’ve vented my major beefs about Ruby and Rails. I really do enjoy the Ruby programming language though, it’s really nice to work with and it’s certainly a step up from Perl as far as very-high level languages go. If you are working on any system that really needs to scale well and you want (or need) advanced Object Oriented features built into the langauge itself, I would suggeest going with Java (a language I would not consider in the “very-high level” category, but in the one below that “high-level”). You really can’t go wrong with the documentation and the mature frameworks available to work with, not to mention the abundance of excellent development tools! I suppose the only major downside (for me) when working with Java is the tediously strict data typing and lack of syntactic sugar that makes coding in Perl or Ruby so much fun.
These people voted against Al Franken’s amendment to the Defense Appropriations Bill that would punish government contractors who “restrict their employees from taking workplace sexual assault, battery and discrimination cases to court.”
Alexander (R-TN)
Barrasso (R-WY)
Bond (R-MO)
Brownback (R-KS)
Bunning (R-KY)
Burr (R-NC)
Chambliss (R-GA)
Coburn (R-OK)
Cochran (R-MS)
Corker (R-TN)
Cornyn (R-TX)
Crapo (R-ID)
DeMint (R-SC)
Ensign (R-NV)
Enzi (R-WY)
Graham (R-SC)
Gregg (R-NH)
Inhofe (R-OK)
Isakson (R-GA)
Johanns (R-NE)
Kyl (R-AZ)
McCain (R-AZ)
McConnell (R-KY)
Risch (R-ID)
Roberts (R-KS)
Sessions (R-AL)
Shelby (R-AL)
Thune (R-SD)
Vitter (R-LA)
Wicker (R-MS)
The issue was thrown into the spotlight when a 19 year old woman was gang raped by KBR contractors and then locked up in a shipping container for 24 hours, and then told by KBR that she couldn’t sue due to an arbitration clause in her contract.
Wow it’s been a long wait but they are finally here. I picked them about from the airport just a few hours ago. Now we have to buy all sorts of stuff…