Inky Code


Niky Morgan: New York-based Web Developer

SlackMoji, Debouncing and React Event Pooling

The Flatiron staff are frequent users of Bitmoji. We use it on email, GitHub and especially on Slack. One of the difficulties of using Bitmoji on Slack is knowing which commands are connected to Bitmoji comics. We have at times found new and unexpected commands using outside sources like this, but the comics update frequently so it is hard to stay current.


Saving Database Space with Rails Enums

I have an app that is running out of database space. It is a shared Rails project with colleagues and we host the app on Heroku, so it has a 10,000 row limit. Since I clean up the database regularly to remove unused data, I decided to focus on other fixes that might decrease the amount of space we are utilizing.


Humor as a Pedagogical Technique

Now that Flatiron School has grown to five campuses, we have many more instructors on the team. In addition to sharing general lecture tips, we frequently share ideas for domains and code examples to use. One domain that has been passed down through several generations of instructors appears in a set of first-week lectures. Over the course of a few lectures, we teach the students the basics of object-orientation and increasingly complex relationships. The domain is Twitter: a user has many tweets and a tweet belongs to a user. By the final lecture, we add in the concept of favoriting another user’s tweet. With a new favorite model joining a user and a tweet, we introduce a many-to-many relationship. A user can have many favorites, a tweet can be favorited many times, and a favorite joins one user to one tweet.


Many to Many Associations with ActiveRecord

I’ve spent the past three months in Ruby-and-Rails-land, teaching dozens of Flatiron students the basics of ActiveRecord. One of the concepts we really focus on early in our curriculum is the many-to-many relationship. We have students use the has many through ActiveRecord association for this, but at some point they stumble upon the has and belongs to many association and wonder what the differences are between the two.


Creating a Contact Form with AWS Lambdas

I recently moved my web hosting to AWS. (Blog post here.) I knew from friends that hosting a static site on AWS is relatively cheap and easy, so I was sure I’d be able to make the switch. However, I didn’t take the time to consider that not all the elements of my site were static.