Programming
https://utcc.utoronto.ca/~cks/space/blog/programming/CAPIsEffectsOfMalloc
Important reminder to anyone writing C APIs and for the ones learning to use it.
It is also major source of security and stability issues when not handled correctly.
As a helpful guide when writing complex C APIs:
- Explicitly define ownership of handled memory AND memory lifetime in API documentation
- Always sanitize and check for correctness input parameters to API
- Provide both at least one happy-case and multiple negative examples for using the API before any release
When writing them, try to ask yourself what you would ask Stackoverflow 🙂
This will help you understand usage patterns
Note: The easiest part is to create an API, the hardest is to change it in production.
https://thephd.dev/c23-is-coming-here-is-what-is-on-the-menu
Finally the C language it getting proper modern ‘face-lift’ that will potentially help and alleviate bunch of manual work and increase quality of written code.
Lets see if it will fizzle-out, or it will gain traction (looking at you, compiler vendors 😉 ).
https://docs.google.com/document/d/16B36r0HksR0LqQAGLA1syYCtZvYaVC0hEF2D00ZAd0o/view#
Highly informative document for anyone switching between C and C++ and pitfalls of using same or similar approaches from one language into another.
https://luckyresistor.me/knowledge/learn-cpp/
To anyone interested in learning C++, with focus on usage in embedded environment.
Good comments especially valid to all related constraints and best practices for embedded implementation.
Fun
https://matthewbilyeu.com/blog/2022-09-01/responding-to-recruiter-emails-with-gpt-3
Fun use of GPT-3 to automate ‘handling’ of recruiter messaging 🙂