Megan Taylor

front-end dev, volunteacher, news & data junkie, bibliophile, Flyers fan, sci-fi geek and kitteh servant

The Kenny Rogers Rule

The Kenny Rogers Rule states: When building anything, especially something as complicated as a robot, the build can sometimes turn ugly. If you try and just power your way through, you can often dig yourself into an even deeper hole. Frustrations can mount, and with it, mistakes, even accidents can happen. So here’s what you do: “Put the soldering iron down, Poindexter. Step away from the steaming robot entrails!” You’ll be amazed at what an hour away, vegging in front of the TV, rolling around on the floor with the cat, or sleeping on your problem will do. It almost never fails. Here’s a corollary: The extent to which you don’t want to drop what you’re doing and take a break (“I know I can fix this, damn it!”), is inversely proportional to the extent to which you need to take that break. Why is it called the Kenny Rogers Rule? ‘Cause as country Kenny wisely tells us: “You got to know when to hold, know when to fold ’em, know when to walk away, know when to run…”

From Tips of the Week: Silencing a Leaky Air Hose, Women’s Work Pants, and the Kenny Rogers Rule | Make:

post

CSS initial Keyword

Note to self: The initial keyword is not supported in Internet Explorer 11 and earlier versions. Just use auto!

July 13, 2017 | Comments Off on CSS initial Keyword | Categories: Posts | Permalink

post

Things That Happened in 2016

This is super overdue, but 2017 has been busy!

Celebrated being bed-bug free after a harrowing couple of weeks.
Blizzard!
I got a standing desk setup at work.
Kyle and the kitties got me an All-Clad pan for Mother’s Day.
I squatted 175lbs.
I started doing CrossFit.
Shortly after starting CrossFit, my face got into a fight with a 20-lb ball. My face lost.
Kyle and I started planning our 2017 trip to Japan.
I started learning about React, Redux, and functional programming in JavaScript, and using these skills at work.
We all survived Dad’s hip surgery, part IV.
I spent a week in Miami to celebrate my best friend’s birthday.
Mom and I spent a day exploring Philadelphia’s Market St (and adjacent areas) from 30th to 3rd.
Another great year of teaching with ScriptEd.
Many walks and foods around NYC.
Visits from parents.
Met some family members from another branch of the tree.
Saw Fully Committed.
I shaved my head for the first time.

And probably a lot of other stuff I can’t remember right now!

June 6, 2017 | Comments Off on Things That Happened in 2016 | Categories: Posts | Permalink

post

JavaScript Code Kata

Dave Thomas was recently on the CodeNewbie podcast and talked about code kata for a few minutes.

A kata is an exercise in karate where you repeat a form many times, making little improvements each time.

kata

The code kata is a way to bring practice sessions into programming.

In my day-to-day work, the problems I solve with JavaScript are not complicated:

  • sticky nav
  • add/remove class based on behavior
  • handle click tracking
  • carousels
  • form validation
  • lightbox

 

So this seems like a great way to stretch my JavaScript legs, so to speak. There are many places online to find code kata; I signed up on Codewars. Even at the beginner and novice levels, I’m working through problems that extend my abilities.

But also, math.

buffyew.gif

 

If you’re interested in doing code kata yourself, LMGTFY. If you happen to sign up on Codewars, I’d love to know so we can compete against each other!

January 27, 2016 | Comments Off on JavaScript Code Kata | Categories: Posts | Permalink

post

Things that happened in 2015

I proposed and helped shepherd changes in tools we use at work for QA and HTML emails.
I planned and executed a field trip for my ScriptEd students to my office, with a lot of help from my awesome coworkers.
I spoke at Career Day at Chelsea Career and Technical Education High School.
I worked on a Chrome extension to help coworkers write presentations in markdown.
Some coworkers and I (wo)manned a table for Career Day at Harlem Village Academies High School.
I spoke about learning web development at Django Girls NYC.
I helped The Story Exchange produce their 1000 Stories project about women entrepreneurs.
I worked on more than 30 websites.
I closed more than 700 tickets at work.
Kyle and I saw Kinky Boots.
I was in the office 2 blocks away when an armed veteran walked into the lobby of a federal building, shot and killed an armed private security guard and then shot himself.
I went to Smorgasburg in Brooklyn and Queens.
Kyle and I went to the Queens Night Market, where Kyle discovered lumpia.
Kyle and I went to an Atlas Obscura event in Greenwood Cemetery.
Kyle and I spent 8 days running around Prague and Southern Germany. We rented a Mercedes and drove >200 MPH on the autobahn. We ate amazing food. We saw beautiful things. We stayed in a hostel.
My family survived my Dad’s hip surgery with minor bickering.
I visited high school friends in the DC area.
Pixel earned the nickname “String Butt” after an emergency trip to the Animal Hospital.
Kyle and I went to the The Rocky Horror Picture Show Experience at the Museum of the Moving Image.
Kyle and I went to the Great Big Bacon Picnic with some of my coworkers.
Kyle and I saw Louis C.K. at Madison Square Garden.
Kyle and I got renters insurance.
I went to the Hamptons for the first time with some great people from ScriptEd.
I played ping pong (badly) with my Mom.
I redesigned the Bummer Bears website to be responsive.
Kyle and I reached the peak of adulthood by buying a frame for our bed.
I learned to like guacamole.
I started lifting weights with a personal trainer.
I went to physical therapy and resolved my back and neck problems.
Kyle and I started saving up to buy a house (someday).

And probably a lot of other stuff I can’t remember right now!

December 31, 2015 | Comments Off on Things that happened in 2015 | Categories: Posts | Permalink

post

Infinite Carousel with jQuery 1.6

I’ve been working on some updates to a site that uses a pretty convoluted and customized combination of JavaScript files, including jQuery 1.6.2. Building an infinite image carousel was an interesting challenge.

JS Bin on jsbin.com

I got a lot of help from these articles:

Making a jQuery infinite carousel with nice features

Create a Simple Infinite Carousel with jQuery

jQuery endless looped slider

I hit an interesting little bug where the browser buffers SetInterval functions, and was able to resolve that with help from this StackOverflow thread: When using setInterval, if I switch tabs in Chrome and go back, the slider goes crazy catching up.

September 10, 2015 | Comments Off on Infinite Carousel with jQuery 1.6 | Categories: Posts | Permalink

post

Pair Programming

During a recent chat with a senior dev at work, I mentioned that I would like to try pair programming. The theory is that I would learn more from working with a more experienced dev than on my own. We had our first pair programming session today.

The project we were working on was just HTML and CSS. The experience was pretty nerve-wracking (having another dev sitting there watching me code feels a lot like public speaking), and I feel like most of what I learned was how inefficient I am. Type type, fix typo, save, refresh in browser, realize Grunt didn’t finish yet and refresh again, check various breakpoints, repeat until expected result accomplished. I’m sure there are some ways I can speed that up. Also, I should turn off all notifications when someone else is staring at my computer screen.

I think I’d get a lot more out of pair programming on JavaScript, which I have much less experience with. In any case, I’m really happy it happened, and am looking forward to more sessions.

August 5, 2015 | Comments Off on Pair Programming | Categories: Posts | Permalink

post

Scale and Center Image in Container

I knew how to do this with a background image, but was really struggling with this earlier today until I found this CodePen.

@import "compass/css3";

body, html {
  width: 100%;
  height: 100%;
  @include box-sizing(border-box);
}

body {
  padding: 1em;
  background: #3498db;
}

section {
  width: 50%;
  height: 15em;
  margin: 0 auto;
  overflow: hidden;
  background: #2980b9;
  @include border-radius(.5em);
  
  img {
    position: relative;
    max-height: 100%;
    left: 50%;
    @include translateX(-50%);
    
    @media(min-width: 800px) {
      top: 50%;
      left: 0;
      max-height: none;
      width: 100%;
      @include translateY(-50%);
    }
  }
}

See the Pen Vertically center image within responsive container by Trevan Hetzel (@trevanhetzel) on CodePen.

August 4, 2015 | Comments Off on Scale and Center Image in Container | Categories: Posts | Permalink