blog icon indicating copy to clipboard operation
blog copied to clipboard

#6 - Adds blog post content for Elixir Parallel Letter Frequency walkthrough

Open percygrunwald opened this issue 6 years ago • 25 comments

Hi @iHiD @nicolechalmers, I've added my first iteration of the blog post in this commit.

I'd love your feedback on the post and I can make any improvements you'd like. The post is quite long, but I tried to add an extra level of interest by adding my benchmarks of the concurrent and non-concurrent code.

I didn't add anything to blog.json since I presume that you all will do that when you decide to release the blog post.

I'm currently putting the final touches on the walkthrough video and I can share the unlisted video with you tomorrow for feedback.

Thanks!

percygrunwald avatar Jan 28 '19 13:01 percygrunwald

This is super-awesome :)

One general comment: How about removing the "final code" bit at the end and linking to your solution on Exercism instead?

I'll try and find some time to read through this more in detail this week!

iHiD avatar Jan 28 '19 23:01 iHiD

@iHiD you're absolutely right, I completely forgot about linking to my solution on Exercism! I think it might be better to completely remove that section from the end and add a link to my solution on Exercism right at the start of the post.

Thanks for the feedback, I'll update the PR.

percygrunwald avatar Jan 28 '19 23:01 percygrunwald

Great. @kytrinyx is going to give some proper feedback to this over the coming days :)

iHiD avatar Jan 29 '19 01:01 iHiD

Hi all, I have an unlisted video on YouTube for this tutorial as well: https://youtu.be/inhcxfzVWWM

Happy to make any changes you all think could improve the video.

Thanks!

percygrunwald avatar Jan 29 '19 11:01 percygrunwald

Thank you so much for diving into this, and I apologize for the delay in digging into it.

No problem at all! I'm really impressed that you all are taking a lot of time out of your day to run and promote Exercism.

For the blog post, my primary thought is that it shouldn't try to do what the video is already doing so well. I wonder if we could take one interesting aspect and do a deep dive or deeper exploration, or discuss the implications of it, rather than doing a full walkthrough.

I was a bit concerned about this aspect as well, so I tried to add some intrigue with the "does concurrency actually make your code faster" aspect.

One thing I could do is boil down the article to have just the section exploring how to benchmark Elixir code and the results of the benchmarking, along with my advice about how to think about the clean code/performance tradeoff. I could edit the video to contain only the walkthrough, but not the benchmarking and say "if you want to see how I benchmarked the code and the results, please check out the article on the Exercism blog". Not sure how many people this would drive to the blog post (your audience is much bigger than mine), but it's something that might add some intrigue. My only concern about this approach is that the blog post then becomes something you'd likely find on a general Elixir blog, since the article content excluding the video would be less about Exercism.

The other thing I could do is just take the key hints that might prevent someone from solving this problem and combine it with the benchmarking procedure + results, namely:

  • Matching any Unicode letter with ~r/^\p{L}$/u
  • Adding concurrency with functions in the Task module like the one I used in the solution (perhaps including the image I made of the process of splitting the task and merging the results)

This way people could get the full walkthrough by watching the video, there's some Exercism-specific hints in the text content as well as some intriguing benchmark results + advice in the article.

I'll start playing around with this idea and update the PR with a more chopped down version of the article. Let me know what you think about the suggestions.

percygrunwald avatar Jan 31 '19 02:01 percygrunwald

@kytrinyx I made the changes I suggested in my comment above. The article is shorter and more engaging in my opinion, and there is less overlap with what the video is doing.

Let me know if you have any feedback whenever you have time to review the latest version.

Thanks!

percygrunwald avatar Jan 31 '19 11:01 percygrunwald

@percygrunwald I am so sorry I dropped the ball. I will review this again in the next day and get back to you!

kytrinyx avatar Feb 08 '19 00:02 kytrinyx

@percygrunwald This reads so much better! My gut reaction as I was reading through it was that we actually have three articles in one, and I'm wondering if we might post it as three separate ones, all of which cross-link to each other, and all of which link to your walk-through.

The three articles would be:

  1. dealing with unicode
  2. concurrency with the Task module
  3. how to benchmark (and when, and why)

@iHiD I'd love your thoughts on this before I send Percy on a wild rabbit chase.

kytrinyx avatar Feb 08 '19 17:02 kytrinyx

So a three-part series about this task that covers those three topics. That makes sense to me. I don't think it'd involve much extra work - just splitting the post and top and tailing a "Next time we'll talk about X" and "Last time we discussed Y".

We could then publish them either as a set of three, or one-per-week.

I like the idea. What do you think @percygrunwald?

iHiD avatar Feb 11 '19 20:02 iHiD

@kytrinyx @iHiD, I'm totally fine with this. If you're both happy to proceed this way I can start to chop up the post.

percygrunwald avatar Feb 12 '19 03:02 percygrunwald

Thanks @percygrunwald !

iHiD avatar Feb 12 '19 04:02 iHiD

@iHiD @kytrinyx, article-splitting complete! Let me know what you think 👍

percygrunwald avatar Feb 14 '19 12:02 percygrunwald

@percygrunwald Fantastic! I'll take a look at these in the next few days.

kytrinyx avatar Feb 15 '19 23:02 kytrinyx

I like this direction!

Ok, here's what I'd like to suggest. I'd like each blog post to stand alone, with a proper intro/conclusion, and that we'd post them one per week.

I'd like to start off the first one without announcing that it's a series (so no "part 1" in the title, and no "coming up next" in the conclusion). Once we post the second one, we can cross-link the first to the second, and vice versa, and the same when we post the third.

For titles, I'm thinking:

  1. What Parallel Letter Frequency can teach you about unicode matching in Elixir
  2. What Parallel Letter Frequency can teach you about concurrency with Elixir’s Task module
  3. What Parallel Letter Frequency can teach you about benchmarking in Elixir

I think we could have the same introduction section for all three exercises. Here's something that I adapted from what you already have here:

Exercises on Exercism are small, synthetic, and often seemingly trivial. It’s easy to imagine that experienced practitioners would have nothing to learn from them. However, solving these synthetic problems can push you to learn and apply parts of your language that you may not have explored. This new learning can lead you to solve real world problems more efficiently or in a more expressive way.

Parallel Letter Frequency is a medium difficulty exercise on Exercism's Elixir Track. It asks you to write a function that calculates the frequency of letters in a list of strings, and to do so concurrently. This unpacks a surprising number of interesting lessons.

Then each post introduces the lesson that that post will talk about, without talking about the other lessons.

For the conclusion, I think it would make sense to echo the idea that "synthetic problems can teach useful things about real-world code", and we could grab this bit that you said in one of the posts:

Prior to solving this problem I barely knew about [this feature], but I would now consider [it] an indispensable part of my Elixir toolbox.

And then say something that lets us link to your video walkthrough.

What do you think, @percygrunwald?

kytrinyx avatar Feb 17 '19 16:02 kytrinyx

@kytrinyx, I'm fine with those suggestions, I'll get to work implementing them and make a new commit for your review.

percygrunwald avatar Feb 18 '19 04:02 percygrunwald

@kytrinyx I've made changes based on your feedback. I kept the file names the same so it's easier to see what changes I made. Let me know what you think.

percygrunwald avatar Feb 18 '19 06:02 percygrunwald

Thanks for the feedback @kytrinyx, I'll make some edits today.

percygrunwald avatar Feb 19 '19 01:02 percygrunwald

@kytrinyx, added more improvements to the articles:

  • Removes titles with part x in them
  • Improves introductions to lead into article content
  • Changes framing to be less "me" and more "you",
  • Improves conclusions with examples of practical applications of the lessons from the exercise

I've also made some general improvements to the article content such as making the code examples more standalone by including more code in each post.

percygrunwald avatar Feb 19 '19 10:02 percygrunwald

@kytrinyx, great suggestions, thank you! I've pushed some updates.

percygrunwald avatar Feb 20 '19 04:02 percygrunwald

The unicode article is great!

I'd like to reconsider the gif. I like the sentiment, but I find animated gifs to be an accessibility issue—I always have to either cover the moving part in order to read the article, or open it with a "readability" plugin.

Would you put the unicode article in a PR by itself? That way we can do a final edit for polish, as well as work out the metadata and "marketing" blurb for it while I review the other two articles.

kytrinyx avatar Feb 20 '19 07:02 kytrinyx

No problem, I'll remove the gif and make a new PR.

percygrunwald avatar Feb 20 '19 07:02 percygrunwald

@kytrinyx, I made some pretty major changes to the article, including a full section on parallelism vs concurrency, plus how Elixir makes achieving both simpler than some other popular languages/runtimes (JS/Node, Python). The length of the article has increased a lot, but I think it's probably valuable for readers.

Let me know what you think, thanks!

percygrunwald avatar Feb 27 '19 12:02 percygrunwald

@kytrinyx, made some edits to the benchmarking article as well to make the concurrency/parallelism distinction more clear and uniform.

percygrunwald avatar Feb 28 '19 09:02 percygrunwald

@percygrunwald The updates to the concurrency article are fantastic. This really feels like a full-fledged, informative, topical article that will be relevant to lots of folks!

I still need to read through the changes to the benchmarks article.

kytrinyx avatar Feb 28 '19 19:02 kytrinyx

Ok, the benchmark article is great now, too. It feels like it gets just the right amount of depth and detail, while still doing a great job of telling people why they should care.

Let's get the first article shipped, then extract the second into a separate PR and polish it up (I'll take a quick run through for grammar/typos, that sort of thing), and then do the same with the third article once the second has shipped.

kytrinyx avatar Feb 28 '19 19:02 kytrinyx