Friday, June 19, 2015

Code Project: AnkiTranslate

CLICK HERE to see the full app on GitHib.

Coming out of a medical background, I can't say I'm one for memorizing much of anything (memorizing hundreds of pages/slides at a time taught me 2 things: #1 amazing time management skills, #2 you forget everything you don't directly apply and use often).. BUT I will say that for learning a language you need to memorize vocabulary and that Anki is the tool out there to help you. Anki is simple and free, its flash cards that you make and that do spaced repetition (it hits you with cards you missed at a time interval you can set that is good for you). However, I wrote hours and hours of notes and cards and well, that's no fun.

In a language, I've seen most people say you need about 2000-5000 words to be conversational. And a lot of English speakers speak around 15,000-20,000 words. And crazy specialized folks who go deep into an area (could be medicine, science, whatever).. may know 30,000 or so words. So let's stick with 2000-5000 words... if I am FAST and can make 1 Anki card a minute, I will spend 5000 hours making flash cards.. which is 83 hours. Yes, yes making the cards *might* help me learn it a little more. But I do think flipping through the cards for 83 hours I could be done with at least a good portion of the cards and be speaking / interacting with people instead of still making more cards.

I could spend said 83 hours making a TON of flashcards for random vocabulary. Or I could spend 2 hours making a little app, drop it on github for anyone to use / see, and get to program a little :D.. and drop my time making flash cards down to about 30 seconds). I can find plenty of lists of top / most common 100 or 1000 or such English words, drop this into the program and get flashcards off of a simple copy and paste.

Using the app: input a text file of words you want to translate out and separate each word to translate with a newline (or edit the app to deal with CSV or whatever format or all formats..).. let AnkiTranslate know which language you are starting with and which one you want outputted.. and then..

Output: you will get a text file you can import into Anki that will make your flash cards. Anki has the front of the card, separated by a tab, the back of the card, then a new line for a new card. So as such the format of the output will be your initial word, a tab, the translated word, and a newline for a new card.

Caveat: This is good for vocabulary and short phrases. Expect that a translator will, well, mess up grammar and make you sound funny if you try and translate a ton of phrases. My purpose is to use this to get mass amount of pure one word vocabulary down, then I will study grammar and sentence strucutre on its own and put together the words I learn from this. Sometimes the meaning of the word won't be the one you think of, it happens.. but it'd happen anyways using a translator. If I get 95% of the words right off a translator, that's still pretty good and I'll fix them when I use it wrong and am corrected :P.

Here's the fun: planning. I decided on a WPF because it's easy for me to navigate as I've worked on projects with it before, the UI is simple and looks nice (I say nice relatively, it works, I don't care about design as much as function and logistical use), so on the CS code behind of main window I made a plan.. I usually *try* my best to bullet out a good order of what I am working on, and it almost always partially turns out that way: And when I dropped some text boxes onto a window it looks like this:



I ran into a snag and realized that Google does not offer free translating at all anymore, but Microsoft does. I went to the Microsoft Translator API and followed the directions there, it was easy to plug right into my app. This is the expanded version of my initial plan.

Since it's a small app, I just hardcoded in some languages (feel free to adjust as needed to whichever you are learning). The website that has a list of all possible languages is here: msdn.microsoft.com/en-us/library/hh456380.aspx

I also made a ConfigClass to hold some global variables instead of passing around local ones to my different functions.

Another cool thing you can do is add some static constants to your config file which makes it easier to change in one place in the future when the app gets bigger.



You can see below with the variables clientId and strTranslatorAccessUri , I am referencing the ConfigurationManager.AppSettings which is hitting my App.config file keys that I added. This is the actual work going to the Microsoft API and returning translated text.



The finished product looks like the following:


If you do get to use this app, here's a good sample of the top 1000 words and how useful they are by example: http://splasho.com/upgoer5/

Also, this is *perfect* for the app to translate to another language.. 1000 words separated by a new line. http://splasho.com/upgoer5/phpspellcheck/dictionaries/1000.dicin

Here's my use of the app and the output file (plugs right into Anki and I get my deck! Whoo hoo! 80 hours to play more games..): 1000 most common vocabulary words in English / Bulgarian

If you want to try it out yourself, have a go! (I just uploaded the release version to Google Drive so you can download from there. If anyone actually wants to use this and doesn't program / wants me to add more languages just ping me on the contact form and I can add the rest..) Download

Tuesday, June 2, 2015

Life Learning Optimization

I wanted to make some comments on learning, perhaps it will help someone out who is struggling with learning quickly and how it occurs. I've done everything in my life to optimize how I learn and I have been pretty successful in helping others as I've spent years tutoring for almost every science / math / topic / exam.

Learning quickly usually means you "care" more (in some way are more motivated, curious, or passionate than others), work harder, work smarter per your time, or spend more time thinking / working through things throughout your day. Honestly though, people do have a "knack" for learning certain things in certain ways. I will also go so far as to say there's a "knack" for memorizing vs. computing thought. By all means you can be born good at both or get good at both, but usually you have a personality and tendency to like/dislike one or the other and it will force your thinking patterns to be "better" at one naturally. There are visual-, tactile-, audio- types of people and others. You can get better at each one, but there are some that you will be better at without as much effort as the others.

It can make you incredibly unhappy to spend all your thought/time doing things you don't want to or doing things you like the wrong way. Don't do it. Life is too short. You might think you are terrible at something, but be going about it the wrong way. For example, I am a visual learner. I learn very well and very fast writing, reading, drawing concept maps, reviewing, testing myself, and reviewing more all visually. You would think I was terrible at something if you made me try and do all of it by listening to audio only (as many times as I wanted) and being able to only talk to people with no writing allowed. I'm the same person, learning the same topics, but some methods make things stick better.

Sometimes you have the leisure and time to improve at a learning skill. If you are mostly visual and keep working at audio, you will be able to become better at both! However, if you're pressed for time and performance (say.. medical student) you are probably better off figuring out how you learn and overusing that to death so you get some time to sleep. Learning is about learning yourself and what makes you understand the best (in a good amount of time with a worthwhile retention).

Other factors in learning are awakeness (did you sleep enough?), happiness with life, overall health (diet / exercise help), background knowledge (in the same, or other seemingly unrelated things), self-confidence, openness (are you fighting learning it? do you hate your class or teacher?), and good habits (do you habitually distract yourself or did you form good habits at sitting and focusing over the years?). Background knowledge in learning, critical thinking, or being familiar with a topic helps a lot.

I've seen people waste unimaginable amounts of time on other thoughts and it cuts into their learning time. Many of them never realized the problem and became frustrated. For example here are a few (look out for these, see if any sound like you..):
  • Thinking about things happening in the day.
  • Thinking about how every last little thing works.. then getting hung up on it.
  • Thinking about how boring things are.
  • Thinking about how much they hate what they are doing.
  • Thinking about how something is named in a dumb way.
  • Thinking/worrying about what someone else thought of them that day.
  • Thinking/worrying about failure.
  • Thinking about how to get through and just scrape past some class / school / graduation date.
  • Thinking about what they will do in the future (which to some extent is productive, as it can be planning and motivating for the current task).
  • Thinking about whether they will get a call / text / message / whatever.
  • Thinking about how to display some status update on social media.
  • Thinking about said random noise / shuffling / movement in room.
  • Thinking about how many pages they read or how far they are getting in the book.. without actually reading the book.
If you said you had 1 hour of time to work on Algebra.. and you did any or a lot of the above.. your 1 hour is now worth say 15 minutes. That's a lot of thought going into stuff not Algebra.

How to fix some of the above things.. make sure after every page (or paragraph / sentence) you actually comprehended, can summarize, and remember what was written. If you don't remember things you read, record yourself speaking the page and listen to it. If you hate audio, either get Dragon or transcribe audio yourself. If you don't map memory to typing, then write it out, or vice versa. Repetition and quizzing yourself helps. Believe in yourself and don't worry about other people. Also don't get hung up on something too long, one nitty gritty detail won't kill you and obsessing over it gets emotional and wastes time. Sometimes its better to write it down, address it later when you know more, or go out into the world and ask someone online/in person to share some of their knowledge with you. Don't worry about "telling" other people on social media or real life how many chapters you read so you sound good. No one cares how much you read if you didn't learn. Learn for YOU.

You are made up of your years. Your years are made up of your months. Your months of days. Your days of hours. And your hours of minutes and seconds.. how you spend them with your actions and thoughts. If you waste your thoughts on garbage (listed above), it will take you a very long time to get through things when you learn them. I don't advocate not addressing these things, they are important but in their own time. If your job is to be a student and to study, or you made yourself a goal to learn something.. then make sure your time is spend smartly working on the task at hand, in the present. Having a plan in mind, an approximate flexible schedule (don't be too hard on yourself if you don't make it, count the positives and don't let things hold you back!), and a goal help immensely.

I've been told I am a fast learner. Sure? I'm smart but no genius child. I am a very hard worker, extremely goal oriented, and very good at focusing at the task at hand. I hate garbage thoughts (negative feelings, negative things from other people, not believing, worry, unnecessary life drama, emotional or irrational reactions). I don't have any form of social media.. the most I have is this blog for software, one for food (my hobby is cooking), and LinkedIn.. I feel most other social media provides more unnecessary distraction than good, but it's just my opinion (however, there are times where it will HELP your career a lot if you are a public speaker, actor/actress, athlete, traveler/have friends at a distance, etc..). I try my best not to worry about others or let them take time away from my thoughts. Of course, I'm human and do care very much what a few people close to me think, but other than that I don't waste time on drama/life garbage. I can blatantly ignore my surroundings, to the point of likely unhealthy if some event were to occur behind me. I can be called "spacey".. I'm there, but I'm not. If you leave me alone a couple minutes I'll have started thinking or planning out something else in my head I was working on before.. for example working through a puzzle, rehashing as many words I can think of from a language I'm learning, finding another way to approach something, or walking through a concept map of something I've learned. Your idle time is A LOT of your day. Your time spent walking, exercising, traveling, driving, sitting, etc.. and if you took all that time, you can get very good at what you already do "quickly" relative to someone else who is thinking about their Facebook post.

You don't have to do this with your time, only do it if you want to.. do what makes you happy. If you enjoy social media, art, history, science.. anything then spend your time on it! This post if for if you are trying to learn and not sure why you may not be getting the results you want. Not everyone wants to learn a ton of stuff. For some, life is a comfortable place and relaxing is important. For others success and moving up. But, for me.. I like to learn. I'm good at learning and it makes me happy so just sharing some mistakes and advice if you too enjoy learning.