Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EventEmitter workshop #32

Open
1 of 9 tasks
grabbou opened this issue Mar 11, 2015 · 10 comments
Open
1 of 9 tasks

EventEmitter workshop #32

grabbou opened this issue Mar 11, 2015 · 10 comments

Comments

@grabbou
Copy link

grabbou commented Mar 11, 2015

Repo: https://github.com/grabbou/nodeschool-eventemitter

Not sure if this part has been already covered somewhere, but was thinking that we might want to create additional workshop to cover this field.

What you think?

Some simple topics that might be worth explaining during such a workshop:

  • Event-loop, what it is, how it works [lecture to be given on site - there's a nice talk by somebody on ng-conf I guess available on Youtube we can translate/take inspiration from]
  • Where are event emitters - some examples, socket.io, hapi.js and so on
  • Use built-in node event emitter and emit one event / listen to it
  • Inherit from event emitter and create a new one
  • Add custom method to the above event emitter, like em.tellMeWhenNewChickArrives that will just call on - event name hidden from end user [prototype chain is no longer a mystery!]
  • Following the above, add custom emit method, e.g. newChickArrived
  • Breakdown of all event emitter implementations
  • Upgrading event emitter we used to create a new one to v2 provided by asyncly and using some wildcarding to provide more interesting events
  • Middleware pattern - provide use method and create additional plugin, like em.use(nightclub()) so night club emits new chick events - this might give valuable knowledge to attendees on how to split their huge app into reusable components, especially when aggregating some data (I have a working example so I can even feature it during the workshop)

Languges to start with:

  • EN
  • PL

If anyone feels native in others, let me know and let's do it together!

@martinheidegger
Copy link
Contributor

👍

@grabbou
Copy link
Author

grabbou commented Mar 12, 2015

@martinheidegger would you mind leaving some feedback on my first lessons?

Trying to make it as easy and understandable as possible :)

The basic idea was to make study-events as easy as possible to show all basic methods available, like on, once, setMaxListeners or removeListener.

Not sure if 'story-telling' approach is a good one, but I personally think it might be more enjoyable to follow something meaningful than just 'create event emitter that will listen to data event' :)

@martinheidegger
Copy link
Contributor

Need to sleep, will look at it tomorrow!

@grabbou
Copy link
Author

grabbou commented Mar 12, 2015

Thanks! #timezone Have a good night then 👍

@martinheidegger
Copy link
Contributor

Okay, I read over this. I feel like it needs a lot of work. (sorry to say that but this might be a little harsh review, be sure that I like your effort a lot!):

  1. The task (what the user has to do) is not clear. It needs to be a lot more straight forward: i.e. "You have to write javascript file that exports a method with following signature: ... The method should do X"
  2. You should assume that the person that reads this didn't start learnyounode and probably not even javascripting. What is a "Class"? etc. should be explained.
  3. It is nice that you create a story arc but I think the arc should A) be mentioned as such "Entertaining Storyline" or so. and B) it should not be used to make the understanding of your tasks cloudy: i.e.: "your phone will call you every time " should be something like: "the phone EventEmitter will send a 'call' event every time"
  4. "message of your choice" will be hard to verify if done correct: i.e. "" is a message of my choice ...
  5. "... and print message ... " is a unclear term. Should the user write a message to stdout?

@martinheidegger
Copy link
Contributor

Another thing: the workshop (imho) should cover event zalgo's :)

@grabbou
Copy link
Author

grabbou commented Mar 13, 2015

Hey, thanks for your review. I appreciate your feedback as this is my first workshop ever! I do agree with your points, its kinda unclear sometimes what user should do. Would you think its worth sticking to the story as long as I fix those unclear parts and create some introduction or shall I just write plain JavaScript tasks? I am still a bit unsure whether that's the correct approach...

Maybe I just should leave short story like introduction to each problem and describe task more technically in the goal section? Like - ok, it's cool I need to order pizzas but in goal there's actually written that I need to listen / emit few events on phone event emitter.

I am going to put everything into introduction.md file and add some further explanations to each problem then. New version should be available by tomorrow :)

@martinheidegger
Copy link
Contributor

My general suggestion is: "first make it work then make it fun" ... :) ... You can keep the story if you like. But only if the thing still works :)

@grabbou
Copy link
Author

grabbou commented Mar 13, 2015

Cool, so I'll follow the general suggestion to make solutions first and then let's focus on proper problems descriptions. In terms of problems - do you think they cover enough of Event Emitter features?

Thanks again for taking a look at it! I'll focus on better problems now, try to finish all of them and then will bump this topic again.

@grabbou
Copy link
Author

grabbou commented May 6, 2015

A quick update -> I am going to resubmit a new, improved version this week, so stay tuned.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants