Study guide

The purpose of study guide is to explain how we (your lecturer and assistants) have envisioned the completion of the course. The study guide brings together our recommendations on how to complete the course as smoothly as possible, without unnecessary surprises.

Use of AI

The general recommendation is to use AI as little as possible. The role of Programming 1 is to present you with simple algorithmic problems using basic programming skills to develop YOUR ability to solve problems and think critically. If you start relying heavily on artificial intelligence from the very beginning, you will do yourself a disservice – when faced with more complex and unique tasks that AI can no longer handle, your own experience and skills will be insufficient.

When using artificial intelligence, you must ensure that the answer is correct and suitable! You must be able to defend the answers generated by AI!

AI is strictly prohibited

  • During exam, tests and quizzes
  • When defending lab tasks
  • For producing complete solutions to lab tasks

AI may be used for

  • Requesting explanations. For example:
    • What are the dangers of using integers in C?
    • Why you should not store monetary values as floating point numbers?
    • How do you use string in C? 
  • Finding and solving errors in the code. Include explicit requests to avoid solving it for you, so you could think about the error in hand.
    For example: Explain to me why there is an error in the following code. Don’t provide a corrected solution
    [Program code or faulty section of program code]
  • Asking for explanations on a given code.
    For example: Explain the purpose and contents of the following program code
    [program code or snippet of code from a larger code base]
  • Generating data files. For example: Create a space-separated data file containing person’s first name, last name, city of residence, age and field of work. For two employees set the field of work to the string “none”. The data file must contain 15 rows. Names must be Estonian and cities must be located in Estonia.

When solving algorithmic problems remember that your role is to develop your own brain’s abilities! Don’t ask for a solution to a simple problem, instead ask for hints!

For example: “Guide me how to write a function in C that finds and returns arithmetic mean of an array of integers, but don’t generate the complete code for me.”

Once you have gained some programming experience, you can start to prompt for small snippets of code. Still, it should only be done once all other options have been exhausted. For example

  • Create a function in C that has voltage in volts and current in amperes as inputs and  returns the device’s rated power in watts.
  • Create a function in C that changes lowercase letters to uppercase

Remember: You are responsible for whatever AI generates.

Ongoing coursework (practice)

Most classes use lecture + practice format – i.e. at the beginning of the class, a new topic is presented, followed immediately by practical tasks. If there is a pop quiz, it will be right in the beginning of the class.

  • Briefly go over the planned topics before the class. This will make it easier to understand and follow along the lecture. It’s recommended to both skim the slides and the lab tasks following it.
  • Take notes during the lecture. Highlight the key points emphasized during the lecture. The lecture often includes comments, hints and common mistakes related to the upcoming task. Slides do not contain the entirety of the lesson.
  • Each class includes check-in, i.e. registration for the lesson, usually right after lecture part and before starting the practical tasks.
  • The rest of the class time is planned for solving and defending the practical tasks.

It’s recommended to use the lab time to the fullest – first listening the theory and make notes. Then start doing the practical tasks in class. If possible, complete and defend base task during the same class. If you have time, also complete and defend the extra tasks. Do not hesitate to ask for help during the class.

Solving practical tasks

Before starting, review the extended lab description. The extended description contains additional hints, references, code examples, lesson objectives, etc. The extended description also contains all tasks to be submitted, along with their requirements, test cases, commentary, tutorials and other necessary information.

It’s recommended to take small breaks when writing code. Most developers don’t sit behind the computer for hours and write code all day long. During the lesson you can (and it is also recommended) to take breaks. You can freely walk out of the classroom and get some fresh air (i.e. go walk around the building for a bit).

If you get stuck, have trouble understanding the requirements, not sure if the solution you thought of is correct or just need some some hints to proceed, ask away! This is why we are in the classroom!

NB! If you feel that you’ve spent 10+ minutes just staring at the screen, doing nothing, ask for help! We will give you some directions to move forward.

Defending tasks

Defenses are individual.

To defend a lab task, you must signal to the lecturer or his assistants that you wish to defend (e.g. by raising your hand).

Defenses take place only in the classroom, at predetermined times (scheduled class time, consultation). Digital defenses are not accepted.

The defense process may include fixing errors and other issues, explaining the code, modifying the code (including alterations from the task description), sketching algorithms on paper, etc.

During the defense, the use of AI or any other outside assistance is prohibited, unless permitted by the person conducting the defense.

Weekly homework

Weekly  homework is defended under the same procedure as practical tasks, unless specified otherwise by the task. It’s recommended to upload the homework solution to the university P drive before the class, in an editable format (e.g. both a picture and the project file for an algorithm).

It’s recommended to have homework ready for defense at the very start of the class. Usually ongoing homework is defended immediately after the defense of the first practical task.

Big homework

Solving big homework is an iterative process, that will take much more time than solving the lab tasks.

  • It’s recommended to start working on big homework a week or two before the deadline. This allows time for breaks and the opportunity to ask for help if you get stuck on the task.
  • Reserve yourself some time on at least 2 … 3 days. The size of the tasks can catch you off guard, and sometimes you just need a break and have a rest from to clear your brain and gather your thoughts.
  • Read the assignment text carefully to catch all the requirements
  • Break the task into small blocks (i.e. subtasks), so it would be easier to start working on it.
  • Once the task is complete, review the requirements again to ensure that nothing has been overlooked
  • After exporting the document as a PDF, read it again – there are often various formatting errors that you don’t notice at first

Using AI in written documents

When using AI for the homework documentation, use the following guides to avoid plagiarism

Test and exam

Preparing for the test

  • Make sure you are familiar with the software package installed on the computers in the class and know how to use the necessary tools.
  • Review your previous lab tasks and homework – both program codes and algorithms. Ensure that you can write similar solutions independently. If necessary, solve the tasks again.
  • Each extended lab description includes the lesson’s learning objectives (“After this class, you should …”). Make sure you have mastered all the listed skills and knowledge.
  • Review and solve various typical algorithm tasks: https://blue.pri.ee/ttu/programming-i/algorithm-tasks/
  • The use of previously prepared materials is allowed, so collect suitable reference materials that you might need during the test. Upload them to the university P drive. Keep in mind, that the internet access might be limited already in the beginning of the class – you might not be able to download anything past the start of the class.