最新通知会出现在这儿。每次上课前请查看。
[New] 考试时间:07 Nov, 周四,8:30 - 10:30, 地点:FJ106 和 FJ203
[New] 项目提交:projet (项目) 可以在学习通平台提交了,截止时间:11月10日(周日)23点59
[New] Voici comment seront calculées les notes de l'UV (sur un total de 105, au lieu de 100):
[New] 项目分组,大家填一下
Each Monday, 8:00-10:45
EJ103 (For both G1 and G2)
Room ID:958 9491 5777
请大家上课带上耳机,上课时不时会需要使用,谢谢!
Each Tuesday, Wednesday and Friday, 8:00 to 11:40
8:00-9:40 (G1)
10:00-11:40 (G2)
Room ID:958 9491 5777
Windows 10
Note: I make those videos so as to help you revise more targetedly. It represents significant extra work (for free) on my side.
For midterm exam revision, Ex23_Ex24_solution.pdf will help a lot, and LO02_poly_exercices.pdf is your best friend.
Note: I make those videos so as to help you revise more targetedly. It represents significant extra work (for free) on my side.
For final exam revision, LO02_poly_exercices.pdf is your best friend, and practicing STL containers with above-listed leetcode will help a lot.
Final exam revision #1 - Ex75 (poly exercise)
Final exam revision #2 - live code - containers
std::map
inside of a std::list
, for counting numbers, and iterate through the std::list
by number of occurance. Each element appears only once in the std::list
, emulating hence a std::set
.std::map
inside of a std::map
, for counting numbers, and iterate through the std::map
by number of occurance, instead of by order of value.std::set
inside of a std::vector
and iterate through the std::vector
by order of value. When printing, the number of occurence will also be printed, emulating hence a Counter in Python.char
and int
. It's up to you to make it a template class.Final exam revision #3
Final exam revision #4
Dans le cadre de cet UV, vous travaillerez par groupe sur un projet C++ en rapport avec le contenu de votre cours et des TDs.
https://docs.qq.com/doc/DT1R1RFdJdFRSUHVw
正确示例:
You could get some inspirations from those projects, accomplished by students from past promotions.
Be innovative. You can do even better.
By default, you agree to share your project videos on this platform. If you disagree, tell me in private chat.
By default, you agree to share your project reports on this platform. If you disagree, tell me in private chat.
std::vector
(or other STL containers) instead of built-in arrays.Just a note to remind everyone what is OK and what is not OK in terms of talking to other students about projects.
It is DEFINITELY OK to:
std::vector
)It is NOT OK to:
Discovery of any inappropriate code sharing will lead to harsh penalties for all involved parties. We expect that all students will conduct themselves with honesty and integrity.
Draw.io is very popular in the academy as well as in the industry.
Download the software:
Online version:
Voici comment seront calculées les notes de l'UV (sur un total de 105, au lieu de 100):
Some further clarifications on mid-term/final exam:
Despite the efforts from the prof side, historically, the failing rate of LO02 has been very high.
重修的同学,去年项目分数是可以保留的,也可以今年重新做,刷新分数。
不过,公平起见,重修的同学的往年项目分数不会透漏。是否重做项目,大家自己把握。
具体细节不详,如有需要,可以咨询教务处。
By default, you should ask questions via Gitee Issue. Here is how:
Here is the principle for asking questions:
ChatGPT/Google First, Peers Second, Profs Last.
You are expected to ask questions via Gitee Issue. However, as a secondary (and hence, less desirable, less encouraged) choice, you could also ask questions in the WeChat group.
Why Gitee Issue? Because it's simply more professional, and better in every sense.
In Gitee Issue and the WeChat group, questions will be answered selectively.
Questions won't be answered if:
Learning how to use ChatGPT & Google & Baidu & Bing to solve programming problems is an important skill you should develop during this course.
Pour des questions privées, merci d'envoyer vos questions par mail à ces adresses ci-dessous :
Office visit is NOT welcome unless you make an appointment at least one day in advance.
Suggestions from students who got an A or B:
If you got an A or B and want to share your experience, you can write it down and send it to me via private chat, or just email to
lundechen@shu.edu.cn
.
See this branch: books
Clion 2020.1 版本无法激活的同学,可以尝试下载 CLion 2022.2,然后激活:https://docs.qq.com/doc/p/41f1c0098815f3d0a6cbb3f9ad2b2312de4b43b3?dver=3.0.0
git stash
, git pull
and git checkout
most of the time.For debugging with CLion, watch this:
有红色波浪线,不能编译,那就不能 debug。
git clone https://gitee.com/lundechen/cpp.git
Then open the cpp
folder with CLion.
In CLion, click VCS
-> Get From Version Control
, input the url:
https://gitee.com/lundechen/cpp.git
Then click clone
.
重新 clone (VCS->Get from Version Control)试试
关闭所有的代码编辑tab,然后再次打开代码文件。
或者关了 CLion, 删除项目的 .idea 文件夹,然后再次打开 Clion
See this branch:
https://peps.python.org/pep-0020/
Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Readability counts.
Special cases aren't special enough to break the rules.
Although practicality beats purity.
Errors should never pass silently.
Unless explicitly silenced.
In the face of ambiguity, refuse the temptation to guess.
There should be one-- and preferably only one --obvious way to do it.
Although that way may not be obvious at first unless you're Dutch.
Now is better than never.
Although never is often better than *right* now.
If the implementation is hard to explain, it's a bad idea.
If the implementation is easy to explain, it may be a good idea.
Namespaces are one honking great idea -- let's do more of those!
https://www.reddit.com/r/cpp/comments/48obqd/what_is_the_rcpp_c_equivalent_of_the_the_zen_of/
Not too ugly is better than really ugly.
Explicit is better than implicit, but bad defaults are worse than either.
A simple implementation is better than a complicated one.
A complicated implementation is better than a complex interface.
Contiguous is better than pointer chasing.
Pointer chasing is better than double pointer chasing.
Readability is important; so C++ being what it is, write lots of comments.
Special cases will require breaking the rules, but try to keep the rule breaking hidden.
That said, if you can't hide the rule breaking, a practical impure solution to a smaller problem is better than a pure impractical solution to the generic problem.
Don't use error codes.
Unless their checking is statically enforced.
In the face of ambiguity, don't compile.
There will be many ways to do everything; know their trade-offs and be an engineer and pick one!
Although the cleanest, most maintainable way will not be obvious at first unless you read books and watch talks from a lot of really smart people.
2011 is better than never.
Though never can be better if you haven't thought it through.
If the interface easily causes undefined behavior, it's a bad idea.
If the implementation is safe, it may be a good idea.
Const is a honking great idea, use it everywhere you can!
CLion can help us reformat code.
You might need to use (triple) backquotes (`) to make your code in Gitee Issue more beautifully rendered:
```cpp
int main() {
std::cout << "Hello, World!" << std::endl;
return 0;
}
```
will render in markdown as:
int main() {
std::cout << "Hello, World!" << std::endl;
return 0;
}
```static``` will render as static
.
`static` will render as static
as well.
valgrind --tool=memcheck <your_app> <your_apps_params>
Valgrind can be used directly in CLion:
gcc
is used to compile C program while g++
is used to compile C++ program.
https://www.cvl.isy.liu.se/education/graduate/opencv/CMake presentation.pdf
https://courses.cs.washington.edu/courses/cse326/00sp/unix/g++.html
https://cmake.org/cmake/help/latest/guide/tutorial/A Basic Starting Point.html
https://www.softwaretestinghelp.com/cpp-makefile-tutorial/
https://www.tutorialspoint.com/advanced-cplusplus-with-boost-library
https://www.boost.org/doc/libs/
Other Cpp open source libraries:
If you are stuck with your CLion configuration during TP sessions, you could write and run your code online:
You might want to add your id_rsa.pub
to GitHub so that
you won't need to input your GitHub user name and password in the terminal each time. You can refer to this blog as to how:
git remote add github <YOUR-SSH-OR-HTTPS-REPO-URL>
git checkout -b <NEW BRANCH NAME>
git add .
git commit -m "<SOME MESSAGE>"
git push github <NEW BRANCH NAME>
Corresponding video:
I learned this approach of teaching from Prof. Fabien Pfaender, the French Dean of UTSEUS. I was so impressed. It was another level.
Here in this course of LO02, we are using a very basic and simple form of teaching/learning with git/GitHub/Gitee. In the course of Introduction To Machine Learning, a more sophisticated approach will be employed.
Some programmers argue that "Object Oriented Programming is Inherently Harmful":
Those resources, found by googling "GitHub cpp design patterns", could be interesting for some of you:
In general I don't give any career or life advices to anyone. I am a liberal and believe that the beauty of life lies in its diversity and randomness, hence an infinity of possibilities. The meaning of life is 42, *, anything, everything. Giving advices to people is limiting and more often than not unhelpful.
However, if you aspire to be a programmer, it might be worth it to build your GitHub profile, by contributing to interesting projects (personal or open-souce) and, accumulating Green Blocks, like this:
A GitHub profile with a lot of Green Blocks will make your CV more attractive.
Life is short. Have fun.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。