From the blog

A guide to designing and shipping AI developer tools

After three-plus years of concepting, designing, and shipping AI-driven developer tools, GitHub is continuing to explore new ways to bring powerful AI models into the developer workflow. Along the way, we’ve learned that the most important aspect of designing AI-driven products is to focus extensively on the developer experience (DevEx). While it can now feel like there’s a new AI announcement from every company every week, we’re here to reflect on what it takes to build an AI product from scratch—not just to integrate an LLM into an existing product. In this article, we’ll share 10 tips for designing AI products and developer tools, and lessons we learned first-hand from designing, iterating, and extending GitHub Copilot. Let’s jump in. Tip 1: Build on the creative power of natural language “The hottest new design system is natural language,” reports the team designing GitHub Copilot. According to them, the most important tools to develop right now are ones that will allow people to describe, in their respective natural languages, what they want to create, and then get the output that they want. Leveraging the creative power of natural language in AI coding tools will shift the way developers write code and solve complex problems, fueling creativity and democratizing software development. Idan Gazit, Senior Director of Research for GitHub Next, identifies new modalities of interaction, or patterns in the way code is expressed to and written by developers. One of those is iteration, which is most often seen in chat functionalities. Developers can ask the model for an answer, and if it isn’t quite right, refine the suggestions through experimentation. He says, “When it comes to building AI applications today, the place to really distinguish the quality of one tool from another is through the tool’s DevEx.” To show how GitHub Copilot can help developers build more efficiently, here’s an example of a developer learning how to prompt the AI pair programmer to generate her desired result. A vague prompt like, “Draw an ice cream cone with ice cream using p5.js,” resulted in an image that looked like a bulls-eye target sitting on top of a stand: An example of GitHub Copilot responding to a vague prompt to draw an ice cream cone using p5.js and generating an image that looks like a bulls-eye target A revised prompt that specified details about the desired image, like “The ice cream cone will be a triangle with the point facing down, wider point at the top,” helped the developer to generate her intended result, and saved her from writing code from scratch: An example of a GitHub Copilot responding to a specific prompt to draw an ice cream cone using p5.js and generating the developer’s desired result Tip 2: Identify and define a developer’s pain points Designing for developers means placing their needs, preferences, and workflows at the forefront. Adrián Mato, who leads GitHub Copilot’s design team, explains, “It’s hard to design a good product if you don’t have an opinion. That’s why you need to ask questions, embrace user feedback, and do the research to fully understand the problem space you’re working in, and how developers think and operate.” Keeping devs in the flow For example, when designing GitHub Copilot, our designers had to make decisions about optionality, which is when an AI model […]

Read More

Senser Unveils AIOps Platform Using eBPF to Collect Data

Senser emerged from stealth this week to launch an artificial intelligence for IT operations (AIOps) platform that leverages extended Berkeley Packet Filter (eBPF) running in the microkernel of Linux operating systems to collect data from IT environments. Fresh from raising $9.5 million in funding, Senser CEO Amir Krayden said the company’s namesake platform then applies machine learning algorithms to that data to identify issues that could lead to outages. Those insights are surfaced using graph technology to make it simpler to both observe IT environments and triage issues at scale because the AIOps platform is running processes at the microkernel level rather than in user space. The approach provides IT teams with a more efficient and holistic approach to observability at a level of scale legacy platforms can’t achieve, said Krayden. The use of machine learning algorithms also reduces the cognitive load on DevOps teams because issues involving, for example, performance degradations are automatically surfaced, he added. In addition, the company is working toward adding generative AI capabilities to provide summaries that explain what IT events have occurred, noted Krayden. In effect, eBPF changes the way operating systems are designed because it enables networking, storage and observability software to scale at much higher levels of throughput since they are no longer running in user space. That’s especially critical for observability and AIOps platforms that need to dynamically process massive amounts of data in near-real-time. As the number of organizations running the latest versions of Linux continues to increase, more hands-on experience with eBPF will be gained. IT teams may not need to concern themselves with what is occurring in the microkernel of the operating systems, but they do need to understand how eBPF ultimately reduces the total cost of running IT at scale. AI and graph technology, in combination with eBPF, will fundamentally change how IT is implemented and managed. The current complexity of application environments is already exceeding the ability of IT teams to cost-effectively manage them at scale, so the need for a different approach is already apparent. Many IT environments are already too complex for IT personnel to manage without the help of some form of AI. It’s not clear precisely how much AI will automate the management of IT, but it’s not likely the need for humans to manage and supervise these environments will happen any time soon. However, the level of scale at which an IT environment can be effectively managed is changing as AI makes it easier to identify issues and understand their impact. Too often today, there are simply too many dependencies within an IT environment to keep track of using legacy monitoring tools that only track a set of pre-defined metrics. It may be a while before AI is pervasively employed across IT environments, but it’s now more a question of when rather than if. The issue now is determining where the interface between the humans and the machines that are jointly managing IT environments lies.

Read More

Raspberry Pi 5: Faster, Better, Stronger — Spendier

Welcome to The Long View—where we peruse the news of the week and strip it to the essentials. Let’s work out what really matters. In a cheeky extra post this week: Everyone’s favorite single-board ARM computer, the Raspberry Pi, has a new generation coming soon. Compared to the ’4, RPi5 has double the performance, quadruple the base RAM and far more capable I/O. Analysis: And you’ll even be able to buy one The pandemic completely messed up the Raspberry Pi Foundation’s supply chains, meaning they had to focus on supplying companies who’d forward-bought the devices. This time, Eben Upton’s crew are trying to get back to their roots, promising—for the first couple of months—to sell RPi5s only to individuals. What’s the story? Alaina Yee reports—“Raspberry Pi 5 just got announced”: “I can’t wait”Forget the holiday pie, this is what I want on my table for Thanksgiving. … It looks totally badass. … Not only does the Raspberry Pi 5 appear ready to deliver a sizable step up in performance compared to its 2019 predecessor, but its new silicon was designed in-house.…The Raspberry Pi 5 is leaning hard into high-octane mini-computing. … You can expect the Raspberry Pi 5 to be about two to three times faster. Memory bandwidth also doubles.…And … a new official first-party operating system will be launching … in mid-October. Called Raspberry Pi OS, it’s based on the Linux Debian distro, as well as the Raspbian derivative that’s existed for years. … I can’t wait. Speeds and feeds? Brad Linder’s got ’em—“Raspberry Pi 5 offers 2X the performance”: “4x ARM Cortex-A76”The new Raspberry Pi 5 is a single-board computer that’s a major upgrade over the Raspberry Pi 4 … in just about every way. … At launch, there will be two configurations available: a model with 4GB of RAM that sells for $60 and an 8GB version priced at $80. That means the starting model has twice as much RAM as a $35 Raspberry Pi 4.…At the heart of new computer is a new … 16nm chip featuring 4x ARM Cortex-A76 CPU cores @ 2.4 GHz, 512KB per-core L2 cache, 2MB L3 cache, VideoCore VII graphics with support for dual 4k/60 Hz HDMI displays. [It] also features 32-bit LPDDR4X 4267MT/s memory … 2x micro HDMI (4K/60Hz), 2x USB 3.0 Type-A, 2x USB 2.0 Type-A, 1x Gigabit Ethernet with PoE support, 1x USB-C power input, 1x microSD card reader. … There are also two 4-lane MIPI interfaces. Horse’s mouth? Eben Upton—“Introducing: Raspberry Pi 5!”: “We’re incredibly grateful”Virtually every aspect of the platform has been upgraded, delivering a no-compromises user experience. … And it’s the first Raspberry Pi computer to feature silicon designed in‑house here in Cambridge, UK. … Broadcom’s VideoCore VII [is also] developed here.…Like all flagship Raspberry Pi products [it’s] built at the Sony UK Technology Centre in Pencoed, South Wales. We have been working with Sony since the launch of the first Raspberry Pi … in 2012, and we’re firm believers in the benefits of manufacturing our products within a few hours’ drive of our engineering design centre in Cambridge.…We expect the first units to ship by the end of October. … We’re incredibly grateful to the community of makers and hackers who make Raspberry Pi what it is. [So,] we’re going to ringfence all of the Raspberry Pi 5s we sell until at least the end of […]

Read More

What Are The Relaxed Constexpr Restrictions In C++?

In C++, the constexpr specifier is used to declare a function or variable to evaluate the value of at compile time, which speeds up code during runtime. This useful property had some restrictions in C++11, these are relaxed in C++14 and this feature is known as Relaxed Constexpr Restrictions. In this post, we explain what are the relaxed constexpr restrictions in modern C++. What is the constexpr specifier in modern C++? The C++11 standard comes with the introduction of generalized constexpr functions. The constrexpr is used as a return type specifier of function and improves performance by computations done at compile time rather than run time. Return values of constexpr could be consumed by operations that require constant expressions, such as an integer template argument. Here is the syntax:   constexpr   Here is an example of how to use a constexpr in C++:   constexpr double sq(const double x) { return ( x*x ); }   and can be used as shown below.   constexpr double y = sq(13.3);   Note that here we used a constant variable 13.3, that is given in coding, thus the result y will be calculated during compilation as 176.89. Then, we can say, similarly this line will be compiled as we show below:   const double y = 176.89   Is there a simple constexpr specifier example in modern C++? Here we can sum all above in an example. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18   #include   // C++11, a simple constexpr example constexpr double sq(const double x) { return ( x*x ); }   int main() { constexpr double y = sq(13.3); std::cout

Read More

MSVC ARM64 Optimizations in Visual Studio 2022 17.7

MSVC ARM64 Optimizations in Visual Studio 2022 17.7 Hongyon Suauthai (ARM) September 28th, 20230 2 In Visual Studio 2022 version 17.6 we added a host of new ARM64 optimizations. In this 2nd edition of our blog, we will highlight some of the performance improvements to MSVC ARM64 compiler backend, we will discuss key optimizations in the Visual Studio 2022 version 17.7 for both scalar ISA and SIMD ISA (NEON). We started introducing these performance optimizations in 17.6 release and we have landed them in 17.7 release. By element operation ARM64 supports by-element operation in several instructions such as fmul, fmla, fmls, etc.  This feature allows a SIMD operand to be computed directly by a SIMD element using an index to access it. In the example below where we multiply a scalar with an array, MSVC duplicated the vector element v0.s[0] into all lanes of a SIMD register, then multiplied that with another SIMD operand represented by array b.  This is not efficient because the dup instruction will add 2 more execution latency before executing the fmul instruction. To better understand this optimization let’s take the following sample code: void test(float * __restrict a, float * __restrict b, float c) {   for (int i = 0; i < 4; i++)        a[i] = b[i] * c; } Code generated by MSVC 17.6:        dup         v17.4s,v0.s[0]        ldr         q16,[x1]        fmul        v16.4s,v17.4s,v16.4s         str         q16,[x0] In Visual Studio 2022 17.7, we eliminated a duplicate instruction. It now can multiply by a SIMD element directly and the code generation is:        ldr         q16,[x1]        fmul        v16.4s,v16.4s,v0.s[0]         str         q16,[x0] Neon supports for shift right and accumulate immediate This instruction right-shifts a SIMD source by an immediate and accumulates the final result with the destination SIMD register. As mentioned earlier, we started working on this optimization in the 17.6 release and completed the feature in the 17.7 release. In the 17.5 release MSVC turned right shifts into left shifts using a negative shift amount. To implement it that way, it copied a constant -2 into a general register, and then duplicated a general register into the SIMD register before the left shift. We eliminated the duplicate instruction and used right shift with an immediate value in the 17.6 release. It was an improvement, but not yet good enough. We further improved the implementation in 17.7 by combining right shift and add by using usra for unsigned and ssra for signed operation. The final implementation is much more compact than the previous ones. To better understand how this optimization works let’s look at the sample code below: void test(unsigned long long * __restrict a, unsigned long long * __restrict b) {    for (int i = 0; i < 2; i++)        a[i] += b[i] >> 2; } Code generated by MSVC 17.5:        mov         x8,#-2        ldr         q16,[x1]        dup         v17.2d,x8        ldr         q18,[x0]        ushl        v17.2d,v16.2d,v17.2d        add         v18.2d,v17.2d,v18.2d         str         q18,[x0] Code generated by MSVC 17.6:        ldr         q16,[x1]        ushr        v17.2d,v16.2d,#2        ldr         q16,[x0]        add         v16.2d,v17.2d,v16.2d         str         q16,[x0] Code generated by MSVC 17.7:        ldr         q16,[x0]        ldr         q17,[x1]        usra        v16.2d,v17.2d,#2         str         q16,[x0] Neon right shift into cmp A right shift on a signed integer shifts the msb, with the result being either -1 or 0, and […]

Read More

Microsoft C++ Team at CppCon 2023

Microsoft C++ Team at CppCon 2023 Sy Brand September 28th, 20230 2 As always our team will be at CppCon this year with a host of presentations. Many of us will also be present at our team’s booth in the main hall for the first two days of the conference. Come say hi and let us know if you have any questions about our talks, products, or anything else! You can also join the #visual_studio channel on the CppCon Discord to talk to us (note: to join, head to #directory channel first, and check the checkbox next to “Visual Studio” box). We’re also running a survey on the C++ ecosystem. If you have a moment, please take our survey. It’s quick and you could win a utility backpack or duffel bag. Here’s the lineup: Monday 2nd​ Lifetime Safety in C++ – Gabor Horvath – 11am ​ Informal Birds of a Feather for Cpp2/cppfront – Herb Sutter – 12:30pm​ Tuesday​ 3rd​ What’s New in Visual Studio – David Li & Mryam Girmay – 3:15pm​ ​Thursday 5th​​ Cooperative C++ Evolution: Towards a Typescript for C++ – Herb Sutter (Keynote) – 10:30am​ How Visual Studio Code Can Help You Develop More Efficiently in C++ – Alexandra Kemper & Sinem Akinci – 3:15pm​ Regular, Revisited – Victor Ciura – 3:15pm​ Friday 6th​​ Getting Started with C++ – Michael Price – 1:30pm   Sy Brand C++ Developer Advocate, C++ Team Follow

Read More

Useful Features Of Modern C++ That Come With C++14

Hello fellow C++ Developers. This week we continue to explore features from the C++14 standard. One of the features that comes with C++14 is auto return type deduction,. We explain auto return type deduction with very simple examples including lambda and template examples. The Lambda Expression construct is introduced in C++ 11 and further developed in the C++14, C++17, and C++20 standards. In C++14, lambda expressions are improved by the generalized lambda (generic lambda) and we explain how you can use generalized lambda captures in modern C++. Our educational LearnCPlusPlus.org site has a broad selection of new and unique posts with examples suitable for everyone from beginners to professionals alike. It is growing well thanks to you, and we have many new readers, thanks to your support! The site features a plethora of posts that are great for learning the features of modern C++ compilers with very simple explanations and examples. RAD Studio’s C++ Builder, Delphi, and their free community editions C++ Builder CE, and Delphi CE are powerful tools for modern application development. Table of Contents Where I can I learn C++ and test these examples with a free C++ compiler? How to use modern C++ with C++ Builder? How to learn modern C++ for free using C++ Builder? Do you want to know some news about C++ Builder 12? Where I can I learn C++ and test these examples with a free C++ compiler? If you don’t know anything about C++ or the C++ Builder IDE, don’t worry, we have a lot of great, easy to understand examples on the LearnCPlusPlus.org website and they’re all completely free. Just visit this site and copy and paste any examples there into a new Console, VCL, or FMX project, depending on the type of post. We keep adding more C and C++ posts with sample code. In today’s round-up of recent posts on LearnCPlusPlus.org, we have new articles with very simple examples that can be used with: The free version of C++ Builder 11 CE Community Edition or a professional version of C++ Builder  or free BCC32C C++ Compiler and BCC32X C++ Compiler or the free Dev-C++ Read the FAQ notes on the CE license and then simply fill out the form to download C++ Builder 11 CE. How to use modern C++ with C++ Builder? C++11 allowed lambda functions to deduce the return type based on the type of the expression given to the return statement. The C++14 standard provides return type deduction in all functions, templates, and lambdas. C++14 allows return type deduction for functions that are not of the form return expressions. In this post, we explain the auto keyword, what is an auto type deduction, and how we can use it in functions, templates, and lambdas. In the first post, explain what is auto return type deduction. Lambda Expressions allow users to write an inline expression that can be used for short snippets of code in your C++ app which are not going to be reused and don’t require naming. The Lambda Expression construct is introduced in C++ 11 and further developed in the C++14, C++17, and C++20 standards. In C++14, lambda expressions are improved by the generalized lambda (generic lambda) or initialized lambda feature, and in the next post, we remember what lambda is and explain what a generic lambda is, and how we can use it. C++14 standard […]

Read More

Announcing the new updated RAD Server Technical Guide

Back in 2019, David I wrote a fantastic guide to RAD Server that has been very popular in helping developers develop new, and migrate older systems towards a RESTful architecture. There have been a number of updates to RAD Server since the guide was originally launched, including a number of new components that have simplified and made RAD Server even more RAD!  We have also had a lot of feedback over time about using the guide, and we have incorporated a large part of that into the new, heavily revised version. Today we launch the first part of that guide but with a refreshed approach. Now you will find not only the text guide but also source code examples that you can directly download from Github for both Delphi and C++Builder, and also includes a comprehensive video series supporting each chapter.  To download the latest RAD Server Technical Guide for Free, just click the next button: Download guide Once you have downloaded the new guide, you will find in the paper the links for the GitHub repository with all the examples as well as the video series included. The list of the current published chapters is: Chapter 1: What’s RAD Server – IntroductionChapter 2: Using the RAD Wizard to Create a “hello world”Chapter 3: Creating your first CRUD ApplicationChapter 4: REST DebuggerChapter 5: Using FireDAC Batch Move and JSONWriterChapter 6: JSONValue, JSONWriter and JSONBuilderChapter 7: Creating your own customized endpointsChapter 8: Accessing the built-in analyticsChapter 9: Deploying RAD Server (Windows, Linux & Docker)Chapter 10: RAD Server Lite Our plan is to keep this guide updated and release new chapters progressively in the future so stay tuned for upcoming updates. Reduce development time and get to market faster with RAD Studio, Delphi, or C++Builder. Design. Code. Compile. Deploy. Start Free Trial   Upgrade Today    Free Delphi Community Edition   Free C++Builder Community Edition

Read More

Generative AI’s Impact on Developers

There is a growing belief in the developer community that future software development will be performed by machines rather than humans by 2040. Software development will undergo a radical change with the combination of machine learning, artificial intelligence, natural language processing and code generation that draws from large language models (LLMs). Most organizations believe that there will be a 30-40% improvement in overall developer productivity with AI. While these arguments have some merit, I do not believe developers will be fully replaced. Instead, I believe generative AI can augment developers to support faster development and higher-quality code. I’ll address the impact of generative AI on the development community under three pillars: Automation and productivity Quality engineering and compliance Ways of working Automation and Productivity There will be a focus on increased automation all the way from business planning to operations of applications. LLMs can help provide better alignment of user stories to business requirements. In fact, one of the best use cases for generative AI during planning phases is to auto-generate user stories from business requirements documents. Since ambiguity of requirements or guesswork is taken out of the equation, one can expect a clearer “definition of done” through the auto-creation of acceptance criteria. In a typical development cycle, 15%-20% of coding defects are attributed to improperly defined requirements. Generative AI augmentation can result in significant reduction of those defects. Generative AI augmentation can help developers with better planning and estimation of work. Rather than relying on personal experience or home-grown estimation models, LLMs can better predict the complexity of work and developers and continually learn and adapt through multiple development sprints. AI-augmented code creation can allow developers to focus on solving complex business problems and creative thinking rather than worrying about repetitive code generation. Over the last decade or so, the perception of software development as a creative pursuit has been a dying phenomenon. With AI, I think that more and more younger developers will be attracted to the field. AI will put the “fun” back in coding. AI-assisted DevOps and continuous integration will further accelerate deployments of code so developers can focus more on solving complex business problems. Deployment failures due to human errors can be drastically reduced. Elaborating on the above, newer and less experienced developers can also generate higher-quality code with AI-augmentation, leading to better overall consistency of code in large programs. Overall, from a development standpoint, I think AI augmentation will free up 30% of developers’ time to work on enhancing user experience and other value-added tasks. Quality Engineering and Compliance In a hybrid cloud world, solutions will become more distributed than ever, making system architecture more complex. LLMs can assist in regulating design documents and architecture work products to conform to industry/corporate standards and guidelines. In essence, LLMs can act as virtual Architecture Review Boards. In a typical development life cycle, architecture/design reviews and approvals make up 5%-8% of work and augmenting the process with generative AI capabilities can cut that time in half. Ssecurity compliance for cloud-based solutions is imperative. LLMs can assist in ensuring such compliance very early on in the development life cycle, leading to more predictable deployments and timely program delivery. Generative AI-augmented test case creation can optimize the number of test cases needed to support the development while increasing the […]

Read More

How To Use Variable Templates In Modern C++

The template is one of the great features of modern C++. They are a simple and very powerful statement in C++ that defines the operations of a class or function. The C++14 standard and above allows the creation of variables that are templated. In this article, we will explain variable templates in C++ with examples that can be used in a professional IDE and compiler that supports C++14, C++17, and over.  First of all, let’s remind ourselves what a C++ template is. What is a template in C++? A template is a very powerful statement in C++ that simply defines the operations of a class, a function, an alias, or a variable and lets the user apply the same template on different types in those template operations. Templates are like macros in C++, considered in compilation except compiler checks types used before the template is expanded in its terms. In the compilation mechanism of a template in C++, the source code contains only a template for a function or class, but when it is compiled, the same template can be used on multiple data types. Templates are powerful entities that can be parameterized by one or more parameters. These parameters can be type template parameters, non-type template parameters, and template template parameters (parameters which are themselves templates). What is a variable template in modern C++? A variable template is used to define a family of variables or static data members. If a static data member is instantiated from a static data member template, it is called an instantiated static data member. A variable template can be introduced by a template declaration at namespace scope, where a variable declaration declares a variable. The C++14  standard and above allows the creation of variables that are templated. In C++11, only functions, classes, or type aliases could be templated.  Syntax of a variable template;   template variable_declaration   The usual rules of templates apply to such declarations and definitions, including specialization. Where is a simple variable template example in modern C++? Variable templates are used to instantiate the variables separately for the type. For example, we can assign 9.80665 to the g variable in T form ( i.e. T(9.80665) ) as a float or double or long double type and that would be g or g or g or g in template usage. Here is a simple variable template example that is used to define standard gravity value.   template constexpr T gravity = T(9.80665);   Is there a variable template instantiation example in modern C++? Now, let’s use this in a template. We can define a force template (force = mass x gravity) as shown below:   template T force(T mass) // function template { return mass*gravity; // gravity is a variable template instantiation }   here gravity is a variable template instantiation. Is there a full example of variable templates in modern C++? Here is an example variable template instantiation to different types. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29   #include   template T gravity = T(9.80665);   // template constexpr T gravity = T(9.80665);   template T force(T mass) // function template { return mass*gravity; // gravity is a variable template instantiation } int main() { auto g1 = gravity; […]

Read More