Journaling on estrip is free and easy. get started today

Last Visit 2012-11-09 18:06:58 |Start Date 2005-09-01 15:28:14 |Comments 1,246 |Entries 866 |Images 935 |Sounds 4 |Videos 95 |Mobl 173 |Theme |

Category: programming

10/22/07 11:48 - 66ºF - ID#41757

RSpec with Autotest

(You can totally skip reading this journal, I am writing this for me and my happiness.)

This is the best thing ever. I am so glad that I took the time to look at this a few weeks ago after sort of putting it off for the last six months. I won't bore you all with the details (that's what (e:james) is around for), but I found a super awesome new tool for testing programs, I can't believe I didn't check it out six months ago when I first heard about it. (rspec)

Basically, instead of unit tests you write a live spec, that is continuously run as you code that notifies you of the status of all your tests open each save of a file. So now I don't even have to run my tests anymore, the freakin computer does it for me, and pops up a discrete message in the corner of the screen letting me know what's going on.

Happy tests:
image

Sad tests:
image

And writing tests with the new tool is also so much cleaner and nicer.

Old way (just random made up examples):

def test_something
  File.open("/tmp/file", 'W') do |f|
    f << test_data
  end 
  assert_equal "/tmp/file", Retrieve.file, "Should have found it!"
end


New way:

it "should find file path" do
  Retrieve.file.should equal("/tmp/file")
end


But, that is a bad example because it doesn't show all the mocking, like:

Retrieve.file("config") # => can not find
Retrieve.stub!(:file).expects("config").and_returns("/tmp/file")
Retrieve.file("config") # => "/tmp/file"


So that you can completely decouple all your tested classes from each other and external output, thus only testing very specific pieces of logic, and making testing ten times easier because you never have to set up infrastructure for it to work.

You can also just have empty tests, which act like a todo list - they show up when the tests run as pending, so it also acts like a roadmap.

image

print add/read comments

Permalink: RSpec_with_Autotest.html
Words: 350
Location: Buffalo, NY


Category: halloween

10/21/07 08:41 - 69ºF - ID#41739

Pumpkins

I love Halloween, mostly for the pumpkins, the pumkin carving, and the pumpkin-seed eating. (e:James) and I went and bought pumpkins today, yay!!!

Also I think I will be dressing up for the Halloween party as either a leopard (in honor of Mac OS X 10.5 Leopard) or else Speed Racer. I'll have to see which I can scramble to put together this week.

Finding a blue helmet might be harder then finding spots.
print add/read comments

Permalink: Pumpkins.html
Words: 74
Location: Buffalo, NY


Category: cars

10/19/07 10:10 - 62ºF - ID#41719

My Fellow Americans

Our odometer hit 8888.

image

I'm just saying.
print add/read comments

Permalink: My_Fellow_Americans.html
Words: 8
Location: Buffalo, NY


Category: programming

10/18/07 11:20 - 73ºF - ID#41706

Martin Fowler

LOLcoder

image
print add/read comments

Permalink: Martin_Fowler.html
Words: 3
Location: Buffalo, NY


Category: buffalo

10/18/07 10:50 - 73ºF - ID#41705

Allen Street


image
print add/read comments

Permalink: Allen_Street.html
Words: 2
Location: Buffalo, NY


Category: computers

10/17/07 04:30 - 68ºF - ID#41692

Leopard

So, I preordered Apple Mac OS X 10.5 Leopard (™, ®, etc). This is what I'm looking forward to:

- Spaces / multiple workspaces
- Tabbed, internationalized terminal
- Time Machine
- Death of Metal
- Finder Improvements
- Learning Objective C 2.0 now that it's got GC
- Playing with the Cocoa-Ruby bridge.

But also to some new 10.5 only apps that are coming out shortly.
print add/read comments

Permalink: Leopard.html
Words: 61
Location: Buffalo, NY


Category: sick

10/15/07 05:14 - 59ºF - ID#41665

I Am Displeased.

I do not feel very good, I think it is a cold or the flu. This displeases me greatly. I think it's the fault of (e:enknot) who did not save me any flu vaccine.

I was fine this morning, went to work on-site at a client's all morning and then all of a sudden I'm congested and cough-y. Sniffling too.

This is awesome.
print add/read comments

Permalink: I_Am_Displeased_.html
Words: 64
Location: Buffalo, NY


Category: buffalo

10/14/07 03:26 - 56ºF - ID#41645

Around Town

When I started programming with Ruby in 2004, there was only one book about it, now it has its own shelf.
image

Pink Kitchen-Aid appliances at Premier:
image

James' favortite Chinese place:
image

UNANONNA (#1 Grandma?)
image

Balloon Architecture Book / Kit (on clearance shelf):
image

print add/read comments

Permalink: Around_Town.html
Words: 48
Location: Buffalo, NY


Category: buffalo

10/13/07 07:05 - 55ºF - ID#41630

10/12 October Storm Anniversary

Snow starts to fall:

image

And fall and fall and fall:

image

image

image

image

image

image

image

And so it went:

image

image

image

image

image

image

image

image

image



print add/read comments

Permalink: 10_12_October_Storm_Anniversary.html
Words: 73
Location: Buffalo, NY


Category: religion

10/12/07 12:06 - 46ºF - ID#41612

Hate the Religion, not the Religionist?

I really hate dislike certain aspects of religion. I am sort of a Buddhist, and on again off again go to the local Zen group for their services. The meditation is really useful, I tend to be sort of high strung or on edge and it helps balance me out. But the chanting and whatnot gets to be too much and so I tend to not go.

It just all seems made up and arbitrary, and anyone who claims that something special has been revealed to them I tend to think is misguided or confusing a psychological process for an external communication.

Zen is the closest that I would come to participating in religion as a devotee, and actually I spent a couple months in a lay-monastic situation when I was younger, which was very intense and useful. Most other religions are too externally imposive for my tastes. I just lump all that together with other things that don't make sense unless you're in a self-referential system. It's 'Sit and figure it out for yourself' vs 'THIS IS HOLY WRIT'.

Even Zen fails me on certain key points, such as claiming to be the 'Front Gate' to enlightenment. Ugh, ugh, ugh. That statement is the one that really kills it for me whenever I go. I seriously promise to attend the first Religious/Spiritual group that does not make these sorts of claims. I am totally serious, if you can show me a religion that is not self-aggrandizing, I will sign right up. Except the Unitarians, they don't count.

Just like certain political and patriotic beliefs make sense if you're in a closed system, Religion can seam like a true thing, but it doesn't admit to change without hypocrisy. Changes in revelation seems to be a fashionable accompaniment to changes in human society, not the other way around.

I get like that with politics too, and unfortunately have been pushed into being a strident Democrat the last few years via subconscious need to cling together for safety against certain geopolitical trends. But I look forward to a more even two-party rule consisting of mostly grid-lock wherein my Independent/Libertarian/Green streaks can distract me from my current party affiliation.


print add/read comments

Permalink: Hate_the_Religion_not_the_Religionist_.html
Words: 369
Location: Buffalo, NY


Search

Chatter

New Site Wide Comments

sina said to sina
yes thank you!
Well, since 2018 I am living in France, I have finished my second master of science,...

paul said to sina
Nice to hear from you!! Hope everything is going great....

paul said to twisted
Hello from the east coast! It took me so long to see this, it might as well have arrived in a lette...

joe said to Ronqualityglas
I really don't think people should worry about how their eyelids work. Don't you?...