I keep coming back to asking myself what the difference between stub and mock objects are and I have it figured out, so here it is: Stubs just return whatever you tell them do, and that’s it. Mocks have expectations and cause tests to fail if those expectations aren’t met.
Verbose Logging
software development with some really amazing hairCompiling ruby 1.9.1 alongside ruby 1.8.7
I almost threw my laptop out the window figuring this out, but if you want to install ruby 1.9.1 alongside ruby 1.8.7 (whether the prefix is the same or not), you have to give ruby 1.9 a program suffix, but also a baseruby. So you need something like this: ./configure --prefix=$HOME/local --program-suffix=1.9 --with-baseruby=ruby --enable-pthread
Read the full article
Better ASM output from gcc
I always find myself needing this but never remember. -fverbose-asm Throw that at gcc when you are outputting asm (-S flag) and you’ll get some useful comments to see what some of the code is actually working on.
Read the full article
Pascal case to human readable with C# extension methods
I wrote this a while ago on my old blog, so I’m just reposting here. It’s useful since you can have an enum of error codes, which also, when converted to human readable text, are useful messages. Here’s how I did it.
Read the full article
Design patterns
The good thing about design pattern writings is that they never really go out of date. Hence this link. It actually doesn’t have a date, but I found it a long time ago. Anyway, here it is. Use them already! Design Patterns
Read the full article
Learn python in 10 minutes
I found this a long time ago (in a galaxy far, far, away), and it’s still up and still good. If you want to learn python, fly through this article and you should be good. Learn Python in 10 minutes
Read the full article
Code Project Add-In for Visual Studio 2008
Code Project is a great resource for developers. I use it, have projects bookmarked, read the newsletter, and got the T-shirt (okay that’s a lie…just the underwear). This makes it even better. You can search Code Project by doing little more than highlighting or copy/pasting code, typing in a few words, and blamo!, there you have it. it uses Live Search for MSDN and the intertubes, which I’m not overly keen on, but if I want to really search m...
Read the full article
.NET Line Count
I found this slick little app a few years ago, and it looks like it’s still around. Count your VC# and VC++ lines, and it differentiates between code lines, blank lines, designer lines, etc, which is nice. The downside: it’s really only useful for VC# and VC++ projects, which is alright if that’s all you are working with. Check it out. C#, Visual Basic and C++ .NET Line Count Utility – The Code Project – .NET PS. You’ll note that I didn’t ment...
Read the full article
Rake tutorial
Oh me, oh my. When I first posted about this, in June of 2007, my original post started with Ruby is sweet. I should use it more often. And now, on Monday, I get to start my new job playing with Rails all day long. Funny how things change. Regardless, the quality of this tutorial hasn’t changed, so here it is again. Rails Envy: Ruby on Rails Rake Tutorial
Read the full article
Oracle + auto_increment = Pain
I had to do auto increment in Oracle a while back and it was painful. It ended up happening, but not in the nice MySQL way. Whatever, it worked. This site has a few tricks. Autoincrement primary key for Oracle
Read the full article