Depending on the complexity of the function you intend to design, the design process can either be relatively simple or more challenging but both require one thing before you start designing and that is planning. The implementation process is always relatively short but the design process is what varies in length depending on the function. The first thing to think about when designing a function is the what; what is the overall purpose of this function? This will lead you into thinking about the next design phase, which is the how? How is this function going to accomplish its goal? How many different parts am I going to need to accomplish my goal? How many different types inputs can be applied to the function? By asking those questions, you will inadvertently discover the next phase of the design process, identifying the challenges. Regardless of how simple or complex the function is, there are always challenges you must overcome in order to design an effective function. Another thing to keep in mind is that the number one virtue of any programmer is laziness so try to accomplish what every your trying to accomplish with the least amount of programming; this will keep you concise and efficient in your programming. Finally, laziness ties directly into keeping your program versatile, design code that applies generally to all potential input, not just one specific type of input to make it more efficient and reduce the amount of effort you have to put in. After, planning the function you can implement it, after which you can test it. Testing can come in a variety of different forms, from check expects to test inputs. Try inputting as many different possible inputs as you can to make sure your function is fool proof. If it doesn’t work, try using step parallel to identify the specific part of your function that isn’t working and fix it. Once the testing phase is over and your function works well under a variety of circumstances, remember to comment in a description of the function to make it more easily accessible for yourself in the future and other programmers.
I don’t think there really is much you can do in preparation for CSC104 without any prior programming experience. It is designed as an introductory course so I don’t think additional prep work is necessary. If you do have programming experience, I imagine it will help you tremendously as it did me. For those without programming experience, I think there are a few things to keep in mind when going into CSC104. First of all, remain calm. It can be challenging at first to try to adjust your thinking to a programming language but the course and the program are designed to be accessible and simplistic so remain calm and keep working until you understand, you will get it eventually. The second thing to remember is to try and participate in lecture. Whether it be by actually raising your hand and answering questions, or by trying to implement the code that the professor is discussing yourself, participating in the lecture instead of just sitting there or not even showing up will always help your understanding of course material. Also, before all the quizzes and tests, do the practice exercises and practice tests. Often, the real thing will be very similar, making the practice exercises an amazing resource. Finally, when it comes collaboration, avoid just copying other people’s work at all costs. Go to them for advice or for general implementation ideas but just pressing Control-C Control-P will never actually help your understanding of curse material and it won’t benefit you in the future.