{"action":"created","comment":{"url":"https://api.github.com/repos/holidaycheck/tech-blog/pulls/comments/120730928","pull_request_review_id":42719416,"id":120730928,"diff_hunk":"@@ -0,0 +1,82 @@\n+---\n+layout: post\n+title:  \"Async Function Kata at #jslang Meetup\"\n+date:   2017-06-02 08:03:00 +0200\n+categories: meetup javascript kata\n+---\n+\n+The callback-hell times are long over. We have better tools now. But which of the new kids on the block do you want to \n+play with? In this meetup, last night we tried out [async functions][async-funcs], also known by the name \"async/await\". \n+It was a fun learning experience. Keep reading and get inspired.\n+\n+## The meetup\n+[\"JavaScript The Language\" (#jslang)][jslang-meetup] a hands-on meetup only about JavaScript the language. Not about any library, \n+framework or the latest programming technique. You could argue that the language JavaScript has become kind of a \n+framework itself, you need(ed) a transpiler, the language changes as fast as those hipster frameworks. \n+Let's put that aside.\n+We focus on language features only. We try to get a handle on a specific one at a time and sharpen this one \n+feature for our tool belts. That's why this is a very hands-on meetup.\n+Also there is no talks or alike, just a short intro and the crowd works together. All attendees are actively \n+participating, by coding, discussing or facilitating.\n+You want to do that too, in your city? Just start a meetup, take our katas that we solve and make it happen.\n+\n+## Our Scope and the Kata\n+I announced the meetup about two weeks ago. There was no #jslang meetup since April 2016, more than one year ago. \n+But since I joined HolidayCheck in May 2017 and it is in my DNA to promote things I enjoy, I had to do restart this \n+meetup. The language JavaScript is moving forward and we need to keep up with what it offers.\n+Async functions are one of the most interesting things that is changing in the language. In order to understand \n+them in the JS context I prepared a [short slide set sumarizing the state the async functions feature][slides]. \n+That was all of presentation we had. I set the context and introduced [the kata][kata] that we want to work on. \n+In the kata we want to combine two asynchronous functionalities, 1) getting the geolocation and 2) loading the \n+(nearest) airports depending on that result.\n+The interesting part is actually not (only) the implementation but it already starts with the tests. Have you ever \n+had trouble writing asynchronous tests? Do this kata and practice even more!\n+\n+## How we did it\n+We were twelve people at the event. And a quick hand-sign and we all agreed on setting up two mobs and solve the \n+problem by mob-programming. We had two mobs of 6 people each. Thanks to [Chris Neuroth][chris] who facilitated the \n+mob-programming for us. The most important rule I took away from it was that the one sitting at the keyboard should \n+not act unless told to.\n+Both teams started and solve the first task, which was to implement the kata by using promises. This was the first \n+step in order to get familiar with the kata and also to feel the pain of using promises and test them properly. \n+Because every team also had the ambition to write good tests, and boy they did. This took about one hour. After that \n+we took a five minutes break and did some physical activity, playing table tennis. The table tennis challenge was \n+that we had to pass on one of the four rackets to the person who had none, while running around the table.\n+Back to the kata, the next step was to move the tests to use async+await keywords, which mostly replaces promises \n+and makes tests more readable. But it has it's own challenges.\n+In step three, which at this time kind of merged with step 2 we used async+await in all places. We learned about \n+async functions this way and naturally put `await` where it felt right. I had the impression this did not really \n+cause many problems and made it very easy to understand how async+await work. This was also the intention of this ","path":"_posts/2017-06-02-jslang-meetup-async-await.markdown","position":49,"original_position":49,"commit_id":"c9de443452bfe9823de962b2a90d3199d56a4f85","original_commit_id":"c9de443452bfe9823de962b2a90d3199d56a4f85","user":{"login":"wolframkriesing","id":113427,"avatar_url":"https://avatars2.githubusercontent.com/u/113427?v=3","gravatar_id":"","url":"https://api.github.com/users/wolframkriesing","html_url":"https://github.com/wolframkriesing","followers_url":"https://api.github.com/users/wolframkriesing/followers","following_url":"https://api.github.com/users/wolframkriesing/following{/other_user}","gists_url":"https://api.github.com/users/wolframkriesing/gists{/gist_id}","starred_url":"https://api.github.com/users/wolframkriesing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wolframkriesing/subscriptions","organizations_url":"https://api.github.com/users/wolframkriesing/orgs","repos_url":"https://api.github.com/users/wolframkriesing/repos","events_url":"https://api.github.com/users/wolframkriesing/events{/privacy}","received_events_url":"https://api.github.com/users/wolframkriesing/received_events","type":"User","site_admin":false},"body":"+1\r\n","created_at":"2017-06-07T20:08:20Z","updated_at":"2017-06-07T20:08:21Z","html_url":"https://github.com/holidaycheck/tech-blog/pull/4#discussion_r120730928","pull_request_url":"https://api.github.com/repos/holidaycheck/tech-blog/pulls/4","_links":{"self":{"href":"https://api.github.com/repos/holidaycheck/tech-blog/pulls/comments/120730928"},"html":{"href":"https://github.com/holidaycheck/tech-blog/pull/4#discussion_r120730928"},"pull_request":{"href":"https://api.github.com/repos/holidaycheck/tech-blog/pulls/4"}}},"pull_request":{"url":"https://api.github.com/repos/holidaycheck/tech-blog/pulls/4","id":123679502,"html_url":"https://github.com/holidaycheck/tech-blog/pull/4","diff_url":"https://github.com/holidaycheck/tech-blog/pull/4.diff","patch_url":"https://github.com/holidaycheck/tech-blog/pull/4.patch","issue_url":"https://api.github.com/repos/holidaycheck/tech-blog/issues/4","number":4,"state":"open","locked":false,"title":"#jslang meetup post","user":{"login":"wolframkriesing","id":113427,"avatar_url":"https://avatars2.githubusercontent.com/u/113427?v=3","gravatar_id":"","url":"https://api.github.com/users/wolframkriesing","html_url":"https://github.com/wolframkriesing","followers_url":"https://api.github.com/users/wolframkriesing/followers","following_url":"https://api.github.com/users/wolframkriesing/following{/other_user}","gists_url":"https://api.github.com/users/wolframkriesing/gists{/gist_id}","starred_url":"https://api.github.com/users/wolframkriesing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wolframkriesing/subscriptions","organizations_url":"https://api.github.com/users/wolframkriesing/orgs","repos_url":"https://api.github.com/users/wolframkriesing/repos","events_url":"https://api.github.com/users/wolframkriesing/events{/privacy}","received_events_url":"https://api.github.com/users/wolframkriesing/received_events","type":"User","site_admin":false},"body":"My first post on the HC blog ... now we only need to get this blog live :)","created_at":"2017-06-02T09:42:05Z","updated_at":"2017-06-07T20:08:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e9937d024984e42979fe5911741ef11f8fcb1870","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/holidaycheck/tech-blog/pulls/4/commits","review_comments_url":"https://api.github.com/repos/holidaycheck/tech-blog/pulls/4/comments","review_comment_url":"https://api.github.com/repos/holidaycheck/tech-blog/pulls/comments{/number}","comments_url":"https://api.github.com/repos/holidaycheck/tech-blog/issues/4/comments","statuses_url":"https://api.github.com/repos/holidaycheck/tech-blog/statuses/c9de443452bfe9823de962b2a90d3199d56a4f85","head":{"label":"holidaycheck:jslang-meetup-post-june17","ref":"jslang-meetup-post-june17","sha":"c9de443452bfe9823de962b2a90d3199d56a4f85","user":{"login":"holidaycheck","id":2122343,"avatar_url":"https://avatars3.githubusercontent.com/u/2122343?v=3","gravatar_id":"","url":"https://api.github.com/users/holidaycheck","html_url":"https://github.com/holidaycheck","followers_url":"https://api.github.com/users/holidaycheck/followers","following_url":"https://api.github.com/users/holidaycheck/following{/other_user}","gists_url":"https://api.github.com/users/holidaycheck/gists{/gist_id}","starred_url":"https://api.github.com/users/holidaycheck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/holidaycheck/subscriptions","organizations_url":"https://api.github.com/users/holidaycheck/orgs","repos_url":"https://api.github.com/users/holidaycheck/repos","events_url":"https://api.github.com/users/holidaycheck/events{/privacy}","received_events_url":"https://api.github.com/users/holidaycheck/received_events","type":"Organization","site_admin":false},"repo":{"id":91095072,"name":"tech-blog","full_name":"holidaycheck/tech-blog","owner":{"login":"holidaycheck","id":2122343,"avatar_url":"https://avatars3.githubusercontent.com/u/2122343?v=3","gravatar_id":"","url":"https://api.github.com/users/holidaycheck","html_url":"https://github.com/holidaycheck","followers_url":"https://api.github.com/users/holidaycheck/followers","following_url":"https://api.github.com/users/holidaycheck/following{/other_user}","gists_url":"https://api.github.com/users/holidaycheck/gists{/gist_id}","starred_url":"https://api.github.com/users/holidaycheck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/holidaycheck/subscriptions","organizations_url":"https://api.github.com/users/holidaycheck/orgs","repos_url":"https://api.github.com/users/holidaycheck/repos","events_url":"https://api.github.com/users/holidaycheck/events{/privacy}","received_events_url":"https://api.github.com/users/holidaycheck/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/holidaycheck/tech-blog","description":"HolidayCheckers blogging about things they care about.","fork":false,"url":"https://api.github.com/repos/holidaycheck/tech-blog","forks_url":"https://api.github.com/repos/holidaycheck/tech-blog/forks","keys_url":"https://api.github.com/repos/holidaycheck/tech-blog/keys{/key_id}","collaborators_url":"https://api.github.com/repos/holidaycheck/tech-blog/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/holidaycheck/tech-blog/teams","hooks_url":"https://api.github.com/repos/holidaycheck/tech-blog/hooks","issue_events_url":"https://api.github.com/repos/holidaycheck/tech-blog/issues/events{/number}","events_url":"https://api.github.com/repos/holidaycheck/tech-blog/events","assignees_url":"https://api.github.com/repos/holidaycheck/tech-blog/assignees{/user}","branches_url":"https://api.github.com/repos/holidaycheck/tech-blog/branches{/branch}","tags_url":"https://api.github.com/repos/holidaycheck/tech-blog/tags","blobs_url":"https://api.github.com/repos/holidaycheck/tech-blog/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/holidaycheck/tech-blog/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/holidaycheck/tech-blog/git/refs{/sha}","trees_url":"https://api.github.com/repos/holidaycheck/tech-blog/git/trees{/sha}","statuses_url":"https://api.github.com/repos/holidaycheck/tech-blog/statuses/{sha}","languages_url":"https://api.github.com/repos/holidaycheck/tech-blog/languages","stargazers_url":"https://api.github.com/repos/holidaycheck/tech-blog/stargazers","contributors_url":"https://api.github.com/repos/holidaycheck/tech-blog/contributors","subscribers_url":"https://api.github.com/repos/holidaycheck/tech-blog/subscribers","subscription_url":"https://api.github.com/repos/holidaycheck/tech-blog/subscription","commits_url":"https://api.github.com/repos/holidaycheck/tech-blog/commits{/sha}","git_commits_url":"https://api.github.com/repos/holidaycheck/tech-blog/git/commits{/sha}","comments_url":"https://api.github.com/repos/holidaycheck/tech-blog/comments{/number}","issue_comment_url":"https://api.github.com/repos/holidaycheck/tech-blog/issues/comments{/number}","contents_url":"https://api.github.com/repos/holidaycheck/tech-blog/contents/{+path}","compare_url":"https://api.github.com/repos/holidaycheck/tech-blog/compare/{base}...{head}","merges_url":"https://api.github.com/repos/holidaycheck/tech-blog/merges","archive_url":"https://api.github.com/repos/holidaycheck/tech-blog/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/holidaycheck/tech-blog/downloads","issues_url":"https://api.github.com/repos/holidaycheck/tech-blog/issues{/number}","pulls_url":"https://api.github.com/repos/holidaycheck/tech-blog/pulls{/number}","milestones_url":"https://api.github.com/repos/holidaycheck/tech-blog/milestones{/number}","notifications_url":"https://api.github.com/repos/holidaycheck/tech-blog/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/holidaycheck/tech-blog/labels{/name}","releases_url":"https://api.github.com/repos/holidaycheck/tech-blog/releases{/id}","deployments_url":"https://api.github.com/repos/holidaycheck/tech-blog/deployments","created_at":"2017-05-12T13:37:53Z","updated_at":"2017-06-04T18:33:09Z","pushed_at":"2017-06-02T09:42:06Z","git_url":"git://github.com/holidaycheck/tech-blog.git","ssh_url":"git@github.com:holidaycheck/tech-blog.git","clone_url":"https://github.com/holidaycheck/tech-blog.git","svn_url":"https://github.com/holidaycheck/tech-blog","homepage":null,"size":16,"stargazers_count":3,"watchers_count":3,"language":"Nix","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":3,"forks":0,"open_issues":3,"watchers":3,"default_branch":"master"}},"base":{"label":"holidaycheck:master","ref":"master","sha":"4fbd63aec3f753f7c1931f93a62902862f0be88d","user":{"login":"holidaycheck","id":2122343,"avatar_url":"https://avatars3.githubusercontent.com/u/2122343?v=3","gravatar_id":"","url":"https://api.github.com/users/holidaycheck","html_url":"https://github.com/holidaycheck","followers_url":"https://api.github.com/users/holidaycheck/followers","following_url":"https://api.github.com/users/holidaycheck/following{/other_user}","gists_url":"https://api.github.com/users/holidaycheck/gists{/gist_id}","starred_url":"https://api.github.com/users/holidaycheck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/holidaycheck/subscriptions","organizations_url":"https://api.github.com/users/holidaycheck/orgs","repos_url":"https://api.github.com/users/holidaycheck/repos","events_url":"https://api.github.com/users/holidaycheck/events{/privacy}","received_events_url":"https://api.github.com/users/holidaycheck/received_events","type":"Organization","site_admin":false},"repo":{"id":91095072,"name":"tech-blog","full_name":"holidaycheck/tech-blog","owner":{"login":"holidaycheck","id":2122343,"avatar_url":"https://avatars3.githubusercontent.com/u/2122343?v=3","gravatar_id":"","url":"https://api.github.com/users/holidaycheck","html_url":"https://github.com/holidaycheck","followers_url":"https://api.github.com/users/holidaycheck/followers","following_url":"https://api.github.com/users/holidaycheck/following{/other_user}","gists_url":"https://api.github.com/users/holidaycheck/gists{/gist_id}","starred_url":"https://api.github.com/users/holidaycheck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/holidaycheck/subscriptions","organizations_url":"https://api.github.com/users/holidaycheck/orgs","repos_url":"https://api.github.com/users/holidaycheck/repos","events_url":"https://api.github.com/users/holidaycheck/events{/privacy}","received_events_url":"https://api.github.com/users/holidaycheck/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/holidaycheck/tech-blog","description":"HolidayCheckers blogging about things they care about.","fork":false,"url":"https://api.github.com/repos/holidaycheck/tech-blog","forks_url":"https://api.github.com/repos/holidaycheck/tech-blog/forks","keys_url":"https://api.github.com/repos/holidaycheck/tech-blog/keys{/key_id}","collaborators_url":"https://api.github.com/repos/holidaycheck/tech-blog/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/holidaycheck/tech-blog/teams","hooks_url":"https://api.github.com/repos/holidaycheck/tech-blog/hooks","issue_events_url":"https://api.github.com/repos/holidaycheck/tech-blog/issues/events{/number}","events_url":"https://api.github.com/repos/holidaycheck/tech-blog/events","assignees_url":"https://api.github.com/repos/holidaycheck/tech-blog/assignees{/user}","branches_url":"https://api.github.com/repos/holidaycheck/tech-blog/branches{/branch}","tags_url":"https://api.github.com/repos/holidaycheck/tech-blog/tags","blobs_url":"https://api.github.com/repos/holidaycheck/tech-blog/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/holidaycheck/tech-blog/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/holidaycheck/tech-blog/git/refs{/sha}","trees_url":"https://api.github.com/repos/holidaycheck/tech-blog/git/trees{/sha}","statuses_url":"https://api.github.com/repos/holidaycheck/tech-blog/statuses/{sha}","languages_url":"https://api.github.com/repos/holidaycheck/tech-blog/languages","stargazers_url":"https://api.github.com/repos/holidaycheck/tech-blog/stargazers","contributors_url":"https://api.github.com/repos/holidaycheck/tech-blog/contributors","subscribers_url":"https://api.github.com/repos/holidaycheck/tech-blog/subscribers","subscription_url":"https://api.github.com/repos/holidaycheck/tech-blog/subscription","commits_url":"https://api.github.com/repos/holidaycheck/tech-blog/commits{/sha}","git_commits_url":"https://api.github.com/repos/holidaycheck/tech-blog/git/commits{/sha}","comments_url":"https://api.github.com/repos/holidaycheck/tech-blog/comments{/number}","issue_comment_url":"https://api.github.com/repos/holidaycheck/tech-blog/issues/comments{/number}","contents_url":"https://api.github.com/repos/holidaycheck/tech-blog/contents/{+path}","compare_url":"https://api.github.com/repos/holidaycheck/tech-blog/compare/{base}...{head}","merges_url":"https://api.github.com/repos/holidaycheck/tech-blog/merges","archive_url":"https://api.github.com/repos/holidaycheck/tech-blog/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/holidaycheck/tech-blog/downloads","issues_url":"https://api.github.com/repos/holidaycheck/tech-blog/issues{/number}","pulls_url":"https://api.github.com/repos/holidaycheck/tech-blog/pulls{/number}","milestones_url":"https://api.github.com/repos/holidaycheck/tech-blog/milestones{/number}","notifications_url":"https://api.github.com/repos/holidaycheck/tech-blog/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/holidaycheck/tech-blog/labels{/name}","releases_url":"https://api.github.com/repos/holidaycheck/tech-blog/releases{/id}","deployments_url":"https://api.github.com/repos/holidaycheck/tech-blog/deployments","created_at":"2017-05-12T13:37:53Z","updated_at":"2017-06-04T18:33:09Z","pushed_at":"2017-06-02T09:42:06Z","git_url":"git://github.com/holidaycheck/tech-blog.git","ssh_url":"git@github.com:holidaycheck/tech-blog.git","clone_url":"https://github.com/holidaycheck/tech-blog.git","svn_url":"https://github.com/holidaycheck/tech-blog","homepage":null,"size":16,"stargazers_count":3,"watchers_count":3,"language":"Nix","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":3,"forks":0,"open_issues":3,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/holidaycheck/tech-blog/pulls/4"},"html":{"href":"https://github.com/holidaycheck/tech-blog/pull/4"},"issue":{"href":"https://api.github.com/repos/holidaycheck/tech-blog/issues/4"},"comments":{"href":"https://api.github.com/repos/holidaycheck/tech-blog/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/holidaycheck/tech-blog/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/holidaycheck/tech-blog/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/holidaycheck/tech-blog/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/holidaycheck/tech-blog/statuses/c9de443452bfe9823de962b2a90d3199d56a4f85"}}}}
{"actor":{"display_login":"wolframkriesing"}}