Deep static analysis, direct support from devs | C, C++, C#, Java, JavaScript, TypeScript, Go | Helping you ship calmer releases
Support: [email protected]
This Friday, we're sharing something a little different: a translated article on the future of programming.
Will AI make programming languages obsolete?
People have been predicting the end of programming for decades. Why is natural language still no substitute for code?
https://t.co/3csLsAZeWm
🔒 How well does PVS-Studio detect #security vulnerabilities?
For over a year, PVS-Studio for Java has been detecting vulnerabilities in 9 out of 10 #OWASP Top Ten categories.
We tested PVS-Studio 8.02 for Java against the OWASP Benchmark, an independent test suite designed to evaluate the effectiveness of vulnerability scanning tools, including SAST.
The analyzer detected 86% of security defects with an 8% false positive rate.
🌭 Sausage code, or why you should keep your code within screen limits.
When a line of code stretches across half your monitor, it's easy to miss a typo. And sometimes, that typo can hide a real bug.
Long, repetitive code makes reviewing and maintaining a project harder. Here are a few ways to keep things readable and reduce the risk of mistakes:
1. Use table-style code formatting.
2. Place the similar code in functions.
3. Avoid redundant operations. For example, instead of type casting of (double)num everywhere, we could simply declare the num variable as double.
4. Run PVS-Studio static analyzer regularly for additional control.
We explore this topic through a real bug found, showing how a copy-paste mistake in a long condition went unnoticed and even made its way into another function.
Read the note: https://t.co/cowudt2tax
#CodeQuality #SoftwareDevelopment #csharp
Years go by, but bugs that leave sensitive data unprotected are still around. We found one of them when checking the DPDK project.
Here's the issue: if a memory buffer isn't used after a 'memset' call, there's no need to fill it. Compilers optimize away the 'memset' call. To prevent this, you can use 'memset_s', 'RtlSecureZeroMemory', or an equivalent function.
#cwe #securecoding #security
Some coding mistakes never go out of style. Typos, null pointer dereferences, memory leaks, unsafe memory clearing, and logic errors.
@Code_Analysis takes a look at some classic human errors found in GmSSL, an open-source cryptographic library implemented with good old C:
https://t.co/U1KfxSa2aa
#c #cpp #debugging
I've been mulling over the claim, "Now, in the age of AI, code is worth nothing." And I agree.
But there's a caveat. It still costs a great deal to make sure you end up with good, efficient code. AI amplifies what you already have; it doesn’t replace it or improve it.
We found a bug in this code a while back. The developers have already fixed it. Can you guess what the bug was?
Hint > https://t.co/tARZnz6Edk
#Csharp#PVS_Task#Gamedev
Remember Andrey Karpov's Terrible Tips for a C++ Developer? The book has reached 45,000 readers. Now it's back with an updated edition!
60 tips on what NOT to do in C++, backed by 20+ years of development experience and a healthy dose of irony.
We're publishing the tips in a series on the PVS-Studio blog.
https://t.co/laxD67b65k
Code quality and security need attention throughout development, not just when a release or security audit is approaching. Static analysis helps teams check code regularly and address potential issues as they come up.
This is especially valuable when adopting new development practices and tools, including AI-assisted coding. An additional layer of verification helps teams keep code quality in check as their workflows evolve.
PVS-Studio is used by game studios and network equipment providers, and by developers of real-time operating systems. Their needs have little in common, yet all of them run static analysis as a routine part of development.
Want to see how static analysis could fit into your workflow? Join a demo with our developers to learn what PVS-Studio can do for your team and how to get started, and bring your questions. Demos usually take 30–60 minutes.
#Development #Security #StaticAnalysis
https://t.co/ItwtG1hNOA
New digest for Go developers from the PVS-Studio team
Go vet can't go: How PVS-Studio analyzes Go projects
Docker, Kubernetes, Gitea, and other projects—they all have one thing in common: they're written in Go. Here, we show the errors that they may contain and why well-known linters like go vet remain silent about errors.
https://t.co/Az9nFMaMIT
^ != <<
In Go, ^ is XOR, not exponentiation. We show how this confusion causes bugs, using a real queue implementation in a popular library, and explain what the consequences are.
https://t.co/5gAd2HfcS8
Error handling in Go: Common pitfalls
Coming from Java or C#? defer with recover looks like try/catch, but no, it’s bad practice. Why? Explained on the most common error-handling mistakes in Go in the article.
https://t.co/gv9Mi2088f
Got other topics you wanna see? Drop a comment below >
#DevDigest #Golang #Gophers #Development
FUS...RO...DAH! It’s 11/11! Happy Birthday, TES Skyrim! 🐉
(person who hold this PVS-Studio profile is eagerly re-playing Skyrim now)
Do you remember the story about Skyrim’s launch day and the newborn Dovahkiin who made their parents happy, not only with their birth but also with a lifetime supply of Bethesda games?
Well, question~
If you had the opportunity to name your kid after the company that gave you an unlimited supply of something, what would it be?
#Skyrim #TES #Gamedev #Programming #Dev #Developer