Monday, 15 December 2014

ADT-1 (Android TV) Development Story - Part 1 (+ Description about my JPHacks App)

Edit: Scroll down to see the description about my JPHacks App.

I made an Android TV application through Android Studio. When it auto-generated the project for me, I got an apparently known issue:

Error:A problem was found with the configuration of task ':tv:generateDebugBuildConfig'.
> No value has been specified for property 'buildConfigPackageName'.

What I did was simply select both TV and Phone/Tablet when I was making the application:


And the automatically generated project gave some kind of internal IDE error.

Around two weeks after this incident however, Android Studio 1.0 was released. I am really glad Android Studio 1.0 was released though. There are some bugs that I found (e.g. the button to add dependencies to your application was gone?!?!), but they fixed that within the same week with a new patch: Android Studio 1.0.1.

After downloading Android Studio 1.0.1, I decided to make an application utilizing my new ADT-1 in a hackathon I was conveniently going to. The hackathon is called JPHacks.

I am the one in the front row, third from the left!

Summary about JPHacks App - "Android x Health"

Me, and two other engineers hacked away at our project. Our project actually uses Android Wear, Android TV, and Android Smartphone! (all 3!) It is certainly an "internet of thing"-like project. This application is like a all-round fitness application that actually encourages you to exercise. It also uses the newest technologies. Android TV is still really new, and Android Wear is pretty new too. If Android Studio 1.0 wasn't released the week of that hackathon, we wouldn't have been able to even set up an Android TV project (though in the end we didn't really need it. More on that later in this post.) We also used the super new Google Fit API, which Google is currently holding a competition for us Android developers to start making apps that include Google Fit API. I am definitely sure that our project has the most recent and innovative technologies because of all the things I have listed.

We had no UI designers in our team, so forgive the bad design.

I will now try to explain what our application does. Basically, the application marks a "geofence" around your home. When you go out of your home boundaries and go on with your day, e.g. go to work, then it will start counting your steps using the Wear's pedometer. On Wear app, you will see your heartbeat and your number of steps. On the mobile app, you will see your number of steps, and a graph that graphs a history of the number of steps you took for that week. There is also a neat feature of our app that is on the mobile phone - a personal avatar feature. We plan for the user to customize the avatar so that it can look like them, and, by analyzing the user's fitness stats through the Google Fitness API, if the user gets fat/does not exercise, then the avatar will get fat. If the user gets skinnier/takes lots of steps, then the avatar will be happy.

So, when the user comes home, if he or she did not exercise enough to meet his/her daily requirements, then a notification will pop up on the Wear and the phone to start exercising, and the avatar will grow a bit fatter and cry. A notification will show up, asking the user to either exercise, by watching an exercise video on their phone or on their TV. This is where the Android TV comes in. But also, this is where (very simple) machine intelligence/learning comes in. Through Google Fitness API and a bit of logic we put into our app, the application will get a recommended video from our database of videos. Also, while the video is playing, if the video is too hard (e.g. if your heartrate is too high), then the application, real-time, will recommend you an easier exercise video, and you can switch to that one.

Anyway, if you choose to show the exercise video on Android TV, you can chromecast a video from your smartphone (the Sender) to your Android TV (the Receiver). Then, the video can play. Not only that, but you can play and pause the video through a button on the smartphone app. While you are wearing your Wear during the exercise video, it will continuously monitor your heart rate.

So yeah. Although I didn't really make an actual Android TV app, I had fun learning how chromecast worked. Next time, I will actually make an Android TV app using Leanback, et cetera. I can't wait!

Also, it is currently 2 days after the hackathon ended, and we got an email saying we will be moving on to the finals with our project! Will we get first place? I hope so!

You can see the source code of our hack here: https://github.com/GreenRobots/JPHacks

Edit: You can see the Japanese Google Slides presentation describing our app here: https://docs.google.com/presentation/d/1QJcfo8gaiokhoCT7ZoCWPPk890GynzRqRcftSXTreAE/edit#slide=id.p4

Tuesday, 2 December 2014

How Keybase.io Taught me Basic Public Key Cryptography/Asymmetric Cryptography



While on Facebook one day, I noticed a friend who is in first year software engineering posting publicly about how he has some invites to a certain website called "Keybase.io". Naturally, I was intrigued, and decided to visit the website, and also asked my friend for an invite (and he kindly gave me one). To be honest, the most intriguing and captivating thing about the website at first was just the amazing, wondrous, illustrations that looked like they were from a classic children's book. I subsequently visited the portfolio site of the brilliant designer who drew these heartwarming, Caroline Hadilaksono's site.

After wasting a few minutes on her site and seeing her pretty illustrations, I actually started to read the text/content on Keybase's main website. And let me tell you that I honestly had trouble wrapping my head around what exactly this service was offering to me, the user. I was even questioning whether I was a potential user of this website, since I didn't know what it was trying to explain, except for the fact that it allows you to connect various usernames from various popular social networks together in order to form a single social identity online. I was honestly confused as to what a "public key" was.

As a regular person who does not know a thing about cryptography until visiting this site, I do have to recommend that Keybase should have some sort of explanation about what public key cryptography is, and their service. I mean, the example on their homepage with Maria grabbing a pint with someone seems like it should explain the whole service wholly, but it just didn't. I didn't understand a thing, even after reading it quite a few times over. That's when I got a bit frustrated at the lack of a good explanation, and decided to Google by myself about this whole "public key" thing.

And boy did I learn a lot! That's one thing that I really like about Keybase - that it taught me something really cool and exciting in my opinion (even though they didn't do a good job of it themselves).

So, just what exactly is this "public key" thing, and what exactly is Keybase? Well, this post is to basically explain it in simple English. No need for fancy words in this post - just straight up facts.

Tl;dr Short Lesson on What is Public Key Cryptography, and Cryptography in General, For Dummies (Like Me)



So, I'm guessing everyone already knows about the whole fiasco with the NSA and how they're spying on everyone's emails. So, how would you prevent people like the NSA, or "hackers" from reading your email? Well, that's where cryptography comes in.

So basically, let's say you want to send an email to someone, but you are afraid that a hacker can hack and might get that email while it is sent to the receiver. So, a good way to prevent the hacker from knowing the contents of your email is to encrypt it. A really good and simple example of what "encrypting" is would be if the hacker didn't know the Chinese language at all and did not have access to a Chinese-English dictionary, but you and the person you want to send the email to do have dictionaries. So, you translate your message word by word in Chinese, send it to the receiver, and they can translate it back to English and read it. Along the way, even IF the hacker gets the email, the contents are unreadable to him. Of course, actual encryption uses lots of complex and very interesting math, and are very very hard to "crack".

So, basically, I learnt that Keybase offers a service that provides this kind of easy service to communicate to other people by using their encrypting and decrypting methods. But, they provide a certain type of cryptographic method called public key cryptography. Some people also call "public key cryptography" as "asymmetric cryptography".

I will explain now about how public key cryptography actually "encrypts" your messages and allows the recipient of your messages to "decrypt" the messages.

Basically, in this type of cryptographic method, you have a public key that anyone can see and "use" (I will explain this in just a second).  This key is usually a big and long sequence of words and numbers that you can copy and paste to anyone. In addition to this public key, you also have a private key. You should never show this private key to anyone, or else the public key cryptography method of safely encrypting/decrypting will just not work - so be sure to keep the private key safe!

Both your public key and private key are mathematically related to each other, but this math is very hard to crack, so for all intensive purposes, no one can "solve" or find out what your private key is just from looking/analyzing your public key.

The public and private keys are mathematically related in such a way so that if you encrypt a message using the public key, you can decrypt the same message using your private key.

So, let's say you want to give your friend Joe an encrypted message that only HE can read. So what do you do? You actually USE Joe's public key to encrypt your message, and then give this encrypted message to him. If anyone accidentally sees this message and obtains it, they cannot read it or decipher it. This is because the encrypted message can only be decrypted by Joe's private key.

Now that I have explained the very very basics of public key cryptography, if anyone is actually reading this, and if they actually want to read more about this interesting subject (including learning about digital signatures, digital certificates, etc.), please click here to read more about it!

To whomever reads this post, I hope you learned a little something about public key cryptography, as I did. Disregarding some of the criticisms that exist for Keybase, I still think it's a very neat service. It's very entertaining to write a message, encrypt it, copy and paste the encrypted message to someone, and have them decrypt it. It's also very fun vice versa. (I like to pretend that I'm some sort of spy!) Overall, I am delighted about how fun Keybase was. I have read that its purpose was to create a service for ordinary people like me or you to encrypt and decrypt messages easily. Well, I certainly think Keybase has hit its target in that regard.

Saturday, 29 November 2014

"Dependencies" Troubles with Android Gradle, and How to Even Use Terminal in Android Studio

I have only started Android development during my last internship which was almost a year ago. Since then, I have migrated to Android Studio, and in all honesty, this new IDE is amazing compared to the Eclipse IDE with the Android ADT.

There are a few differences, though getting the hang of this new IDE should be simple enough - except for one thing.

Let's say you had a lot of dependencies - a.k.a., external libraries for your application. This has been honestly the most annoying thing ever for me as a newbie at Gradle, but basically, if one of your library projects has its own dependency called A, and you have the same kind of dependency in your main application project, then those two dependencies will conflict with each other.

When you have this kind of conflict, the error that you will normally get is:

UNEXPECTED TOP-LEVEL EXCEPTION:
com.android.dx.util.DexException: Multiple dex files define ...

Now, obviously, when one first comes across this issue, one uses StackOverflow - which is what I did, and this should be the best answer:

http://stackoverflow.com/a/21100040/3324013

However, usually, newbies at Gradle such as myself will not realize that these commands only work if you have Gradle installed - I only installed Android Studio, that has a Gradle wrapper.

To summarize, all I and anyone who does not have Gradle installed should do is:

for any gradle command that we see that we can copy and paste in the terminal, replace the word "gradle" with "gradlew", because we do not actually have Gradle installed.

This made my life so much easier.

So, e.g., use:

gradlew -q :projectName:dependencies

not

gradle -q :projectName:dependencies

I hope this teaches some newbs such as myself about Gradle in terms of Android Studio.

Wednesday, 26 November 2014

ADT-1 Development Story - Part 0

This will be a blog series on my progress of developing on the ADT-1, a media player and game controller by Google! I got it from a very kind person working at Google Japan. He gave it to me, even though I am still just a student.



Sorry if this blog post is short, more will come very soon, as I can't wait to get started on this!

Saturday, 8 November 2014

Ramblings on Project Euler and How to Determine if a Number is Prime

Yesterday and today, I was trying to do problem 3 from Project Euler. If you don't know what Project Euler is, it is a neat site where there are math/programming questions that can only be solved if you write a computer program that will output the right mathematical number/answer. From there, you can just input the answer for the particular question on the site, and it will tell you if you got the right number/answer or not. If you did, then you will gain access to community discussions and even a pdf on how to properly code a program to solve that question you answered. The questions are all ranked based on how many people solved it, so you can start on the easiest questions and work your way down to the ones where less than a hundred people even solved it worldwide.

I already answered first two questions, which are the two that people answered the most (and thus, the easiest two questions). But then came question 3. The question was to find the largest prime factor of a number. The hard part is to actually determine the primality of a factor of the number. If you don't know what primality is, it's basically "whether or not the number is a prime number". Now the thing is, you could answer question 3 easily if you used certain pre-defined methods in standard libraries for a variety of programming languages. For example, I know that in Java, there is a function called isProbablePrime. (You might be wondering why it's called isProbablePrime instead of isPrime. I will explain that later). And of course, with Python and Ruby, you can write a couple lines of code and just be done with it as they have a lot of those mathematical/scientific functions. I can't really go into detail about them though, as I am not familiar with either programming languages.

As for me, I used C++ to answer all my questions, including question 3, and did not use any sort of already existing function that is similar to isProbablePrime like in Java. At most, for question 3, I used the rand function. to generate a random number.

Below is my short story of how I learned how to test the primality of a number.

1. Use trial division.

What is trial division? Well, you can read more about it here: http://www.counton.org/explorer/primes/checking-if-a-number-is-prime/

It's basically an efficient way to test all numbers between 1 and n-1, where n is the number that we want to know if it's prime or not, and see if any of the numbers between 1 and n-1 divide into n evenly. If any one of them does, then n is not a prime number. Obviously, 1 to n-1 is O(n). If you don't know what O(n) is, go take an Intro to Data Structures and Algorithms course in your university.

So, trial division makes it from 1 to n-1, to 1 to sqrt(n). Why sqrt(n)? If you read the link, you would find out that:

Suppose one number is a factor of N and that it is smaller than the square-root of the number N. Then the second factor must be larger than the square-root.


Think of all the factors of 20. 1x20, 2x10, 4x5. 1 and 20 are on opposite sides of the spectrum, if the spectrum was a number line from 1 to 20. So are 2 and 10, and 4 and 5. So, all you really need to do is to look at the smaller numbers and not care about their larger counterparts. What I mean by this is, if you already tested if 20 mod 2 == 0, then you don't need to test if 20 mod 10 == 0. Thus, you only check the ranges of numbers from >1 and <sqrt(n).

Also, considering that n should be an odd number (because if it was an even number you would automatically know it's NOT a prime), then that means you also don't need to check if any even numbers are factors of n, so you only need to iterate sqrt(n)/2.

So, an implementation of trial division is:
You have an ODD NUMBER, n, and you want to check its primality.

//start at 3 because you don't need to check if even numbers, e.g. 2, are a factor of the odd number.
//go up until rounded up sqrt(n) (you should round it up)
//iterate by i+=2 because you don't need to check any of the even numbers
for (int i = 3; i < ceil(sqrt(n)); i+=2)
{
    if (n % i == 0)
    {
        return false; //it's not a prime
    }
}
/*after you check all of the numbers and you know none of them are factors of n then n must be prime.*/
return true;

If you try to answer question 3 of project euler using this implementation, I guarantee that the program runtime will be over an hour. I'm on a Macbook Pro that I bought in August 2014. And it took over an hour pretty much.

I think this frustration improved me for the better though. Project Euler, it is certainly frustrating, challenging, but still a lot of fun. When you get the right solution to a problem, you definitely want to come back to that question and see if you can improve your algorithm to be more efficient (a.k.a. not run for over an hour just to get the answer). It certainly makes me realize how I take for granted the power of modern computers computing powers.

I have since improved my trial division implementation, and am using the miller rabin algorithm. The Java method, isProbablePrime, actually uses this algorithm. It is not a deterministic algorithm though, and recently in 2006, there was a deterministic and polynomial time algorithm for primality called AKS primality algorithm. Perhaps I will read more into AKS later.

How to use Github Pages (your github.io page) as a server/host for your Gandi Domain

Recently, I bought a domain from Gandi. You can see it here: my website. Making my website from Bootstrap, HTML, CSS, and a bit of javascript wasn't that hard. I just coded, and then pushed to the master branch of my Github page repository (which is phantomkirby.github.io). However, what stumped me a lot was how to make it so that when a user types in my domain website name (cherryzhang.net), he or she will see my github website.

In order to do this, you will need to make github pages your server/host, and your domain will be provided by Gandi. Here is the best blog post about how to do this exactly: http://spector.io/how-to-set-up-github-pages-with-a-custom-domain-on-gandi/

If you do everything he tells you to do, you will be able to also use your Github pages with your website name!

Friday, 31 October 2014

5 Steps that I Took to Learn Japanese

To be honest, there is a lot of language learning tools and apps on the web or on mobile that I frankly do not recommend. As a long time avid-learner of Japanese, over the duration of my language learning experience, I have compiled a concise set of steps that I recommend in order to learn Japanese. Please note that this list is in chronological order - a list that I myself have used in order to get to the level of Japanese I am at now.

1. Learn Japanese Pronunciation and Articulation/Learning Hiragana and Katakana

I'm not sure if I just have a natural knack for this, or if it's just an easy skill that many language learners don't seem to think is important. Either way, I personally still think it's important to be able to speak like a native and not sound completely weird when speaking in Japanese, although some people might disagree. I know it's bad to judge people based on their accents, but I definitely believe that Japanese language learners can improve their current level of Japanese pronunciation if they focus on it. This is what I did first - possibly due to me being the type of person who gets easily embarrassed. I am 100% certain that once you talk like a native, you will be more confident in talking in Japanese to others. Not only will your language confidence improve, but you will also be implicitly learning hiragana and katakana at the same time. You see, each "letter" in the Japanese alphabet is, to simplify, a basic "sound" in their language. That means, if you learn all of the hiragana alphabet, you will be technically able to pronounce any Japanese word. The katakana alphabet has the exact same sounds as the hiragana alphabet - it's just another way of writing hiragana. So, you could learn proper pronunciation with either of the two alphabets.


Here are some tools that helped me improve my Japanese to the level where I actually fool actual Japanese people into thinking I am a native:
1. Youtube. Just google search "Japanese pronunciation Youtube" and you will get a lot of videos. Also search for "Japanese alphabet" or "Japanese Hiragana".
2. Learn Hiragana, then Katakana. (hiragana is more common when reading Japanese). This is the first big mile stone for beginners of Japanese. If you can't do this step (which is basically the first step in learning Japanese), then I doubt you can be fluent. That being said however, please do not let it get to you. Don't give up! To motivate you, I should tell you that I actually learned hiragana in elementary school. By myself. If you are older than that, then of course you can easily learn the two languages by yourself.
3. Binge watch a lot of anime or J-dramas. (Yes, this actually helps you get an ear for the articulation of words!). Try not using any subs for a few times. It will help you concentrate on how they speak.

2. Understand all of the basic grammar.

Without grammar, sentences would have a lot less meaning. The only things we could say would be single word sentences such as "I". "Go". "Bird". With grammar, language becomes alive. I would say that there were two main basic sites I went on to learn all of my basic Japanese grammar.

http://thejapanesepage.com/grammar.htm
I think that this page is more appealing than the popular Tae Kim's guide, because it is just more aesthetically pleasing to my eyes. That being said, both this, and Tae Kim's guide are amazing.

http://www.guidetojapanese.org/learn/grammar
Tae Kim's guide to Japanese grammar

Not only do these two links help you learn essential grammar, but as you grind through them, you will also learn a lot of common Japanese vocabulary. It's like hitting two birds with one stone!

3. Talk and write/type in Japanese (online and in person).


So after steps 1 and steps 2, you have developed a very rudimentary Japanese vocabulary and basic Japanese grammar. This is basically all you need in order to start actually speaking and writing in Japanese. I fortunately had a friend who was studying with me, and my brother and parents are fluent in Japanese too. Therefore, I could practice talking to my family, and practice writing with my friend. In order to write Japanese, you just need to add the language input. This depends on whether you're on a Mac, PC, et cetera, but it honestly shouldn't be too hard. Just google it. Virtually everything and anything is googlable nowadays.

Now, if you don't have anyone to talk to or write to, I suggest using http://lang-8.com/ which is a cool site that allows you to write journal entries/blog posts in the language you are speaking. Then, natives in Japanese will be able to correct and edit your posts. In order to practice speaking in Japanese, I suggest actually going out of your home and try to find Japanese classes. Try going to your local city hall and ask them if there are any, or ask your high school teachers/counselors, or go to your local university and see if they offer Japanese courses to non-students (where you can practice speaking Japanese). If you are a university student, that's even better.

I would like to note something that is pretty obvious, but I will mention it anyway: you shouldn't stop this step as soon as you go onto step 4. This step should be something that you should continually do in order to improve your Japanese.

4. Learn vocabulary everyday.

In order to really talk in a language, sure you could learn some of the more advanced grammar, but what you really need is vocabulary. If you know vocabulary and basic grammar, you'll be basically able to talk at a conversational level. I mean, I think it's obvious that vocabulary is the core of all languages. Without vocabulary, we wouldn't have anything to play around with grammatically. Without vocabulary, we wouldn't be able to describe anything or even talk about anything.

In order to increase your vocabulary, I recommend using Anki. I honestly think that this is the best software for remembering things (not just Japanese vocabulary). Medical students use it too in order to memorize a lot in a short amount of time. Anki is an SRS, which stands for spaced-recognition software. That's just a fancy way of saying it has lots of cool algorithms and logic so that it repeats the flashcards at a rate/in a way which helps you memorize more efficiently and faster. Anki is like an advanced flashcard system that can have audio and images in it, and is super customizable. It even has an Android app and an iOS app (though the iOS app isn't free), not to mention a web app and an app you can download onto your computer locally.

Anki users who want to learn Japanese typically download premade decks which other users have made. This is the amazingness of Anki - you don't necessarily have to make your own flashcard decks, since there are already pre-made ones. The decks that I think everyone should use are: Japanese Core 2000 series, and after you've finished that, you should take the Japanese Core 6000 series. By the end, this will make you learn 6000+ words, enough to basically hold your own in a conversation. I'd also like to note that these core series are sub-divided into smaller decks. For example, the Core 2000 series is not one deck with 2000 words you can learn. It's actually 10 decks that you will have to download - each with 200 words in them. Each of these decks are called "steps". So, when you first start off with Anki, be sure to only download Core 2000 Step 01, and not Step 05 or something like that.

5. Go to Japan or find a way to immerse yourself in the language.

http://www.alljapaneseallthetime.com/blog/why-you-should-keep-listening-even-if-you-dont-understand

The link above will take you to Khatzumoto's site, and honestly, I too find that immersing yourself in the language will help you attain fluency very quickly. I mean, that's how I learned English when I immigrated to Canada. Just immersing yourself, whether by going to Japan or just surrounding yourself artificially with the language, will definitely help a ton. I have heard of people who went to Japan and did not get fluent, however. The trick is to completely stop looking at English. Whenever you see something in English, try it or look at a Japanese version. It's a big step, but it is what's required in order to attain fluency, I find.

Some easy ways to at least artificially immerse yourself in the Japanese language is to only watch Japanese TV/go on Japanese sites, go watch Niconico instead of Youtube, read Japanese newspapers,  listen to Japanese music, and talk in Japanese as often as possible. Basic, switch everything you do in to what I call "Japanese mode".


I hope this post helps fellow Japanese language learners such as myself.

Tuesday, 22 April 2014

A Beginner Android Dev's Guide on How to Import Custom Libraries Into the Eclipse IDE

Pre-Requirements
You will need:
  • the Eclipse IDE with the Android SDK.

General Steps
  • Go to the site (e.g. github) that has the open source library.
  •  Download the files (usually there should be a button that says "download .zip file" or "download .rar file". 
  • Copy and paste the src files into your own Android application's package. I usually like to do this by copying and pasting normally, and then pasting inside the package manager that Eclipse provides.
  • You might get errors. If you copied the individual classes into a package you already pre-made/pre-named, then just change the package name inside each .class file.
  • If there are errors for R., import the one that has your application package's name, and not the other Android.R one.
  • If there are additional things (e.g. the custom library included files in a drawable folder/xml files in the values folder), then be careful not to override your current android application's existing files!!! (e.g. if you already have values/string.xml and the custom library has one as well, then try to manually combine them instead of overwriting YOURS. You will get errors if you do not.)
Now, you can use the custom library. I hope this helps some people.

Sunday, 6 April 2014

A Newbie's Short Intro Guide to Gundam (biased perspective by me)

Brief History of Me, and a Story on How Gundam Came to Canada

If you're reading this, chances are that you have heard of the famous Japanese anime franchise called Gundam. My brother and I have always loved this anime to death, and I figured it was to time actually write a blog post about this famous mecha franchise. To start off, before I was born, my family lived in Japan. My brother was exposed greatly to this great series, and I can definitely imagine his eyes filling up with wonder as he saw the Gundam shows on TV, read Gundam mangas, and collected Gundam models (which are called "Gunpla"). I was born only a few years until we had to move to Canada, so naturally, I was not as well acquainted with Gundam compared to my brother, who became a full-fledged Gundam "otaku".

When I came to Canada, there was no sign of anime or the anime culture anywhere (other than Pokemon, and perhaps Dragon Ball Z). Just when you'd think Gundam would never be popular in North America, my brother and I managed to discover that very late at night, on YTV, Gundam Wing actually aired!

I feel so old for remembering this logo of YTV's!

To note, I'm currently 18 years old, and came to Canada when I was around 4 years old. Yep, I was that young when I first saw Gundam Wing!

In honesty, Gundam Wing was the first Gundam anime that I've seen (likewise for many other North American Gundam fans). After Gundam Wing, however, it seemed that the Gundam craze stopped outside of Japan (especially since here in Canada, G Gundam never aired). It was only years later that Gundam Seed and Gundam Seed Destiny aired (and we all know how bad GSD was). And after Gundam Seed and Gundam Seed Destiny finished, no new Gundam shows ever appeared. It's suffice to say that my brother and I were very disappointed because of this.

Most people I know who managed to even watch Gundam Wing that late at night (as we all had curfews, being children and all that) didn't even know that there are other Gundam shows out there! After I told them of this fact, they were honestly fascinated. Their eyes widened and their jaws open, struck in disbelief. "There were OTHER Gundam animes?", they would usually say.

There is a variety of Gundam shows out there.

There are tons! And being the kind of person who loves to share good animes, I naturally tried to persuade them, or rather, "convert" them into liking Gundam. The only unfortunate thing now is how to actually get them "into" Gundam. They have expressed how daunting it is to tackle this gigantic franchise, with a multitude of series that are 50 episodes or more, multiple OVAs, and lots of movies as well.

TL;DR
So, why am I writing this at 1 a.m. when I have my co-op job tomorrow? Well, I want to provide a short guide for newbies of Gundam (a.k.a. my friends) to help them get "into" the Gundam franchise. I know that there are other guides out there, but I just wanted to write one of myself.

If I help even one person out with this guide, then I think I would consider my job done :)

SHORT NEWBIE'S INTRO GUIDE TO GUNDAM

(With a biased perspective from me)

Do you like Recent Anime? Do you not like the look of old animes?
  • Gundam 00 (may not be for young children, set in future of our universe)
  • Gundam Seed, followed by Gundam Seed Destiny (GSD is a direct sequel to GS) (Caution: the main character and his trophy wife is a Mary Sue. Also, GSD has lots of plot holes.)
  • Gundam Age (main character: a kid, spans 3 "arcs")
  • Gundam Unicorn (CAUTION: It's better if you understood all of the Universal Century first. The UC era is basically the "universe" where a lot of older Gundam series took place in)
  • Gundam Build Fighters (CAUTION: not the conventional kind of Gundam anime. This anime is more for children who are into animes like Yu-gi-oh or Pokemon)

Do you want to see the classic animes?
Watch these in order (you may skip 0079 and just read a summary of it, if you don't really like it... which I didn't):
  • Gundam 0079 (the original)
  • Gundam Zeta
  • Gundam ZZ
  • Char's Counterattack

Do you have a short attention span? Do you just want those 25-episode animes or short OVAs? These are good to get the "feel" of Gundam in less than 25-ish episodes!
  •  Gundam War in the Pocket (6 ep, very sort and sweet/will make you cry at the end)
  • Gundam MS 08th team (I think 25 episodes, and one retarded 26th episode which you should not watch)
  •  Gundam Stardust Memories (really good! I recommend. This and MS 08th team are the first ones that come to my mind when I think of the essence of Gundam... condensed into a neat little package :)!)
  • MS Igloo (I don't really recommend this as your starter Gundam series)

Do you like death, lots of people dying, etc.?
  • Victory Gundam

Do you like street fighter?
  • G Gundam 

And finally, the one that I loved but everyone else hated
Turn A Gundam.

I know - it's not really a traditional Gundam series. Also, at first you might be completely turned off just from the opening theme, the fact that it looks like it took place in the Victorian era, and the fact that the main Gundam has a big moustache - but, if you keep watching it, I guarantee that most of you guys will love this anime as much as I did :) It holds a special place in my heart!

Not to mention that Turn A also has one of the best ending theme songs out of any of the other Gundam series:

This was my brief intro guide to Gundam. I might update it later.

Friday, 4 April 2014

3 Reasons why your Android Search Dialog Doesn't Work

Today's post will be pretty short. It's about the search dialog in Android.


It's about this annoying thing I've tried to do for a long time. And it's a pretty easy thing to implement, since Android actually has a tutorial on how to implement it on their site. Click here to see the documentation.

It's how to create a search interface for your application.

I have had many newbie problems in just getting this thing to work, and after finally having solved all of my problems I wanted to compile a simple list of the most common reasons why the search dialog doesn't work
  1. You need to use @string/ instead of hardcoding the android:label and android:hint in your searchable.xml (this xml file is something you should have created in your /xml/ folder under res/)
  2. You messed up somewhere in your Android manifest.
Here is how your android manifest should look like.

 Android SearchableActivity
<activity android:name="com.example.lexicav1.SearchableActivity" >
            <intent-filter>
                <action android:name="android.intent.action.SEARCH" />
            </intent-filter>

            <meta-data
                android:name="android.app.searchable"
                android:resource="@xml/searchable" />

        </activity>

the activity you want to use the search dialog in
<activity
            android:name="com.example.lexicav1.ListLexica"
            android:configChanges="orientation|screenSize"
            android:label="@string/app_name"
           >
            <intent-filter>
                <action android:name="android.intent.action.listlexica" />

                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
              <meta-data android:name="android.app.default_searchable"
                   android:value=".SearchableActivity" />

        </activity>



3. Put the correct path location of your SearchableActivity.class in android:value. For example, instead of using:

android:value=".SearchableActivity"

I used instead:

android:value="com.example.package2.SearchableActivity"

Which is wrong, because I did not put it in that package.

I hope this post helps.



Monday, 31 March 2014

Why I'm Tired of League of Legends

I have to warn you that today's blog post will be mostly me venting out about how I am tired of League of Legends.

I was a huge gamer even back before I played League of Legends, but mostly for single player games. I played the NES, the SNES, an N64 emulator, bought a 360, and of course, eventually played on the PC (which I now realize is undoubtedly the master race). I didn't only play single player games - I also played multiplayer games as well, such as the Halo series and Call of Duty. So, I of course had my fair share of video-games.


I think for me, and probably many others, League was definitely the gateway game into MOBA and what I'd like to call "serious multiplayer gaming". I never actually took other multiplayer games seriously, nor did I ever care about my rank in other games until I started playing this game.

By the time I started playing (which was during the later half of season 2), the game was already popular, so I thought I was behind on the times. This made me motivated to try and catch up to what I have missed. So, I started in the summer of 2012. As everyone knows, the learning curve of League is easy, so naturally I improved very fast. I feel in a way, the easy learning curve, and the fact that it is a competitive game makes the game turn into a very addictive one - and I for one was hooked.


After a couple of months of playing 24/7, I got to plat skill level. I got so "into" the game. I followed the League subreddit everyday, I was always up to date with the League e-sports scene, and even had nights where I dreamed that I dropped out of university and somehow "made it" in the league scene (either by getting a job in e-sports or playing somewhat professionally, or just streaming). My friends had to console me a lot out of the idea of "making it big" in the league scene. They helped me realize that after a few years, League will eventually die out. Even if Riot tries to pump more money, invest more money into the League e-sports scene, it'll be like any other video-game. It's not going to last. I am 99.99% sure. So, if I ever do become a pro, I would only have my fame for a few years. After that, I would have nothing.

I realize that it is better to take a smarter approach to life. I went into university for engineering. Everyone knows that engineering takes up a lot of time in one's schedule, so naturally, I had no time to play any games, let alone League. Though, finally, when all the exams were done for the term, I had some free time before the next term started. I got into DOTA 2 instead of going back into League. I also got into CS: GO. I'd say they both have a much higher learning curve compared to League. These two new games were so refreshing for me. I felt that after playing these two games, I have just grown bored of League, and even started to dislike it. League honestly isn't that difficult, the builds for each lane are always the same (especially for the role that I mained, which was mid lane), and I felt like every game seemed to always be the same.

I really hope I am not coming across as a DOTA 2 elitist. I just think I got genuinely bored of League. You can only sap so much fun out of it. The only incentive I have for League nowadays is to "keep up my skills" since everyone is playing and everyone is improving - either catching up to me, or surpassing far beyond me.

But, at some point in trying to "get ahead of the curve" again, I realized that I wasn't playing the game for fun anymore. I was literally just grinding this game so that I can catch up or stay ahead. After coming to this realization, I had this empty feeling with League. I realized that for me, Dota and CS are loads more fun. I had fun trying out every hero in dota, whereas League's champs just seem boring to me now. They all have the same basic types of attacks e.g. aoe, single shot, four abilities, etc.

So, after realizing that I wasn't playing League purely for entertainment anyway, I have been really wishing that League would stop being so popular. I'm just sick and tired of hearing League all of the time! All my friends keep talking about it.

Perhaps some League players should try Dota? I tried converting them to Dota, though they always complained about the mechanics and how it "wasn't as smooth as League". I jokingly said that they weren't good enough to play Dota, and one wittingly replied back that "it wasn't due to his skills, but the game itself is frustrating players because of its lousy mechanics".

I'm not saying everyone should "convert", but I think people should definitely try to playing Dota (for more than 10 games and not just for 1 game). Not even dota though! I hope people will see that there are more games than League out there. So many in fact!

My wish is already starting to occur. Before, the number of League players has been climbing up. But now it's hit a plateau. A typical sign in video-games, right before it goes down... and down... and down... until it's never heard of again :) (By then, I HOPE people will start playing more fun games!)

...

So, what will be the next big thing? Well, I hoped it was Heart of the Storm (but I saw a gameplay video of it by TotalBiscuit, and honestly, it's not that good. It's too easy. It's shared exp. There are NO ITEMS to buy.) Even if we don't know what will be the next big thing, I'm not worried. As long as League declines, I'm happy. Although it was a great game, I'm just hoping something new will come along so that my friends can also enjoy a fresh game with me (without me just playing alone!)


A Female Nerd/Otaku's Guide to Fitness and Health! Part 1 - Why you should exercise!

Hey ladies! (and maybe for the gents who read this as well.) This is a guide that I have written to help all those out there who have never actually exercised outside of those dreadful physical education classes.

When I was in high school, I never really started to work out at all. But believe me when I say that working out is a crucial part of one's lifestyle. I did not realize how big of a negative consequence it was to not work out. I hope that this post will help teenage girls out there realize the importance of exercising.

So, who did I make this motivational guide to?

This guide is to help those who are too scared to go to the gym, and those who were never good at any sport. Believe me when I say that I basically fit all of those characteristics. My head got hit by more baseballs/basketballs/volleyballs/etc. than I could count! I also had a huge phobia of going to the gym (as I was super self-conscious back then). And of course, as a stereotypical straight A high school Asian student that I was, I was horrified when I got a 70 in phys. ed. That mark just extremely demotivated me from exercising in general.

I was basically a huge nerd. Huge geek. Huge otaku. I watched anime since I was super young (as my brother and I immigrated to Canada from Japan). This guide is dedicated to the people who can relate to me - my fellow nerds!


The following is a bit embarrassing to admit, but I feel like I should share it so that you (the reader) can better relate to me. Hopefully, by being able to relate to me, I can help you guys to live a better life. So, after the single mandatory phys. ed. course that I was forced to take in my freshman year, I vowed to never do any exercise again in order to avoid scrutiny and embarrassment. However, I realized that during my 10th grade year in high school, my thighs grew fatter. Because I got a lot fatter in this area in such a short amount of time, I developed a lot of stretch marks on both of my inner thighs. (A lot of them!) After some time, I even felt like I had to suck in my stomach every time I wore my skirts (which means I got fatter around my stomach area as well). I was exceedingly self-conscious about my big hips and thighs, which made me have a pear-shaped body (the body shape that I did not like at all back then).

I tried to ignore my weight gain. I began a life of pure unhealthiness. I played games all day. It was when I got into Starcraft 2 for a while, and then started to play League of Legends addictingly.


Ahri - My Favorite League of Legends Champion

That was basically my life during this rather depressing period. Games and anime. Anime and games. Food. I barely ate any vegetables or fruit. I had a hard time trying to escape from this cycle.

I basically was ignoring, or to be more precise, a unconscious about the status of my health. In fact, I thought I wasn't fat. Sure I had fat, but if you looked at me during those days, you would have seen a girl of an average weight for her height. I thought that because I couldn't see any huge protruding sections of fat on my body, I was healthy.

I couldn't have been more wrong. If I had to summarize this blog post in a few short sentences, the following would be it: The key is to be fit. Not to lose weight,  but to be fit and healthy. Most geeks/nerds don't even realize what it means to be "fit and healthy"!

You see, just because you don't look "externally" fat, does not mean you are healthy. You could be like I was during high school - you might not be overweight, but that does not mean you are fit. Weight should never be a "sign" of how healthy you are. You know why? Fit people generally weigh more than their chubby counterparts. This is because muscle is more dense than fat. So from now on, I would like to encourage my fellow females to please disregard how much you weigh. Instead, start caring about the foods you eat, and also start caring how much exercising you're doing!

If you are like the past me, then that means you are not only unfit, but you might actually be fat "internally" as well. To clarify, your body actually stores a lot of internal fat that you cannot see. This kind of fat is worse than the external fat that actually makes you look fat. Internal fat is worse than external fat because they are nearest to your vital organs. Because they are near your vitals, you will have an increased chance of getting cardiovascular disease when you're older.

Now that you have heard all of the reasons why your lifestyle is bad, The remainder of this blog post will be to try and persuade you and motivate you to start leading a healthy life. I personally like Nike's slogan, because the meaning behind it fits with what I am trying to say: "Just do it". Just start exercising regularly starting right now. No excuses! Then, have your diet mainly consist of vegetables. The second thing your diet should mainly consist of should be fruits. Most people eat lots of those fatty, calorie rich, or sugar-loaded food. Just start getting on the right track now.

In order to further persuade you to exercise, I have written two lists: one that lists all of the negative consequences of not exercising, and one that lists all of the positive things about exercising. Of course, I have written these lists in the perspective that will suit female nerds!

Not Exercising Leads to Lots of Problems:
  • more severe/more sicknesses
  • loss of muscle (i.e. you won't even be able to simple objects when you are older. This is especially frightening to me)
  • loss of bone (This is especially something we females need to worry about. Osteoporosis is very common in females. There are lots of exercises that help prevent bone loss.)
  • depression (I had depression for most of my high school life, and in the beginning of my university life as well. You know what helped me? Regular exercise. Exercising actually releases hormones that will help prevent depression. With exercising, self-confidence can also be increased since you will be seeing objectively that you are making progress on your body!)
  • premature deaths
  • back pain (obesity is linked to back pain)

Why you should Exercise:
  • after only a month, you will be able to actually touch and feel parts of your body having less fat or more muscle
  • after a few months, a more drastic change will occur (i.e. if you got a bit chubby like me in high school, then you can practically revert back to your old self!)
  • you will be stronger, and you'll be more confident (who doesn't want to brag about how they can lift more than their own weight?)
  • you will be able to fit and look good in cosplay
  • you will be healthier, live a longer life, be happier, and potentially get rid of your depression! (which is pretty much what happened to me!)

I hope this blog post has helped motivate some of you to start living a healthy life!

Sunday, 30 March 2014

Haiku on School

学校に行く
勉強する、帰る
ベッドで寝る

Written by: Cherry

English Translation:
  I go to the school
I study, [then] I go home
I sleep on my bed




Granted, this isn't necessarily a traditional haiku :) A traditional haiku consists of three main things:
  • It has to be about nature/seasons. Most haikus have striking visual words, called "kigo", that are words/concepts that are reminiscent to the seasons. For example, "snow" pertains to winter. "east wind" pertains to Spring. etc. etc.
  • It needs kireji. These are basically particles in the Japanese language. "ya" is a common particle that is used in haikus. "ya" is used to connect two ideas together. e.g. "kaeru ya ike" (frog "ya" pond). Using kireji basically creates juxtaposition of two elements.
  • Finally, the one criterion that most people know: the 5-7-5 structure of haikus. Three lines: first line being 5 syllables, second line having 7 syllables, and the third one having 5 syllables.
 Obviously, my haiku only meets 1/3 of those criteria for a "traditional haiku". :) Oh well, it was a fun thing to do!

A Disappointing Ending for the Mass Effect Trilogy - A Short Informal Essay

PLEASE READ: I wrote this precisely when the ME3 online hate was at its biggest. I never actually posted this until now.

Beginning. Middle. End. Be successful in each, and you'll have a good story or plot. It is within the very foundations of the dramatic structure of most media out there today. Say if I changed it to beginning, middle, oops. Say if you invested 5 whole years of your life to this story when it was released in 2007, only to have it slap you across your face with its terrible excuse for an ending.

I'm talking about a revolutionary video-game trilogy, accompanied with numerous comic books, and even 5 written novels . I have personally spent over 150 hours playing all three video-games, read 3 of the books, and read all of the comics. To have this series end in such a cheap way is undermining the rest of the success of the franchise. I'm talking about Mass Effect.

The major overarching theme of this science-fiction series is that your choices in the game affect the entire galaxy. One wrong move and you can destroy a solar system, or even an entire sentient alien species. The ending was promised by Bioware, the company who developed this series, to effectively factor in the thousands of choices that you have made throughout the three games into a unique and memorable ending. Casey Hudson, the project director for Bioware, stated that "It's not even in any way like the traditional game endings, where you can say how many endings there are or whether you got ending A, B, or C". I've played the ending myself, and my eyes saw only three endings to choose from, exactly unlike what Hudson has promised this game wouldn’t have.  Furthermore, these endings are 99% equivalent to each other - the same special effects and the same cinematic scenes. All I can say is that the ending was a hypocrisy to the game’s theme of free choice - and that's excluding the abundance of plot holes all packed into such a short 15-minute time which could decanonize the entire third part of the trilogy. Imagine, 15 minutes that could ruin over 5 years of work. How is this a satisfactory ending at all?

It's no secret that an overwhelming majority of gamers who have played Mass Effect 3 found the ending to be disappointing or worse. It’s no secret that we have been disheartened to the extent that us hardcore fanatics have donated almost $80 000 dollars to The Child's Play Charity in under a week in order to raise awareness about this issue. It’s no secret that out of 54 898 votes on the official Mass Effect forums online, 91% found that the "endings suck". It’s no secret that entire campaigns, such as "Retake Mass Effect" on Facebook have launched in hopes of Bioware listening to us. 

The media also hasn't helped at all. They portray us as entitled, whiny gamers hwo wanted a happier ending. They who argue that we are supposedly "entitled", or that Bioware's artistic ending was creative and imaginative are wrong. This is not an issue of the lack of a "happily ever after"; it's about an ending that was promised and takes the rest of our 150 hours of gameplay into consideration. All in all, the message that Bioware send to us fans is that our choices and our time invested into this franchise ultimately meant nothing.

Thursday, 30 January 2014

Werewolves vs Vampires - The Ultimate Supernatural Showdown



It is within our discriminatory nature to categorize and brands things - to differentiate between what is superior compared to the weak. This is relatively easy for the observed phenomena of this world, but what about the world beyond this mere reality? Should we not take importance in the perplexing, yet seemingly unanswerable questions on the supernatural?

Perhaps we should not merely brand these as unsolvable - moreover, through the knowledge that we've attained in this field, correct sides in the debates of classical questions, such as the superiority of werewolves vs vampires, can be evident as if in clear daylight.

Today, I will tackle the classic werewolves vs vampires argument. Who is superior? Who is better? We believe it is the werewolf.

Why do the supernatural exist? It's simple. To instill fear, the greater frightening portion of human experience,  in us piffling mortals. And why is this question important, you might ask? Because we believe that the differentiation between quality supernatural creatures versus others is dominated by the amount of fear that they incite in our minds.

Werewolves have been recorded in history for far longer. Numerous historical references of lycanthropy exist, dating back to Indo-European mythologies, being cited during classical antiquity, and still, the werewolf remains, to this day, a popular element of spooky culture.

Compared to that of the werewolf, the vampire (on the other hand) first appears only during the middle ages. During that period of time, the equivalent of witch hunt trials were conducted against werewolves, once again proving that the werewolf is something to dread. 

While indeed, others might have the concession that vampires were recorded in ancient history, the significant thing to bear in mind is that of the distinction of "the vampire" between other blood-seeking creatures. In fact, these people carry a fallacious mental baggage with their contemporary notion of the vampire - they forcibly connect their current knowledge to these ancient monsters, during an era where people had no conception of a vampire yet.

Thus, with that being said, it is clear that the werewolf has instilled fear in more generations of people than the vampire has. There is, however, another way in which the werewolf succeeds more than vampires in instilling fear - and that is the enigmatic nature of the werewolf.

Before explaining this though, we must distinguish two terms, that are usually interchangeable in everyday language, though in actuality, are by far different from each other - horror, and terror. Both Stephen King and Ann Radcliffe have described the difference between the two, explaining how horror describes its "unambiguous atrocity", while terror is something even more sinister, lying in its obscurity and uncertainty.

Here lies a perfect quote by Stephen King: 


"The horror: the unnatural, spiders the size of bears, the dead waking up and walking around, it's when the lights go out and something with claws grabs you by the arm. And the [...] worse one: Terror, when you come home and notice everything you own had been taken away and replaced by an exact substitute. It's when the lights go out and you feel something behind you, you hear it, you feel its breath against your ear, but when you turn around, there's nothing there..."

It is without a doubt that lack of knowledge instills probably the greatest fear. The vampire is so clearly defined in its characteristics, from that pale skin, its vampiric fangs, to its absolute pure love of anything sanguine. The vampire is also beautifully defined in Bram Stoker's Dracula, just as how Mary Shelley defined Frankenstein. But can anyone think of a classic novel pertaining to that of a werewolf? Frankly, there isn't any. And that my friends, is where we all discover just what makes the werewolf so utterly terrifying: his ambiguous and elusive nature.

Another resulting consequence of the explicit descriptions of the vampire is that we know more than ever about the weaknesses of this nocturnal creature. Garlic, a stake in the heart, and sunlight are its primary weaknesses, while the only weakness that the werewolf has is the silver bullet. If, perchance, the vampire and the werewolf were to engage in an all out duel to the death, the werewolf clearly has the advantage due to the sheer number of vulnerabilities that the vampire has over the werewolf's. Furthermore, the exploitation of the werewolf's weakness is particularly difficult to conduct, as modern bullets are composed of lead or lead alloys.

A potential counterargument is that the werewolf can only become a werewolf once per month. Thus, the vampire has the advantage as the vampire can harness his true powers and destroy the werewolf during any night that he wishes. However, as long as the werewolf is adequately sensible enough, and because the vampire has numerous weaknesses, the werewolf could simply keep garlic or have a stake nearby to drive the vampire off.

Our last argument is more of a hypothetical model of sorts on the contagiousness of lycanthropy versus vampirism. Of course, if the werewolf and the vampire did exist, who would have the numbers in their favor? Again, we think it is the werewolf. The vampire's only method of transmission is to bite their fangs in one's neck, whereas the werewolf can simply scratch the victim. As it is particularly biologically awkward to bite someone on the neck, especially as the victim is resistant, it is relatively easy for the werewolf to use its extended appendages to scratch. Thus, the function for the spread of lycanthropy versus time increases possibly exponentially more than vampirism. Eventually, werewolves would outnumber vampires, and...


 ~ vampires would ultimately have to admit defeat. ~