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
.
Jul 27 '14

Prawn 1.2 released!

Today I published a new release of the Prawn PDF toolkit. It is mostly backwards compatible with 1.1, and includes some bug fixes, internal cleanup, and minor improvements.

Be sure to check out CHANGELOG to see exactly what changed.

Should you upgrade to Prawn 1.2?

If you are already running Prawn 0.15, 1.0, or 1.1, absolutely! If you are using tables in your PDFs, you’ll need to install the prawn-table gem and then require "prawn/table" to make your code work, but everything else should be backwards compatible.

If you’ve been using an older version of Prawn, you should treat your code as legacy and not assume that you’ll be able to upgrade without something breaking. Consider trying out our newer releases on your next project instead.

What will happen in future 1.x releases?

We’re going to keep working mostly on internal restructuring for the next several releases, in the hopes of making Prawn easier to extend through third-party gems, and also to make our own maintenance efforts easier. We’re going to either stabilize, extract, or cut any of the remaining experimental features between now and the far-future 2.0 release, but we’ll do it gradually so that it minimizes impact on Prawn’s users.

We have very limited time for the project currently, but little by little we hope to make Prawn better for everyone. Be sure to ask if you’re interested in helping out.

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 Mansfield, James Coleman, Pete Sharum, Christian Hieke, and Hartwig Brandl for their help with this release.

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

Jul 20 '14

Archaeological notes on The Law of Demeter

The Law of Demeter comes up often in software design conversations. Although many find the rule to be a helpful tool for eliminating tight coupling in the code, some treat it as an immutable law that isn’t subject to adaptation or scrutiny. This is the cause for much confusion, and the occasional controversy.

In The Law of Demeter: Some archaeological notes, David A. Black returns to the original source materials and conversations that established the Law of Demeter. Through a combination of intellectual curiosity and careful analysis, David shows that the Law of Demeter is something far more dynamic than what modern interpretations give it credit for, and hints at how the ideas behind it can be used for developing other kinds of rules for code organization and design practices.

Originally available to Practicing Ruby subscribers only, this article is now available to everyone. Go read it, and if you like what you see, check out the dozens of other articles that have been publicly released on practicingruby.com.


All articles on Practicing Ruby are reader-funded and reader-focused. We’re an independent publication and will never run advertisements.

If you’ve learned something useful from the content we’ve published, support our future work by subscribing. For only $8/month, you can help us make the programming world a more thoughtful and interesting place.

Jun 27 '14

Prawn 1.1.0 Released!

Today I published a new release of the Prawn PDF toolkit. It is mostly backwards compatible with 1.0.0, and includes some bug fixes, internal cleanup, and minor improvements.

Be sure to check out CHANGELOG to see exactly what changed.

Should you upgrade to Prawn 1.1?

If you are already running Prawn 0.15 or 1.0, absolutely! If you are using tables in your PDFs, you’ll need to require "prawn/table" to make your code work, but everything else should be backwards compatible.

If you’ve been using an older version of Prawn, you should treat your code as legacy and not assume that you’ll be able to upgrade without something breaking. Consider trying out our newer releases on your next project instead.

What will happen in future 1.x releases?

We’re going to keep working mostly on internal restructuring for the next several releases, in the hopes of making Prawn easier to extend through third-party gems, and also to make our own maintenance efforts easier. We’re going to either stabilize, extract, or cut any of the remaining experimental features between now and the far-future 2.0 release, but we’ll do it gradually so that it minimizes impact on Prawn’s users.

We have very limited time for the project currently, but little by little we hope to make Prawn better for everyone. Be sure to ask if you’re interested in helping out.

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 Evan Sharp, Uwe Kubosch, Deron Meranda, and Hartwig Brandl for their help with this release.

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

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