As a musician, I am saddened by the loss of a legend. All of you know who I am talking about.

 

As a veteran, my heart weeps for those who gave the ultimate sacrifice this year. Do you know the name of even one of them?

 

As a human, I am disgusted and outraged at a government that will shell houses and kill innocent children to squash those seeking freedom. Did you know this is happening right now and has been for a while? Do you even know where the country is on the map where this is happening?

 

As an American, I am ashamed of the priorities of the majority of those who share citizenship status with me.

 

Most of us don’t care about anything that doesn’t directly affect our own personal quality of life. We prefer to be blissfully ignorant of the world around us. One day that will come crashing down and you will wonder how it happened.

I’m sick to death of recruiters who won’t take two seconds to not waste my time

Subject of this email I just got is: “EAD/ GC or Citizens Only:- Urgent Requiremen​t :- .Net Developer (GA, 3+ Months)Loc​als Only!!—” 

The only reason I payed any attention to it is because I read it on my iPad and quickly skimmed it. As I am a consultant, I occasionally will get info through my work email about new gigs. Then I read it. It was another email from a stupid recruiter who won’t take two seconds to google me or something before sending me an email. Unless of course you consider Philadelphia, PA local to Atlanta, GA.

I’ve heard others start to threaten to post the emails they get and I’m in that kind of mood so here goes. Here is the email I got. If you’re in Atlanta, you may (or probably may not) be interesting in this gig…

HI Dane,

Hope you are doing great! Please find the requirement below , If you find yourself comfortable with the requirement please reply back with your updated resume and I will get back to you or I would really appreciate if you can give me a call back at my contact number ***-***-****

Location: Atlanta, GA
Duration: 3+ Months
Interview Mode: F2F After Phone!!

Visa Status: EAD / GC or Citizens
Required Skills:-
ASP .Net
C#
VB.Net
SQL2008/2005
HTML
MVC

HTTP Referrer in RSpec

I ran into an issue testing a controller action today where I needed to perform some action based on the HTTP referrer. When an rspec test executes the referrer is nil so the code errors. The quick fix is to manually insert the referrer into the request object:

@request.env[“HTTP_REFERER”] = “http://test.com”

This can obviously be done in a before block or each test as needed.

Rendering views in rspec controller tests

Normally I love the fact that rspec doesn’t render views when testing controllers, but I have one instance where this was needed. I needed to render some coffeescript through erb based on a controller action. I called the erb template using render_string, then passed the returned string to the coffeescript compiler. Not really the most elegant solution, but it does work well.

My real problem came when I needed to test it. Using cucumber didn’t make much sense to me so I wanted to do it through rspec. I already had the controller written and manually tested so test first wasn’t an option. I broke my coffeescript on purpose just to prove that the test would fail, had my spec looking for an response code of 200 since I knew if the coffeescript compile failed, it would return a 500.

I ran my spec and to my surprise it passed.

It failed everywhere else in every manual test I did, even if I loaded the rails test environment. Only the rspec test passed. Previous to this, I had never used rspec to test anything related to rendering views from a controller so it didn’t occur to me that rspec wouldn’t process the view template at all. 

So to get it to work, I found an option that will allow your controller specs to render views. It’s an edge case so it wasn’t easy to find, but it’s pretty simple to do.

All you need to do is call integrate_views after describe YourController and it will also render the view.

New music room setup. My toys: 6 Piece Tama Imperialstar drum kit, Epiphone Les Paul.

New music room setup. My toys: 6 Piece Tama Imperialstar drum kit, Epiphone Les Paul.

This is just pure awesome

This is just pure awesome

Rails debugging under Pow

Pow is awesome and if you are doing Rails (or Rack at all) dev on a Mac, you need to check it out. I was bummed about loosing debugging support, but tests take care of most of that anyway. But there have been a few cases where having a debugger would have been nice. Well someone figured out how and it is pretty awesome. Check it out.

Drum Solo Week - Neil Peart (6/9/11)

Drum Solo Week - Roy Haynes (6/8/11)

Drum Solo Week - Sheila E (6/7/11)