Feeds:
Posts
Comments

Archive for the ‘Rails’ Category

Fluent Interfaces in Ruby

I had a chance to look at what Neal Ford had to write on Fluent Interfaces in his book The Productive Programmer.  Granted, I heard him cover it before at one of his presentations at the No Fluff Just Stuff conference in Reston, VA.
Basically, fluent interfaces have setter functions return self (or this in Java).  [...]

Read Full Post »

Safer Monkey Patching

General Monkey Patching
In Java, classes are defined up front, compiled into bytecode, and remain unaltered.  Every instance created from a class adheres to that class.
Of course, Ruby is different.  In Ruby, you can define a class and later redefine it (and of course, you can modify individual instances of a class so that they differ [...]

Read Full Post »

The following code uses a class factory to create a new class along with getter and setters for the fields passed into it:
class ClassFactory
def self.create_class(new_class, *fields)
c = Class.new do
fields.each do |field|
define_method field.intern do
[...]

Read Full Post »

How Ruby Differs From Java

The biggest difference really comes down to metaprogramming.  While Java offers introspection (which was a major step up from C++), Ruby offers the ability to dynamically define new classes and methods without recompilation.  Additionally, the ability to hook into a module being included or a new class being sub-classed combined with metaprogramming adds extremely powerful [...]

Read Full Post »

I saw the Pragmatic Wetware book by Andy Hunt.  “Hmm”, I thought, “a book on the human brain and how it works.  Interesting, but I have too much else to read and study.” Wrong.
Apparently I had missed the pragmatic part of that title.  As I am averaging three to five technical books a month right [...]

Read Full Post »

Regular expressions were not my strong suit, but I felt it was important to master them (or at least reach competency).  So, on a flight back from Walt Disney World last summer, I studied them from one of my Ruby books and summarized them in detail in Evernote (to refer back to them).  I thought [...]

Read Full Post »

In my last blog on this, I discussed some of the Capacity best practices.  I am now going to briefly touch on the remainder of the book:

Networking. The section talks about best practices in a data center.  This includes different networks for different functions (e.g., production, admin) and different NIC cards on different machines to [...]

Read Full Post »

In my last blog I discussed some of the stability anti-patterns of Michael Nyguard’s excellent but tragically misnamed book “Release It!”  I finished reading the patterns and best practices portion, discussed below:

Timeouts.  Traditionally a thread blocks until the resource is ready, but this can be destabilizing if the resource is never ready.  Thus, a thread [...]

Read Full Post »

Practices of an Agile Developer

I have been reading “Practices of an Agile Developer” by Venkat Subramaniam over a few lunches.  At 200 or so pages, it is a quick read (I am 2/3 through).
The problem?  I have not been learning anything new.
But is that really a problem?  The book is excellent, pragmatic, and full of good tips and ways [...]

Read Full Post »

This blog is hosted on WordPress, which takes care of so many operational details for me.  Essentially, if I can use a word processor, I host my blog on WordPress.
Now, I am creating my own virtual Ubuntu server on SliceHost to host my Rails app.  There is so much more to think about!  I have [...]

Read Full Post »

Older Posts »