This site uses cookies to improve your experience. To help us insure we adhere to various privacy regulations, please select your country/region of residence. If you do not select a country, we will assume you are from the United States. Select your Cookie Settings or view our Privacy Policy and Terms of Use.
Cookie Settings
Cookies and similar technologies are used on this website for proper function of the website, for tracking performance analytics and for marketing purposes. We and some of our third-party providers may use cookie data for various purposes. Please review the cookie settings below and choose your preference.
Used for the proper function of the website
Used for monitoring website traffic and interactions
Cookie Settings
Cookies and similar technologies are used on this website for proper function of the website, for tracking performance analytics and for marketing purposes. We and some of our third-party providers may use cookie data for various purposes. Please review the cookie settings below and choose your preference.
Strictly Necessary: Used for the proper function of the website
Performance/Analytics: Used for monitoring website traffic and interactions
For more background on safety and security issues related to C++, including definitions of language safety and software security and similar terms, see my March 2024 essay C++ safety, in context. This is a status update on improvements currently in progress for hardening and securing our C++ software. Its just a metaphor.
When I started working on the new edition of Head First C# back in 2023, AI tools like ChatGPT and Copilot were already changing how developers write and learn code. But the audience for the booka developer learning C# as their first, second, or third languagedoesnt yet have these skills.
The whole point of the exercise that follows is to allow me to move quickly, spotting patterns from afar, and not having to do any slow or meticulous work yet. I want to be able to form hypotheses and draw conclusions without viewing a single URL or a line of source code. That work is what comes next. Final Word.
It sits at the very beginning of the process before the code is written and can save an immense amount of time down the road (of somebody spending tons of time just to get to a dead-end). I really like what one of the smartest people with whom I worked said: “A good design is a design where you can see the code”. Important note.
Submit a proposal for a talk at our new virtual conference, Coding with AI: The End of Software Development as We Know It.Proposals must be submitted by March 5; the conference will take place April 24, 2025, from 11AM to 3PM EDT. AI writes buggy code? So do humansand AI seems to be getting better at writing correct code.
Safety and simplicity are the two core things I want to try to dramatically improve in C++, and are why I’m doing my cppfront experiment, so although the above absorbed some time away from cppfront coding it all contributes to the same goal. (If Support all C++23 and draft C++26 headers that have feature test flags.
Consequently, handling our task becomes a no-brainer: DECLARE @s AS VARCHAR ( 20 ) = '123.456.789,00' ; SELECT TRANSLATE ( @s , '.,' , ',' ) ; This code generates the desired output: 123,456,789.00. As an exercise, try solving this task with a pre-SQL Server 2017 compatible solution where you cannot use TRIM and TRANSLATE.
The tester established a baseline by selecting the most critical, common, or obvious path through the code selection. Steps to Performing Basis Path Testing The first step is to create a control flow graph for a specified code section. The second step is to select a baseline path through the code.
As a tribute in honor of Dennis Ritchie’s passing , I’d like to invite you to share your thoughts in this post’s comments about your first C program – either the code if you remember it approximately, or a story about when you wrote it. After all, this was just a warm-up initial exercise for the course. Here’s mine.
Simple, mathematically safe, and efficient chained comparisons ( commit ) P0515 “Consistent comparison” (aka “spaceship”) was the first feature derived from this Cpp2 work to be adopted into the ISO Standard for C++, in C++20. Thank you again to everyone who helped land this Cpp2 feature in the ISO C++ Standard.
In this blog post, I will show you a particular example I faced when working with an upgrade exercise using pg_upgrade. When working with the upgrade exercise, the goal was to move from PostgreSQL 11 to PostgreSQL 12. for lib in $(psql -qtA pgbench -c"select extname||'.so' for lib in $(psql -qtA pgbench -c"select extname||'.so'
C++ “move” semantics are simple, and unchanged since C++11. Move: What it is, and how to use it In C++, copying or moving from an object a to an object b sets b to a ’s original value. This post is an attempt to shed light on that situation. That’s it for what advanced users need to know. Yes, but don’t.
Assertions have been a foundational tool for writing understandable computer code since we could write computer code… far older than C’s assert() macro, they go back to at least John von Neumann and Herman Goldstine (1947) and Alan Turing (1949). 1,2] How well do we understand them… exactly? GUIDELINE: Assert liberally. [3]
That is, does SQL Server perform a substitution process whereby it converts the original nested code into one query that goes directly against the base tables? The answer is simple, to shorten the code by having the inner query use the infamous SELECT *. And if so, is there a way to instruct SQL Server to avoid this unnesting process?
“It’s written in ones and zeroes - binary code. So a whole Babel of computer languages has been created for programmers: FORTRAN, BASIC, COBOL, LISP, Pascal, C, PROLOG, FORTH. This blog is meant for those who don’t know x86-64 assembly, but maybe know a little C, and are curious about code generation.
Use the following code to test the function with the variable assignment technique: DECLARE @n AS BIGINT ; SELECT @n = n FROM dbo. Here’s the code that creates the table and populates it using an INSERT statement with 102,400 rows to get it to be compressed: DROP TABLE IF EXISTS dbo. NullBits102400 ; GO. CREATE TABLE dbo.
Advent of Code. If you prefer a puzzle over an article, take a look at Advent of Code. C# Advent Calendar. It’s time for the fifth annual C# advent calendar that will feature two pieces of content every day. Code Security Advent Calendar. JavaAdvent on Twitter. Stoyan Stefanov on Twitter. LeanUXmas on Twitter.
Briefly, what is the difference among: (a) undefined behavior Undefined behavior is what happens when your program tries to do something whose meaning is not defined at all in the C++ standard language or library (illegal code and/or data). By definition, if a function’s preconditions are violated, then the results are not specified.
That is, does SQL Server perform a substitution process whereby it converts the original nested code into one query that goes directly against the base tables? The answer is simple, to shorten the code by having the inner query use the infamous SELECT *. And if so, is there a way to instruct SQL Server to avoid this unnesting process?
We want a way to enable checking for some assertions but not others in the same code, because we may not always be able to afford expensive checks. If we could write all ideal assertions, and exercise all control flow and data flow during testing, then a failed assertion would definitely mean a bug in the same function where it was written.
If a PostgreSQL user wants to change these values, they need to recompile the PostgreSQL from the source code. This can be changed later using the pg_checksums utility, but that will be a painful exercise on a big database. psql "host=localhost user=postgres options='-c synchronous_commit=off'" psql (14.8) Type "help" for help.
In the video I explained how I arrived at tracing __iwl_dbg() in this way, and how you can follow a similar approach for tracing unfamiliar code. This is not my best code, since I hacked it in a hurry, but here it is: #!/usr/bin/python Embedded C. # # Tone generation from: [link] # # 29-Apr-2019 Brendan Gregg Created this.
In the video I explained how I arrived at tracing __iwl_dbg() in this way, and how you can follow a similar approach for tracing unfamiliar code. This is not my best code, since I hacked it in a hurry, but here it is: #!/usr/bin/python Embedded C. # # Tone generation from: [link] # # 29-Apr-2019 Brendan Gregg Created this.
Here is a query to help you track them down using the sys.columns catalog view, but you're on your own for any explicit references that might exist in your application code: SELECT [ Schema ] = s. name , [ Column ] = c. name , [ Data Type ] = TYPE_NAME ( c. system_type_id <> c.
Some of these are exercised by the “wrong order” permutations above, but even call sites that remember the right argument order can make mistakes about the actual values. But is (b) always better than (c), in other examples? We limit the code that is responsible for maintaining the boolean condition. is_reachable?
Saga analyzers Sagas have a powerful API, but it’s limited by the confines of C#. You can create a class that is a lousy saga but is still perfectly valid C# code. With Roslyn analyzers and code fixes , we can now do a lot better and help guide you toward the pit of success. Let’s take a look at the new features. ??
This allows application code to introspect on the dynamic behavior of each data source, maintain synthetic metrics which aid the analysis, and create alerts when conditions require. They make use of standard object-oriented concepts and languages (such as C#, Java, and JavaScript). Debugging with a Mock Environment.
This allows application code to introspect on the dynamic behavior of each data source, maintain synthetic metrics which aid the analysis, and create alerts when conditions require. They make use of standard object-oriented concepts and languages (such as C#, Java, and JavaScript). Debugging with a Mock Environment.
Every member creates the most comprehensive understanding they can of each story, which they express both through artifact (story narrative or code for example) and collaboration with other team members (story walkthroughs and desk checks). Good managers know how to work the problem and solution space.
Instead, focus on understanding what the workloads exercise to help us determine how to best use them to aid our performance assessment. This all sounded very similar to HammerDB TPROC-C workload (we will look at HammerDB TPROC-H (OLAP) another time), so it is easy for any reader to think both workloads are about the same. and 8.0.32
The Twizzler KVS (key-value store) is just 250 lines of Ccode, and uses one persistent object for the index structure, and a second one for the data. This is left as an exercise for the application developer at present. Cross-object pointers make this easy and natural. The FOT structure has some pros and cons. .
a AS /* comment here because -- chaos */ int = 5 , @b AS varchar ( 64 ) = 'AS = /* BEGIN @a, int = 7 */ ' 'blat' '' , @c AS int = -- 12. So I wrote some PowerShell code to step through a procedure to see which other tokens were identified. . -- AS BEGIN, @a int = 7 'blat' AS =. /* AS BEGIN, @a int = 7 'blat' AS = -- */. @a
– -c the control file. I started with a cmd file script exercising the connection path. We then found a few code paths in find login that did not switch to preemptive before making a call to SSSD or LDAP for Linux, AD activities. . – -S target server name forcing tcp protocol. – -T146 disable encrypted TDS.
A peculiar throughput limitation on Intel’s Xeon Phi x200 (Knights Landing) Introduction: In December 2017, my colleague Damon McDougall (now at AMD) asked for help in porting the fused multiply-add example code from a Colfax report ( [link] ) to the Xeon Phi x200 (Knights Landing) processors here at TACC.
Introduction: In December 2017, my colleague Damon McDougall (now at AMD) asked for help in porting the fused multiply-add example code from a Colfax report ( [link] ) to the Xeon Phi x200 (Knights Landing) processors here at TACC. Instead, we found puzzle after puzzle. Instead, we found puzzle after puzzle.
We organize all of the trending information in your field so you don't have to. Join 5,000+ users and stay up to date on the latest articles your peers are reading.
You know about us, now we want to get to know you!
Let's personalize your content
Let's get even more personalized
We recognize your account from another site in our network, please click 'Send Email' below to continue with verifying your account and setting a password.
Let's personalize your content