• Home
  • Join
  • Courses
    • Garden Tours (Start Here!)
    • The Garden Paths
    • All Courses
  • News
  • Activity
  • Help
    • Feature Requests
  • Contact
    Sign in Sign up
    • Home
    • Join
    • Courses
      • Garden Tours (Start Here!)
      • The Garden Paths
      • All Courses
    • News
    • Activity
    • Help
      • Feature Requests
    • Contact

    Month: April 2022

    Site News #11: Content gating changes, More Systems Ruby

    A module on low-level file I/O added to the systems Ruby course, and some changes to how content access works.
    Avdi Grimm 2022-04-06
    0 Comments

    Recent Posts

    • Site News #16: New dashboard, and…

    • New Video: RUBYOPT and the Sneaky…

    • Black Friday Not-Sale (UPDATED)

    • Site News #15: New content, new…

    • Site News #14: Bug fixes &…

    See all

    Archives

    • January 2023
    • November 2022
    • October 2022
    • July 2022
    • June 2022
    • May 2022
    • April 2022
    • March 2022
    • February 2022
    • January 2022
    • December 2021
    • November 2021
    • October 2021

    Categories

    • Meta (1)
    • New Content (1)
      • New Video (1)
    • News (19)

    Meta

    • Register
    • Log in
    • Entries feed
    • Comments feed
    • WordPress.org

    Recent Comments

    • Philipp Blume on But I don’t know Ruby at all!
    • Philipp Blume on But I don’t know Ruby at all!
    • Philipp Blume on Say hello!
    • Chris Shieh on But I don’t know Ruby at all!
    • Chris Shieh on Say hello!

    Recent News

    • Site News #16: New dashboard, and more
    • Black Friday Not-Sale (UPDATED)
    • Site News #15: New content, new welcome series
    • Site News #14: Bug fixes & new video
    • Graceful.Dev Birthday Sale 2022

    Latest Content

      Common Tags

      Applications asynchrony concurrency containers corelib data debugging design enumerable gems guest Guest Episodes idioms io iteration Language libraries metaprogramming oop patterns practices rails refactoring regex rspec Ruby stdlib style systems TDD test doubles testing text tools variables

      • Home
      • Join
      • Courses
      • News
      • Activity
      • Help
      • Contact
      © 2023 ShipRise LLC
      • Code of Conduct
      • Privacy Policy
      • Terms of Service
      • Blog
      • Help
      • Contact

      Forum Description

      Hi there graceful devs, here’s what’s new!

      Content Updates

      More Systems Ruby: I did some poking around in the archives, and was reminded of some more content that belongs in the Systems Ruby course. There’s now a 7-part section on working efficiently with Ruby’s low-level file I/O APIs, using a reimplementation of the UNIX tail command as an example. I’d totally forgotten about that series, and I’m excited to highlight it in this way. Not only will you learn more about file I/O, but you’ll see an example of iteratively encapsulating procedural code into OO abstractions.

      Feature Updates

      New content-gating behavior

      My philosophy for building Graceful.Dev has been to leverage off-the-shelf code for 99% of the solution, and write the 1% of customization and glue code that makes it work “just right”. Towards that end, the site is build on a foundation of WordPress, the LearnDash Learning Management System plugin, and a symbiotic combination of WP Fusion and MemberPress for managing memberships and content access.

      One area where this has fallen slightly short of "just right" is in how LearnDash handles attempts to read course topics when you don’t have access (either because you’re logged-out, or because you don’t have the right course product or membership). By default, you get redirected to the course home page.

      That’s not the experience I want. If someone follows a link to a Graceful.Dev topic (either from a third-party site, or from being redirected from the old RubyTapas site), I want it to behave like the RubyTapas site did: show an excerpt, and a note about how to get access (register, log in, join, etc.).

      Anyway, long story short, I’ve added some customizations to the site to make it do just that: now if you don’t have access to a piece of content, you’ll see an excerpt and a notification about how to get access. This is a step toward my long-term goal of retiring content from the RubyTapas site: it enables the old episodes to redirect directly to their corresponding Graceful.Dev topics.

      New Pro membership behavior

      I’m still getting the hang of how to code “with the grain” of this tech stack. Originally, the way Pro membership worked was there was a group of “premium” courses that you’d get automatically enrolled in when you joined. Maintaining this course-group was a bit of a hassle, though, and a few thousand callbacks would get fired every time a new course was added to that group.

      More recently, I made some changes so that Pro members could self-enroll in premium courses. This didn’t pan out as well as I’d expected, however; it confused several users and could make it look like you’d lost your course progress. It also turned out to have some hinky edge-cases, because it was effectively routing around how LearnDash normally thinks about course access.

      So, after some more research, I’ve once again made a change to how Pro membership works. It now uses a built-in LearnDash feature called “auto-enrollment”. If you’re a Pro member (either directly or through a RubyTapas legacy account) you will once again be considered by the system to be enrolled in all courses. I no longer have to maintain a fixed list of “pro courses”, however. And staying “with the grain” means even less customization code to maintain.

      Sorry about any confusion along the way!

      Video script and code now in tabs

      I've reworked the "video script and code" to make better use of the site theme and show that content in a tab, instead of behind a fold-out at the bottom of the post.

      Fixed some styling regressions

      A major version update to the LearnDash plugin introduced some visual regressions with the site's theme. Since the update didn't add any features or fixes I needed, I've downgraded it back to the 3.x series until theme support catches up.

      A faster site

      Cloudways hosting continues to pay off in terms of making it very easy (and relatively inexpensive) to experiment with different instance sizes and compare performance. After some experimentation I've bumped up the server instance size again and upped request memory limits. I'm seeing a more responsive site as a result and hopefully you will too.

      That’s it for this edition. Stay graceful!

      — Avdi

      Report

      There was a problem reporting this post.

      Harassment or bullying behavior
      Contains mature or sensitive content
      Contains misleading or false information
      Contains abusive or derogatory content
      Contains spam, fake content or potential malware

      Block Member?

      Please confirm you want to block this member.

      You will no longer be able to:

      • See blocked member's posts
      • Mention this member in posts

      Please allow a few minutes for this process to complete.

      Report

      You have already reported this .
      Clear Clear All