These are chat archives for codefellows/sea-b15-javascript

19th
Jun 2014
Jeff Adelman
@jeffadelman8
Jun 19 2014 03:19
You guys are quite tonight
Hailey L. Petway
@hlpetway
Jun 19 2014 03:23
Thanks again Elliot!
cfbot ping
cfbot ping
please?
hmph
Jeff Adelman
@jeffadelman8
Jun 19 2014 03:28
PONG?
Hailey L. Petway
@hlpetway
Jun 19 2014 03:35
haha thanks Jeff
cfbot help
Jeff Adelman
@jeffadelman8
Jun 19 2014 03:37
there's no help for you
Brian Studwell
@bwstud
Jun 19 2014 03:39
What's cfbot?
Hailey L. Petway
@hlpetway
Jun 19 2014 03:40
It's a chatroom bot: https://hubot.github.com/
Brian Studwell
@bwstud
Jun 19 2014 03:41
awesome rm violence inhibitor
Robert Talamantez
@Talamantez
Jun 19 2014 04:37
this is too good not to share. use node modules on the web with browserify and chrome apps: https://developers.google.com/live/shows/7320022-8001
Elliot Chong
@ElliotChong
Jun 19 2014 16:01

I received a question about async.parallel after class that I wanted to address- Sorry we ran short on time!

Q: Why wouldn’t you just call the methods in the for loop right then versus moving them into async?
A: Usually you’ll want to do something after all these async requests have completed - Such as calling a callback to let something else know your operation has completed, or maybe working with the data once you’ve got it all in one place. If you weren’t using async, you’d have to manage a counter that is being called every time an async function completes to know whether the number of times something has completed is equal to the number of calls you made. It’s a bit of a hassle.

Plus, you’ll frequently want to do something with all of the data you’ve just brought into your application as a single entity- such as if we were querying for a user’s profile information, their friends, and their interests to then store that in your database, it’d be nice if you just had to make those 3 requests and then have the results returned in one central location once they’re all completed.

So, Async’s purpose in general is that it makes working with asynchronous flows a lot easier- you can do everything async is doing by hand, but you’ll end up writing a lot more code and having to handle a bunch of cases which aren’t an issue when using the Async lib. Your code will look cleaner / be easier to read rather than nested callbacks, and you can do complex patterns like knowing when all async operations have completed easily.

Hope this helps, I had an awesome time working with you guys! Thanks for having me!

If you guys have any follow-up questions on really anything tech-related, don’t hesistate to shoot me a message or @ me in chat!
Hailey L. Petway
@hlpetway
Jun 19 2014 16:06
ty!
Josh Cunningham
@joshcanhelp
Jun 19 2014 17:43
Thanks @ElliotChong ... good prezzo, as always
Nicholas Harberg
@harberg
Jun 19 2014 19:21
anyone else having really slow internet downstairs?
Ivan Storck
@ivanoats
Jun 19 2014 19:42
ping homer.u.washington.edu ...
48 packets transmitted, 39 packets received, 18.8% packet loss
round-trip min/avg/max/stddev = 12.264/280.192/2004.408/413.881 ms
that’s pretty bad
worse on Rackspace (1)
I’ve let Jenn know she should call the dude
Nicholas Harberg
@harberg
Jun 19 2014 19:45
cool, thanks @ivanoats
Ivan Storck
@ivanoats
Jun 19 2014 19:45
was 26% packet loss on Rackspace
Nicholas Harberg
@harberg
Jun 19 2014 19:47
But I needed those packets.
Damn you Rackspace!
Andy Ernst
@AndyCErnst
Jun 19 2014 20:31
When first learning Java I learned a ton from Head First Java. They really simplify things
Chelsea Lura
@ChelseaLura
Jun 19 2014 20:34
Great Java algorithms practice site: http://practiceit.cs.washington.edu/practiceit/
Josh Cunningham
@joshcanhelp
Jun 19 2014 20:53
Very cool HTML + CSS starter kit from Google that uses Node, Sass, and Gulp: https://developers.google.com/web/starter-kit/
Elliot Chong
@ElliotChong
Jun 19 2014 21:09
:+1:
Kevin Stephens
@kevinmstephens
Jun 19 2014 21:17
@ElliotChong Thanks for the talk yesterday, have been in 'callback hell' and excited to use this new design pattern
Elliot Chong
@ElliotChong
Jun 19 2014 21:28

@kevinmstephens Awesome! Once you get the hang of the async library (specifically, wrapping your methods to accept a callback function) it’s really hard to go back.

Async, Lodash (a faster drop-in replacement for Underscore, plus some additional methods like deep merge! http://lodash.com/docs), and Sugar (Epic library for working with Dates, plus some other awesome additions to most native datatypes http://sugarjs.com/) are all pretty much auto-installs for all of my Node project these days.

If you ever need to do any Date-related work, definitely check out Sugar. It’s amazing.
Nicholas Harberg
@harberg
Jun 19 2014 21:32
@ElliotChong, what makes Sugar good for dates?
Elliot Chong
@ElliotChong
Jun 19 2014 21:39
@harberg http://sugarjs.com/dates - Create dates from Strings (i.e.: “tomorrow”, “1 minute from now”, “May 2nd 1992”), date manipulation (i.e.: addMinutes(), beginningOfDay()), comparison (isToday, isLastWeek, etc.), and a super powerful formatting engine- plus more!
Nicholas Harberg
@harberg
Jun 19 2014 21:40
@ElliotChong well, that is indeed powerful. Thanks for the tip.
Elliot Chong
@ElliotChong
Jun 19 2014 21:40
:+1:
Jeff Adelman
@jeffadelman8
Jun 19 2014 21:41
"And if you call in the next 10 minutes we'll throw in all THESE date features!"
Chelsea Lura
@ChelseaLura
Jun 19 2014 21:43
@toastynerd Suggestions for Gitbook topics: Auth-Auth, tokens, & sessions/cookies
@toastynerd Suggestions for Gitbook topics: SVG and D3
Ivan Storck
@ivanoats
Jun 19 2014 23:05
cfbot image me real artists ship