How I use C: a line-by-line code review

How I use C: a line-by-line code review

HomestragerHow I use C: a line-by-line code review
How I use C: a line-by-line code review
ChannelPublish DateThumbnail & View CountDownload Video
Channel AvatarPublish Date not found Thumbnail
0 Views
Let's walk through quick-lint-js, a 100,000 line C project, and talk about the code style and design decisions.

Left:
Stewart Lynch's Sane C Series: https://www.youtube.com/watch?vnoA4moTihU4&listPLCE2sZmRNLTM3PRM2UCebzODSVHtkV5sC
C Core Guidelines: https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines
decode_utf_8_result design help by u/LegionMammal978: https://old.reddit.com/r/rust/comments/104md0s/is_coding_in_rust_as_bad_as_in_c_a_practical/j3b6afz/

00:00:00 Development environment
00:00:36 Font
00:00:55 Editor
00:01:24 Terminal
00:01:48 Copyright comments
00:03:39 Reduce clutter
00:05:05 Copyright year
00:05:57 Copyright checker
00:06:19 Source file generator
00:06:37 How do I write new code?
00:07:09 includes
00:07:38 .h next to .cpp
00:08:40 Namespace
00:10:19 Quote Comment
00:10:57 Naming style
00:11:36 preferred style
00:13:09 custom syntax highlighting
00:15:06 char8_t
00:16:25 char8_t vs char
00:17:55 nested functions
00:19:08 Number literals
00:19:38 Raw pointer
00:20:35 intelligent pointers
00:22:04 anonymous namespace
00:22:55 Which compiler?
00:23:37 Compiler warnings
00:25:02 Return of the classes
00:25:35 Structure vs. Class
00:26:02 better design
00:27:23 char8_t Confusion
00:28:34 designated initializer
00:29:22 Zero initialization
00:30:01 claim
00:30:18 QLJS_ASSERT
00:30:51 custom assert message
00:31:46 better assert debugging
00:32:16 Cassert sucks for debugging
00:34:40 if variables
00:37:25 Watering
00:39:22 in_area
00:40:53 Narrow_Cast debugging
00:42:05 Source location
00:42:36 __built_in_line
00:43:33 Narrow_Cast performance
00:44:25 To-do comments
00:45:16 Issue tracking
00:46:49 Performance notes
00:47:23 Column limit
00:48:24 Screen size
00:49:02 Monitor aspect ratio
00:49:43 Hard column boundaries
00:52:06 Type inference
00:53:46 Object initialization
00:54:30 explicit
00:55:01 implicit
00:57:06 no implicit in Rust
00:58:21 Rust ..
00:58:40 most annoying analysis
01:00:13 Header file
01:00:29 Lock in guards
01:01:45 including security guard
01:02:40 chaotic #include guards
01:03:18 File organization
01:04:52 #include
01:05:17 Namespace references
01:06:46 Code formatting
01:07:28 Legacy header
01:08:37 #include order
01:11:00 #Include style
01:12:15 Header organization
01:12:29 Macros in headers
01:13:19 Header example
01:14:02 empty lines
01:15:03 Forward explanations
01:15:52 simdjson-fwd
01:18:04 Portability and the standard library
01:19:06 Working around compiler errors
01:20:07 Port folder
01:21:18 Binary Bloat
01:22:45 Data in binary size
01:24:07 std::Filesystem::Path bloated
01:25:12 #if defined
01:26:41 platform-specific files
01:27:31 everything is compilable
01:28:28 hrs::Filesystem::Path
01:30:08 why not std::filesystem
01:32:40 Exceptions and error handling
01:33:45 Why use C exceptions?
01:34:37 try_catch_stack destructors
01:35:34 Result
01:36:57 static and dynamic analysis
01:37:45 clinking-tidy
01:38:47 Warnings in CI
01:40:04 What's next

Please take the opportunity to connect with your friends and family and share this video with them if you find it useful.