It's not invalid JavaScript, and it does work, but it isn't doing exactly what he thinks it's doing.
You need the jQuery parameter to make sure the $ in your code refers to the jQuery object and not something else. Without it your code is just referencing the global $ object which some other framework could have poached for itself.
But I suspect you already know all that. What his code is actually doing is creating an anonymous function intended to provide a safe place for $-based code, evaluating it immediately, and then passing the return value to the jQuery function. Depending on the return value this may be useful or not, but I'm pretty sure it's not what he intended. His function is evaluated immediately rather than when the DOM is ready.
What you want to do is combine the second part of your example with your already-written code:
(function($) {
$(function () {
// your code to fire when the DOM is ready
});
})(jQuery);