How do I design?


Introduction

When you begin reading a program criteria and it's specifications, it can be incredibly overwhelming. Have you ever began reading the instructions of an assignment and been completely confused on what is going on? I know I have. When we design, there are techniques we can use in order to make the outcome rewarding. Although, this does not mean that it will not be challenging. But, with the right mindset, effort and tools, anything is possible! And you will soon be an amazing program designer and programmer!


Step 0: Keyboard Rules

First off. Do not touch the keyboard. Step away! Don't launch that IDE!

Step One: What is the problem I am trying to solve?

This is the big question. Before even digging deep into details and nit-picky specifications, you need to understand the overarching ideas of the instructions/programming problem. After you first read all of the instructions, can you write a 2-3 sentence explanation of what problem your program should aim to solve? Can you tell your buddy a super short summary of what the program should be doing? When I am telling my grandma about Facebook for example, I don't tell her about all the crazy complicated backend and frontend code that occurs, I just tell her: "Hey Grandma! Facebook is a super cool app that helps you connect with friends, make new friends and show a status about your life!" If you can give a short summary like this about the program and what it should be solving/doing, you are ready to move on to step two.

Step Two: Offer a generic solution.

Okay, so we've identified the programming problem. What is a generic solution? Don't start throwing a bunch of programming terms like println(), for loops, while loops, etc. Think of a general idea as to how you'd approach it. What kind of methods do you wanna have? Do you want a specific method to automate a specific process such as printing? Do you want to have a method to specifically ask users for input? Start mapping this out, but don't get into specifics. In this step, it is okay to start building a flow chart, doing pseudocode, drawing pictures, etc. Designing is to help you when you code!

Step Three: Fill in the gaps.

Turn the generic solution into a more complex one. This is where we can get our hands dirty. Re-read the specifications so that you are playing within the boundaries of technicality, and start mapping out how you can accomplish the ideas you mapped out in step two. Should we use for loops, while loops, variables, method calls, parameters, etc.? Stay organized here and really get specific, these details will be incredibly useful in step four.

Step Four: Transfer to code

The moment you have been waiting for! You can now start coding! Take all those ideas you have developed in steps zero to three, and begin turning it into code. Here, it is important to comment your ideas and if you stray away from a specific part of your design, find solutions to keep things consistent.


Why should I care about designing?


In the world of Computer Science and programming, the ability to think in an abstract way and map out your ideas through design can be quite useful. Although it might not seem important at times, the ability to take a complex problem and break it down into smaller more understandable pieces is the sign of a great programmer and is an art within itself. The truth is, that the more you practice designing, the sharper your problem solving skills can be on more complicated programming assignments, personal projects and engineering jobs. Furthermore, as you get deeper into the world of CS, especially if one of your goals is to become a Software Engineer, Researcher, etc, problem solving and even succeeding in interviews for those fields will hopefully become natural and easier.

If you are a CS312 student, there is some additional information you may find useful. For one, this is the second semester we are doing program design, so the logistics are much more clear now. Everything is integrated within Canvas and your assignment instructions. For CS312, we also have Guru's for assignments, and I will be the "Guru" for design. If at any point you are confused about the logistics, have some sort of issue with Canvas, etc, Please email me with a specific subject line so that I can get back to you in a reasonable time frame. Please be sure to complete this design portion prior to coding on your computer. Becareful when you collaborate on design, because you do not want you and your partners code coming out the same. The steps that focus on more high-level ideas for program design are okay for collaboration, but getting into the specifics can be risky and lead to academic dishonesty issues. Furthermore, grading will be on a 0 to 2 point scale. 2 points are awarded if there is a clear effort and thought put into the design and that it is clear that you fully and carefully read the instructions. 1 point will be granted if there was effort, but it was very clear that you did not try much or did not thoroughly read the instructions. 0 points will be granted if there is an empty submission, no submission, and is just overall evident that there was no effort put at all into the design.

This semester, I will also be showcasing impressive program designs on the website to be an example for students in future semesters!


Design Showcase


  • Coming Soon
  • Coming Soon
  • Coming Soon