Journaling on estrip is easy and free. sign up here

Jim's Journal

jim
My Podcast Link

10/22/2007 23:48 #41757

RSpec with Autotest
Category: programming
(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

tinypliny - 10/23/07 03:01
The inane commenter is baaaaaa ack.

Actually, for a change, I think I just might understand your happiness at finding this autocheck tool. It's somewhat like writing a lengthy SAS/R code and finding out several lines later that the resultant analysis isn't what you wanted because of some stupid error in the code.

How nifty to have some program run chunks of your saved code in the background, as you write *and* let you know how you are doing. That totally rocks! Congrats on the find!

10/21/2007 20:41 #41739

Pumpkins
Category: halloween
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.
jim - 10/23/07 00:03
We went to a nursery, I got 3 big ones for a total of $25.

There are a couple really large pumpkin farms around that I'm definitely going to go back to next year, it's too expensive otherwise.
jbeatty - 10/21/07 23:19
I almost bought one today but they are kinda expensive at Wegmans. I need to find a farm that sells them for a dollar.

10/19/2007 22:10 #41719

My Fellow Americans
Category: cars
Our odometer hit 8888.

image

I'm just saying.
jenks - 10/20/07 14:06
just wait for 80085 so it can say BOOBS.
teehee.
fellyconnelly - 10/20/07 10:41
ahhh a car that has less than 40,000 on it... how quaint...
kookcity2000 - 10/20/07 01:02
god-bless your sweet numerically palindromic soul
tinypliny - 10/19/07 22:27
To be overtly ostentatious, Kilometres.
tinypliny - 10/19/07 22:25
Let me make haste and say Kilometers, not your crazy imperial measurements...
tinypliny - 10/19/07 22:24
Oh my god!!!! I never thought I would meet another member of the eagle-eyes-for-significant-odometer-readings club! I actually celebrated my odometer hitting 6666 :)
james - 10/19/07 22:15
I blame Bill O'Reily!

10/18/2007 23:20 #41706

Martin Fowler
Category: programming
LOLcoder

image
jim - 10/19/07 14:23
Inspired by: :::link:::
james - 10/19/07 13:58
Tiny, I get this joke only because I hear about these silly computer things all day from Jim. You are not alone.
carolinian - 10/19/07 10:01
Martin Fowler's "Patterns of Enterprise Application Architecture" is a must-read for anyone who works both with an object-oriented language and a database. It is one of the best $50 I've ever spent.

I think he probably has too much real-world programming experience to be classified as a "computer scientist". :)
tinypliny - 10/18/07 23:38
"I totally taked your binky"* I gotz help now.


hahahaha



  • Killed your joke by my ignorance.

jim - 10/18/07 23:29
Like here: :::link:::

Except I made one about a computer scientist, so if it doesn't make any sense don't worry :)
jim - 10/18/07 23:28
Have you heard of LOLcats?
tinypliny - 10/18/07 23:26
Huh?

10/18/2007 22:50 #41705

Allen Street
Category: buffalo

image
jenks - 10/18/07 23:53
yeah, I really want to know her story. I talked to a guy who works in psych at ECMC and the other hospitals, and even he has never met anyone that has talked to her. Such a mystery!!!
tinypliny - 10/18/07 23:25
I swallowed so many words. :/
Today is correction fluid day, so here goes...

- who these people are (omit ? mark)
- Why are *they* clothed...
- Don't they *feel* uncomfortable *under* all
those layers of cloth?
- *(*followers of Jainisms = Jains)
tinypliny - 10/18/07 23:17
I have wondered a million times who these people are? Why are clothed like aliens from sci-fi movies? Don't they uncomfortable with all those cloth layers? Are they under some secrecy oath?

There is a religion in India called Jainism 9followers = Jains). The monks from this religion wear white masks over their mouths to prevent the inhalation of flying creatures (yeah, as if nostril hairs weren't enough). They are called the Swetambara (Sheathed-in-white) monks. They carry whisk-brooms to prevent themselves from stepping on crawling creatures, don't walk on the grass and only go outside during daylight. The very rigid among them don't eat root vegetables that destroy the plant. They follow the principle of non-violence to its extreme meanings.

I am sure the alien-look-alikes on Allen can't be Jains. Who are they? Scientologists??