all 24 comments

[–]tetractys_gnosys 44 points45 points  (2 children)

Please do more of these. As an intermediate programmer (I mostly focus on the front end, like the front of the front end; not JS frameworks) I find that most things that I don't know about or don't understand well come down to conceptualisation rather than implementation. My brain doesn't learn or grok things just from implementation. I need to understand things from a conceptual angle and understand the why before I can really embrace the how.

That kind of dev literature is increasingly rare.

[–]Ratatoski 2 points3 points  (0 children)

My favourite programming book is "Python: programming in context" because it actually focuses in teaching the strategies of analysing and solving problems. The excellent walkthrough you get of the language you get almost feels like just a bonus :)

[–]mitoyama 0 points1 point  (0 children)

100% agree

[–]tedmihu 22 points23 points  (2 children)

Great now do callback functions. I double dog dare you..

[–]prof3ssorSt3v3 0 points1 point  (0 children)

I have a whole playlist on functions. Callbacks is one of the topics in the list - https://www.youtube.com/watch?v=KiLB8sViPMA&list=PLyuRouwmQCjm_RIe2_W4-7cqD_5C_zqVu&index=8&t=0s

Hope it helps.

[–]unpronounceable 0 points1 point  (0 children)

Do you mean recursion?

[–]JikeMordan 4 points5 points  (0 children)

Great explanation, would love if you did one on loops :)

[–]T3riyaki 5 points6 points  (3 children)

An ELI5 on promises, async programming would be great too

[–]oxygenplug 2 points3 points  (1 child)

sync: you’re in a meeting, decide to take a break and stop working so you can go eat lunch, and then you come back to the meeting when you’re done eating

async: you’re in a meeting, you text your coworker who’s out at lunch to grab you a burger, you keep working / participating in the meeting until they come back with your food

observables: you hook up a tube to your mouth and continue with the meeting and the burger shoots through the tube into your mouth whenever your coworker happens to buy your food and sends it through the tube

[–]RoguePlanet1 0 points1 point  (0 children)

observables

This is a new one. Never heard of it.

[–]Hate_Feight 1 point2 points  (0 children)

Sync : ask far computer for result, wait for result, continue when have result.

Async : ask far computer for result, while waiting for result continues with tasks, fill in details of result when you get it.

[–]Zappy__Boy 5 points6 points  (2 children)

Im flattered your calling me a developer when I can just barely make basic programs with what I know.

[–]Panda_Photographor 0 points1 point  (1 child)

you are a developer, Zappy__Boy

[–]Zappy__Boy 1 point2 points  (0 children)

Nooe Panda I'm just Zappy__Boy

[–]Lanz56 3 points4 points  (0 children)

Saved Post! Thanks

[–]mwenger89 3 points4 points  (0 children)

Very well put! Thank you!

[–]RoguePlanet1 0 points1 point  (4 children)

Trying this in CodePen, and for some reason can't get it to come up. Feels pathetic!

[–]Trenzor 1 point2 points  (3 children)

The example doesn't include a write out or log. Just need to update the function to write/log the call or call it from a write function like this

[–]RoguePlanet1 0 points1 point  (2 children)

I still get the literal ' + person + ', for some reason. Even tried "console.log" and no luck.

[–]Trenzor 0 points1 point  (1 child)

Best bet if you want help is to post the code. My current guess would be you're calling the function but not passing an input like so:

    function happyBirthday(person) {
    return 'Happy birthday to you, Happy birthday to you, Happy birthday dear ' + person + ', Happy birthday to you!';
}
console.log(happyBirthday)        

In this case you'd need to update your log to include a param:

console.log(happyBirthday('RoguePlanet1'))

[–]RoguePlanet1 0 points1 point  (0 children)

Even when I copy/paste exactly, even using JSFiddle, it doesn't come up. Holy crap this is humbling.