My Old Fridge

There has been a great weight lifted off of my shoulders. That weight is my old refrigerator. I had an old, broken refrigerator sitting in my apartment for close to 4 years, probably. It’s been there so long, that I was starting to think it would always be there. You see, getting rid of a refrigerator is a huge pain in Japan. There’s no dragging large items out for garbage pickup. You’ve gotta pay around $50 bucks for large item disposal. But electronics are special items here and they flat out won’t take a refrigerator. You’ve gotta get a disposal service to take it off your hands.

I had two opportunities to have it disposed of and I missed out on those each time, with the cost of disposal going up each time. The first time was 4 years ago when my ex-girlfriend’s father, who owns an appliance shop offered to take it away for free. I misheard him though, thinking that he would need ¥5000, when in fact he was saying it would save me ¥5000, and I kept it around. At this point, the fridge actually still worked. I just didn’t need it because I had a newer one as well. The second chance was when I bought my new TV three years ago. The electronics store took away my old TV for free and would’ve taken away the old fridge for ¥3000 as well, but, it was still usable, so I had it in my mind that I could still sell it and get some money out of it.

Eventually, the old fridge up and died and I was left with a bunk fridge sitting around taking up space not only physically, but psychologically as well. It was getting in my way on two fronts. It sat there for years and it just became part of the scenery. It became a metaphor for the perpetual rut I’ve been in for the last few years: unchanging and useless.

As luck would have it, I stumbled upon a recycling shop yesterday (2013–12–08) and for ¥4300, I finally ridded myself of the old broken down refrigerator. I feel like it’s the first step in moving forward.

Use MailMate Rules to Easily Create OmniFocus Tasks From Flags

Quickly Turn Flagged Emails into OmniFocus Inbox Items

If you’re a MailMate user and an OmniFocus user, I’ve got a hot tip for you. You can easily flag emails on your iPhone or iPad and have MailMate stick them in your OmniFocus your inbox. Here’s how:

  1. Modify MailMate’s “Add to OmniFocus” script to skip the quick entry tree.

    on run argv
        set theFilename to item 1 of argv
        set theName to do shell script "head -n1 " & theFilename
        set theNote to do shell script "tail -n+2 " & theFilename
    
        tell application "OmniFocus"
            tell default document
                --tell quick entry
                    set theTask to make new inbox task with properties {name:theName, note:theNote}
                    select {theTask}
                    set note of theTask to theNote
                    open
                    --tell application "System Events" to keystroke tab
                --end tell
            end tell
        end tell
    end run

  2. Set up a “Follow-Up” smart mailbox that watches for flagged emails.

  3. Set up rules on your “Follow-Up” mailbox to run your OmniFocus script and then remove the “Flagged” IMAP tag.

  4. Flag email on your iOS devices.

This approach means your flags will never stick around, but if you’re sticking to your “one inbox”, which is OmniFocus, it doesn’t really matter.

How I Learned to Program

HTML/CSS

I wish I had learned HTML and CSS before learning anything else. You can reach the largest group of people and quickly and visually express yourself the easiest by building a web site. And a lot of the projects you work on with other languages will eventually lead you to building a web site to showcase those projects. It’s available on every operating system as well, so you can reach everybody.

Regular Expressions

Regular expressions have let me do massive renaming projects. I’ve experimented with a few different file naming schemes over the last year, and using Regexes made it easy to match patterns and change file names to new patterns in a few seconds. Also, using grep and Ruby’s Regex support, it’s improved my searching on the hard drive and finding patterns in my programs. If you’re a programmer, you have to learn Regex if you want to be as effective as you possibly can be.

JavaScript

JavaScript is another language that’s ubiquitous. All web browsers support it and it’s a great fall-back. It’s probably because I learned Ruby before JavaScript, but I picked up the syntax quickly, and after having studied Ruby, the oddities of JavaScript drove me a little nuts. Having to declare variables with var, the verbose functions and having to end everything with semicolons was insane to me. Thankfully, [CoffeeScript][http://coffeescript.org] exists. CoffeeScript started of as a Ruby gem for cleanly and succinctly writing JavaScript and because of that, the syntax for CoffeeScript is a lot like Ruby. In some ways, CoffeeScript’s syntax is even cleaner than Ruby’s is.

You can declare constructor variables like this:

Class Person

constructor: (@name,@age)

Now, you’ve created a Person class and you don’t have to even do the Ruby thing of @name = name or @age = age. I’m kind of in love with CoffeeScript, and since JavaScript is new to me, I’m really excited about writing CoffeeScript that will turn into JavaScript and be used with HTML5 and CSS to build some great web sites in the future. I’ve already got some ideas.

Shell

The Unix shell was actually the second language I learned. I’m not even sure it’s a language. It’s a collection of awesome small programs that glue together in the most amazing ways though. It seems like every day, I find some Unix program I never knew about. The day I discovered at was great. I wrote up a bunch of timer scripts for myself that I now use on a daily basis. The shell is also the hardest language to wrap your head around. A lot of it was written a long time ago and the documentation is spotty at times. The “community” surrounding Unix and shell scripting isn’t as welcoming as say Ruby’s is. They’re not also eager to help and often the discussions they’re having are over a beginner’s head. It would behoove every Mac user who wants total control over OS X to learn to utilize Unix’s power.

Ruby

Ruby was the third language I learned and probably my favorite (although CoffeeScript is giving it a run for its money). It’s very powerful and yet flexible in its abilities and acceptable syntax. It’s easy to invoke system commands so you can leverage the power of Unix in your Ruby programs too. The Ruby community is a sprawling and friendly one.

AppleScript

And then there’s AppleScript. It was the first language I learned. While many dismiss it as not a real language and some say that its day in the sun has past, AppleScript was the most immediately useful language to me. I wanted to script OmniFocus and a few other OS X apps. The only way to do that was to learn AppleScript. I learned not only how to script through AppleScript but I also picked up the general theories driving computer programming. Maybe Ruby or Python would’ve been better to start out with, but I had a goal, scripting OmniFocus, and because of that goal, I probably was driven to stick with it.

I’ll admit it’s not a great general purpose programming language. It’s only useful on Macs, there’s no built-in Regex support, problems often arise when manipulating files, and you can’t do much with applications if they don’t support AppleScript in the first place.

The Future

I see myself using AppleScript when I need it, although Apple keeps breaking support in their own applications. OmniFocus 2.0 Pro will have AppleScript support so I’ll definitely still be writing scripts there. I use shell scripts whenever possible because they’re often the simplest and fastest solutions to basic scripting problems. I’m working towards eventually building a Rails app, so Ruby will a major part of my programming life. And CoffeeScript/JavaScript is mandatory if I’m going to build interactive web sites, so I’ll continue working in them as well.

I know I’m still a novice, but I’m getting better every day. I hope I just didn’t wait too long to start being a programmer to do something with it.

On Literate CoffeeScript

One of the coolest CoffeeScript things I’ve run into is Literate CoffeeScript.

name = "Literate CoffeeScript"
console.log "This is an example of #{name}."

It’s almost like I’m writing a Markdown file. I believe other languages have literate versions (Haskell, for one), but this is the first time a language I’ve been using had one. I binged and purged on JavaScript last weekend and it’s what I’ve got on the brain this week. I finished up the second half of Codecademy’s JavaScript tutorial, I did Code School’s two JavaScript “Road-Trip” courses, Code School’s “Try jQuery” course and lastly Code School’s “A Sip of CoffeeScript”. Literate CoffeeScript is just a text file where only indented lines get treated as code. When you run a “.litcoffee” file through the CoffeeScript compiler, it ignores unindented lines and spits out the code from the indented lines. I suppose if you’re into writing code that reads like a story, this could be pretty useful.

Batman: Arkham Origins

Spoilers abound! Precede only if you’ve finished Batman: Arkham Origins.

Batman Arkham Origins 13671866588883

I Don’t Need No Stinkin’ XP

I often felt like I needed to do the side missions in Arkham Asylum and Arkham City because I needed the XP. I need to unlock more gadgets or abilities to get the job done effectively. In Arkham Origins, I never felt that way. In fact, the only side missions I completed while doing the main story the first time through were the Riddler’s radio towers. They were fun to complete, as I imagine a lot of the other side missions will be when I get around to them, but at least the Riddler’s radio towers were necessary, for the most part. Sure, you could glide around the city freely, but the chance to open up the whole of Gotham to fast travel is appealing. Aside from this though, I didn’t feel the need to accrue extra XP to do anymore upgrading than the XP I gained along the way while completing the main story afforded me.

Assassin Appearances Unbalanced

You know, for having eight assassin’s after Batman, you’d never really know it. It seems like only four of them ever really got the message. Electrocutioner kinda shows up, Copperhead makes a valiant effort, Firefly pops up as filler towards the end, and Bane is in the game way more than he needs to be. The boss encounters in Origins are really unbalanced.

Electrocutioner

Electrocutioner may be the worst “boss” fight I’ve ever played. Oh! Hit square! Fight over. No, seriously. But he gets away because Batman didn’t tie him up, like I was telling the TV that he should do! Then, Joker kills him and you raid his corpse for the win button (I mean, Shock Gloves). He only exists in this game to let you get your Shock Gloves.

Deathstroke

I enjoyed the Deathstroke fight. It felt like a classic Arkham boss fight and was mildly challenging. It was a little prompt heavy at times though, and the reason I had to replay it a bunch of times was because I was being a bit too proactive with my countering and while the game wanted me to have a really cinematic counter with Deathstroke, I was trying to play it like a regular fight, which led me to countering earlier than the game wanted me to and then dying five times.

Copperhead

Copperhead’s fight was also fun. She poison’s you and while you’re walking out of the building to pick up an antidote drop, you’re caught in a hallucinogenic scrap with ten Copperheads all at once. It’s a shame more boss fights weren’t like this.

Firefly

Hey mom! I’m a QTE sequence.

Bane

What’s the deal with Bane getting three fights? Had the developers watched Dark Knight Rises so many times that they had Bane on the brain? You first encounter Bane with at the hotel should’ve been the last. It’s the hardest of all the encounters and I felt like “what was the point?” after artificially losing after getting him down to a sliver of health. You put a tracker on him, but he uses it to lure you away so he can kinda, but not really, destroy the Batcave. Then, he kinda, but not really, kills Alfred. Good thing Plot Device’s (I mean Electrocutioner’s) Shock Gloves are around to save the day (again). Then, you see him again back at Blackgate Prison, and after you kick his ass, Batman’s dumb rule about not killing anyone brings him back and you get to fight him a third time, and this time it’s one of those “use the environment” fights. I never really like those.

Anarky, Shiva, And Deadshot Only Show Up As Side Missions

Remember how there were eight assassins? Remember only fighting four of them? (Electrocutioner doesn’t count!) Well, the other three are still out there, but as side missions! I didn’t do any side missions yet, so I’ll not pass judgement on their quality, only that what’s the point of saying you have eight assassins after you when only five ever come after you?

Story

I know they want everyone to know think that this Batman game is the just the same and as good as the last two, but they’ve gone overboard with the “Arkham” naming scheme. This game never goes anywhere near Arkham Asylum, and Arkham City hasn’t been thought up yet. In fact, the only mention of Arkham Asylum is at the end, during a radio sequence during the credits where they talk about Arkham being reopened.

I was a little disappointed at the length of Arkham Origimns as well. Playing just the main story clocked in around eight hours, and while there was a lot of filler like Firefly’s oddly timed appearance and Bane’s way too much camera time, the ending of Arkham Origins wound up feeling rushed somehow. The first encounter with Joker was really great and you get to see how Joker feels about Batman. The final encounter goes by way too fast and you’re barely in control of the game during the final sequence. It’s little more than a QTE at the end.

Overall Verdict

I enjoyed Arkham Origins. The more I think about the game though, the more I find that I dislike about it. I still have a lot to do: Anarky, Deadshot and Shiva’s side missions for starters. Also, Mad Hatter and Riddler’s bits. I didn’t do more than two of the challenges in the Batcave and none of the Predator challenges. There is also supposed to be new story DLC in the upcoming season pass, which while I haven’t purchased yet, I would gladly pay another $20 for more Batman story content.