<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0"><channel><atom:link rel="hub" href="http://tumblr.superfeedr.com/" xmlns:atom="http://www.w3.org/2005/Atom"/><description>what it all comes down to</description><title>starjuice.net</title><generator>Tumblr (3.0; @sheldonh)</generator><link>http://starjuice.net/</link><item><title>What Google thinks you should be getting this week-end. Do you...</title><description>&lt;img src="http://25.media.tumblr.com/d26541fb3c1a29b73db7115224677d0f/tumblr_mlvas9vhtX1qzmx46o1_500.png"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;What Google thinks you should be getting this week-end. Do you feel lucky, punk?&lt;/p&gt;</description><link>http://starjuice.net/post/48931199033</link><guid>http://starjuice.net/post/48931199033</guid><pubDate>Fri, 26 Apr 2013 17:55:00 +0300</pubDate></item><item><title>Dig this</title><description>&lt;p&gt;We have this custom in our office. Every now and then, someone will exclaim &amp;#8220;It&amp;#8217;s the X song!&amp;#8221; for some value of X, while a song with appropriate lyrics is playing.&lt;/p&gt;

&lt;p&gt;For example, Daniel Bedingfield&amp;#8217;s &lt;i&gt;I Gotta Get Thru This&lt;/i&gt; would almost certainly elicit an &amp;#8220;It&amp;#8217;s the Documentation At The End song!&amp;#8221;. Almost certainly. If that song somehow managed to stay on long enough to reach the chorus.&lt;/p&gt;

&lt;p&gt;Today, Bliss&amp;#8217;s &lt;i&gt;Monitor Access&lt;/i&gt; came on. Arguably, it&amp;#8217;s the Refactoring song, because of the &amp;#8220;Light that motherfucker up&amp;#8221;. But when it occurred to me to name the song, it was in the &amp;#8220;I know you gonna dig this&amp;#8221; loop.&lt;/p&gt;

&lt;p&gt;More specifically, it was in the &amp;#8220;Dig dig dig dig&amp;#8221; build up. So I called out &amp;#8220;It&amp;#8217;s the Node.js song!&amp;#8221;. See, I&amp;#8217;ve been punting node.js hard, and have been saying peeps will dig it. Sadly no dice, because as I said it, the track transitioned into the &amp;#8220;this this this&amp;#8221; bridge. So my timing was poor.&lt;/p&gt;

&lt;p&gt;Rory&amp;#8217;s was not. Without a moment&amp;#8217;s hesitation, he asked &amp;#8220;Because of this?&amp;#8221;&lt;/p&gt;

&lt;p&gt;JavaScript jokes. I kill me.&lt;/p&gt;</description><link>http://starjuice.net/post/48121138835</link><guid>http://starjuice.net/post/48121138835</guid><pubDate>Tue, 16 Apr 2013 17:26:58 +0300</pubDate></item><item><title>Conversation</title><description>&lt;p&gt;&lt;dl&gt;&lt;dt style="font-weight: bold;"&gt;&amp;lt;spook&amp;gt;&lt;/dt&gt;&lt;dd&gt; Surely there&amp;#8217;s a worthwhile replacement for google reader?&lt;/dd&gt;
&lt;dt style="font-weight: bold;"&gt;&amp;lt;sheldonh&amp;gt;&lt;/dt&gt;&lt;dd&gt; spook: conversation. it&amp;#8217;s awesome&lt;/dd&gt;
&lt;dt style="font-weight: bold;"&gt;&amp;lt;Helzibah&amp;gt;&lt;/dt&gt;&lt;dd&gt; there actually aren&amp;#8217;t that many because Google reader cornered the market so well&lt;/dd&gt;
&lt;dt style="font-weight: bold;"&gt;&amp;lt;Helzibah&amp;gt;&lt;/dt&gt;&lt;dd&gt; the existing ones are certainly shaping up before sign-off day though&lt;/dd&gt;
&lt;dt style="font-weight: bold;"&gt;&amp;lt;spook&amp;gt;&lt;/dt&gt;&lt;dd&gt; sheldonh: where is it?&lt;/dd&gt;
&lt;dt style="font-weight: bold;"&gt;&amp;lt;spook&amp;gt;&lt;/dt&gt;&lt;dd&gt;that&amp;#8217;s a shit name since it&amp;#8217;s not googleable &amp;gt;:(&lt;/dd&gt;
&lt;dt style="font-weight: bold;"&gt;* sheldonh weeps for the species.&lt;/dt&gt;&lt;dd&gt;&lt;/dd&gt;
&lt;/dl&gt;&lt;/p&gt;</description><link>http://starjuice.net/post/45904538713</link><guid>http://starjuice.net/post/45904538713</guid><pubDate>Thu, 21 Mar 2013 11:49:30 +0200</pubDate></item><item><title>"Decide in your heart of hearts what really excites and challenges you, and start moving your life in..."</title><description>“Decide in your heart of hearts what really excites and challenges you, and start moving your life in that direction. Every decision you make, from what you eat to what you do with your time tonight, turns you into who you are tomorrow, and the day after that. Look at who you want to be, and start sculpting yourself into that person. You may not get exactly where you thought you’d be, but you will be doing things that suit you in a profession you believe in. Don’t let life randomly kick you into the adult you don’t want to become.”&lt;br/&gt;&lt;br/&gt; - &lt;em&gt;&lt;a href="http://www.reddit.com/r/IAmA/comments/18pik4/i_am_astronaut_chris_hadfield_currently_orbiting/"&gt;Astronaut Chris Hadfield’s answer&lt;/a&gt; to the question “Any advice to a young person who wants to get into this field?”, from &lt;a href="http://www.reddit.com/r/IAmA/comments/18pik4/i_am_astronaut_chris_hadfield_currently_orbiting/"&gt;his spectacular reddit IAmA&lt;/a&gt; (via &lt;a class="tumblr_blog" href="http://apoplecticskeptic.com/"&gt;apoplecticskeptic&lt;/a&gt;)&lt;/em&gt;</description><link>http://starjuice.net/post/43571201538</link><guid>http://starjuice.net/post/43571201538</guid><pubDate>Wed, 20 Feb 2013 18:37:00 +0200</pubDate></item><item><title>Free will at the office</title><description>&lt;p&gt;&lt;em&gt;Me:&lt;/em&gt; Have you read &lt;a href="http://www.samharris.org/free-will"&gt;Free Will&lt;/a&gt; by Sam Harris?&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Rory:&lt;/em&gt; What&amp;#8217;s it about?&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Me:&lt;/em&gt; You&amp;#8217;re seriously asking me what a book called Free Will is about?&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Rory:&lt;/em&gt; Well you can&amp;#8217;t judge a book by its cover.&lt;/p&gt;
&lt;p&gt;PWNT!&lt;/p&gt;</description><link>http://starjuice.net/post/38455401024</link><guid>http://starjuice.net/post/38455401024</guid><pubDate>Fri, 21 Dec 2012 11:51:52 +0200</pubDate></item><item><title>DRM</title><description>&lt;ol&gt;&lt;li&gt;&lt;del&gt;Saving you time.&lt;/del&gt;&lt;/li&gt;
&lt;li&gt;&lt;del&gt;Saving you money.&lt;/del&gt;&lt;/li&gt;
&lt;li&gt;&lt;del&gt;Putting you first.&lt;/del&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;p&gt;Fuck off, it&amp;#8217;s not all about you.&lt;/p&gt;</description><link>http://starjuice.net/post/37632847883</link><guid>http://starjuice.net/post/37632847883</guid><pubDate>Mon, 10 Dec 2012 14:05:02 +0200</pubDate></item><item><title>"He doesn’t want you because you’re mean and evil. He wants me because I’m nice and..."</title><description>“He doesn’t want you because you’re mean and evil. He wants me because I’m nice and sweet and pure. So fuck off!”&lt;br/&gt;&lt;br/&gt; - &lt;em&gt;Robin, in &lt;a href="http://www.imdb.com/title/tt0089730/"&gt;Once Bitten&lt;/a&gt; (Thanks, Helzibah!)&lt;/em&gt;</description><link>http://starjuice.net/post/37399366348</link><guid>http://starjuice.net/post/37399366348</guid><pubDate>Fri, 07 Dec 2012 14:26:25 +0200</pubDate></item><item><title>Delicious irony from Airbrake.</title><description>&lt;img src="http://24.media.tumblr.com/tumblr_mehuhkNGZv1qzmx46o1_500.png"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;Delicious irony from &lt;a href="http://airbrake.io"&gt;Airbrake&lt;/a&gt;.&lt;/p&gt;</description><link>http://starjuice.net/post/37174312634</link><guid>http://starjuice.net/post/37174312634</guid><pubDate>Tue, 04 Dec 2012 08:39:20 +0200</pubDate></item><item><title>hi mate,I found a patch of yours, posted 2 years back. I have the very same problem, I want 12bits lenght vhids to keep them aligned with vlan ids. Did you face some side effect using it? I wonder why it was not merged to the branch. Any information you could give us is very welcome. Thanks in advance!</title><description>&lt;p&gt;I’m pretty sure we backed it out, but I don’t remember whether that was because it crashed FreeBSD, or because it crashed adjacent switches. Sorry, I know that’s not very helpful. In the end, it was cheaper to give up and throw more firewall pairs at the problem.&lt;/p&gt;</description><link>http://starjuice.net/post/36594201903</link><guid>http://starjuice.net/post/36594201903</guid><pubDate>Mon, 26 Nov 2012 17:40:33 +0200</pubDate></item><item><title>"The problem with managers is that they’re totally disconnected from the everyday doing getting done...."</title><description>“The problem with managers is that they’re totally disconnected from the everyday doing getting done. In a pinch, they wouldn’t be able to do it if they tried. They can only talk about doing it, because that’s the role they’ve had to play, for their boss who can’t talk about doing it at all. He can only talk about talking about doing it. The more abstract level. The work around the work around the work. Where the bets are made.”&lt;br/&gt;&lt;br/&gt; - &lt;em&gt;&lt;a href="http://whitneyhess.com/blog/2012/08/29/the-management-problem/"&gt;The Management Problem — Whitney Hess&lt;/a&gt;&lt;/em&gt;</description><link>http://starjuice.net/post/34831325410</link><guid>http://starjuice.net/post/34831325410</guid><pubDate>Fri, 02 Nov 2012 17:02:00 +0200</pubDate></item><item><title>"Another advantage of values is that they’re easy to fabricate.

So for testing it’s..."</title><description>“&lt;p&gt;Another advantage of values is that they’re easy to fabricate.&lt;/p&gt;

&lt;p&gt;So for testing it’s really fantastic that you can fabricate inputs, to test programs using any technology. You don’t have to get the class library that has the right classes and interfaces and relate it to the stuff that you used in your program. Your program takes data, you can now write another program that produces data to test it.&lt;/p&gt;

&lt;p&gt;And also for simulation purposes. So when you start raising your testing up to the next level, and you’re trying to drive your program to different kinds of situations, all you need to do is algorithmic generation of data to get a variety of simulation points for your program.&lt;/p&gt;

&lt;p&gt;If your program can only get into a particular state by a series of interactions through objects, how are you going to algorithmically drive that program to different kinds of test cases? It’s a huge problem. It’s just a mess.&lt;/p&gt;

&lt;p&gt;Whereas, if you can just algorithmically generate data, you’re done.&lt;/p&gt;

&lt;p&gt;And again, it goes to this point about places. With places, you have to emulate an operational interface. It’s a ton more work. And also when you want to drive it, you have to drive it through the operational interface instead of with data.&lt;/p&gt;”&lt;br/&gt;&lt;br/&gt; - &lt;em&gt;&lt;a href="http://www.infoq.com/presentations/Value-Values"&gt;Rich Hickey in &lt;em&gt;The Value of Values&lt;/em&gt;&lt;/a&gt;

&lt;p&gt;Rich provides clear context for this notion of &lt;em&gt;“Place”&lt;/em&gt; earlier in the talk.&lt;/p&gt;&lt;/em&gt;</description><link>http://starjuice.net/post/29823790964</link><guid>http://starjuice.net/post/29823790964</guid><pubDate>Mon, 20 Aug 2012 14:59:00 +0300</pubDate></item><item><title>@qcoding I&amp;#8217;ve heard a rigid bottom leads to pain. Good luck! :-)— Sheldon Hearn (@sheldonh)...</title><description>&lt;blockquote class="twitter-tweet" data-in-reply-to="235589440758751234"&gt;&lt;p&gt;&lt;a href="https://twitter.com/qcoding"&gt;&lt;s&gt;@&lt;/s&gt;&lt;b&gt;qcoding&lt;/b&gt;&lt;/a&gt; I&amp;#8217;ve heard a rigid bottom leads to pain. Good luck! :-)&lt;/p&gt;— Sheldon Hearn (@sheldonh) &lt;a href="https://twitter.com/sheldonh/status/235604909305778177" data-datetime="2012-08-15T05:12:42+00:00"&gt;August 15, 2012&lt;/a&gt;&lt;/blockquote&gt;
&lt;script src="//platform.twitter.com/widgets.js" charset="utf-8"&gt;&lt;/script&gt;</description><link>http://starjuice.net/post/29463533235</link><guid>http://starjuice.net/post/29463533235</guid><pubDate>Wed, 15 Aug 2012 08:15:00 +0300</pubDate></item><item><title>Flex for flexibility</title><description>&lt;p&gt;Robert C. Martin (Uncle Bob) wrote something in &lt;a href="http://amzn.com/0137081073"&gt;The Clean Coder&lt;/a&gt; that has rocked my little world:&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;Much has been written about the principles and patterns of software design that support structures that are flexible and maintainable. Professional software developers commit these things to memory and strive to conform their software to them. But there&amp;#8217;s a trick to this that far too few software developers follow: &lt;strong&gt;If you want your software to be flexible, you have to flex it!&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The only way to prove that your software is easy to change is to make easy changes to it. And when you find that the changes aren&amp;#8217;t as easy as you thought, you refine the design so that the next change is easier.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;I&amp;#8217;m seeing the benefits of this kind of thinking with &lt;a href="https://github.com/sheldonh/interface_enforcement"&gt;interface_enforcement&lt;/a&gt;, a library I&amp;#8217;m developing for elective test enforcement in Ruby.&lt;/p&gt;

&lt;h4&gt;The wall of doubt&lt;/h4&gt;

&lt;p&gt;I started out by implementing interface enforcement as a proxy. This produced code that seemed fine. However, I had a few doubts about distribution of responsibility and clarity of abstraction, and I couldn&amp;#8217;t think my way through them.&lt;/p&gt;

&lt;p&gt;Experimental refactoring helped a lot. I extracted ad absurdum from one bloated family of classes, and gained insight into the true nature of the family. Then I inlined most of what I&amp;#8217;d abstracted, but now into fewer, more clearly defined collaborators.&lt;/p&gt;

&lt;p&gt;Still, there remained an opaque core in there, that I couldn&amp;#8217;t break into.&lt;/p&gt;

&lt;h4&gt;The hammer&lt;/h4&gt;

&lt;p&gt;So I took Uncle Bob&amp;#8217;s advice one step further and started working on an alternative enforcement strategy prematurely. I say prematurely because I was pretty sure I would never ship it, and the primary strategy of proxying wasn&amp;#8217;t finished by a long shot.&lt;/p&gt;

&lt;p&gt;The additional strategy is enforcement by injection. How it works doesn&amp;#8217;t contribute to my point. What matters is that it&amp;#8217;s a different way to &lt;em&gt;apply&lt;/em&gt; an interface to an object. It&amp;#8217;s a different &lt;em&gt;delivery mechanism&lt;/em&gt; for the core value of the library.&lt;/p&gt;

&lt;h4&gt;The breakthrough&lt;/h4&gt;

&lt;p&gt;This additional use case applied pressure to my code from a different angle. All of a sudden, inappropriate responsibilities and missing abstractions leaped out at me. Being forced to distinguish an interface from the method of applying it exposed opportunities for valuable refactorings toward cleaner code in surprising places.&lt;/p&gt;

&lt;p&gt;I&amp;#8217;m pretty sure that the injection strategy is a dead end. Sure, it will make automatic interface enforcement possible. But I&amp;#8217;m not sure how desirable automatic enforcement is, and injection is brittle with dynamic test subjects. Proxying is verbose, but I have a strong intuition that it&amp;#8217;ll be bullet proof.&lt;/p&gt;

&lt;h4&gt;The insight&lt;/h4&gt;

&lt;p&gt;No, the primary value of an additional delivery mechanism is not in its usefulness as product. The value is in its usefulness as design constraint. Having pressure applied from a different angle highlights inappropriate coupling and complicated decoupling.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;If you want your software to be flexible, you have to flex it!&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;I know Uncle Bob&amp;#8217;s advice was intended to support continual refactoring. But sometimes great advice extends to multiple levels. And on this young project, I&amp;#8217;m already benefiting from developing two delivery strategies, even though I plan to ship only one. And who knows? Maybe the second strategy will turn out better than I can imagine right now. Only more use cases and refactorings will tell.&lt;/p&gt;

&lt;p&gt;P.S. Okay, I lie. I don&amp;#8217;t plan to ship &lt;a href="https://github.com/sheldonh/interface_enforcement"&gt;interface_enforcement&lt;/a&gt; at all. It&amp;#8217;s an exploration, and clearly disclaims itself as such on the front page. Shipping isn&amp;#8217;t the point. :-P&lt;/p&gt;</description><link>http://starjuice.net/post/29352700936</link><guid>http://starjuice.net/post/29352700936</guid><pubDate>Mon, 13 Aug 2012 22:45:36 +0300</pubDate></item><item><title>"When I see creators constrained by their tools and their ideas compromised        
I don’t say..."</title><description>“&lt;p&gt;When I see creators constrained by their tools and their ideas compromised        
I don’t say “Oh good, an opportunity to make a product, an opportunity               
to start a business or an opportunity to do research or contribute to
a field.”  I’m not excited about finding a problem to solve.  I’m not
in this for the joy of making things.&lt;/p&gt;

&lt;p&gt;Ideas are very precious to me.  And when I see ideas dying it hurts.
I see a tragedy.  To me it feels like a moral wrong.  It feels like
an injustice.  And if I think there’s anything I can do about it I feel
it’s my responsibility to do so.&lt;/p&gt;

&lt;p&gt;Not opportunity, but responsibility.  Now this is just my thing.  I’m not
asking you to believe in this the way that I do.  My point here is that
these words that I’m using, injustice, responsibility, moral wrong;
these aren’t the words we normally hear in a technical field.&lt;/p&gt;

&lt;p&gt;We do hear these words in association with social causes.  So things
like censorship, gender discrimination, environmental destruction; we
recognize these things as moral wrongs.  Most of us wouldn’t witness a
civil rights violation and think “Oh good, an opportunity.”  I hope not.
Instead we’ve been very fortunate to have people throughout history who
recongized these social wrongs and saw it as their responsibility to
address them.&lt;/p&gt;

&lt;p&gt;And so there’s this activist lifestyle, where a person dedicates
themselves to fighting for a cause they believe in.  And the purpose of
this talk is to tell you that this activist lifestyle is not just for
social activism.&lt;/p&gt;

&lt;p&gt;As a technologist, you can recognize a wrong in the world.  You could
have a vision for what a better world could be and you can dedicate
yourself to fighting for a principle.  Social activists typically fight
by organizing, but you can fight by inventing.&lt;/p&gt;”&lt;br/&gt;&lt;br/&gt; - &lt;em&gt;&lt;a href="http://youtu.be/PUv66718DII"&gt;Bret Victor in &lt;em&gt;Inventing on Principle&lt;/em&gt;&lt;/a&gt;&lt;/em&gt;</description><link>http://starjuice.net/post/29331502968</link><guid>http://starjuice.net/post/29331502968</guid><pubDate>Mon, 13 Aug 2012 14:28:00 +0300</pubDate></item><item><title>"Objects were made to encapsulate IO devices. So there’s a screen, but I can’t touch the..."</title><description>“&lt;p&gt;&lt;a href="http://en.wikipedia.org/wiki/Object_(computer_science)"&gt;Objects&lt;/a&gt; were made to encapsulate IO devices. So there’s a screen, but I can’t touch the screen, so there’s this object. And there’s a mouse, but I can’t touch the mouse, so there’s this object. &lt;/p&gt;

&lt;p&gt;That’s all they’re good for. They were never supposed to be applied to information, and when you apply them to information, it’s just wrong.&lt;/p&gt;

&lt;p&gt;But I can now say it’s wrong for a reason. It’s wrong because it’s complex. In particular, it ruins your ability to build generic data manipulators. If you leave data alone, you can build things once that manipulate data and you can reuse them all over the place. You know they’re right once, and you’re done.&lt;/p&gt;

&lt;p&gt;The other thing about it, which also applies to &lt;a href="http://en.wikipedia.org/wiki/Object-relational_mapping"&gt;Object Relational Mapping&lt;/a&gt;, is that it will tie your logic to representational things. Again: tying; complecting; intertwining.&lt;/p&gt;

&lt;p&gt;So represent data as data. Please, start using maps and sets directly. Don’t feel like “I have to write a class now, because I have a new piece of information.”&lt;/p&gt;”&lt;br/&gt;&lt;br/&gt; - &lt;em&gt;&lt;a href="http://www.infoq.com/presentations/Simple-Made-Easy"&gt;Rich Hickey in &lt;em&gt;Simple Made Easy&lt;/em&gt;&lt;/a&gt;&lt;/em&gt;</description><link>http://starjuice.net/post/27763968527</link><guid>http://starjuice.net/post/27763968527</guid><pubDate>Sun, 22 Jul 2012 17:51:41 +0300</pubDate></item><item><title>"When you write your tests first, you have to design the production code to be accessible from the..."</title><description>“&lt;p&gt;When you write your tests first, you have to design the production code to be accessible from the tests. Since you haven’t written the production code yet, the tests have a tremendous influence on the design of the production code. And that influence is to make the production code testable. Writing tests first makes production code testable. And another word for testable is decoupled.&lt;/p&gt;

&lt;p&gt;The only way to test lines of code is to access them from the tests. But the only way to access them from the tests is to decouple the functions that contain them. So the act of writing your tests first causes you to have a system that is far less coupled than otherwise. In short, you get a better design simply by writing your tests first.&lt;/p&gt;”&lt;br/&gt;&lt;br/&gt; - &lt;em&gt;&lt;a href="http://www.cleancoders.com/codecast/clean-code-episode-6-part-1/show"&gt;Robert C. Martin in &lt;em&gt;Clean Code, Episode 6 - TDD - Part 1&lt;/em&gt;&lt;/a&gt;&lt;/em&gt;</description><link>http://starjuice.net/post/27704199078</link><guid>http://starjuice.net/post/27704199078</guid><pubDate>Sat, 21 Jul 2012 20:11:00 +0300</pubDate></item><item><title>Using the rspec documentation</title><description>&lt;p&gt;I&amp;#8217;ve seen a lot of newcomers to rspec trip up over the documentation; where to find it, and how to become familiar with it. The two common mistakes are:

&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Reading the documentation for rspec-1 instead of rspec-2.&lt;/li&gt;
&lt;li&gt;Getting lost in the API documentation, instead of the user documentation.&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;With a little guidance, it&amp;#8217;s easy to become familiar with the rspec documentation. Start by knowing that it&amp;#8217;s documented at a site called relishapp.com, which hosts documentation in the form of cucumber test output, for several projects, including rspec. So rspec is at &lt;a href="https://www.relishapp.com/rspec/"&gt;relishapp.com/rspec/&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;With that clear, I recommend that you perform an initial review of the structure and key elements of the documentation up front. The following review, which should take you less than half an hour, will set you up for easily finding the documentation you need when you&amp;#8217;re knee deep in testing.&lt;/p&gt;

&lt;dl&gt;&lt;dt&gt;&lt;a href="https://www.relishapp.com/rspec/docs/gettingstarted"&gt;Getting Started&lt;/a&gt;&lt;/dt&gt;
&lt;dd&gt;Start here and bookmark the site. Notice the package names on the left side of the page, RSpec Core, Expectations, Mocks and Rails. Once you&amp;#8217;ve read the getting started advice on the page, you can click through to Rspec Core.&lt;/dd&gt;

&lt;dt&gt;&lt;a href="https://www.relishapp.com/rspec/rspec-core/docs"&gt;Rspec Core&lt;/a&gt;&lt;/dt&gt;
&lt;dd&gt;This is an index of core topics. Make a note of all the topics available, then read at at least:
  &lt;ul&gt;&lt;li&gt;&lt;a href="https://www.relishapp.com/rspec/rspec-core/docs/example-groups"&gt;Example Groups&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href="https://www.relishapp.com/rspec/rspec-core/docs/command-line"&gt;Command Line&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href="https://www.relishapp.com/rspec/rspec-core/docs/hooks"&gt;Hooks&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href="https://www.relishapp.com/rspec/rspec-core/docs/helper-methods"&gt;Helper Methods&lt;/a&gt;&lt;/li&gt;
  &lt;/ul&gt;&lt;/dd&gt;

&lt;dt&gt;&lt;a href="https://www.relishapp.com/rspec/rspec-expectations/docs"&gt;Rspec Expectations&lt;/a&gt;&lt;/dt&gt;
&lt;dd&gt;The whole .should / .should_not vibe. You need to know about expectations (i.e. .should and .should_not) and matchers (e.g. .have(3).elements). Expectations are described on this page, and matchers are described under &lt;a href="https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers"&gt;Built in matchers&lt;/a&gt; and &lt;a href="https://www.relishapp.com/rspec/rspec-expectations/docs/custom-matchers"&gt;Custom matchers&lt;/a&gt;. Notice the list of Built in matchers; you&amp;#8217;ll be coming back to this list a lot.&lt;/dd&gt;

&lt;dt&gt;&lt;a href="https://www.relishapp.com/rspec/rspec-mocks/docs"&gt;Rspec Mocks&lt;/a&gt;&lt;/dt&gt;
&lt;dd&gt;Rspec&amp;#8217;s support for faking out behaviour . Test doubles stand in for real objects, and rspec lets you define test double objects, as well as stubbing out methods on specific objects and and classes. Read at least this page, &lt;a href="https://www.relishapp.com/rspec/rspec-mocks/docs/message-expectations"&gt;Message expectations&lt;/a&gt; and &lt;a href="https://www.relishapp.com/rspec/rspec-mocks/docs/argument-matchers"&gt;Argument matchers&lt;/a&gt;.&lt;/dd&gt;
&lt;/dl&gt;&lt;p&gt;With this review under your belt, you&amp;#8217;ll have seen enough of the structure of rspec to know what kind of thing you need to read about (e.g. a built in matcher) and where to find documentation for it. Happy testing!&lt;/p&gt;</description><link>http://starjuice.net/post/27615476090</link><guid>http://starjuice.net/post/27615476090</guid><pubDate>Fri, 20 Jul 2012 10:26:00 +0300</pubDate></item><item><title>Active Records vs Objects</title><description>&lt;p&gt;The following started as a comment response to Uncle Bob&amp;#8217;s &amp;#8220;&lt;a href="http://blog.objectmentor.com/articles/2007/11/02/active-record-vs-objects"&gt;Active Record vs Objects&lt;/a&gt;&amp;#8221;, but the comment trail is so littered with spam that I feared it would be lost.&lt;/p&gt;

&lt;p&gt;In the article, Uncle Bob illuminates the flexibility cost of Active Record, providing background for its negative impact on &lt;a href="http://blog.8thlight.com/uncle-bob/2012/08/13/the-clean-architecture.html"&gt;The Clean Architecture&lt;/a&gt; pattern he presented in: &lt;a href="http://confreaks.com/videos/759-rubymidwest2011-keynote-architecture-the-lost-years"&gt;Architecture: The Lost years&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;If you&amp;#8217;re a long-time Rails developer, you will probably experience two things as you read Uncle Bob&amp;#8217;s concerns and watch the video:&lt;/p&gt;

&lt;ul&gt;&lt;li&gt;an intuitive &amp;#8220;Aha, so THAT&amp;#8217;s the problem!&amp;#8221; feeling, but also&lt;/li&gt;
&lt;li&gt;a dread &amp;#8220;But how else would persistence work in a Rails app?&amp;#8221; sense.&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;Both responses are well-placed; don&amp;#8217;t let the conflict stop you thinking! After all, what you&amp;#8217;re struggling for is valuable: to have all the dependencies in your application pointing inward toward the domain model.&lt;/p&gt;

&lt;p&gt;I don&amp;#8217;t have the answers. I&amp;#8217;m just embarking on the journey myself. And here&amp;#8217;s how I plan to tackle it.&lt;/p&gt;

&lt;p&gt;Start by designing your domain model with plain old Ruby objects, with no regard for persistence, making heavy use of &lt;a href="http://pragprog.com/articles/tell-dont-ask"&gt;Tell-Don&amp;#8217;t-Ask&lt;/a&gt;. Once your domain model starts to look interesting enough to be worth persisting, then take a look at how you might go about persisting the data from your business objects without attaching additional behaviour to them. At all.&lt;/p&gt;

&lt;p&gt;Take a look at the &lt;a href="http://martinfowler.com/eaaCatalog/repository.html"&gt;Repository&lt;/a&gt; and &lt;a href="http://martinfowler.com/eaaCatalog/rowDataGateway.html"&gt;Row Data Gateway&lt;/a&gt; patterns and consider hand-coding them for a few iterations to get a feel for what you&amp;#8217;d want from a library.&lt;/p&gt;

&lt;p&gt;There seem to be three concerns that need to be addressed:&lt;/p&gt;

&lt;ul&gt;&lt;li&gt;The Repository,&lt;/li&gt;
&lt;li&gt;the Row Data Gateways, and&lt;/li&gt;
&lt;li&gt;mapping data from the Row Data Gateways into your business objects.&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;Repository implementations exist. My gut feeling is that the active_record library probably works really well as a Row Data Gateway, as would data_mapper or just about any Ruby ORM. Mapping the data into business objects is a responsibility that must lie outside the business objects themselves if we are to maintain the correct direction of dependencies. But the business objects need to provide an interface to their data, violating Tell-Don&amp;#8217;t-Ask.&lt;/p&gt;

&lt;p&gt;And so I think our sense of dread stems from the fear of not being able to handle the data mapping concern correctly. Where does this responsibility lie? Observing the &lt;a href="http://en.wikipedia.org/wiki/Single_responsibility_principle"&gt;Single Responsibility Principle&lt;/a&gt;, it definitely doesn&amp;#8217;t belong in the business objects or the Row Data Gateways. My guess is that mapping belongs in adaptors that are private to the repository, leaning on a mild Tell-Don&amp;#8217;t-Ask violation in the business objects.&lt;/p&gt;

&lt;p&gt;Dan Bernier provides another valuable perspective on this sense of dread. In &lt;a href="http://invisibleblocks.com/2012/05/08/out-of-love-with-active-record/"&gt;Out of Love with Active Record&lt;/a&gt;, he demonstrates that the Repository pattern forces us to think about our applications&amp;#8217; data access patterns in ways that we have not had to think about them with fat active_record models. This thinking is hard, and I think it&amp;#8217;ll pay off.&lt;/p&gt;

&lt;p&gt;Here are some working examples that have captured my interest and gotten me thinking about how I&amp;#8217;d like to solve the problem:&lt;/p&gt;

&lt;ul&gt;&lt;li&gt;Shane Isbell&amp;#8217;s hand-coded example, &lt;a href="http://www.jroller.com/random7/entry/simplifying_ruby_on_rails_queries"&gt;Simplifying Ruby On Rails Queries With The Repository Pattern&lt;/a&gt;&lt;/li&gt;

&lt;li&gt;A framework that uses dependency injection (light coupling), &lt;a href="https://github.com/braintree/curator"&gt;Curator&lt;/a&gt;&lt;/li&gt;

&lt;li&gt;A framework that promotes complete decoupling, &lt;a href="https://github.com/zombor/Arden"&gt;Arden&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;I know of two books that deal with this issue (inter alia). I&amp;#8217;ve only read Objects on Rails, but plan to purchase Clean Ruby soon too. The way these authors implement &lt;a href="http://www.artima.com/articles/dci_vision.html"&gt;Data Context Interaction&lt;/a&gt; to separate persistence out of business objects looks promising.&lt;/p&gt;

&lt;ul&gt;&lt;li&gt;Avdi Grimm&amp;#8217;s &lt;a href="http://objectsonrails.com/"&gt;Objects on Rails&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Jim Gay&amp;#8217;s &lt;a href="http://clean-ruby.com/"&gt;Clean Ruby&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;And remember, the fact that it&amp;#8217;s hard doesn&amp;#8217;t always mean you&amp;#8217;re doing it wrong.&lt;/p&gt;</description><link>http://starjuice.net/post/27254089033</link><guid>http://starjuice.net/post/27254089033</guid><pubDate>Sun, 15 Jul 2012 14:03:00 +0300</pubDate></item><item><title>Photo</title><description>&lt;img src="http://25.media.tumblr.com/tumblr_m5yi9bKAvp1qzmx46o1_500.jpg"/&gt;&lt;br/&gt;&lt;br/&gt;</description><link>http://starjuice.net/post/25563667052</link><guid>http://starjuice.net/post/25563667052</guid><pubDate>Thu, 21 Jun 2012 10:31:58 +0300</pubDate></item><item><title>Creationists believe God put dinosaur bones in the ground to test our faith. I believe God put...</title><description>&lt;blockquote class="twitter-tweet"&gt;&lt;p&gt;Creationists believe God put dinosaur bones in the ground to test our faith. I believe God put Creationists here to test our sense of humor.&lt;/p&gt;— Scott Weinberg (@scottEweinberg) &lt;a href="https://twitter.com/scottEweinberg/status/210259600065310720" data-datetime="2012-06-06T06:39:29+00:00"&gt;June 6, 2012&lt;/a&gt;&lt;/blockquote&gt;
&lt;script src="//platform.twitter.com/widgets.js" charset="utf-8"&gt;&lt;/script&gt;</description><link>http://starjuice.net/post/24536000286</link><guid>http://starjuice.net/post/24536000286</guid><pubDate>Wed, 06 Jun 2012 15:40:57 +0300</pubDate></item></channel></rss>
