Your web-browser is very outdated, and as such, this website may not display properly. Please consider upgrading to a modern, faster and more secure browser. Click here to do so.

Elm City Craftworks

News and updates from Gregory Brown and Jordan Byron.
We work on the Practicing Ruby journal, and are active in F/OSS
.
Apr 9 '14

Practicing Ruby 6.4, 6.5, and 6.6 added to open access archives

Within the next few months, all of Practicing Ruby’s content will be freely available under the CC BY-SA license, and we will transition fully to an open-access publishing model.

Between now and then, we’re gradually releasing articles from behind the paywall, little-by-little. Today I’m happy to announce that the following issues are now publicly available:

  • Issue 6.4 discusses in obsessive detail the various ways of reusing code in Ruby — from classical inheritance and mixins to meta-programming and object composition. This article is possibly one of the most comprehensive articles you will find on the topic.

  • Issue 6.5 was written by Carol Nichols. It covers various tools and technique for dealing with buggy code without losing your cool.

  • Issue 6.6 is a straightforward recipe for taking methods that have too many parameters and streamlining them.

All of these articles have also been released in source-form on Github. Please see Practicing Ruby’s open source page for details on all of our F/OSS offerings, including our manuscripts repository.

Enjoy the articles, and happy hacking!

-greg

PS: Don’t forget that there are a total of 81 articles that have already been released to our public archives. If you haven’t checked those out yet, please do so and let us know what you think!

PPS: Although we’re making these learning materials freely available to all Ruby programmers, high quality independent publishing is a costly operation. The average Practicing Ruby article takes anywhere from 30-60 hours to produce, and our larger projects often take longer than that. You can support Practicing Ruby’s work by becoming a subscriber — it will only cost you $8/month but it makes a huge difference to us.

Mar 28 '14

A Link Dump from Practicing Rubyists

Lots of interesting links have been posted in Practicing Ruby’s campfire chat over the last couple weeks. Here are some of the things we’ve been reading, listening to, watching, and talking about:

Hope you enjoy this very eclectic set of links, and if you’re a subscriber to Practicing Ruby, I’d love to discuss them with you in our Campfire room!

Mar 17 '14

Prawn 1.0 is finally here

Work began on the Prawn PDF toolkit in April 2008, thanks to some generous crowd funding from the Ruby community. Nearly six years later, I’m proud to say that we’ve finally shipped our 1.0 release.

This 1.0 release represents a fresh start for Prawn, and I hope that even folks who have been using our project for several years will see it that way. Start with the Prawn by Example manual and our API documentation, and then get in touch via GitHub or our mailing list if you have questions or suggestions for us. Where six months ago you would have found a stagnant project, you should now see signs of life!

Our history is long and complicated, but the basic story is that Prawn is a very powerful but unwieldy ball of legacy code that we’ve been trying to rebuild from the inside out for many years now. We’re nowhere near done with that process, but we’ve done a lot over the last several months to get things pointed in the right direction.

It’s been a wild and bumpy ride, but over the last few months we’ve done the following things to make the project more sustainable:

  • Since 0.13 shipped in December 2013, we’ve resumed a monthly release cycle with clear and comprehensive notes in our CHANGELOG. We’re going to try to keep this going indefinitely, and will also maintenance releases when needed to fix bugs or make performance improvements.

  • We have put a free-flowing commit bit policy into action, and have added 20 new committers to Prawn since I resumed work on the project in November 2013.

  • Because our former core team members are mostly inactive now, I also invited two more people to help me with Prawn’s long-term maintenance and release management: Evan Sharp and Alexander Mankuta. While I’m planning to stick around for a while, Evan and Alex will help make sure the project doesn’t go stagnant again, even in my absence.

  • We have an official API compatibility policy now. If you look at it, you’re probably going to think “wow that’s complicated, why not just use semantic versioning?”, and you’d be right to think that. But the underlying goal is to make a clear dividing line between our stable API and extension API, and then either stabilize or extract all of our experimental features. Once that happens, we’ll make the switch to semantic versioning, probably starting with a 2.0 release somewhere down the line.

  • All open issues have now been responded to, and all pending pull requests have either been merged or rejected with a reason. We had something like 100+ issues without recent activity back in November, but we’re much better at being responsive now. Even though we’re not implementing very many new features or fixes ourselves, we’re trying to make it easier for others to contribute to the project by providing feedback, guidance, and reviews where needed.

  • We are starting to undo past mistakes by disabling or extracting features that never worked properly, and that we don’t currently have the resources to support. So far this has included the removal of our templates feature and transactions/grouping, and there may be more cuts to come in the coming months. Where possible, we’ll work with those who depend on these features to provide extension points that will let them live on as external add-ons to Prawn.

  • We’ve been putting an emphasis on returning to the ideas behind our original tagline: Fast, tiny, and nimble. The truth is that Prawn is none of those things right now, but the performance optimizations, introduction of new extension points, and restructuring of our internals over the last several months have hopefully hinted at our commitment to return to those roots.

A lot of the work that has been done over the last few months has been boring behind the scenes stuff, and for that reason our 1.0 release announcement isn’t nearly as exciting as what you might expect from a project with a less complicated history as our own. But if you give Prawn a spin, you’ll see that it is the product of many years of hard work from nearly 100 generous people around the world.

I’d like to thank the Ruby community for their initial funding of the project and the Prawn core team for putting so much effort into the project over the years. Over the last several months, I was provided with 100 hours of funded work from Madriska Inc. (Brad Ediger’s consulting company) to help get 1.0 out the door. So in addition to contributing a ton of code to Prawn, Brad also kicked in some money to help get it to where it is now!

Here’s hoping that somewhere in the not too distant future, we’ll have a Prawn 2.0 announcement to share with you. But even if that day never comes, I’m happy we at least made it this far.

Mar 11 '14

Practicing Ruby Issues 6.1, 6.2, and 6.3 released to public archives

Within the next few months, all of Practicing Ruby’s content will be freely available under the CC BY-SA license, and we will transition fully to an open-access publishing model.

Between now and then, we’re gradually releasing articles from behind the paywall, little-by-little. Today I’m happy to announce that the following issues are now publicly available:

  • Issue 6.1 was written by Aaron Patterson. It shows you how to use low-level parsing and compiler tools from Ruby to parse JSON files.

  • Issue 6.2 is an exercise in code reading that invites you to walk through a small but complete GUI application for playing the Go board game.

  • Issue 6.3 was a collaboration with Alberto Fernández Capel. It shows how to solve the classic Dining Philosophers concurrency puzzle in three ways: first using mutex synchronization, then using Celluloid, then using a minimal actor model implementation written from scratch.

All of these articles have also been released in source-form on Github. Please see Practicing Ruby’s open source page for details on all of our F/OSS offerings, including our manuscripts repository.

Enjoy the articles, and happy hacking!

-greg

PS: Don’t forget that there are a total of 78 articles that have already been released to our public archives. If you haven’t checked those out yet, please do so and let us know what you think!

PPS: Although we’re making these learning materials freely available to all Ruby programmers, high quality independent publishing is a costly operation. The average Practicing Ruby article takes anywhere from 30-60 hours to produce, and our larger projects often take longer than that. You can support Practicing Ruby’s work by becoming a subscriber — it only costs $8/month but it makes a huge difference to us.

Feb 24 '14

Practicing Ruby Issues 5.7, 5.8, 5.9, and 5.10 released to public archives

Within the next few months, all of Practicing Ruby’s content will be freely available under the CC BY-SA license, and we will transition fully to an open-access publishing model.

Between now and then, we’re gradually releasing articles from behind the paywall, little-by-little. Today I’m happy to announce that Issues 5.7, 5.8, 5.9, and 5.10 are now publicly available:

  • Issue 5.7 looks at the three object peer stereotypes discussed by Freeman/Pryce in GOOS: dependencies, notifications, and adjustiments. This article looks at practical examples of each type of object relationship and discusses how to model them in Ruby.

  • Issue 5.8 invites you to sharpen your code reading skills by jumping head first into Rich Hickey’s Clojure Ant Simulator and trying to make some sense of how it is implemented.

  • Issue 5.9 walks you through the core ideas behind Ant Colony Optimization, and then shows how to use JRuby to implement something similar to the Clojure ant simulator shown in Issue 5.8.

  • Issue 5.10 was written by Avdi Grimm, and basically implements the Javascript prototype-based object model on top of Ruby. Along the way, Avdi also implements a little text-based adventure game using this new object system.

All of these articles have also been released in source-form on Github. Please see Practicing Ruby’s open source page for details on all of our F/OSS offerings, including our manuscripts repository.

Enjoy the articles, and happy hacking!

-greg

PS: Don’t forget that there are a total of 75 articles that have already been released to our public archives. If you haven’t checked those out yet, please do so and let us know what you think!

PPS: Although we’re making these learning materials freely available to all Ruby programmers, high quality independent publishing is a costly operation. The average Practicing Ruby article takes anywhere from 30-60 hours to produce, and our larger projects often take longer than that. You can support Practicing Ruby’s work by becoming a subscriber — it only costs $8/month but it makes a huge difference to us.

Feb 17 '14

Practicing Ruby’s chat room has reopened!

A few days ago we opened Practicing Ruby’s campfire channel back up. We’ve experimented with chat before, but because we never really made the feature visible it didn’t get used much.

But with the recent change in direction, we want to make it easier for subscribers to get in touch with me and Jordan, and also to interact with each other in an informal setting. We’re going to be rolling out a bunch of interactive stuff in the near future (including self-guided courses, office hours, project hack days, etc.), and to support those activities we have brought back our Campfire chat and made it easy for subscribers to find and use.

There’s now a chat link in the navbar for logged-in subscribers, which displays the following dialog:

Any subscriber can sign in as a guest by just typing in a nickname, with no additional setup. Those who want transcript access and the ability to use third-party clients can email us to get full access via a Campfire accounts.

The integration isn’t perfect, but it’s better than what we’ve done before. We hope this will encourage readers to use the Practicing Ruby chat room for various events and adhoc conversations.

Here are some possible use cases we encourage:

  • Lurking in the chat room whenever you’re reading an article, sharing any casual thoughts or questions that come up while you study. Even if no one else is around when you are, there are many people with transcript access who might see your messages and respond to them later.

  • Using the chat room to discuss articles, papers, and books related to programming. You don’t need to be talking about Practicing Ruby’s content, as long as whatever content you are discussing is potentially interesting to your fellow Practicing Rubyists.

  • Offering suggestions for how to improve Practicing Ruby, or asking questions about how to make the most of the service.

  • Participating a bit of “behind the scenes” discussion about upcoming changes to practicingruby.com or articles that are currently being worked on.

In addition to these self-service use cases, you can expect to see a project hack day within the next couple weeks, and some scheduled office hours with me within the next month or two. Once we roll out self-guided courses, this will also be a great place to discuss the exercises and projects as you work on them.

Even if this chat room doesn’t end up having around-the-clock conversation, we hope it’ll be a useful way for you to connect with other folks who are just as serious about their programming studies as you are. Please make yourself at home, and see you in Campfire!

Feb 16 '14

Prawn 0.15.0 has been released!

Today I published a new release of the Prawn PDF toolkit. This release is a stepping stone to next month’s 1.0 release, and it mostly consists of internal restructuring and policy updates.

That said, there are still a few new fixes and minor improvements in this release. Be sure to check out CHANGELOG to see exactly what changed.

Should you upgrade to Prawn 0.15.0?

If you are already running Prawn 0.13 or 0.14, absolutely! This release maintains backwards-compatibility except in cases where it fixes obviously bad behaviors, and should not break your code.

If you’ve been using an older version of Prawn, you should read more about our more recent releases before attempting to upgrade. A lot has changed since 0.12.x.

What’s left to be done between now and 1.0?

There aren’t many new exciting features to come before 1.0. Instead, we’re going to spend the next month focusing on overall UX concerns — this means fixing bugs, improving documentation, clarifying and correcting feature behaviors, etc.

If we do spend time on any new developments, it’ll probably involve some work to make Prawn more extendable in your applications and in add-on libraries. But those improvements can always be made later if we don’t make much progress on them in the next few weeks.

Our plans for API stabilization post-1.0

We’ve put together some release management plans for post-1.0 backwards compatibility in APIs. The basic idea behind it is that Prawn 1.0 will ship with some APIs marked stable, others marked as extension APIs, and everything else marked as experimental.

The stable APIs will not break backwards compatibility across the 1.x line, and the extension APIs will issue deprecation warnings for at least a month in released code before they change. As we continue to move the project forward, we’ll seek to stabilize more and more of our experimental features, and we’ll also work to provide good extension points to allow for the creation of add-ons to Prawn that do not risk breaking on every new Prawn release.

If you are an extension author or someone interested in continuously updating your dependencies in your applications, be sure to check out our API compatibility notes. Your feedback and questions are welcome, especially between now and our 1.0 release on March 16.

Getting help if you need it

Please send support requests to us via the Prawn mailing list, or see if anyone is around in the #prawn channel on Freenode. To report problems or contribute code, check out prawnpdf/prawn on Github.

Acknowledgements

I’d like to thank Simon Traels Ravn, Pierre Paridans, Hartwig Brandl, and Robert Pelkey for contributing code for this release.

Enjoy the new code, and Happy Prawning everyone! -greg

Feb 4 '14

Practicing Ruby Issues 5.4, 5.5, and 5.6 released to public archives

Within the next few months, all of Practicing Ruby’s content will be freely available under the CC BY-SA license, and we will transition fully to an open-access publishing model.

Between now and then, we’re gradually releasing articles from behind the paywall, little-by-little. Today I’m happy to announce that Issues 5.4, 5.5, and 5.6 are now publicly available:

  • Issue 5.4 was written by Carol Nichols (@carols10cents), and covers the costs and benefits of choosing a traditional RPC-style JSON API vs. a Hypermedia API in the context of the rstat.us microblogging service.

  • Issue 5.5 was written by Jesse Storimer (@jstorimer) and covers how to build several of Ruby’s process spawning features using nothing but the low-level fork/exec UNIX pattern.

  • Issue 5.6 was a collaboration with Jordan Byron (@jordan_byron), the maintainer of practicingruby.com. It covers how we approach continuous improvement in our web development projects, with examples taken directly from our work on Practicing Ruby.

All of these articles have also been released in source-form on Github. Please see Practicing Ruby’s open source page for details on all of our F/OSS offerings, including our manuscripts repository.

Enjoy the articles, and happy hacking!

-greg

PS: Don’t forget that there are nearly 70 articles that have already been released to our public archives. If you haven’t checked those out yet, please do so and let us know what you think!

PPS: Although we’re making these learning materials freely available to all Ruby programmers, high quality independent publishing is a costly operation. The average Practicing Ruby article takes anywhere from 30-60 hours to produce, and our larger projects often take longer than that. You can support Practicing Ruby’s work by becoming a subscriber — it only costs $8/month but it makes a huge difference to us.

Feb 3 '14

Improving Practicing Ruby’s UX

A Practicing Ruby development update from Jordan Byron

You may have heard about some of the big service changes happening over at Practicing Ruby, but we’re also actively working on improving the project’s user experience. This article summarizes some of the recent changes we’ve made to practicingruby.com in the hopes of making it a more pleasant place for our subscribers and visitors.

Streamlined subscription process

Because it is often a customer’s first experience with a service, many companies make sure their registration process is as polished, streamlined, and as efficient as possible. Unfortunately, that was never the case for Practicing Ruby.

New subscribers had to run a gauntlet of 4 different steps, jumping between GitHub, Practicing Ruby, and their email. This is an awful lot of work just to be able to read an article, and we knew we could do better.

A few weeks ago, we figured out a way to untangle this mess:

  • Set sensible defaults for email notifications instead of showing many confusing checkboxes to the subscriber, while still allowing these settings to be changed later.

  • Postpone email confirmation until after the signup process, since we’re already validating the subscriber through Github anyway.

  • Use inline validations on email and credit card fields to catch errors before the subscribe button gets clicked.

These tweaks allowed us to reduce our process down to two steps: authorizing with GitHub, and filling out a single registration form:

Subscription Page

A simple, clean style is what we were going for, and we’re pretty happy with how this page came out. But beyond aesthetics, the streamlined workflow is the major highlight of this round of changes.

Article Discovery

Back in October, we revamped our library page by shifting focus from collections and volumes to recommend and recent articles. As a stop gap measure, we also added an archives page that included a brief description of every article we’ve ever published. While this worked for a time, we decided we could do better.

Our re-imagined library page now has recommend articles plus our entire archives all on one page:

Articles Page

We also added some randomized selections into the mix, which are recycled every time the page is reloaded.

We know that content discovery is still one of the biggest challenges we need to work on, but hopefully this will be the first step of many towards exposing the depth and variety of our archives.

Navigation

Over the years, we’ve experimented with several variations on Practicing Ruby’s navigation. Where we’re at now is surprisingly similar to where we started, albeit with more subtle color choices:

Nav over the years

The aesthetics are not what matters here, though. Our main goal has been to minimize distractions, and that meant getting rid of our fixed navigation bar, which followed you down the screen unnecessarily.

We’ve taken this idea of “content first” a step further on the article page:

Article nav

Here we hide the bar entirely creating a clean and focused reading experience. In its place we show a friendly little home icon which is visible from anywhere within the article, but does not get in the way.

Navigation elements may continue to change over time for us, because as we add and remove new features to the application, we’ll need to find some way to expose them. But we’re going to try to balance the tension between making available functionality visible and contextually relevant without becoming a source of distraction.

Minor incremental tweaks

In addition to all of those changes we’ve also started smoothing out some of Practicing Ruby’s rougher edges.

  • We are slowly transitioning away from the Folks font in favor of easier to read sans-serif.
  • Links are no longer “LOOK AT ME! CLICK ME!” red, but instead a cool off black.
  • When new subscribers are redirected to GitHub for authentication we now have a tiny facebox explaining what is about to happen so they aren’t confused when we suddenly send them off to GitHub

That just about wraps up the latest changes to Practicing Ruby’s UX. Our web application is open source and we <3 helping developers contribute to OSS for the first time so stop by and say hi!

Jan 31 '14

Why reader-funded, reader-focused publishing matters, Part 1

Now that we’ve decided to transition Practicing Ruby to an open-access model, I think it might be a good idea to do a few posts explaining why it was a closed service in the first place, and why it still is important for readers to fund it now that we’re dismantling the paywall as our primary business model.

I don’t know when I’ll be posting these blog posts, or how often, but I have a lot to say on the topic so I’ll just keep putting some notes out there as I find time for it.

The short story of why Practicing Ruby existed as a commercial service is because I am very much aversive to the typical way of making a “free as in beer” blog sustainable: relentless self-promotion and advertisement.

Here’s an example I drew from someone who’s blog I really like, and I’m showing it because it’s typical rather than exceptional in programming blogs. The red represents self-promotional materials, advertisements, social networking links etc, and the green represents the actual content. The whole image shows what the site looks like in one full screen of content from the top of the page:

We are so used to this on the internet, even with Adblockers installed, that you’ll probably think "What’s the big deal?"

Maybe if you don’t read into it, or if you assume that this is the price that you need to pay to get at the great content in the green box, or if you’re just used to it, none of this matters to you. Unfortunately, I’m a lot more sensitive and fragile than that.

What I see in this image is that the author is spending 50% or more of their screen space shoving products, services, and “personal branding” at me, and that distracts me from the probably totally awesome ideas they have in that green box.

If they just waited until the end of the post, and made sure their promotion was relevant and tasteful, I’d be a whole lot more likely to be interested rather than annoyed by their promotions. But even then, isn’t that what you see on every damn website now? It gets tiring.

Perhaps even worse is that you get the feeling that the reason why the blog exists is to support the stuff in the red, and the stuff in the green is just the loss-leader, the “free sample”. This isn’t a pleasant experience by a long shot, but I admit I’m as cynical as they come when talking about sales and marketing tactics.

Getting to the point, the contrast is that even on our publicly visible articles (i.e. the ones for non-subscribers) for Practicing Ruby, this is what our visitors see instead:

The top bar tells you what it is you’re looking at, i.e. it’s a promotion for Practicing Ruby itself, not some other vaguely related service or product. The second area only exists because contributors come to expect it, but even there I try to edit this so it says “Foo built this cool thing” rather than “BUY FOO’S STUFF NOW!”. If I could get away with it without making contributors feel uncomfortable, this section wouldn’t even exist, and I don’t put a byline for myself on any of my own articles.

So if you’re a subscriber, and you’re reading one of my articles, here’s what you see:

Let’s compare the two extremes side by side, to really let the point sink in:

On the left side, you are the sales target first, and the reader second. On the right side, you are just the reader. This difference exists because Practicing Ruby is in the business of content production, not content-marketing.

This is just one difference in what we’re trying to do, and if you’re not the kind of person who minds the typical blog experience when it comes to self-promotion and advertising, it may not convince you. But the general philosophy expressed behind this one example permeates through all that we do in Practicing Ruby.

I will be sure to cover more in future posts, but if this post resonated with you, consider voting with your wallet by becoming a Practicing Ruby subscriber.