Oh, what a night

What a terrible, terrible night.

Backup puked up even more hair ties yesterday morning. It was possible that that was the end of it, but we took him to the vet because we wanted to be sure.

After a very expensive day of barium ingestion and X-rays, we were told the cat had to come in the next day for further tests, but we brought him home with an IV catheter in his arm. I was pretty damn certain that he’d try to tear it out, so they gave me a cone to put around his neck.

Well, the cone did jack shit. After a few hours of writhing around with the cone on, he found a way to reach his arm and tear the catheter’s covering off. Next would be the catheter itself, so I volunteered to “sleep” in the family room where he hangs out and stop him from tearing at it.

At around 3 AM, I was ready to give up, so I let Anna take over the watch… but then I realized he’d probably hate it if I covered what remained of his wrapping in duct tape. Well, I only had electrical tape, but that seemed to do the trick. It’s 7 AM and it’s still in one piece. Although he did find a way to tear his cone off.

In other news, I was looking under the bed and found a third clump of regurgitated hair ties. That probably brings the count up to 20. Bravo, kitty.

The most surreal thing in recent memory just happened to me.

Our cat Backup (namesake) has been puking a bit for the past few days, which worried us, because all we changed about his diet was trying some new pet food we got from a friend. We stopped giving it to him, but he kept puking, and he started to take his time eating his morning dry food, only eating his evening wet food regularly.

Today I came home and he had barely eaten any dry food, and there was some puke around (some on my Swimp hoodie :( ), but the cat seemed pretty calm, greeting me and sitting on me. Regardless, I called a pet hospital and decided to bring him over as a walk-in when Anna got home (I can’t drive, my hand’s still busted).

About half an hour later, Backup started to gag and puked up a bit on the floor. I came over to him and put my hand on his back, I felt him tense up, he gave out a low moan, and a gigantic clump of elastic hair ties shot out of his mouth.

There must have been at least ten of them. It was ridiculous. I can’t believe something that enormous could fit in a cat’s stomach… makes sense why he was passing up his dry food. We knew he loved playing with Anna’s hair ties, but were completely unaware that he was swallowing them. They could have been in there for months. Doing a quick search, this might be kind of a common situation with cats.

Sssoooo… I think we’re good now. The cat seems calm enough. I expect his appetite to return shortly. Problem… solved?

Bonus photo! Click here for a gruesome hair tie regurgitation bonanza!

Broke some more bones!

me with bonez

Thought I’d give the longer story here since so many people are curious.

Didn’t get hit by a car this time, but it happened on my bike. I hung a reusable bag on my handlebars and put my U-lock in it, and while riding down a hill the bag swung into my front tire and halted the bike. I flew forward and landed on my face and hands, breaking my right ring and pinky fingers, and fracturing the side of my right hand and a wrist bone.

Anna drove me to the ER and it was plain I got a concussion because I don’t remember the majority of the ride there. But things are fine. No head damage beyond the stitches on my chin and the scrape on my face. Going to see an orthopedist today about replacing my splint with a cast. Still won’t be able to do most two-handed things, I gather, but I’ll just take it slow. Got some pain meds; they work.

Anna has been wonderful as always, hanging out with me this first day and just helping me do what I need to do.

What is a function?

I’m trying my hand at writing a ridiculously easy-to-follow guide on JavaScript essentials. There might be many of these out there, but this one is mine. Tell me what you think and whether I can clarify or simplify at any point.

In JavaScript, a function is a bunch of code that can be run, or called, repeatedly.

Creating a function

Here is an example of a function being created:

var doStuff = function () {
  // Code you want to run goes here!

In this example, we are first creating a variable called doStuff. doStuff is then being assigned a function as its value – which means, from now on when we refer to doStuff, we are referring to a bunch of code that can be called.

Calling a function

Whenever you see parentheses following a variable, it means we are calling a function – the code inside it will be run:

doStuff(); // the doStuff function is being called.

This is in contrast to just referring to a variable, which is valid, but doesn’t do anything:

doStuff; // no-op


Some functions can change what they do, based on how they are called.

When we are writing code for the browser, we automatically have access to a function named alert, which tells the web browser to pop up a dialog box. When we call alert, we need to specify what exactly to show inside that dialog box:

// the alert function is being called with the string 'Hello!'

In this example, we are putting a string inside the parentheses. Anything placed inside these parentheses is called an argument. In the case of alert, the argument determines what text appears in the dialog box that shows up:

Screen Shot 2013-04-05 at 5.19.18 PM

If we want to create a function that makes use of an argument, it would look like this:

var takeThis = function (foo) {
  // Inside these brackets,
  // we have access to a variable named foo.

// foo's value will be "Hello!" when the function is called.

// foo's value will be 3 when the function is called.

In this example, we are saying that whatever is passed in as an argument when we call takeThis will be referred to as foo as the function runs. We can name the argument whatever we want, but it only affects how it will be referred to inside the function’s code.


Functions can also give back a result after they’ve been called. This is called returning. Returning is important if we want to receive the result of a function and use it someplace else:

var giveMeSomething = function () {
  return "Here you go";

var something = giveMeSomething();
// now something's value will be "Here you go"

In this example, we are using the command return to specify what comes out of the function when it is called. Upon calling giveMeSomething, we are taking its result and assigning it as the value of a new variable named something.

Multiple arguments

Functions can accept multiple arguments. It is as simple as separating the values being passed in with a comma. In this example, we are creating a function that can add two numbers together and return the result:

var add = function (addend1, addend2) {
  // add the two arguments together and then return the result
  return addend1 + addend2;

// pass 1 and 2 when calling add and assign its result, 3, to sum
var sum = add(1, 2);

Having called add with 1 and 2 as the arguments, those values are then assigned to addend1 and addend2, respectively.

Calling functions inside other functions

There’s nothing stopping us from calling functions within the code of another:

var sayHello = function () {

Here, we’re creating our own function and calling it inside another function we’re creating:

var bar = function () {
  // do something

var foo = function () {

foo(); // call foo, which will call bar

Here’s a more complex example where we’re passing in arguments and getting things returned to us:

var bar = function (arg) {
  return arg - 1

var foo = function (arg) {
  return bar(arg) - 1;

var result = foo(3);

Seem complicated? Hover over these steps to see how this code will run:

  1. bar is defined and assigned
  2. foo is defined and assigned
  3. foo is called with 3 passed as the argument
  4. foo begins to run, with arg having a value of 3
  5. bar is called with arg passed as the argument
  6. bar begins to run, with its own version of arg having a value of 3
  7. arg is subtracted by 1, and returned
  8. The result of bar(arg), which is 2, is subtracted by 1, and returned
  9. The result of foo(3), which is 1, is assigned to result.

Passing functions into other functions

To take it one step further, we can even pass functions themselves as arguments:

var bar = function () {
  // do something

var foo = function (callMe) {
  // we are assuming that the argument is a function

// we are not calling bar here,
// merely passing it in as an argument while calling foo

This last example might take a bit of time to understand. The difference between merely referring to a function versus calling it is an important distinction.

  1. When we run foo(bar); we are calling foo, but not calling bar – remember, we don’t see a pair of parentheses following it – we’re only referring to it and passing it in.
  2. When foo begins to run, it has access to a variable named callMe. Having specified the function bar as the argument, callMe now refers to it as well.
  3. callMe, or bar, is called.

Why would we want to do this? So we can call foo multiple times and tell it specifically which function to run each time. In the real world, foo would do more than just call another function – it might do something with the result of that function, or return something itself.

That’s it for an introduction. I’ll see if I can write something about more complex topics like scopes, this, recursion, closures, asynchronicity, et cetera – but we’ll start here and see how it goes.

New website: Jeffrey and Anna

At work and at play, I’m always makin’ websites! Shortly after getting engaged at the beginning of the year, I started brainstorming on how best to tell family, friends, and the world at large about us. Naturally, it would be a website, but I realized I’d have to pick up a pen and pencil for the first time in years if I really wanted to make it special.

Screenshot of Jeffrey and Anna

After a few months of tinkering, I present to you Jeffrey and Anna, a super-fun, animated adventure through our life. Everything has been coded (save for some plugins) and drawn by me, and written by both of us.

What follows is a bit of a technical walk through the site.

Jeffrey and Anna is, naturally, pure HTML, CSS, and JavaScript. It adapts to different resolutions and form factors with media queries, using the same technology to gracefully degrade for less capable browsers. The site is very different from on a desktop computer, but hopefully just as usable, when you view it on a phone or tablet.

I drew everything on paper, scanned it, and colored it in Photoshop. I designed the site to use different complementary color schemes for every section, and further personalized it with Google Web Fonts and Font Awesome.

Superscrollorama is the engine behind the animations which happen as you scroll through the page. I slightly modified the library to detect whether you’re scrolling up or down, and to cause certain animations to start from wherever you currently are on the page.

I used certain parts of Twitter Bootstrap. Scrollspy causes our clothes to change as we jump through the sections, and Carousel provides CSS-animated navigation between subsections.

The site runs on Rails, my current web application framework of choice. Being database-driven, it doubles as our guest list management tool, as we can easily create invitations for guests by using RailsAdmin – and guests can enter their automatically-generated RSVP codes to instantly notify us of their attendance.

The stylesheet is written in Sass + Compass. Compass’ astounding ability to automatically generate sprites would have been an amazing help, given the massive amount of images on the site, but unfortunately, the sheer size of the sheets it generated caused the site’s performance to slow to a crawl. It turns out that it’s not a good idea to have dozens of images at tens of thousands of square pixels moving around on the screen at once. Instead, images are individually crushed and preloaded.

A little easter egg: some of you will see a little range slider in the lower-right corner of the page. Use it and see what happens!

I feel that this site represents the epitome of my current skills. It’s a bit hard to poke through the files on the site as it’s minified for best performance, but fortunately, it’s all open-source! Please poke through the code on GitHub, and feel free to comment (or create an issue) with any suggestions.

For those who are wondering, we haven’t sent out invitations yet! There’s still the task of combing over the list with the parentals, and then collecting the physical addresses of almost a hundred families. It’ll be a few weeks. But do be on the lookout soon for the location and date of our wedding!

Lost In the Internet

(Originally written in 1996.)

“It’s coming down on me! It’s, it’s- AHHHH!!!-” I woke up. I was gasping. I looked at my clock. “8:45!? I’m late for school!”

Before I knew it, I was out the door running.

My school is Weibel. I’m in 5th grade! My teacher is Mrs. Locklan. As I opened the door, everyone looked at me. They were checking homework. Homework! I forgot to pack my backpack.

“And Jeffrey? Jeffrey?” Mrs Locklan asked.

“I forgot,” I murmured.

“That will be inside lunch recess for you,” she quickly stated.

My name is Jeffrey Faden. I’m nine years old. I love computers.

Speaking about computers, that afternoon, we had a computer lab.

I started my computer. We started the Internet.

Just then, I felt a sucking feeling coming from the computer. It was sucking me in!

“Whoa! Whoa! WHOA!”

Total darkness.

“Wh-where-where am I-I?” I mumbled.

“You are on Netcom Avenue,” someone replied while I discovered it was late evening.

“Who are you?”

“I am Mr. Http.”

“Wait a minute! Isn’t that part of an internet adress?”

“Got to go! Here’s my card. So long!” Before he went, he whispered something to me.

On the card, it said:

Name: Baud Http

Adress: http:http.html

Zip: 11101001101

Occupation: Server

If you need any help, fax me at 423-8886.

“Talk about weirdness!” I exclaimed.

I heard a yell. I saw a flash.

“Simeon?” Simeon is someone in my class. “What are you doing here?”

“What are you doing here, Jeffrey?”

We saw a sign. The sign said, “WELCOME TO THE WORLD WIDE WEB. Population: 10001011101”.

“The World Wide Web! That’s an Internet server!” I stated.

“The Internet! That’s where we are!”

“???” I asked.

We took a cab on the Information Superhighway to a strang place. I faxed Mr. Http a question:

“Where are we? What should we do?”

He faxed me back:

“You are in Modemsville. Go see Mr. Megabyte.”

I looked in the Net Search (what did you expect in the internet? The phone book?).

“There’s no Mr. Megabyte, but there is a Dr. Gigabyte.” Simeon said.

“Okay, let’s try him.”

“His address is http://modemsville/gigabyte.com. Oh! That’s his house right there!”

“Funky house!” I exclaimed.

“Let’s go!”

We clicked the doorbell. We didn’t hear anything. We knocked. No answer.

“Let’s just go in. The door’s unlocked,” Simeon shrugged.

I opened the door. It was really dark in there! “Let’s go, Simeon.”

Inside, I could see nothing. Suddenly, the lights flashed on. So suddenly that action scared the living laydights out of me!

“Who is th-ere?”

“It is I, Dr Gigabyte.” sneered a voice.

I saw a bald-headed man in a white suit. He had a lightning bold-like mustache with gray hair around the side.

“What do you want?” hissed the voice.

“We just want to go home!” we whimpered together.

“Do you know what happened to the last people that wanted to go home with Dr. Gigabyte?” he scoffed. “They were erased!” he thundered, and his hands turned white with little sparks flashing around them.

Voom! Lightning bolts shot from his electric hands toward us! We dodged and they missed us. The place where they hit turned black.

“Simeon!” I yelled. “Go into the basement! On the circut panel, press the big red button!”

While he went, I kept scampering from the lightning bolts.

Suddenly, I heard a loud click. Everything turned wavy. Then, I felt like I was going right through a transparent wall. I saw the computer lab. I was there. Everyone stared as if I was an alien.

Simeon appeared. Everybody did the same thing.

When my mom came to pick me up from school, she asked, “What did you do at school today?”

“Nuthin’,” I mumbled.

The End

SONIC THE HEDGEHOG: a short story

(Originally written May 31, 1993.)

Once there was a hedgehog named Sonic. Now I mean he was’nt just a regular junky ol` hedgehog, I mean he runs HECK-a-FAST!! Faster than anyone on the planet, Mobius!
But one day Dr. Ivo Robotnik trapped ALL of Sonic’s friends into the Prison Egg, except one.His name was Tails the Fox. He could run almost as fast as Sonic. Now I hope you know Sonic had a LOT of friends, but there’s only two that could help it! Sonic + Tails! Now I hope you know Sonic’s the REAL hero, but Tails could do one more thing than sonic…-FLY! But then they just remembered something… THEIR FRIENDS!!
Robotnik had turned them into robots! They ran as fast as they could, but when they got there and jumped on the Prison Egg…IT WAS TOO LATE! Badniks (Robotnik’s robots) came jumping out! This ” “Hedgehogy dude” and the “Foxy Dude” Lost all their rings, but they didn’t die. Now they were mad. They ran 1,000,000 times faster than the sound of speed! But where? Robotnik’s Hideout! Where else? But wait! there was a door blocking it! No problemo! There’s a button! Robotnik ran away, but he’ll be back with even better stuff!

The End! WAIT!!!!!!!!!

He left something over! THE CHAOS EMERALDS! Ther’e very powerful! Speakin` about powerful, he – he – he – he turned yellow! Do you know how? Why? Since he had 50 rings, and all the emeralds, HE TURNED INTO SUPER SONIC, SONIC, SONIC, SONIC, SONIC, SONIC, SONIC, SONIC, SONIC!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! It meaned that he had power sneakers and invincibility at the same time! PERMANILY!!!! Tails was so suprized, he could’nt bare it !!!!!!!!! Next time Dr. Robotnik comes, he’ll be scared to pices!

NOW The End!

Yearly Meme #9

Still doing this thing! Last year’s answers.

1. What did you do in 2011 that you’d never done before?
Went to a Catholic funeral, moved in with my girlfriend.

2. Did you keep your new years’ resolutions, and will you make more for next year?
Last year I resolved to lose weight and move out of the Tenderloin, and I did the latter. Next year I just gotta keep doing that weight thing – probably play DDR at least once a week in addition to going to the gym.

3. Did anyone close to you give birth?
Not yet! Anna’s sister is on schedule for late March.

4. Did anyone close to you die?
Anna’s grandpa did.

5. What countries did you visit?
The east coast.

6. What would you like to have in 2012 that you lacked in 2011?
I wanted a living room and I got one! Next year – a cat of my own maybe?

7. What date from 2011 will remain etched upon your memory, and why?
April Something! Moving in with Anna.

8. What was your biggest achievement of the year?
Releasing a major corporate website, becoming a teacher.

9. What was your biggest failure?
Letting my gums get so bad – but that was over a few years. At least I’m going to the dentist regularly again!

10. Did you suffer illness or injury?
Besides the aforementioned bad gums, not really.

11. What was the best thing you bought?
A king-sized memory foam mattress. Haha just kidding it was an engagement ring

12. Whose behaviour merited celebration?
Anna and my family’s for being so accomodating.

13. Whose behaviour made you appalled and depressed?
My former roommate for scamming me out of a month’s worth of rent!

14. Where did most of your money go?
Taxes! But I became a salaried employee early this year, so that shouldn’t become a trend.

15. What did you get really, really, really excited about?
It hasn’t happened just yet. ENGAGEMENT

16. What song will always remind you of 2011?
“Fuck You”

17. Compared to this time last year, are you:
i. happier or sadder?
ii. thinner or fatter? Fatter!!!
iii. richer or poorer? Richer!!!

18. What do you wish you’d done more of?
Small hangouts with a friend or two. I need to get to know individual people better.

19. What do you wish you’d done less of?

20. How will you be spending Christmas?
Spent Christmas at my dad’s, although it was the least festive year yet. The rest of the week’s been spent at Anna’s.

21. Did you fall in love in 2011?
I’m kind of already down in there

22. How many one-night stands?

23. What was your favourite TV program?
We went back and watched a whole lot of early Simpsons this year.

24. Do you hate anyone now that you didn’t hate this time last year?

25. What was the best book you read?
I picked up some great comix at APE this year. Even got Ian‘s new mini-thing!

26. What was your greatest musical discovery?
Tune-Yards, the National.

27. What did you want and get?
I got to move in with Anna!

28. What did you want and not get?

29. What was your favorite film of this year?
Bridesmaids was pretty great.

30. What did you do on your birthday, and how old were you?
Turned 26 – Woke up at Anna’s parents’ place, had lunch with my mom, and headed back up for some birthday pizza (mac + cheese + bacon, and meatball marinara).

31. What one thing would have made your year immeasurably more satisfying?
Spending time hopping around the bay with random people, maybe

32. How would you describe your personal fashion concept in 2011?
Less t-shirts. Pants that fit.

33. What kept you sane?
My coworkers in the face of corporate silliness.

34. Which celebrity/public figure did you fancy the most?
Patrick Stewart

35. What political issue stirred you the most?
Occupy, SOPA

36. Who did you miss?
I think I kind of saw everyone this year!

37. Who was the best new person you met?
Anna’s got some cool famblies.

38. Tell us a valuable life lesson you learned in 2011:
Lighten up and don’t let sarcasm consume you.

39. Quote a song lyric that sums up your year:
I can’t think of anything and if I can’t think of it next year I’ll probably remove this question