For my programming courses, I give 3 different types of assignments each week: a typing exercise, a Q/A style set of questions, then a problem. No "make a loop print the numbers 1 to 5", but something like "implement standard deviation".
I've talked about the typing exercises before on HN, give the students a picture of code and make them retype it. They can't copy-paste, which is one of the mistakes of beginners, plus it gives them a fully functioning implementation of that week's topic. It doesn't have to be huge, something like 50-100 lines (this is Java, so that isn't as much as it seems). Students have given it a positive response this past semester and I'll be adding it to some other classes as well.
The Q/A questions are traditional multiple choice/true-false/fill in the blank style questions. I won't lie, it's blatantly taken from MIT's Open edX 6.01 course, though tweaked to prevent Googling. The questions range from simple concepts like what is the end result of a conditional statement, to number of loops, to having to implement a small amount of code to determine the next integer in a seeded random. McGonigal discusses how in a game, the risk of failure is reduced by allowing the player infinite tries. If they fail, they don't get slapped with a 0, they are free to try the question set as many times until they get the 100%. You have to be careful, otherwise you'll get the person that just guesses, but overall it is a successful tool.
Finally, the problem sets are again similar to MIT's 6.01 course. This is actually my current pain point, as I need to implement an automatic grader to repeat the infinite tries from above. They are given the problem, along with some test cases of what to expect. This is the first assignment that doesn't have a clear A to B section, which is done purposely to facilitate their problem solving skills. To help, I do the same thing as the author by making my class time lab time. I do like the ideas of paired programming and Post-Its, so I might look to implement them in the future.
The big thing I'd same McGonigal's book suggests is "Make the assignment seem attainable". This helps defeat the stereotype threat. If step 1 each week is literally "retype this program", it gets harder for a student to say "I can't do this".