So, I took the JLPT N5 last year, which was one my goals. I don’t know if I passed or not yet, but I’m going to guess probably not. I don’t feel bad about it though, since the point was to take it.

This is not a guide for everyone

I learned a lot about my own abilities, and about what kinds of things I should be studying. This blog post is my own meandering about how I’m going to study for this next test. It’s not for people dropping by to find out how they should study. I can’t answer that, you need to find your own best methods.

What went wrong

The number 1 thing I messed up on when studying for the N5 was not taking the vocabulary seriously enough. I ended up knowing a lot of vocabulary I didn’t strictly need, and ended up cramming the stuff that was on the test. I didn’t give myself enough time for Vocabulary.
I overestimated the difficulty of the Kanji. Truth is, once I got going and started to learn how to learn Kanji, they got easier. The reason this was a mistake is that it affected the rest of my studying. I assumed my ability for Kanji was a good barometer of my general ability. Nope.

Things that were hard

  1. Stamina – things that shouldn’t have been hard were harder since I wasn’t used to going that hard for that long at once. I’ll need to train up so 3 or 4 hours IN JAPANESE the ENTIRE TIME isn’t too bad.
  2. Listening – You get one go at hearing and understanding the dialog. I need to practice this more directly, with some kind of listening practice or practice questions. I was missing things because I was trying to translate them and getting behind.
  3. Similar-looking Kanji, or incorrectly written Kanji – I’ll need to study writing the Kanji much more. I got complacent on that.
  4. Kanji I “don’t need to know yet” – Knowing all the Kanji for all the vocab would be ideal. Though the more the better.

Mistakes I made in studying for the N5:

  • Not consistent enough across the year.
  • Too much time spent on general study, not enough on test prep like specific vocab. I knew a lot I didn’t need to at the cost of things I did need to know.
  • I didn’t put much effort at all into listening practice.
  • I didn’t train my translation speed enough.

General schedule

January

Taking a break. I’m using this time to get things in line and focus on other things while I have the longest time until the next test.

February – June

General Study

General study is still important, since the end goal is literacy, not just passing the tests. So here’s the plan.
  • Finish Genki I
    • I’m 7 chapters in (4 remain), and I should pretty easily finish Genki I. I probably should have finished it last year, but oh well.
    • Each chapter takes me about 6 – 10 hours to dig through as completely as possible, a chapter could take two weeks along with other study methods.
  • Genki II
    • The goal there was to get another 5 chapters in, but we’ll see. It really depends on how long things take.
  • Other Workbooks
    • I have Japanese in Mangaland and Kanji in Mangaland. They’re not the best resources in the world, but repetition is the key to mastery, so I might as well.
    • I’m already on volume 2 of Japanese in Mangaland. I don’t have a particularly detailed plan for going through this yet, but I’ll sort stuff out. I’m thinking 1 – 2 lessons a week, depending on how intense the study is that week. This would be in addition to Genki I, which will be the focus.
  • Translating
    • [email protected] times
      • I’ve been getting these for a while. The plan right now is to translate every story, then compare with their translation.
      • I have no idea how long this will take, since there will be a LOT of words and such I don’t know
      • I’ll also plan on pulling out notecards of words, phrases, and so on that seem like I should know or are otherwise interesting.
      • This comes after all the study resources.
    • Imported Manga
      • If I have time and energy, import some relatively simple manga and do my own scanslations (but don’t distribute it, since that’s illegal).
      • If it’s something with an official English translation, I could compare

May – November

N4 Kanji Study

Study time is going to start ramping up in May, since I’ll be adding on Kanji study specifically for the N4.
  • Anki and Memrise seem to be the best way for me to learn. I had pretty good success with memrise, so I might even start there this time.
  • The goal is to have the entire deck memorized backwards and forwards by some time in October.
  • Should be able to draw and recognize every Kanji
  • Review the entire deck every week from mid-October until the test.

July – November

N4 Vocabulary

Use Anki and Memrise to learn the vocabulary. Also, preferably, I’d like to know all the Kanji for the vocabulary, though that’s not as important. The goal is to be able to go between Japanese and English without having to think too hard. It should be instinctive.

N4 Grammar

Use Anki and Memrise to get some of the basics, but using flash cards for grammar wasn’t very effective for me.
So, I want to find some resources like textbooks or workbooks or something I can use to practice grammar much more and get this stuff down. I’ll figure this out when I get closer to July.

Listening

I want to make a point of practicing listening. I’m not sure what resources exist here, but I should be able to find some. Preferably focused on the N4 level content in this case. I’m even considering getting some kind of live tutoring online or in person if I can find some for a reasonable price.

September

Don’t forget to register for the exam.

October – November

I want to be at least 90% there by the end of October, since NaNoWriMo is in November, and based on last year it seems like it’ll take about half of my free time that month. Kanji and Vocab should be more or less done in October, and November should be primarily reviews and practice tests.

Practice exams

  • Find unofficial online tests to take, and evaluate positions once a month, starting in July.
  • Should be hitting 80 – 90% consistently by October
  • After NaNo, take the official practice N4 exam
    • Do it again every week, to get the habit down

Another personal post. Ignore if you like, just best to do this stuff publicly since it’s more likely to happen then.

I wasn’t in a hurry to get to this after the year started for a few reasons. The main one is that things go a little crazy around all the holidays, and it takes a while for things to settle down again. I think things have settled, and it’s been kind of itching to get this written up and wrapped up.

2016 so far

It’s been an alright year, for how short it’s been. I think I might actually have some kind of schedule worked out that feels good. Something where I’m simultaneously getting stuff done that I wanted to get done and actually doing some of the more community oriented goals I have.

I feel bad that I basically neglected this blog in 2015. There were a number of reasons that happened, but they mostly boil down into needing to look for more work taking priority over basically anything else. It was short-term thinking that’s not my normal state, and I’m sort of ashamed looking back on it. At the same time, I did end up getting a job that’s more interesting than what I’ve done before in some ways, and with a path to move up for a while before things have to get messy again.

This year’s goals look a lot like last year’s goals. I’m basically in the same spot that I was last year at this time, though much more secure. I’m looking long-term again, and some things have become obvious. The main one is that if I am going to blog technical stuff, I should do it on a technical blog. Start something new, do it there. Keep the non-technical stuff here. Random one-off technical posts are fine, but they don’t really serve a bigger purpose.

I planned out my goals this year using a different method than previous years to try to see if I ended up in a different spot. I did, but it won’t look like that here. Basically, I ended up with a laundry list of habits to develop and what I call ‘directions’ to move in. Those aren’t goals, though they can be used to determine some goals. I can smell another blog post coming about some of those, or possibly even a few about the various topics.

I’m working on my Japanese study schedule post already though, so that’ll be next.

The short version of this year is: Less fiction, more technical writing. More investments in the future and community, and less looking for quick payoffs or money.

I did put some money goals in there too though, because why not?

Oh yeah, and I won’t have so many exercise goals this year either. Annual lifting benchmarks and such really don’t make sense at the level I’m at right now. It’s better for me to just keep progressing and keep at it.

On Challenge

Different people are motivated by different things. As a general rule, I tend to over schedule myself by about 20% per week. This does two things:

  1. Things that don’t matter end up falling by the side, undone
  2. I get significantly more done

Those are both important. Think back to high school or college. How many times did you or someone you know just start cleaning their apartment or something when they were supposed to be studying for the tests. It’s just an easy way to distract yourself by feeling productive. You’re getting things done instead of getting done what you need to get done.

The key with my scheduling is that I keep focus on the important things. Sometimes I clear the week, usually I end up with around 20% not done. Sometimes that 20% that’s left is also important enough to actually get done, just not as urgent. Then it goes on the next week’s list. Simple system, really.

The other major advantage (hinted at by #2 above) is that I when I get ahead of schedule for some reason – like an estimate was wrong or something fell through to give me more time, etc – I’m able to move on to the next thing immediately since I know precisely what the next thing is. Otherwise it’s far FAR too easy to just go “Well, I’m done, so I’ll just mess around” even if it’s unconscious.

There’s the rambling link to my goals. My goals are big, probably too big. Bigger than are really reasonable, especially together. I make a point of only writing goals that are measurable, defined, and actually possible. And looking at the list I’ve started on, and the thoughts I’ve had regarding all of them, I think it’s clearly possible for me to achieve all but maybe 2 or 3 of them without much more than 2 or 3 regular weekly schedules over the year.

The bonus goals are dramatically harder, mostly just there to keep myself pushing if I achieve some success in one or another category.

Basic Categories

  • Health & Fitness
  • Writing
    • Fiction
    • Non-Fiction
    • Blogging
  • Community & Networking
  • Skills & Certifications
  • Income

Last Note before we get into the goals

If things change dramatically again (job situation, family situation, etc), I’ll try to update with a new set of goals this time. These aren’t set in stone, since a year is a long time.

2016 Goals

Health and Fitness

1. Lose 80 pounds

Again? Yeah, well I actually lost some last year, but the math that makes losing 80 pounds in a year possible (though challenging) remains true. That’s a little under 3 lbs/week on average, if you’re keeping track. I’ve already made some progress here, so I’m feeling good about this one.

2. Bike 100 miles in under 7 hours

This was a goal of mine last year, but I didn’t quite make it (got to about 70). I’m talking about a stationary bike as well, just since it’s much easier to manage. This isn’t bike 100 miles without stopping, but it’s making me average over 14 mph. I can take breaks, but not too many or for too long or I’ll go over 7 hours.

Skills and Certifications

3. Study for and take the JLPT N4

I took the N5 last year and learned a LOT about what I need to focus on more and how to generally study for the test. I doubt I passed the N5, but I feel good about passing the N4 this year. Why go up a level instead of just nailing the N5? I don’t want to waste the time, frankly. If I happen to fail the N4 this year, I might consider holding off on advancing to the N3. Once I get to the N3 level I’m going to make a point of passing before I advance every time. Much longer post on this stuff coming later.

4. Get 2 new technical certifications

I basically have my job because I got a certification. Some of them seem like they’re actually worth it. I have at least one in mind right now, and instead of listing that one specifically, I’ll just say that I’m going to try for two by the end of the year. That shouldn’t be too much of a challenge. I am going to make a point of only going after what seem like valuable certifications and not just obviously-money-making ones that just cost a lot and don’t mean anything.

Writing and Blogging

5. Write 20 new posts on this blog

Same number as last year, same logic as last year (1 post every other week or so). This would not include crossposts from the new technical blog. This blog, the one you’re reading now, is going to be more productivity and personal garbage than the other one.

6. Write 60 posts on new technical blog

I actually lowered this number from what I had been thinking of doing. The only reason I can be confident I can pound out that kind of content is that I know many of the posts won’t be huge and long and rambling like the technical posts I put here have been. Some percentage of them will just be the whole “If you get X error, here’s the solution I found” kind of posts. This is just over one post per week. I’d only need to post two posts per week once a month or so even if I get this thing launched at the beginning of February. So the goal here is really more for consistency than for volume. Frankly, I’d put this one as my 2nd most important goal this year, after the weight loss. This is one of my longer-term plans.

7. Write 100k words into a story posted on a public site

I’m not sure where to post this, but I want to get something going on one of those public sites like wattpad, fictionpress or something. Not necessarily a high quality, edited 100k words, but just something to keep putting stuff out there into the ether and getting that social pressure.

8. Win NaNoWriMo

50k words in November. I did it in 14 days in 2015, I can fit it in this year too, no problem.

9. Rewrite, edit, and self-publish (or submit) my NaNo 2015 book

I really liked the thing I wrote for NaNo 2015. It had a lot of flaws – as you’d expect from a NaNo book – and I probably started 3 chapters earlier than I should have. Or arguably I could start the story where I stopped and go from there. Lots of options there, but I want to actually finish this book and put it out there. This is different from the thing for goal #7. That’ll be new, this is more of the back end of book development.

10. Self-publish 1 technical or non-fiction book

Another book? Am I crazy? Maybe, but a book about a topic or set of libraries or something doesn’t seem like it’d actually be that hard. I want to try it out and see how I do. Being entirely honest, I’m not sure I’ll have time for this AND #7 AND #9 but we’ll see. They’re kind of each different things and it mostly comes down to time management. I actually started a book in 2015 that I abandoned once I got my current job. I won’t go back to that one, since it was basically an extended tutorial on a set of libraries, and those go out of date rapidly. It did give me the chops I needed to sketch out the right kind of outline and do it. I wouldn’t be starting from zero knowledge.

11. Review 5 technical books

This is kind of cheating a little, since I’d be doing these as blog posts for #6. I want to make a point of reviewing some technical books as part of my blog. The motivation here is two-fold. First, it makes my blog show up for those authors when they search their own name. Since they’re probably more successful than me or at least more influential in their circles, that could give me some pull. Second, the reviews will have Amazon referral links on them (properly disclosed of course), and depending on the volume of traffic I could make a couple of dollars. So this really works as a potential income source and networking opportunity. I’m probably only going to review books I like though, since otherwise that makes things messier. I don’t want to be a general reviews site, I just want to point out useful resources to my readers from time to time.

Social and Networking

12. Have 500 Twitch followers

This goal assumes I’m going to keep streaming on Twitch. I want to, since it’s fun. Why pick a number like 500? It’s basically either impossible or too easy, depending on the circumstances. About 2/3 of my followers I got in maybe 2 or 3 streams. The rest of the time I’d get anywhere from 0 (usually) to maybe 2 or 3 at most. Using those numbers and some idea of how much I think I can stream this year, I could probably make a safe estimate and pick a number like 200. Instead I’m betting on luck to an extent. Maybe I play some game and happen to get on a bandwagon. Maybe I get raided. Who knows. This one has more luck to it than I like, but having a number is a handy thing. Just so I have a reference point on progress when I come back, at the beginning of the year I think I had 98 followers.

13. Have 500 Twitter followers across accounts

Too easy, probably. I have a few accounts I’m using and unless something happens with twitter (there have been rumblings) I think I’ll end up with a pretty good number across accounts. This includes my technical accounts and such, and even with basically no content I’ve been getting a pretty decent stream of followers just from the auto-follows people do. I have some plans for social media, so I wanted to work in a goal. Might have a post later on the Twitter stuff, though I’ve gotten some ideas recently for helping out my following. We’ll see.

14. Mentored by 3 people more successful than me

I need to be around more successful people to become more successful myself. It’s pretty obvious when you think about it. Part of why I like my current job as much as I do is that a good percentage of the people I work with are (probably) smarter than me. That makes me smarter, over time. On a similar note, I want to get pulled up by people more successful than me. The reason I used the term ‘mentored’ instead of ‘befriend’ is because mentoring is a more professional thing. I could and might even pay for it if the right opportunity pops up. Restricting friendship to successful people or just trying to be friends with successful people because they’ve got that money still seems gross to me. Start with mentoring, if I end up with friends, great. If not, that’s fine too.

Income

15. Make money from 2 more sources

Honestly, these income ones are less important this year, since I’m in a longer-term cycle right now, but two sources of side-income seems reasonable. If I achieve every other non-income goal on this list, I’ll have at least two sources. The point is to build up streams little by little, since it adds up.

16. Make $3000 side income

I sort of doubt that the stuff I’ve outlined above would make me this money, so I’m leaning on luck here. I might also find some side opportunity this year. As long as I stay employed, I won’t feel too bad missing this one, but it’s good to try.

BONUS GOALS (Pushing harder on the above goals or extra details. The 20% above the 20%)

17. Lose 120 pounds

18. Write 30 new posts for this blog

19. Have 1000 Twitch followers

20. Have 1000 Twitter followers across accounts

21. Create a publishing company

22. 120 posts on  new technical blog

23. Review 10 technical books

24. Self-publish 3 technical or non-fiction books

25. Get 4 new technical certifications

26. Completed the Genki I Textbook + Workbook

27. Completed the Japanese in Mangaland and Kanji in Mangaland Series

28. Completed 5 chapters of the Genki II Textbook + Workbook

About the bonus goals

The bonus goals aren’t supposed to be all possible at the same time like the regular goals. A few are just details, but most of them are doubling down on one or another specific direction. I don’t ever want to end up where I’m not pushing hard.

2016 Quarter 1 Goals

The following should be completely by April 1, 2016

  • Lose 40 pounds
  • Have or scheduled to test for 1 certification
  • Written 6 posts on this blog
  • Written 10 posts on the new technical blog
  • Written 20k words on a story online somewhere
  • Rewritten and started editing on the NaNo 2015 book
  • Have 200 Twitch followers
  • Have 1 mentor or a solid lead on one
  • Have 250 Twitter followers

Final Thoughts

It was hard to come up with goals this year. On the one hand it felt like I was just repeating or extending what I wrote last year, after having completely abandoned that direction last year. On the other hand, I don’t suddenly think those were all bad ideas. They just ended up not working out at the time.

Are there too many this year? I don’t think so. The income ones aren’t really important and will only apply if I find an opportunity that will pay off this year. The NaNoWriMo one is basically free. The rest kind of work together into: Health & Fitness, community development, and skill development. There’s a huge amount of overlap between the goals, so while they might mostly be too big and hard, I don’t think there are too many.

I’m not sure this plan will survive the quarter. Last year’s didn’t. I still think that setting goals is important though. It helps me to organize my thoughts, set realistic expectations on what I can do in a year and prioritize what I think is important. This year my primary motivation is going to be community. The new blog will be a major focus, along with Twitch. Programming on Twitch Creative could be an interesting source for more community building. I started doing it just to hang out with my regulars while I was doing the coding I was going to do anyway. Now I have some more ideas for making it more interactive and interesting. Still, it seems like Twitch is controlled by a set of kingmakers. Sort of annoying. It might make sense to try to build a network of Twitch programming streamers. Hmm, that one have to go in the cooker for a while. There might be something there. We’ll see. I shouldn’t have ideas while I’m typing posts.

I’m going to try to make a point of doing quarterly updates to my goals progress. Then at least I can change them if my situation changes. It feels good to have this post done. I have at least two or three more kind of rattling around in my head, so I might post some more soon, but I don’t like to promise anything.

It seems like I don’t post these exactly on the new year. I had planned to work on this earlier, but things got in the way, as it goes. Also, I just realized I haven’t posted since my last goals post at the beginning of 2015. Planning to do better this year.

Proper warning: This post is going to be rambling and personal. These posts are more for me than for the public. So don’t worry about skipping this one.

Improper promise: I’ll be (cross)posting a lot more technical stuff in 2016. That’ll at least pad out the personal gibberish.

Beginning Thoughts

I’m looking at my 2014 post to have some kind of structure to go on. I thought 2014 was “strange” and “had some employment panics.” 2015 proved to be more in kind of every way. Higher highs, lower lows. More success, more failures. Went without any work for a while, which kind of put the axe on the various plans I had. I took the first serious steps in getting healthier. I didn’t make serious progress on weight loss (lost between 20 – 30 pounds), but I stopped gaining weight and I started losing weight. Also, I started to get in the habit of exercising, going to the gym, and tracking what I eat. Those habits are huge, and an important part of moving on and getting healthier generally.

Also, I ended up losing my main contract (on good terms), and went basically without income for a while. I picked up a SalesForce Certified Developer certification, and got a job for this place called CloudCraze which builds an eCommerce solution on top of SalesForce. This sprung out of my web background, and is a fairly large career change. At the same time I’ve spent time learning Node.js and some of the JS frameworks (React and Angular in particular). So, my previous goals were, um, shortsighted. I actually refactored stuff personally in March or so, but I didn’t do a blog post about it. Anyway, since I didn’t blog about my update, we’ll go through what I thought I wanted to accomplish in 2015 back in February. I think any further comments belong in the 2016 goals post.

2015 Goals Final Update

1. Lose 80 pounds

RESULT: Some Progress. My 2014 goal was to lose 60 pounds, and I gained 20. This year I actually made progress. Up until the holiday break I lost about 30 pounds total. By the end of the year, I’d gotten back about 10 of those (oops). So, depending on how we measure it, I lost either 20 or 30 pounds. Probably 20, that’s more honest. But hey, it’s going the right direction (momentum is important), and I have a better handle on managing this stuff. I’m not completely unhappy with this, but I would have preferred getting farther.

2. Run 5km without stopping

RESULT: FAIL; I didn’t do any running training. At some point I changed my focus to try to bike 100miles in a day (which I also failed). However, the intent of this one was to get a basic amount of cardio, and I ended up getting to about 60 or 70 miles in one go. So, if I stretched the rules I could say I succeeded, since I got a fairly challenging cardio endurance thing done. But we don’t bend the rules here. Again, this is my fault for not updating with my changed goals.

3. Do 150 situps without stopping

RESULT: FAIL; Didn’t even train situps. When I built this fitness list I had no idea what kind of exercising I’d actually be doing.

4. Curled 100lbs (set of 10)

RESULT: FAIL; Again, this was just bad imagination on my part. I did a LOT of lifting (for me) this year, but curling was more of an afterthought. Makes me think these yearly fitness goals might not be a smart move until I’m in a more permanent cycle.

5. Pressed 300lbs

RESULT: Some Progress. This goal was unrealistic. I mean, super unrealistic. The highest number I could find was 155 in my log book. I vaguely remember 170, but 155 is what I found. That 155 was a 5×5 though, not a 1 rep max. I’d need a spotter to find out my 1 rep max. Based on loose estimates and online calculators, I can probably do around a 225 1RM. Just going on my gut feeling, I’d say closer to 200, but whatever. The bench press isn’t one of my major concerns right now.

6. Develop 2 passive income sources (making at least $300 each)

RESULT: FAIL; Got distracted doing some professional development and looking for a primary income again. -_- Here’s hoping I can actually get this stuff going in 2016.

7. Made $3000 in side income

RESULT: FAIL; Again, went looking for real work again. That took priority. Kind of an excuse, but there we go. I have a lot more specific plans for this year at least.

8. Finished 4 volumes of light novels

RESULT: FAIL; I feel bad about abandoning this. Writing got pretty much sidelined when I started looking harder into professional development and job hunting. I did manage to do NaNoWriMo successfully. I also wrote a small Sound Novel (think VN w/o character graphics), and that was pretty cool. Anyways, I’m not going to bother commenting on the remaining writing goals, since I’d just be repeating myself.

9. Published 1 novel or light novel volume

RESULT: FAIL

10. Finished 1 novel

RESULT: FAIL

11. 20 new posts on this blog

RESULT: FAIL

12. Taken the JLPT N5 or N4

RESULT: SUCCESS! The first thing I have completely succeeded on. I took the N5. The goal was to study for and take the test. I did that. I probably failed the test but that’s fine. I got so much information and data for taking the N4 in 2016. I actually feel really good about this.

BONUS GOALS

All failed, though I did make a few youtube videos.

Middle Thoughts

Again, looking back on last year’s summary to maintain some structure, one of my complaints at the time was that my 2014 list “lacked imagination.” In some senses 2015’s list was improved, but in others it was misguided. I had wanted to get some writing income going as my background passive income. Then I suddenly needed primary income.

Goals-wise 2015 looks like an almost complete failure. Most of that is because I never updated my goals on the blog here when I updated them in reality (somewhere in the March – May time frame, I’m not sure of the exact date).

I’m going to add a new section here.

2015 Events and Accomplishments

Jan – Feb – Nothing too significant, though this was the remainder of my time working on the contract I’d been working on.

Mar Everything changed, decided to start hitting the gym harder. I also started getting into Node.js and React

Apr – Jun – Started applying for some jobs, did some interviews. Attempted the SalesForce exam.

Jul – Got the SalesForce certification. Accepted a job offer. Hit the gym kind of too hard.

Aug – Started a new job

Sept – Dec – Most of my interesting things here have been work related. Also learned Angular and Polymer.

Final Thoughts

2015 had a lot of ups and down personally as well. I’m not going to get into that here, but I know that at least some percentage of the downs were my fault or made worse by my reaction to things, so that’s something I want to work on. I want to be more calm, more mindful, and have a better focus.

I actually made a lot of professional progress, both in employment and in skills.

My writing stalled in some ways, and took a hard turn in others. I’m not unhappy with the progress made here, but it was almost entirely in the “try new things” category.

All in all, 2015 wasn’t too bad in the end. Could have been better, could have been worse, but I’m happier with where I am than where I was at the beginning of the year.

On to 2016. It’ll be even better.

It took me longer to get to this than I was expecting. I had some goals written up just a week or so after the last post. It just took me a while to get around to writing up this post.

Fair warning to anybody reading this: This type of post is mostly for me to keep track of myself. I put it out in public because otherwise I won’t act on it. There will be a lot of navel gazing and a lot of rambling.

Feel free to ignore this post.

Thoughts on 2015

2015 is already coming up on 10% done, so I suppose I have some idea of how the year is. 2015 is going to be like most previous years in that my main goal is going to be improving my health. It’s kind of depressing to think about that way, but one of these years I’ll stick to it better enough to improve, right? That’s the idea anyways. So I weighted how many goals I should have based on each category, and put much more weight on health this year. Simple enough.

So, the categories. Keeping in mind there’s some overlap. Also, the broad categories are pretty much the same as last year, which shouldn’t be a surprise.

  • Health
    • Weight loss
    • Eating Habits
    • Exercise & Fitness
  • Income Diversity
  • Writing
    • Fiction
    • Non-fiction
    • Editing/Publishing
  • eCeleb Status
  • Japanese Proficiency

OK, so what needs explanation here? Health stuff is pretty obvious. I want income diversity just for a safety net and because it’s always good to have multiple irons in the fire. I enjoy writing and want to get some stories out there, but I’d even be happy building up a small publishing house, even if it’s not of my stuff. eCeleb stuff is much less important this year, I’ll just let it happen if it happens. If it does, it’s a potential serious side income source, but I need to get there on my own pace. Japanese study should just continue on. Last post I mentioned how I just missed the registration date for the N5. Can’t do that again. I’ll probably take the N4 depending on how I feel about it. Might get some practice tests in the summer and see where I am in terms of skill. My final goal here is to get up to N2 eventually, though N1 would be a possibility if there’s some real potential jobs or something.

Also, looking at 2014, it was clear that although all of my goals might have been ambitious-yet-possible, progress was very difficult to track. Because of that, I think I’m going to do quarterly goals in addition to the annual ones. So I’ll be outlining my annual goals with descriptions below, then a quick list of the quarterly goals for this quarter. I’ll try to do an update post every quarter at least.

2015 Goals

Health and Fitness

1. Lose 80 pounds

Basically this is the same goal weight as last year, since I put on some poundage. Possible? Yes. Likely? Honestly, no. But I’m going to push for it. I’m hoping that since I’m incorporating more fitness stuff this year I’ll be able to push harder into this goal, and lose faster than just diet changes alone.

2. Run 5km without stopping

I’m so out of shape. I can’t run (or jog) 5km without stopping. Not even close, really. I can walk 5km without stopping. I can run maybe 500 meters. Maybe. This one will take a while to get started, since I need to lose a fair amount of weight before I can start running seriously without risking injury. It pains me to type that, this shit really needs to turn around. Anyways, 5km seems like a good goal. I’m not going for a time, just going 5km without stopping or slowing down to a walk. In the spring I’ll see how far I can go, and try to increase it bit by bit during Q2, Q3, and Q4.

3. Do 150 situps without stopping

Seems simple enough. Honestly, this and a few of the others were just so I could have nice measurable fitness goals. 150 at once without stopping seems like a silly thing, since you’d usually do it in sets, but also it’s kind of an interesting goal, so here we are.

4. Curled 100lbs (set of 10)

Again, simple enough. Right now my dumbbells only go up to 50lbs, which I can curl easily enough. Typically I only use the 30’s and do more reps, but I want to bulk up my arms a bit and get up to 100’s. I’ll probably have to use the gym’s weights for this, since buying increments between 50 and 100 is pretty expensive. Also, to be clear, this is 100lbs per arm, not a 100lb bar with both hands.

5. Pressed 300lbs

Honestly, I haven’t done any presses that require a spotter in years, so I don’t even know if this is a lot. I’m pretty sure I can’t do it right now, so if nothing else, it’ll give me a good number to push for and have a better idea next year. I’ll push harder on this one later, might get a personal trainer to help out with stuff.

Income Diversity

6. Developed 2 passive income sources (making at least $300 each)

I set the bar a bit lower this time, with the expectation that I’ll actually follow through. These are supposed to be passive income sources, which means money I get paid for doing little to nothing. Examples are things like books, games, stuff like that. Things where people can buy it or sign up or something and give me money. Not something that requires me to do work per product sold (ex: stuff animals, etc). Something like a website with a subscription option counts too. The $300 is a low bar, but that’s enough money that it’s probably not just fam + friends buying something. I really really want to have higher incomes than that, but who knows? Note: this would not include a patreon, since I’m not in the right circle of people to get paid to exist, and I’d have to actually generate products. So a patreon would be an active income source in that case.

7. Made $3000 in side income

Assuming I get at least $600 from the two passive sources above, that’d leave something like $2400 to gain actively. If one of the above really took off, great, but otherwise I need to consider more active income sources. This is where stuff like YouTube can come in, but maybe other things too. I have to really consider some smaller, shorter-term contract work. Maybe try to reach out to local professionals, etc. At any rate, this number seems high right now, but if I can’t make at least this much, I really haven’t been trying very hard.

Writing

8. Finished 4 volumes of light novels

This includes writing, editing, copy-editing, and possibly some kind of character design work. I’d like to have at least 2 chapters of at least 2 stories done. This can include stuff that was started earlier. What matters is finishing it.

9. Published 1 novel or light novel volume

Self-pub obviously. Preferably with a publishing company I’ve founded as opposed to just under my own name. If it’s a light novel volume, it needs to be illustrated.

10. Finished 1 novel

Novels are harder to publish. This could be the novel in #9 though I expect that to be a light novel. This one will be considered done when I have enough edits done that I’d be willing to submit it to an agent. Ideally, I would submit it to an agent or 10. We’ll see.

11. 20 new posts on this blog

I should really be posting here more. But my posts are all long and rambling, so they take a long time. Or they’re complicated technical stuff, so they take a long time. Maybe I should just start writing little “How to do X in JS” or “How to do X in CSS” like some people do.

Japanese Study

12. Taken the JLPT N5 or N4

And passed, ideally, but I wouldn’t know until 2016, so yeah. If I’m aiming for the N4 I’m going to have to push a lot harder this year than last.

 

BONUS GOALS (More detailed goals, or pushing farther than the base ones)

13. Lose 130 pounds

14. Run 10km without stopping

15. Made over $10000 gross income in one month

16. Made $16000 in side income

17. Developed 4 passive income sources (making at least $300 each) -OR- developed 1 passive income source (making at least $100/month)

18. Released 100 new videos on YouTube

19. Founded a publishing company

20. Published 3 light novel volumes (illustrated, hard copies)

21. 5 guest spots on blogs, podcasts, streams, or videos

22. Completed the Genki I Textbook + Workbook

23. Completed the Japanese in Mangaland Series and Kanji in Mangaland Series

24. Completed the Genki II Textbook + Workbook

 

2015 Q1 Goals

The following should be complete by April 1, 2015

  1. Lose 20 pounds
  2. Do 40 situps without stopping
  3. Curled 50 lbs (set of 10)
  4. Pressed 100 lbs
  5. Planned and Began implementation of a passive income source
  6. Made $500 in side income
  7. Written 10000 words (not counting blog posts)
  8. Posted at least 2 chapters of a story online somewhere
  9. Finished 1 volume draft of a light novel
  10. Posted 5 posts on this blog (counting this one)
  11. Finished 2 more chapters of Genki I Textbook + Workbook (through Ch 9)
  12. Saved at least $10000 (for taxes, etc)

 

Final Thoughts

Long, windy post, probably with spelling and grammar errors. Oh well. I think I can be successful in 2015. The hardest part is going to be the side and passive income sources, so that’s what I need to push hardest on. Aside from the health stuff, that comes absolutely first. I think I can cross off a couple of those fitness goals right now if I wanted to, but the point is to ramp up so that it’s easy to keep going.

 

I’ll try to come up with something more technical or interesting to post next week or so, I hope.

These posts are probably a little late. I can understand why David Seah does this stuff on Groundhog day. Gives more time to deal with holidays and such. Also, this stuff is mostly for me, so unless you’re curious and a little voyeuristic, you can pass on this one.

Anyways, here it goes.

Some Thoughts

2014 was a strange year for me. I had a few employment panics throughout the year, but it all settled down. Honestly, some of the direction of my goals last year were related to open questions for employment, and since I ended up doing full time contracting almost all y ear, the sheer volume of the goals was unrealistic at best.

Anyways, even with all the strange ups and downs, I feel more or less good about 2014. I’m hoping that things will be calmer in 2015, allowing me to get back to doing some of the things I enjoy that are less necessary. Like streaming, writing, and so on. Though, it’s probably easiest to just run down the goals one last time. Be warned: Not a very high achievement rate here.

2014 Goals Final Update

1. Lose 60 pounds

Hahaha, nope. Actually gained about 20. No point in dacing around this one: I got too lazy to exercise, and too lazy to cook. So I ended up having fast food and pizza far too often. This was less of a primary focus than it should have been. I decided that work was most important, which led to poor time management. No excuses, I need to do better.

2. 2 full novels published (self published is fine)

So, along with a number of other goals, the main thing here was that I kind of stopped writing. At all. Can’t finish and publish anything if I don’t spend time writing.

3. 3 volumes of the light novel published (illustrated, hard copies)

Again, I stopped writing. So nope.

4. 1 manuscript submitted to an agent or publisher

See the previous two.

5. 50 new posts published here

This one is actually more interesting than just “I stopped writing” though that definitely plays a factor. The other side of that is that I wanted to establish my persona online so potential employers would have an easier time telling I was actually a good developer by searching for me. My employment situation settling down actually made me lose motivation on this as well.

6. 1000 followers on Twitter

I really hate Twitter. Didn’t get close, didn’t really make an effort.

7. Taken the JLPT N5

Ok, now this one I’m actually kind of miffed about. I spend a considerable amount of time last year studying for the test – probably far outpacing the things required for the N5. Then stuff got busy, and I completely forgot to check on when to register for the test well ahead of time. By the time I checked, registration was closed. This is obviously entirely my fault, but more of a fault of checking on things than actual prep. I probably put in 200+ hours or more studying last year and missed this one on basically a technicality. Maybe I’ll take the N4 next year, even though it’s less likely I’d pass.

8. 300 Twitch follower

I had a weekly show for a while, then didn’t, then tried restarting it again. I’m convinced I’d have passed 300 if I’d kept at it, even if my follower scaled linearly and didn’t blow up like some people’s do. That being said, I’m at 106 right now. Which is up 18 from last year today, which is kind of sad small number. If this continues to be a priority, I need to either dig deep into a speedrun (or two) and get in those communities, or I need to start streaming more popular stuff.

9. $10K income from non-contract/salary source

This was to diversify income, which I think is important. However, at the time, I wasn’t sure about work at all. So work calming down lowered my motivation. And here we are.

10. 100 RSS subscribers on a new podcast (or on YouTube)

I started a YouTube channel, but it didn’t really gain traction. I’ll need a new strategy here. I’m not abandoning this, but clearly I need to do something more unique.

11. 10 new plushies designed and created

I did one. I think. Again, plushies were supposed to be a potential income source, but they just weren’t worth the effort. The hourly rate was hilariously low. I don’t feel bad about this one, was a passing hobby. Might do more stuff later, but it won’t be something wrapped into a goal.

BONUS GOALS More stuff, not as “core focus” as above, but extra things to motivate

12. Completed the Genki textbook

Finished Chapter 7 (of 12) of the textbook, exercises, workbook, and kanji supplemental stuff. I’m happy with where I got, considering.

13. Made over $7000 gross income in one month (COMPLETE)

Hey. I actually did this. Woohoo!

14. Founded a publishing company LLC

See above writing related stuff

15. Lose 100 lbs

See above weight related stuff

16. 5 manuscripts completed

See above writing stuff

17. YouTube channel to 500 subs

Nope

18. 2 podcasts or regular shows running for 3 months (COMPLETE)

Calling this one complete. Not sure if my streams were ever really that consistent for that long, but meh. Close enough.

19. $3k through patreon or similar

Never really pushed patreon, feel good about that now

20. 5 guest spots on things

Nope

21. 100 people on a mailing list

Never even started here

22. 100 new posts on this blog

Also nope

Thoughts on Goals

I still have the same thoughts on the purpose of things like annual goals: They are supposed to drive you to get farther and do more in the year than you really would have otherwise. I think the set of goals I had last year did that fairly effectively. And contrary to the number of “failed” goals, I feel like 2014 was a pretty successful year for me.

However, the main failure of least year’s goals was a failure of imagination. The goals were designed specifically to give me income sources, with one or two other things. That’s not bad in and of itself, but I should have considered the possibility that things would have turned out well for employment (which they have).

I think I’m going to manage the goals a little differently this year. Although my 2014 goals did push me farther than they could have, by the mid to late year, they were mostly impossible or irrelevant. So I want to have annual goals, but maybe fewer of them. Maybe do some shorter-term stuff. That could be an idea. I’ll be working on goals and stuff tomorrow, might not get them done enough to actually post, but I should have them

I keep trying to write about upcoming ideas and goals, but I don’t want to put that stuff in this post, so I think I’ll wrap it up here.

There are instructions all over the place for this sort of thing, so I’m just putting this here for my own reference. I may update it or write new posts as things change significantly.

These instructions are all assuming a headless remote Linux machine will be running the server, so the instructions are based on that.

Step 0

Get the linux server running, set up ssh access, install java, etc.

Step 1 – Install Screen

It’s easiest to run the server on a Screen Window, so go get screen.

Ubuntu/Debian setup:

 sudo apt-get update
 sudo apt-get install screen

Gentoo:

 sudo emerge --sync
 sudo emerge screen

Step 2 – Get the server software

Modpack:

If you’re using a modpack that provides server software, go get that.

Example:

Feed the beast – List of server packs – http://www.feed-the-beast.com/servers/downloads
Monster:

wget http://www.creeperrepo.net/direct/FTB2/f4039de83bfeba547e48047317c4c82e/modpacks%5EMonster%5E1_1_1%5EMonsterServer.zip

unzip the modded server into a directory of your choosing

mkdir ftbMonster
mv *MonsterServer.zip ftbMonster
cd ftbMonster
unzip *.zip

Vanilla (or custom modding):

Go to minecraft.net to get the server software, get the jar: https://minecraft.net/download

Currently:

 wget https://s3.amazonaws.com/Minecraft.Download/versions/1.7.10/minecraft_server.1.7.10.jar

copy the server into a directory of your choosing (to keep things clean):

mkdir minecraft
mv minecraft_server.*.jar minecraft
cd minecraft

Step 3 – Set up the shell script

Modpack:

Odds are there’s already a shells script ready to use, but it might need modifications. For FTB it’s called ServerStart.sh
You can edit this file, but keep reading the vanilla instructions to understand what to modify.

Vanilla:

Create a new file called ServerStart.sh with contents (note: If you’re using a modpack, don’t change anything yet):

java -Xms512m -Xmx1024m -XX:PermSize=256m -jar minecraft_server_1.7.10.jar nogui

What this does:

java = runs java
-Xms512m = tells java the server will use at least 512MB of RAM.
-Xmx1024m = tells java the server can only use up to 1024MB of RAM.
-XX:PermSize=256m = tells java that it should allocate 256MB of space for classes and such. 
This is in addition to the Xmx setting
minecraft_server_1.7.10.jar = the name of the server application
nogui = tells minecraft we don't want to use the GUI

So here’s what to edit:

-Xmx1024m = Set this as high as you're comfortable. Leave some memory for other processes.
-Xms512m = Scale this up some if you've scaled up the maximum.

Leave the permsize unless you’re running significantly more mods, 256Mb should be enough. I haven’t run into any issues with this for the Monster pack from FTB.

Step 4 – Set up ops and server properties

ops.txt should have 1 line per operator. Use the player’s handle.

kadono
Notch

Then set up the server.properties file. This is more complicated than I plan on getting into here, and there’s a good reference here: http://minecraft.gamepedia.com/Server.properties

One note though, if you’re using a white list, be sure to add the users you want to allo in white-list.txt. Ops are automatically allowed, so they don’t need to be in the whitelist.

Step 5.0 – Using Screen

OK, now a short screen cheat-sheet.

First, run screen

>screen

You’re now in a screen window. These windows will keep running even after you detach from them and log off ssh.

Screen uses “Ctrl+a” for its shortcuts. There are a number of shortcuts, so I’m not going to list them all here, just the ones that’ll be needed most frequently.

“Ctrl+a”, “?” – a list of shortcuts (for what’s not listed here)
“Ctrl+a”, “c” – create a new “window”
“Ctrl+a”, “n” – go to next window
“Ctrl+a”, “d” – detach from screen. This will send you back to the shell but keep the screen and all it’s windows running.
“exit” – closes that screen window, if it’s the last window, closes the screen

When you’re detached, to reattach, type

>screen -r

and if there’s one screen it will reattach. If there is more than one, it will ask:

There are several suitable screens on:
 17021.pts-0.machineName (Detached)
 17725.pts-0.machineName (Detached)

To reconnect to one, use:

>screen -r 17021.pts-0.machineName

Step 5.1 – Running the server on a screen

launch screen and navigate to your ServerStart.sh file (in the same directory as your server).

run:

sh ServerStart.sh

and it should work. You should see some stuff being written to StdOut. Try connecting to your server from the local network. If it all looks good, you can detach from the screen and disconnect from ssh. If there are issues, spend some time on Google figuring it out.

Step 6 – Port Forwarding

Forward 25565 to the server (by default)

Step 7 – Do everything else

Choose the mods to use, set up everything, and so on. There are other things you can do like have default resourcepacks and you’ll have to distribute the mods to whomever wants to play on your server. This guide is just for the initial basic setup, so all of the fancier stuff can be handled by Google. If I make some other guides, I may link them here.

Again, this guide was for myself as a quick reference, if it was useful to you, I’m glad. If it’s not, then head over to http://minecraft.gamepedia.com/Tutorials/Setting_up_a_server

Lesson 2: Keep on moving, text

This article is part of a series. Part 1 and table of contents.

Here’s a surprising fact, for some of you this text will scroll.

We have to assume that the marquee’s days are numbered, though. The marquee tag started its life in Internet Explorer, back in the bad old days. If you search for ‘marquee tag’ on Google, the results are in a marquee tag. But the Wikipedia page describing it basically just spends the entire time saying “Don’t”

If you remember the GeoCities days, almost every page (every page that was worth reading, anyways) had at least one element where someone did <blink><marquee>This text is important!</marquee></blink> so that it would stand out regardless of which browser you use.

By the end of this lesson, we’ll make this monstrosity a reality. The blinking marquee.

Alright, if you remember last time, when we made blinking text, we just used setInterval to keep updating the canvas. We’re going to do something like that again.

First thing’s first, let’s use the same HTML as last time (more or less):

<html>
<head>
</head>
<body>
<button onclick="startScrolling()">Start Scrolling!</button>
<canvas id="canvas1" width="500px" height="100px" />
</body>
</html>

I made the height smaller, since the 500px height was probably too much. You with me so far? Easy, right? Good. Let’s move on to making a simple class called Scroller that will handle the canvas and our scrolling text. For now, let’s just pass in a reference to the canvas, the text we want to scroll, and have our drawtext method. We’re going to make that startScrolling() function as well. Here’s the code:

function startScrolling()
{
    var c = document.getElementById("canvas1");
    var scroller = new Scroller(c, "Welcome to my homepage! Sign my guestbook!");
    scroller.drawText();
}

function Scroller(canvas, scrollingText)
{
    this.canvas = canvas;
    this.text = scrollingText;
    this.yloc = 10;
    this.xloc = 0;
    this.drawText = function()
    {
        var context = this.canvas.getContext("2d");
        context.fillText(this.text, this.xloc, this.yloc);
    };
}

OK, let’s go over the code, though if you did part one of this series, you everything will be familiar. The startScrolling() function is what we’re calling when we press the button. From there we create an instance of our Scroller and manually call the drawText() method.

The Scroller takes a reference to the canvas and some text, saves it interally, and has default x and y values. The y value is set to 10 so we can see the text, since unlike regular HTML the text doesn’t draw from a box starting on the upper left, it starts drawing from the text’s baseline. So we have to adjust for that. Here’s a fiddle with the working code so far: http://jsfiddle.net/kadono/QLSGJ/

Sweet, we drew some text, let’s keep going and make it move. The canvas has a few different ways we can do this, but we’re going to use the window’s requestAnimFrame method. Actually, before we move on, let’s talk about requestAnimFrame a bit.

requestAnimationFrame

I’m going to pass on the sarcastic tone for this part of the guide. When we made our dumb blinking text, it was kind of funny to make it use too many resources. However, we were only calling the method with setInterval every 500ms, and it took almost no time to run, so it wasn’t really that big of a deal. If we want to have nice, buttery animation we’re going to want to run way more often than twice per second, though. So we should think a little more about the resources we’re using.

requestAnimationFrame is a relatively new method added to the DOM. Until very recently, it wasn’t available on any mobile platforms, though now it’s on the lastest versions of the iOS and Android default browsers. Still, before we go any further, if you’re going to use the requestAnimationFrame method (which you should), then you use use Paul Irish’s gist, located here: https://gist.github.com/paulirish/1579671 Just throw that code in at the top of your Javascript, and now you have requestAnimationFrame, even on older browsers. There are other shims that add the method or extend on it, but we’re not going to cover those here.

Ok, so why do we want to use requestAnimationFrame? Well, we could just use setInterval(someFunction, 1000/60) to get 60fps and it’ll look good, right? That works, but it’s like trying to pull a tooth with a sledgehammer. Too much tool, too much collateral damage. We need to use some finesse.

When we use requestAnimationFrame, a few things happen.

  1. The code will run immediately before the page redraws, not accidentally during the redraw or in some other non-ideal situation.
  2. The code won’t run if the tab isn’t visible, saving battery on laptops and things. It’s not like we need it to run then anyways.
  3. We get something much closer to an update/draw loop we can use.

Overkill for our project? Probably, but it’s good to use good coding practices, even if we’re doing awful things in the process. Let’s talk about this method a little more generally before we move into our actual implementation.

The recommended usage of requestAnimationFrame moves our animation code from this:

setInterval(someFunction, 1000/60);

To this:

(function mainloop()
{
    requestAnimationFrame(mainloop);
    someFunction();
})()

So you can see, that once you call mainloop() once, it will continue to run recursively forever. So, requestAnimFrame takes a callback function, then calls that function at the appropriate time. Using this type of layout, we have an infinite loop, except it only continues when requestAnimationFrame decides it’s time to call the callback function. We get another benefit as well. requestAnimFunction actually returns a reference we can use to cancel the animation with another method: cancelAnimationFrame

So we can have the following:

var animId;

function mainloop()
{
    animId = requestAnimationFrame(mainloop);
    someFunction();
};
function stopAnimating()
{
    cancelAnimationFrame(animId);
};

So you can see what’s going on here. When we call cancelAnimationFrame(animId) it tells the system not to do the callback we previously asked it to do. That breaks the recursion in our function and stops the animation.

Back to the Marquee

Now that we have some idea how we can do smooth animation without killing the performance, let’s start working on this, shall we?

Last time we had to do some trickery to change the relative value of “this” when a function was called as the setInterval callback. We’re going to have to do the same thing with requestAnimationFrame. Since I like to add one thing at a time, we can start by getting the requestAnimationFrame working. We’re going to add our new callback method called doAnimation, which for now will just update a frame counter and draw the text. We won’t be keeping the frame counter around for too long, it’s just a way to confirm our animation is working. Here’s the code:

function startScrolling()
{
    var c = document.getElementById("canvas1");
    var scroller = new Scroller(c, "Welcome to my homepage! Sign my guestbook! Frame count:");
    scroller.doAnimation();
}

function Scroller(canvas, scrollingText)
{
    this.canvas = canvas;
    this.text = scrollingText;
    this.yloc = 10;
    this.xloc = 0;
    var self = this;
    this.animId;
    this.counter = 0;
    this.doAnimation = function()
    {
        this.animId = requestAnimationFrame(function() { self.doAnimation(); });
        this.counter++;
        this.drawText();
    }
    this.drawText = function()
    {
        var context = this.canvas.getContext("2d");
        context.clearRect(0, 0, this.canvas.width, this.canvas.height);
        context.fillText(this.text + this.counter, this.xloc, this.yloc);
    };
}

You can see we’re keeping around a reference so we can stop the animation later. Pretty simple change, huh? You can see the code working here: http://jsfiddle.net/kadono/Lh8jj/ and if you start the frame counter and flip over to another tab and come back, you’ll see that it hasn’t been increasing while it was invisible. Nice, huh? And we didn’t even have to do anything except use requestAnimationFrame to get that nice little piece of functionality.

Also, we added a clearRect call to clear out the canvas before we draw the text, otherwise we’ll just be stacking the text on top of itself over and over forever, and that’s no good. We’re going to need to do that when we animate the text anyways, so we might as well get it in now.

So what should we be doing to move the text? Let’s consider how a marquee tag works:

  1. Text should move from right to left
  2. The entire text should move out of sight before it starts scrolling in from the right again
  3. Since there isn’t a standard, we can eyeball the rate it moves.
  4. There are a number of behaviors and modifiers we can emulate if we want

Out of extreme laziness, we’re going to go with the default scroll rate being 1 pixel per frame, which ends up being 60 pixels per second if we’re running at 60fps. Regardless of the rate, it’ll look smooth since it only moves one pixel at a time. So we can do that just by decrementing the xloc every frame. But what about when the text has move entirely off the frame? That’s simple, we can measure the text using the canvas method measureText and move the text off the right side of the canvas after the -xloc is bigger than the measureText length.

Just look at the code, it’ll make sense:

function startScrolling()
{
    var c = document.getElementById("canvas1");
    var scroller = new Scroller(c, "Welcome to my homepage! Sign my guestbook!");
    scroller.doAnimation();
}

function Scroller(canvas, scrollingText)
{
    this.canvas = canvas;
    this.text = scrollingText;
    this.textWidth = 0;
    this.yloc = 10;
    this.xloc = this.canvas.width;
    this.font = "12px Arial";
    var self = this;
    this.animId;
    this.doAnimation = function()
    {
        this.animId = requestAnimationFrame(function() { self.doAnimation(); });
        if(this.textWidth == 0)
        {
            var context = this.canvas.getContext("2d");
            context.font = this.font;
            this.textWidth = context.measureText(this.text).width;
        }
        if(this.textWidth + this.xloc < 0)
        {
            this.xloc = this.canvas.width;
        }
        else
        {
            this.xloc--;
        }
        this.drawText();
    }
    this.drawText = function()
    {
        var context = this.canvas.getContext("2d");
        context.clearRect(0, 0, this.canvas.width, this.canvas.height);
        context.font = this.font;
        context.fillText(this.text, this.xloc, this.yloc);
    };
}

OK, so major changes:

  • We’re setting a font, this is to make sure that measureText() behaves predictably
  • We got rid of the frame counter
  • We’re starting the text off the right side of the canvas so it will scroll in
  • We’re measuring the text, but only if it hasn’t been measured before
  • If the text is entirely off the canvas, we reset it to the right side, otherwise we move it left.

Sweet, we have a basic, working marquee. Here’s the fiddle if you want to play with it: http://jsfiddle.net/kadono/N692p/

Now, we could add a bunch of options on here, like adding support for different speeds, colors and directions. So, let’s just do it. The only canvas-type code we’ll be adding here is we’re going to use the fillStyle. All we need to do is set the context’s fillStyle property to a hex value string to set the color. The rest of the code is just simple switches and math, so I won’t go into detail on that. I’ll just show you the code:

function startScrolling()
{
    var c = document.getElementById("canvas1");
    var scroller = new Scroller(c, "Welcome to my homepage! Sign my guestbook!", 1, "down", "#CC0000");
    scroller.doAnimation();
}

function Scroller(canvas, scrollingText, rate, direction, textColor)
{
    this.canvas = canvas;
    this.text = scrollingText;
    this.textWidth = 0;
    this.textHeight = 12;
    this.yloc = 10;
    this.xloc = this.canvas.width;
    this.rate = rate;
    this.direction = direction;
    this.textColor = textColor;
    this.font = "12px Arial";
    var self = this;
    this.animId;
    if(this.direction == "up")
    {
        this.xloc = 0;
        this.yloc = this.canvas.height;
    }
    else if(this.direction == "down")
    {
        this.xloc = 0;
        this.yloc = 0;
    }
    this.doAnimation = function()
    {
        this.animId = requestAnimationFrame(function() { self.doAnimation(); });
        if(this.textWidth == 0)
        {
            var context = this.canvas.getContext("2d");
            context.font = this.font;
            this.textWidth = context.measureText(this.text).width;
        }
        if(this.direction == "left")
        {
             if(this.textWidth + this.xloc < 0)
             {
                 this.xloc = this.canvas.width;
             }
             else
             {
                 this.xloc -= this.rate;
             }
         }
         else if(this.direction == "right")
         {
            if(this.xloc > this.canvas.width)
            {
                this.xloc = - this.textWidth;
            }
            else
            {
                this.xloc += this.rate;
            }
        }
        else if(this.direction == "up")
        {
             if(this.yloc < 0)
             {
                 this.yloc = this.canvas.height + this.textHeight;
             }
             else
             {
                 this.yloc -= this.rate;
             }
        }
        else if(this.direction == "down")
        {
             if(this.yloc > this.canvas.height + this.textHeight)
             {
                this.yloc = 0;
             }   
             else
             {
                this.yloc += this.rate;
             }
        }
        this.drawText();
    }
    this.drawText = function()
    {
        var context = this.canvas.getContext("2d");
        context.clearRect(0, 0, this.canvas.width, this.canvas.height);
        context.font = this.font;
        context.fillStyle = this.textColor;
        context.fillText(this.text, this.xloc, this.yloc);
    };
}

And here’s the fiddle: http://jsfiddle.net/kadono/zpnru/ This is probably not the most efficient way of making this method, but hey, we’re already doing some pretty nasty anti-design patterns, so what’s some not-completely-efficient code, eh?

This is probably enough, right? Yeah, this is definitely enough. We have a working marquee element that has EVEN WORSE USABILITY than the actual marquee tag. We can do other things like add a “stop” function and put that in the mouseover, and other things, but I’ll leave that exercise to the reader.

The monstrosity

I promised this, so let’s get that blinking marquee text going. We’ll put a blinkrate into the previous method, and count frames to keep track of if we should be showing the text or not.

I’m really not proud of this, but in an odd way I am proud of this. The realization of that horrible nested tag from the 90’s:

function startScrolling()
{
    var c = document.getElementById("canvas1");
    var scroller = new Scroller(c, "Welcome to my homepage! Sign my guestbook!", 1, "left", "#CC0000", 30);
    scroller.doAnimation();
}

function Scroller(canvas, scrollingText, rate, direction, textColor, blinkRate)
{
    this.canvas = canvas;
    this.text = scrollingText;
    this.textWidth = 0;
    this.textHeight = 12;
    this.yloc = 10;
    this.xloc = this.canvas.width;
    this.rate = rate;
    this.direction = direction;
    this.textColor = textColor;
    this.blinkRate = blinkRate;
    this.showText = true;
    this.frameCount = 0;
    this.font = "12px Arial";
    var self = this;
    this.animId;
    if(this.direction == "up")
    {
        this.xloc = 0;
        this.yloc = this.canvas.height;
    }
    else if(this.direction == "down")
    {
        this.xloc = 0;
        this.yloc = 0;
    }
    this.doAnimation = function()
    {
        this.animId = requestAnimationFrame(function() { self.doAnimation(); });
        if(this.textWidth == 0)
        {
            var context = this.canvas.getContext("2d");
            context.font = this.font;
            this.textWidth = context.measureText(this.text).width;
        }
        if(this.blinkRate > 0)
        {
            this.frameCount++;
            if(this.frameCount > this.blinkRate)
            {
                this.showText = !this.showText;
                this.frameCount = 0;
            }
        }
        if(this.direction == "left")
        {
             if(this.textWidth + this.xloc < 0)
             {
                 this.xloc = this.canvas.width;
             }
             else
             {
                 this.xloc -= this.rate;
             }
         }
         else if(this.direction == "right")
         {
            if(this.xloc > this.canvas.width)
            {
                this.xloc = - this.textWidth;
            }
            else
            {
                this.xloc += this.rate;
            }
        }
        else if(this.direction == "up")
        {
             if(this.yloc < 0)
             {
                 this.yloc = this.canvas.height + this.textHeight;
             }
             else
             {
                 this.yloc -= this.rate;
             }
        }
        else if(this.direction == "down")
        {
             if(this.yloc > this.canvas.height + this.textHeight)
             {
                this.yloc = 0;
             }   
             else
             {
                this.yloc += this.rate;
             }
        }
        this.drawText();
    }
    this.drawText = function()
    {
        var context = this.canvas.getContext("2d");
        context.clearRect(0, 0, this.canvas.width, this.canvas.height);
        if(this.showText)
        {
            context.font = this.font;
            context.fillStyle = this.textColor;
            context.fillText(this.text, this.xloc, this.yloc);
        }
    };
}

And the fiddle: http://jsfiddle.net/kadono/4eVKb/

So there we have it, blinking scrolling text.

Future Developments?

Well, if you want, you could implement all of the options the marquee element has/had. You could add the stop() function, allow for more dynamic speeds, allow images in the marquee, and so on. I’m not going to do any of that in this tutorial, but you should be able to do most of those pretty easily from what we’ve done here.

If you wanted to go even farther, you could add diagonal scrolling, gradients instead of colors, or even moving/changing gradients. Amazing, don’t you think!

I hope you’ve learned more about the canvas today, and more about website usability!

Purpose

The point of these articles will be to teach you how to use the HTML5 Canvas Tag. Although, instead of directly teaching you how to do things that are useful, I’m going to try to show that the canvas tag can be used to bring back the worst of the Bad Old Days and even set some new lows for bad design patterns.

Why do it this way? I dunno, seems like fun. Isn’t it always more fun to do something stupid than do something actually useful? I mean, how many object oriented programming books teach you the concepts referencing cars or bank accounts? Most of them, right? It’s so boring. So let’s do something dumb.

Who is this for?

I’m going to assume you have at least a little background in programming. Someone who knows how JavaScript works, and how objects work. There are a billion different places to learn that stuff, but I think if you have even the basics down you’ll be able to follow along.

That being said, if you’re a programmer you can probably just look at an API reference somewhere and that’ll be faster. So, who is this for, really? Programmers with a sense of humor, I suppose.

Lesson 1: Bring Back the Blink

Do you guys remember the blink tag? It’s from the Netscape days, and it was one of the most annoying things on the Internet. This and the marquee tag (probably lesson 2, hehehe) were cheap, simple ways for a beginning web developer to put some “motion” on their website. Also, animated gifs. Too many animated gifs.

So, the blink tag is no longer officially supported by any modern browser, and the replacement CSS text-decoration:blink is also being phased out. The reasons being that it provides poor accessibility, it’s hard to print, and it doesn’t have any real practical purpose.

So let’s bring it back.

The canvas is supported by every major browser, and we can emulate the blink tag to some extent using it. Simple, eh? It might even be worse when it comes to accessibility. No, it is worse.

So let’s start with some basic HTML. You could do some inline canvases to make it look like we’re not on a canvas, but since we’re in tutorial land, the canvas will be big and impractical.

<html>
<head>
</head>
<body>
<button onclick="startBlinking()">Start Blinking!</button>
<canvas id="canvas1" width="500px" height="500px" />
</body>
</html>

OK, simple enough. We have a 500px by 500px canvas and a button. Right now the button calls a method that does not exist, but we’re getting there.

Alright, let’s pretend for a moment that we’re loading up a canvas entirely for the purpose of making blinking text. Awful, right? Assuming that, we need to do the following:

  1. Draw the text on the canvas
  2. Wait for a while
  3. Clear the canvas
  4. Wait for a while
  5. GOTO 1

Cool, so let’s start by adding a script tag in the head section of the document, and see what it takes to get the canvas. I usually use jQuery because I’m lazy, but it seems like overkill for this little project, so I’ll be using native JS. Let’s add that startBlinking function.

<script type="text/javascript">
function startBlinking() {
    var c = document.getElementById("canvas1");
}
</script>

Awesome, that’s it. We get the canvas like we get any other object. Now, so that we can have completely unnecessary extra portability, let’s try making an object that handles the blinking. Let’s start by just having it draw the text. Simple enough, eh? To do that we need to get the 2D context we can draw on, then call the context’s “fillText” function, which draws filled in text. We would use strokeText() if we just wanted the outlines.

<script>
function Blinker()
{
    this.drawText() = function(canvas, text, xloc, yloc) {
        var context = canvas.getContext("2d");
        context.fillText(text, xloc, yloc);
    }
}
</script>

Here’s a fiddle with startBlinking() calling the drawText(): http://jsfiddle.net/kadono/m6P3d/ Obviously, it doesn’t blink yet, it just draws the text.

OK, let’s add a little OOP thinking to this Blinker object. What variables do we need? Well, obviously we need a reference to the canvas, the text to blink, and the location, but we also need to know if the text is currently visible and how fast to make it blink, right? Let’s add some stuff to the constructor and have some instance variables. We can change our drawText to use those variables in the process.

function Blinker(canvas, blinkingText, period, xloc, yloc) {
    this.textVisible = false;
    this.canvas = canvas;
    this.text = blinkingText;
    this.xloc = xloc;
    this.yloc = yloc;
    this.period = period;
    this.running = false;

    this.drawText = function() {
        var context = this.canvas.getContext("2d");
        context.fillText(this.text, this.xloc, this.yloc);
        this.textVisible = true;
    }
}

Fancy, don’t you think? We still need to make it blink though. So let’s start making a function that does the blinking. Since we’re crazy and using a canvas for nothing other than our blinking text things are simple. The function should just check to see if the text is drawn, and either clear the canvas or draw the text. Easy. To clear the canvas we’re going to use the clearRect function and just clear from (0,0) to (width, height):

this.doBlink = function() {
    if(this.textVisible) {	
        var context = this.canvas.getContext("2d");
        context.clearRect(0, 0, this.canvas.width, this.canvas.height);
        this.textVisible = false;
    }
    else {
        this.drawText();
    }
}

All of this make sense? So every time that doBlink is called, it will either draw the text or clear the canvas. Now all we have to do is call doBlink every time we hit the number of milliseconds stored in the period variable. To do that we’ll just use window.setInterval(). The only issue with setInterval is that when it calls the method, it sets this to be the window. To make it not do that, we create a copy of this and pass it into the function manually.

There are a few ways of doing it, like having start() and stop() functions. This is supposed to be dumb though, so we’ll just have it happen on construct. Here’s the whole script segment:

function startBlinking()
{
    var c = document.getElementById("canvas1");
    var blinker = new Blinker(c, "Welcome to my homepage! Sign my guestbook!", 500, 20, 20);
}

function Blinker(canvas, blinkingText, period, xloc, yloc)
{
    this.textVisible = false;
    this.canvas = canvas;
    this.text = blinkingText;
    this.xloc = xloc;
    this.yloc = yloc;
    this.period = period;
    var self = this; // This is to pass the reference into setInterval
    this.interval = setInterval(function() { self.doBlink(); }, this.period);
    this.doBlink = function()
    {
        var context = this.canvas.getContext("2d");
        if(this.textVisible)
        {    
            context.clearRect(0, 0, this.canvas.width, this.canvas.height);
            this.textVisible = false;
        }
        else
        {
            this.drawText();
        }
    };
    this.drawText = function()
    {
        var context = this.canvas.getContext("2d");
        context.fillText(this.text, this.xloc, this.yloc);
        this.textVisible = true;
    };
}

And here’s a fiddle to the final, working product: http://jsfiddle.net/kadono/ZLCn3/

Conclusion

Well, we made blinking text. There are quite a few other things we could do, like changing the font face, color, size, and so on. We’ll get there, don’t worry. One step at a time, just going in and changing the color wouldn’t really be abusing the canvas tag, would it? Next time, we’ll start messing around with animating our text. Marquee? Of course. Other stupid stuff? Who knows?

Table of Contents

  1. Introduction and Recreating the Blink Tag [this post]

This is my monthly attempt at keeping at it. These posts aren’t crafted, they’re brain dumped, so please excuse the poor writing and comma abuse. The original post is here. I’m kind of making it up as I go here, so I apologize if I jump around a little. But basically the plan is to do weekly and monthly reviews. I’ll post occasional weekly updates as well. There’s other monthly review stuff I do, but the goals side of the monthly reviews I’ll post here. 

OK, this month has been odd. And clearly I haven’t been doing as many posts as I should. Oh well, we’ll get to that soon. On to the summaries:

Summary of February

February had some of that second month “blah” to it, but I’m getting reinvigorated as the month comes to a close.

Goal Progress

1. Lose 60 70 pounds

Well, an odd thing happened here. So I got a new scale, and it reported me as 10 pounds heavier. Ok, that’s fine. But my actual written goal was getting under a specific weight. I decided not to change my actual goal, so this relative-looking one had to change. That means the “lose 100 pounds” has become “lose 110 pounds” as well. Alright, that’s fine. I’ve been in that “post induction stall” for a while as well, but I think that I’ve finally gotten past it in the last couple of days, so hopefully I’ll start to see some real progress again in March. Still, February wasn’t as bad as it could have been.

Monthly Progress: 6 pounds
Total Progress: 19 pounds
Ratio: 19/70 ~ 27.14%

Thoughts: It wasn’t as successful as January, but I still made progress. Unless you count the moving goalpost. Hopefully the posts don’t move any farther. Still can possibly hit the bigger goal (110). So, let’s see how March goes.

2. 3. 4. Writing

I did some work on the light novel series, and I wrote a short story (that I’ll be adapting into a novella). I also did some revisions on both. More on this later, I think, but here are some word counts:

Monthly Progress: 6859 words written, Novella plan, LN plans solidifying, 3 revisions done
Total Progress: 6859 words written

Thoughts: I’m actually going to do a while post on the “novella plan” but it’s basically a way to force myself to finish things I can actually publish. I have plans to push hard on writing in March.

5. 50 posts published here

Been hung up on a bigger technical post. Maybe I should pick easier things to write about.

Monthly Progress: 3 posts
Total Progress: 5/50
Ratio: 5/50 ~ 10%

Thoughts: I still didn’t make 1 post / week. I still need to catch up. Once I finish this API documentation I’m hoping to catch up.

6. 8. – Twitter/Twitch Followers

Welp, this might be done. I tried pushing a patreon page to actually get some financial support for this and it failed completely. This has taken a lot of the wind out for me, and I’m not sure I’ll push on this front too hard anymore. Writing might be the better option. We’ll see.

Twitter: No change
Twitch: 100 total followers

7. JLPT Prep

This is hard to update, since there’s no number before December. I’ve been studying using Anki primarily, and I feel like I’ve been making progress there. I have Hiragana on lock (still mix up chi/sa once in a while), getting better at Katakana, and chipping away at Kanji. I’m planning on tearing apart (well, maybe not), scanning, and home translating some manga. Kind of to supplement things. We’ll see.

8. Outside Income

Patreon didn’t work out, but I tried. I’m going to push much MUCH harder into the writing side of things, and hopefully a little money will come out of there. That’s not the main goal, but it would be a nice indicator of success.

Not sure there will be any real progress by the end of next month, but we’ll see.

10. 11. Podcast/Plushies

Nothing done here.

12. – 22. Bonus Goals

(14) I’m pushing to get the publishing company formed soon.
(16) Manuscript number might be changed/adapted due to the Novella Project

No other significant tracking on the other bonus goals.

Final Thoughts and Looking Forward

Not the best month, not the worst month. I have some other things going on that I’m not posting here that are significantly cutting into my time to get goal based stuff done. I’m having a hard time getting everything done at the same time. I’ve been putting one or the other project on the side while I’ve been focusing on others. I spent quite a bit of effort on Twitch, and that seems to have been barking put the wrong tree. That’s OK, but I need to pivot now. Expect a lot more progress on the writing goals.

Direction and Focus this month:

1. Focus on the task at hand. One task at a time.
2. Write, plan, build worlds, blog. Make serious progress.
3. Morning Pages – Keep at it
4. Novella written and ready
5. 1 Issue of LN done

See you next month.

“Weekly” Update here.

Probably only interesting to me, so I can track things better and keep on top of stuff.

Weight: Funny story. Humidity killed the scale, got a new one the next day “gained” 10 lbs. So, I’m operating on the assumption that I actually started 10 lbs heavier. I’d say this is within +/- 2lb of accurate. So, what do I do about my goals? Well, my actual written one is being under a certain weight, and I’m keeping that the same. So now it’s “lose 70 lbs” and “lose 110 lbs” instead of 60/100. Harder, but still possible I’d say. Either way, I don’t want my actual goals to change. Assuming that, I’ve just started to break my stall.

Weekly Progress: 3.6 lbs lost.

Writing & Posts: About 3500 words in the light novel series. Started on a technical blog post but hit a wall. I know what to do with it now, even though I’ll be changing direction on it. This is post #4/50 published.

Twitch: Been streaming pretty regularly, Just hit 100 followers (woo). I haven’t done anything popular yet either, so I’m not unhappy with how it’s going.

Focus this week: Blog posts, writing, brainstorm for podcast / youtube show / etc