Try to learn the students' names as quickly as you can. Remembering someone's name is a show of respect. If a student is going to listen to somebody talk for 3 hours a week for 15 weeks, the least an instructor can do is remember his or her name (besides, saying, "Hey... guy" doesn't really work past the first week or so). Obviously this may not be practical all the time - lecture halls with hundreds of students make it just a little harder - but it really helps an instructor to connect with the students.
It's also good to try to convince them that you are interested in helping. The students *should* succeed. They should understand why learning certain things is important. They should know the practices that good programmers engage in, and why some practices lead to bad programming habits (hint: O(n^7) solutions are usually bad). They should know how things will work in a job some day. A good instructor should help them accomplish these things.
Grades should be secondary. An "A" doesn't mean a student is smart any more than an "F" means a student is dumb - it just means that the "F" student, for some reason, didn't accomplish some required minimum class requirement. The requirements are there for a reason, for sure, but the major goal should be to ensure that students learn as much as possible - not pass or fail students. It's not about grades - it's about really learning.
Enthusiasm / Fun
In my mind, effectively teaching computer science is equal parts logic, coding, and sales. You have to do all three. When you're teaching undergraduates, it's one thing to present the material effectively - but you have to make them believe in it. You have to sell it. You have to make them want to complete the assignments, because there's a reason for it. You want to make them excited about computer science and software engineering. If you can do that, the students will work harder because they'll know this their work isn't just going to be going through the motions to meet some mundane criteria.
It also helps to make the class fun. There are lots of ways to do this - you can create assignments that are interesting and rewarding. You can make lectures entertaining and more engaging. You can create interesting grading systems or assignment approaches. You can incorporate outside material. Trying different things out and seeing how the students respond is a great way to make the class more enjoyable (and if all else fails, just point to starting salaries for CS graduates).
Practical and Relevant Practice
I think assignments are important - and a lot of them. Even though you tend to work on large projects in a software engineering job, one or two big projects for the term don't teach students about what it's really like to have a job. The big difference is that in a typical job, you're expected to work on your project every day; in school, you don't have the same motivation, reward system, or status checks to effectively accomplish this (i.e., nobody is paying you, and nobody is yelling at you). Some students might work on a large project every day because that's just the way they operate. Most of them will end up cramming it in closer to the due date or at the last minute. This doesn't help them learn - it's like cramming for exams. Much of it is forgotten shortly after the assignment is completed.
I've found it much more effective to give smaller assignments, but more of them. I think at least one assignment every two weeks is a pretty good frequency (one per week is better, but hard to keep up with). That's because it keeps the students coding. You need more than just demonstration of concepts - you need regular practice to really learn how to be a software engineer. Lots of smaller assignments keep the students regularly engaged. It's more work to grade, but I think it's important. It keeps the students' minds consistently thinking about coding.
There are definitely ways to break large projects or assignments up into smaller pieces - in fact, if you think about it for a moment, this is exactly what happens in a job as a software engineer. By doing this students can accomplish a larger project, but presenting it in smaller pieces will give the students a more manageable way to finish the work.
I'm extremely skeptical of puzzle solving problems. Google stopped doing these types of questions in interviews for a reason. I know a lot of instructors love to assign them but I don't know what students really learn from them; I really believe there's more value in knowledge, technique, and writing maintainable code than there is in "clever" solutions to cryptic problems. Chances are, coding an algorithm to solve a sudoku puzzle isn't going to come up in the day-to-day work in a future job or academic pursuit, but it might trip up some strong developers who aren't good at that sort of thing.
I used to give weekly quizzes in my classes - both as an exercise in repetition (you tend to remember things better if you repeat them after learning) and as regular evaluation. In the last year I've changed this a bit.
Not long ago Harvard announced that "required" final exams would no longer be required. Of course the big controversy was no longer having final exams, but I drew a slightly different conclusion from this policy: one big comprehensive exam just wasn't an effective teaching tool. I've discovered something that is a much more effective teaching tool: a series of comprehensive exams.
As an instructor, this is something that is a huge pain to deal with but I've found it to be extremely effective for students to learn the material. In a 15 week term 4-5 exams is a pretty good number. The important thing is that each exam is comprehensive - it changes the student mindset. No longer can students study for an exam and then forget the material shortly after. It inspires students not to quickly learn the topics, but to KNOW the topics. Students don't love it, but I've found it to be effective for knowledge retention.
So much of computer science builds on earlier topics; for example, you need to understand how a linked list works before you can learn binary search trees, and you need to understand queues before you can understand breadth first search algorithms. By continuing to test students on all the material throughout the term, knowledge retention can be improved.
There are two sides to this: student feedback and instructor feedback. Student feedback is typical - usually suggestions and comments in assignment grades, exam feedback, etc. Instructor feedback is often less frequent, but is just as important. It's hard to hear you're not awesome all the time, but it's important.
You can ask students several times during the term how things are going. The school where I'm currently teaching does end-of-term evaluations, but I don't think that's timely enough to correct your pace or methods. It's important to regularly get a feeling for how the students are responding to the material and your style. It's easy to ask the students in your class a few questions in small, informal, anonymous surveys to get their opinions and comments on the course. Is the course moving too quickly? Too slowly? Are you feeling challenged? One time a student responded that I tell too many jokes - so I tried to make it a bit more serious (unfortunately I'm just not so good at serious, but I really did try). This can give you great feedback to course-correct (no pun intended) and can really improve student engagement. Students like it when they feel like you're listening to them (much like professors).
One big problem I found with my undergraduate education was that too many instructors didn't seem to want to teach, let alone enjoy any aspect of it. I had some great instructors, sure - I'm really honored to be working alongside many of them now. The ones that I really remember are the ones that had a passion for teaching. It wasn't just something they had to do - it was something they enjoyed.
A lot of these other things are easier if you really enjoy teaching. I love teaching. I enjoy helping students. I get a lot of satisfaction out of explaining how things work. Because of this I try hard to improve my classes every semester. I think that being passionate about education - truly desiring to do it well - can really make the difference for any instructor.