Skip to content

Files

Latest commit

 

History

History
61 lines (31 loc) · 2.57 KB

File metadata and controls

61 lines (31 loc) · 2.57 KB

Basics of C

Back to Main

​​​Authors

Dicaprio Cheung (dhcheungaa@connect.ust.hk)

Daniel Cheung (dcheungaa@connect.ust.hk)

Ho Yu Yat (yyhoai@connect.ust.hk)

Lau Ka Kit, Danny (kkdlau@connect.ust.hk)

Li Ka Yau Elwin (kyeliaa@connect.ust.hk)

Leung Ka Chun, Wesley (kcleungax@connect.ust.hk)

Li Chi Kin, Andy (ckliam@connect.ust.hk)

Suggested Learning Materials

Helpful playlist (For tutorial 0, watch #1 ~ #8)

Legacy tutorial videos

What is This C Language ?

C is an old language. It was very popular then, and is still popular now, because of how robustly it can run. It is a low-level language, meaning there is little between it and machine code (0s and 1s). Hence, it is the ideal language to be used for embedded systems such as our robots.

If you have learned another programming language, transferring your programming ability to C should not be too hard. The syntax might look different, but the underlying concepts such as variables, control flow, and functions are similar. In fact, you may just get familiar the syntax and move on.

If you have never programmed before, don't give up! We are here to guide you through.

What should I do if I get stuck while programming?

In general:

Recommendations for debugging:

  • Print stuff out so that you can track how your values change and whether your code reaches a certain line of code (e.g. maybe an if-condition failed). It may sound simple, but it is actually powerful even in a complex program.

Enjoy your time debugging!

Using AI in Coding

We welcome the integration of AI in software development. Indeed, ChatGPT is quite powerful and usually able to generate a working code in some cases. However, when using them in your programming work, you need to be aware that they only act as your assistant. You need to always verify whether the code generated works well in all cases. Your understanding of programming logic itself is also important.

When you decide to use ChatGPT to generate code. Make sure you do understand why it decides to use these line of codes. You should not blindly trust all the code written by an AI.

Continue to The Next Page