• April 21, 2019

  • 1 min read

Better code thanks to Twitter

Recently I sent a tweet to a stranger that I follow on Twitter asking for his help. The result? The coding culture on the Internet is great.

I’ve been really annoyed with the leaves animation on my portfolio.

Though unnoticeable in use on my website, I hated how the leaves would bounce back and forth between two points but I didn’t really know how I could fix it (I’m new to animations).

I’ve been following Varun Vachhar on Twitter for some time and see his animation work all the time. Now that I moved my job search to Toronto, I decided to go out of my comfort zone and reach out to him about helping me on my animation. His response was more than I could’ve asked for!

He ended up making a CodePen that forked mine, showing me that GSAP can re-run the animation after completion:

I made some tweaks to it and ended up with the following, which is now applied to my website! It’s a much more natural movement for the leaves! Thanks Varun!

In that same thread, Varun also talked about using p5 to animate noise, something I’ve never even heard of. I asked him to meet for coffee so I could learn more and he told me all kinds of background information about animation frameworks that I never knew! I think it’ll really help me learn animations moving forward because up till now it’s really been throwing darts in the dark.

So I guess what I learned is that the process of randomly tweeting at people for code mentorship is pretty awesome! I’m definitely going to do it more.