Jim Lynch Codes
  • Blog
  • About Jim

Writings about one coder's stories & experiences.

Thoughts After Giving My First Coding Lecture

4/14/2016

0 Comments

 
It's 10pm, and I just got home about 15 minutes ago from the trek to NYC. I was at another software development meetup event today, but this time it was different; this time I was giving the presentation! During the last day of my Angular class I had to present my project: ng-nj.org. When I was finished I thought to myself, "Hey, I kind of want some more of that", and I was finally feeling knowledgable enough to be able to give other people some solid advice so I made an event happen and gave a presentation.
Original meetup event: http://www.meetup.com/New-York-AngularJS-Meetup/events/230204905/

How It All Came About

I just recently finished an 8-week AngularJS course at NY Code & Design Academy and have been using AngularJS at work for the past few months so I wanted to do a talk about AngularJS. Being a huge Kent Beck / Martin Fowler / TDD fanboy, I also wanted to incorporate TDD into the talk. I stated putting together some slides and thinking about how I would visualize the concept of a test suite. Then I saw someone posting on meetup.com asking if anyone had ideas for events. I said that I'd be interested in giving a short presentation, and he was super supportive. We picked a time and day, and it was on!

Why Am I Doing This?

This is just me right now reflecting on why I am going around giving lectures on AngularJS and unit testing. One reason is just to meet other developers who are interested in AngularJS and unit testing. The people that actually leave their homes and come out to these events legitimately care at least a little bit, and those are the people that I want to hang out with. Another reason is just to be a part of the Angular community. Really the entire software development community is all about open source, sharing ideas, and helping each other. It's awesome. I think I've found certain things that work really well for me in terms of workflow and development style, and it's nice to be able to share them. Not only is it good validation for me that I'm doing things that makes sense when people are receptive the ideas, but it just feels good to give someone that aha moment about a particular topic. On a more superficial level, this is a small step towards that "famous software developer" status or a Google Developer Expert title as well as improving my coding street cred a smidgen and another feather in my cap to put on the old resume.

Preparation

I actually spent a lot of time on the slides for this presentation (you can find them here: http://www.slideshare.net/JimLynch22/intro-to-unit-testing-in-angularjs). It's pretty enlightening to realize how difficult it can be to explain things that you thought you understood well. For example, it took a while for me to really understand the underscore (_) characters used in injecting a service in a unit test to the point where I could write about it on a slide and talk about it in a lecture. Things like that take a lot of time to research and really get the facts straight. When I'm explaining something, my #1 goal is to be right. Don't give people information that's just flat out wrong. It makes you look bad, it's confusing for them, and it's just not good. So if you want to be a teacher, do ALL of the homework and the extra credit problems! I also owe a huge thanks to the program Keynote which I was first turned on to by coworkers at my current job who use it to build slideshows for our clients.. I ended up dropping the $20 for Keynote, a Mac slideshow application. It worked great for setting up my slides, adding animations, and playing the slideshow during the presentation. 

The Talk

The talk was titled, "Intro to Unit Testing with AngularJS". In it I basically describe what a test suite, test case, and assertion are, go into the syntax of Jasmine and injecting Angular stuff, and running tests with karma. I even invented my own nemonic phrase for testing- just remember that a test suite in JavaScript is, "A describe full of it's with some beforeEach's". It's pretty funny because I only had 3 people come out to the event, but honestly it was perfect for my first lecture. We got to all talk about our backgrounds and what we were interested in they were focused on the presentation the whole time. They stayed for the full hour, and afterwards they all thanked me and said they learned something and liked the lecture which I was glad to hear. 

Great Questions 

Before giving this talk one of the things I feared most was being asked a question t which I didn't know the answer. Everyone wants a great teacher that knows the in's and out's and understands everything perfectly; who simply can't be stumped. I was worried that I just wasn't that guy. I mean I didn't want to go up there and look stupid in front of everybody! Now that the talk is over I realized something- the tough questions that people ask you are actually one of the best parts of doing this type of thing. Other people get you to really think critically or just frame things in a way that you've never thought about them before. I'll be honest, there were some questions I was asked tonight that I didn't know, but there were also questions that I was able to answer. In my opinion it basically comes down to this- give a talk on something you know at least moderately well. If you really are familiar with the subject then you will have confidence to give a good response for most questions and the humility to say you don't know for the very advanced or off-the-wall questions. Here are some great questions I can remember that I was asked today and wasn't exactly sure how to answer:
  • Is Jasmine specific to Angular or can you use it for other Javascript frameworks? Does it still use 'inject' to add your files outside of Angular?
  • How do you mock $http?
  • Where in the directory structure do you put the .spec.js files?
  • If you really wanted to, could you change karma / gulp to look for *.test.js files instead of *.spec.js files?

Where to Go From Here

So Jim, you've given you're first coding talk. Now what? Well, I'm sure if teaching is really my thing, but I definitely want to come more one-off slideshow lectures. The same great guy who allowed me to give this presentation was really encouraging me to teach a beginner Angular class, but I don't know if that's really my thing. I'm afraid I would get kind of bored doing that, and I really want to focus on TDD and unit testing. I suggested an "Angular TDD Bootcamp" where each class we go over a different mock or common mistakes novice Angular testers frequently make. The only problem is, well, I'm still figuring out that stuff for myself! No doubt this will push me even harder to build the strongest, most bulletproof test suites with the cleanest code out of anyone. I just want to be "Jim Lynch, the Angular TDD guy", and that's the other reason why I liked giving this presentation; it reminds me that I can be that guy. And part of the next steps are actually doing it; writing out real tests to see what works and what doesn't. And of course you guys that that when I do figure out how to unit test each possible situation you might be in, that I'll share it publicly right here on this blog. All I have to do is put the time in and work at it. But giving lectures that are well received gives me confidence and just an extra feeling of usefulness. It pushes me to be the best developer I can be, and makes me feel even more responsible for having all the answers; that it's my duty to read every book, work through all the examples, watch every video, take every e-course, and read every article and ebook out there on Angular, front-end development, and/or unit testing. Not because anyone told me to or because I think I need to. Just because I love it.
0 Comments

Your comment will be posted after it is approved.


Leave a Reply.

    ​Author

    Picture
    The posts on this site are written and maintained by Jim Lynch. About Jim...
    Follow @JimLynchCodes
    Follow @JimLynchCodes

    Categories

    All
    Actionscript 3
    Angular
    AngularJS
    Automated Testing
    AWS Lambda
    Behavior Driven Development
    Blockchain
    Blogging
    Business Building
    C#
    C / C++
    ClojureScript / Clojure
    Coding
    Community Service
    CS Philosophy
    Css / Scss
    Dev Ops
    Firebase
    Fitness
    Flash
    Front End
    Functional Programming
    Git
    Go Lang
    Haskell
    Illustrations
    Investing
    Java
    Javascript
    Lean
    Life
    Linux
    Logic Pro
    Music
    Node.js
    Planning
    Productivity
    Professionalism
    Python
    React
    Redux / Ngrx
    Refactoring
    Reusable Components
    Rust
    Security
    Serverless
    Shell Scripting
    Swift
    Test Driven Development
    Things
    TypeScript
    Useful Sites
    Useful Tools
    Video
    Website Development
    WebStorm
    Writing

    Archives

    August 2021
    February 2021
    January 2021
    October 2020
    September 2020
    May 2020
    April 2020
    February 2020
    January 2020
    December 2019
    October 2019
    September 2019
    August 2019
    July 2019
    June 2019
    May 2019
    April 2019
    March 2019
    February 2019
    January 2019
    December 2018
    November 2018
    October 2018
    September 2018
    August 2018
    June 2018
    May 2018
    April 2018
    March 2018
    February 2018
    January 2018
    December 2017
    November 2017
    October 2017
    September 2017
    August 2017
    July 2017
    May 2017
    April 2017
    March 2017
    February 2017
    January 2017
    December 2016
    November 2016
    October 2016
    September 2016
    August 2016
    July 2016
    June 2016
    May 2016
    April 2016
    March 2016
    February 2016
    January 2016
    December 2015
    November 2015
    October 2015

    RSS Feed

  • Blog
  • About Jim
JimLynchCodes © 2021