We must stop using silly terminology such as 'Offensive C'. Dennis Ritchie did not design the C programming language with weaponization in mind. C is a simple programming language which provides the capabilities to create both offensive and defensive tool sets.
-
Show this thread
-
Every anti-virus is written in C, or C++. Have you ever heard them market their work as utilizing 'Defensive C'? RIP Dennis Ritchie
3 replies 2 retweets 54 likesShow this thread -
-
-
Replying to @vxunderground @jkbckr
Nah,
@jonasLyk provides a ref. A combo of syntax, macros, optimizations for compilers & humans to create software. It's a standard. If OSS adopted the practice it could lead to less malicious implants by bad actors http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2020/p2064r0.pdf … http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4075.pdf …3 replies 0 retweets 1 like -
When I think defensive programming i am not thinking about some whacky standard- i think about a mindset. The mindset of having two entities- you and the client, the client can be you tomorrow, it is just a placeholder for someone that somehow uses your creation.
1 reply 0 retweets 2 likes -
Replying to @jonasLyk @TommyTenacious and
Now- you are in a situation where you have to design something to accomplish something. Now comes your toolbox of encapsulation, syntax and design patterns. What you create - should be impossible to use wrong by the client. Needing to remember to call an init? No way! crazy
1 reply 0 retweets 1 like -
Replying to @jonasLyk @TommyTenacious and
You never create something that opens op for creating bugs- and you can do soooo much with just the built in classes. You only make constructors that create an object in a fully functioning state. Antthing else is bad design- the is always alternatives.
1 reply 0 retweets 1 like -
Replying to @jonasLyk @TommyTenacious and
Need to half construct a square because you only have x1 and y1- well, that is not a square you retart- thats a half square so make a class that represent what it is. Inside that you can have a method that finishes construction by reusing stored 2 coordinates and inputs the rest
2 replies 0 retweets 1 like -
Sounds more like a proxy class than a method...
1 reply 0 retweets 1 like
are you referring to another name for the pattern or are you suggesting another approach?
-
-
Giving a name to what sounded like Proxy class/pattern; a class functioning as an interface to something else. Referencing the 'half a square' class w/ a method, utilizing other objects to become a square.Kinda boarders incomplete. https://en.wikipedia.org/wiki/Proxy_pattern …https://sourcemaking.com/design_patterns/proxy …
1 reply 0 retweets 1 like -
I think terminology is less important than the “never create something that open opportunities for bugs” part, which this addresses no matter what you call it. ;)
0 replies 0 retweets 1 like
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.