c++ - Tomato Soup https://www.wholetomato.com/blog Visual Assist Team Blog Wed, 28 Aug 2024 05:44:14 +0000 en-US hourly 1 https://wordpress.org/?v=6.4.5 https://i0.wp.com/www.wholetomato.com/blog/wp-content/uploads/2020/05/cropped-wt-logo.jpg?fit=32%2C32&ssl=1 c++ - Tomato Soup https://www.wholetomato.com/blog 32 32 227787260 The biggest challenges in writing C++ programs for finance and banking https://www.wholetomato.com/blog/2024/08/28/the-biggest-challenges-in-writing-c-programs-for-finance-and-banking/ https://www.wholetomato.com/blog/2024/08/28/the-biggest-challenges-in-writing-c-programs-for-finance-and-banking/#respond Wed, 28 Aug 2024 05:44:14 +0000 https://www.wholetomato.com/blog/?p=3899 Introduction When it comes to developing software for the finance and banking industry, C++ is often the language of choice due to its performance, efficiency, and flexibility. However, writing C++ programs in this highly regulated...

The post The biggest challenges in writing C++ programs for finance and banking first appeared on Tomato Soup.

]]>
Introduction

When it comes to developing software for the finance and banking industry, C++ is often the language of choice due to its performance, efficiency, and flexibility.

However, writing C++ programs in this highly regulated and fast-paced environment comes with its own set of challenges. From managing the complexity of legacy codebases to ensuring real-time performance for trading systems, developers face numerous hurdles. Regulations and stringent security measures, compliance with industry regulations, and the ever-present demand for high reliability and accuracy also compound this problem. 

In this blog, we will explore some of the biggest challenges C++ developers encounter when creating software solutions for the finance and banking sector.

Why use C++ in Financial Software

Banks and financial institutions are always looking to improve their trading infrastructure and upgrade their data-management capabilities. Having the best financial model mathematical models help generate profits and reduce risk in a highly volatile and time-sensitive market.

And it just so happens that C++, a low-level language, is the top choice due to its speed and efficiency, making it a preferred choice for high-frequency trading platforms, risk management systems, and other critical financial applications.

The challenges to becoming a programmer in the financial industry

When you’re a developer in the financial industry, it’s almost always a given that apart from being able to program, you would also be able to understand the math to validate various financial models. Some developers may also conduct research and hypothesize on new trading strategies themselves.

Becoming a quantitative analyst, bank developer, or high-frequency trader can be very lucrative career choices. However, it also means that there are stricter requirements and skill sets to be qualified.

As an aspiring developer, here are the key problems and frustrations that C++ developers in the financial industry should keep in mind:

Training requirements and developer skill set

  • Steep learning curve
    You can be a decent trader and a researcher using basic programming and scripting languages such as Python. But on the other hand, knowing C++ from just a broad level won’t be able to help you as much since you won’t be able to utilize the low latency advantages. If you really want to implement models and develop applications for the industry, there is a certain level of optimization skills you need first.
  • Understand modeling and simulations. It comes as no surprise, but there is a hefty amount of math involved in the financial industry. Financial algorithms can be mathematically intensive, requiring developers to have a strong understanding of quantitative finance and numerical methods.
  • Need to invest in skills other than programming? Developers often need to implement complex models that simulate market conditions or risk factors, which requires a deep understanding of both finance and C++. However, this is less of a problem if you’re working with a diversified team of developers, traders, and analysts.

Programming requirements: Performance Optimization

  • Low Latency Requirements
    Financial applications, especially in trading, require extremely low latency. Developers must continuously optimize their code to reduce execution time to microseconds or even nanoseconds.
  • Resource Management
    Efficient memory management is crucial—each unoptimized bit of code can amount to micro delays that can be the difference between a winning and a losing trade. C++ developers need to carefully manage resources, avoid memory leaks, and ensure optimal memory performance in their code.
  • Accuracy and code correctness: Financial applications often rely on parallel processing to handle large volumes of data. The source code and the project itself may not be massive, but the intricacies involved must be accurate because of the sensitive nature of market prices. Still, managing developer mistakes and errors in C++ can be challenging and error-prone.

Programming requirements: Performance Optimization

  • Low Latency Requirements
    Financial applications, especially in trading, require extremely low latency. Developers must continuously optimize their code to reduce execution time to microseconds or even nanoseconds.
  • Resource Management
    Efficient memory management is crucial—each unoptimized bit of code can amount to micro delays that can be the difference between a winning and a losing trade. C++ developers need to carefully manage resources, avoid memory leaks, and ensure optimal memory performance in their code.
  • Accuracy and code correctness: Financial applications often rely on parallel processing to handle large volumes of data. The source code and the project itself may not be massive, but the intricacies involved must be accurate because of the sensitive nature of market prices. Still, managing developer mistakes and errors in C++ can be challenging and error-prone.

Programming requirements: Compliance and Regulations

  • Compliance with regulations
    Apart from being mathematically complex enough as it is, financial software must comply with stringent regulations within the company and the government. Developers need to ensure that every bit of their code adheres to compliance requirements—this can vary by region and change frequently.
  • Auditability
    The code must be auditable, meaning that it should be easy to trace and understand how financial decisions are made by the software, which adds another layer of complexity.
  • Vulnerability Management
    There are many available libraries and third party extensions for C++ developers. Developers, however, need to stay on top of potential vulnerabilities in C++ libraries or the codebase itself to prevent exploits.

Tips for facing these challenges

  • Study the math, polish your C++
    As mentioned earlier, you can be a pure developer and just implement whatever algorithms that are supplied to you. But to become a better analyst and interpret trends yourself, you need to equip yourself  with more than programming skills.If you’re looking to familiarize yourself with the concepts, there are many great resources available such as Investopedia. For specific use cases or general C++ skills, a good old reference book (such as those from Scott Meyers or one from Bjarne Stroustrup himself) will always be great options.For references regarding high performance C++, there are also great resources online such as:

  • Invest in understanding above and beyond your tasks

Banks and financial institutions, especially top ones, will only hire the cream-of-the-crop devs. Average devs with pedestrian level finance knowledge will be less appealing for the simple fact that for an expensive role, financial firms expect the maximum returns. 

This often means that being a financial developer entails learning and understanding current market trends, calculating opportunity costs, and economic theories yourself—not just the technical aspects of implementing them into an algorithm.

  • Get all the help you can

Take note of tidbits of knowledge you’ll pick up on the spot from existing codebases accessible to you. Colleagues may also come to you directly and give you advice on how best to tackle certain financial puzzles.

As for developer tools, they are oftentimes underestimated in terms of how helpful technology can be when you’re developing software and finance algorithms. Having a conducive and smart development environment can be the small difference between a timely implementation hauling your company massive profits, or an unfortunate missed opportunity.

Try to invest in software that allows you to focus and concentrate on the core work such as thinking and planning. For example, there are many productivity tools available online that seek to help developers monitor their code’s quality. There are also tools that help in maintaining or refactoring code bases. These are all tools that can help you stay on the cutting edge.

Protip for those coding in Visual Studio C++

Visual Studio remains the premier IDE for C++, especially serious C++ programming such as financial services. That includes deploying to Linux. Visual Studio is a robust IDE for developing C++ financial programs because it offers powerful debugging and code analysis tools, which are crucial for maintaining high-quality, error-free code in critical financial applications, plus strong performance and profiling tools. 

It provides extensive support for modern C++ standards and libraries, ensuring compatibility and performance optimization. The IDE integrates well with various version control systems, enabling smooth collaboration and code management among development teams. Additionally, Visual Studio’s extensive ecosystem of extensions and plugins allows developers to customize their environment to fit specific financial industry requirements.

There are general plugins that augment the entire IDE with faster processes and more intuitive workflows. For example, Visual Assist, one of the most popular VS extensions, provides faster ways to navigate projects, convenient one-click solutions to maintaining code, and additional syntax support not available in the default VS IDE. Here are some specific features:

When writing high performance C++ you’ll find yourself doing things like (for example) avoiding memory allocation, and Visual Assist’s set of refactorings can assist with all sorts of work that can move code around to assist your improvements. A trivial example is converting a heap-allocation to a stack allocation via the Convert Pointer to Instance refactoring.

You can’t underestimate how helpful it is especially in a high-stress and time-sensitive profession.

Those jobs are high stress and lots of crunch is expected. Our navigation features get you around much faster than the built in tools Open File in Solution, Find Symbol in Solution and Find References just works that much better and faster.

Conclusion

Becoming a programmer in the financial industry is no small task. There are many significant challenges presented to you both as a programmer and as a learner.  It is a constantly evolving profession—like a perpetual hackathon. You have to stay on top tech and industry trends to ensure your company is getting the best results it can. 

Study beyond your delegation. Utilize all the tools at your disposal. And most importantly, persevere. 

The post The biggest challenges in writing C++ programs for finance and banking first appeared on Tomato Soup.

]]>
https://www.wholetomato.com/blog/2024/08/28/the-biggest-challenges-in-writing-c-programs-for-finance-and-banking/feed/ 0 3899
Catching up with VA: Our most recent performance updates https://www.wholetomato.com/blog/2024/07/21/catching-up-with-va-our-most-recent-performance-updates/ https://www.wholetomato.com/blog/2024/07/21/catching-up-with-va-our-most-recent-performance-updates/#respond Sun, 21 Jul 2024 21:31:14 +0000 https://www.wholetomato.com/blog/?p=3848 Throughout its long lifetime, Visual Assist (VA) has been a top-of-the-line productivity plugin with a performance advantage over Visual Studio and other plugins. Performance and speed has been a bread-and-butter factor for choosing VA—and we’ve...

The post Catching up with VA: Our most recent performance updates first appeared on Tomato Soup.

]]>
Throughout its long lifetime, Visual Assist (VA) has been a top-of-the-line productivity plugin with a performance advantage over Visual Studio and other plugins. Performance and speed has been a bread-and-butter factor for choosing VA—and we’ve doubled down with updates focused on cutting interruptions and load times.

VA had significant improvements in 2024, particularly in the initial startup time for projects, as well as in the responsiveness of a few key features. It is not farfetched to say that performance has been the primary consideration for the development direction of the plugin.

Why? Because performant, responsive software is productive software, and fast interaction is key to you getting your work done.

We have a lot of solid, robust features based purely on providing not the kitchen sink, but what you need. We already had a reputation for being faster than other products. Now we are even faster: VA is a lean, mean, coding machine.

We’re midway through the year, and we’re summarizing all the recent performance updates in this handy update blog. Read on further to get a more complete picture of when and why these changes were introduced to VA.

Faster startup sequence

Whatever task you have, you first must open and launch Visual Studio—along with any installed plugins you have. Opening a Visual Studio-associated file initiates the startup process which starts loading the essential IDE assets, the solution files you have chosen, and ultimately any auxiliary components like Visual Assist.

While we cannot alter the core loadout of Visual Studio, we’ve worked on every facet of our tool that can be optimized for faster startup:

  • Project initial parsing

    Project parsing is an extra step that code assistant plugins like Visual Assist need to undertake. VA uses its own parser independent of Visual Studio’s which allows it to pre-scan projects so it can be faster, smarter, and able to provide different functions.

    The release in January 2024 featured an overhaul of the parser, which reduced startup times for opening previously unparsed project files by up to 15 times.

    While an initial parse is only done the first time you open a project. The next time you open it, it will be instant. (This was an existing feature.) However, we made it 15x faster for those of you who are opening multiple new projects on a more frequent basis.

    For example, an Unreal Engine project with its typically massive code base previously took 15 minutes to parse. We’ve brought this down to a mere one minute of parsing.

    Tech details: Visual Assist implemented a cache for parsed directories to bypass slow Windows file IO API calls where the same call is expected to give the same result—this significantly reduced the initial parse time.

     

  • Plugin load time

    This update refers to the time it takes for Visual Assist’s features to become functional. As mentioned above, the time-to-functional is the sum of all Visual Studio’s startup routine which includes loading in plugins.
    Every time you close and open a solution, VA’s features take a few moments to load—or at least that’s how it was before. With this update, time-to-functional is more or less instantaneous even in extremely large solutions! 

    As soon as Visual Studio calls on Visual Assist to start loading, you’ll immediately see coloring and syntax highlighting, and have access to all navigation and features. (Note: How Visual Studio initializes plugins and components is indeterminate; results may vary slightly depending on how many components it loads first before Visual Assist.)

    What these changes mean for you:

     

    Depending on how often you need it, the Visual Studio startup sequence and project load can be a part of your feedback cycle when testing and coding. And even a mere 30 seconds are painful and a threat to productivity when repeated, especially when they add up in a work week.

    This is even more pronounced when your work entails opening new projects multiple times in a week. Visual Assist is the best in-class plugin that offers significantly less startup time—giving you more time to be productive.

    READ: Visual Assist startup duration update

Search dialogs: Find References and File Finding

Since starting our crusade against a slow and unresponsive IDE,  there have been two updates that shortened the loading time for finding references and symbols. Utilizing techniques such as parallelism and removing extraneous string searches, you’ll  enjoy up to ten times faster search time.  

Furthermore, better accuracy and new functionality has been added for other search dialogs, including fuzzy search for Open File in Solution.

  • Find references speed and responsiveness

Find references is a feature that looks for symbol usage within the current project or solution. Depending on the project size, there may be hundreds to thousands of symbol definitions in your solution, and many of those, tens of thousands of times they may be used. In order for code navigation to work, VA must scour its database for the correct results.

Find references time increases with the number of symbols in the database. However, VA’s feature has been greatly improved for performance and speed—almost ten times faster than before! That means that this performance improvement applies to many key features and navigations.

Some other common and key features in VA improved by this change: 

  • Renaming finds references in order to rename them.
  • Implement Methods finds methods in order to know which ones do and do not exist
  • Change signature works similarly.

    Visual Assist’s Find references window. Takes significantly less time to find all references in 2024.3.

  • Fuzzy search and uppercase search for opening files and searching symbols

    Fuzzy search is a technique used in searches and information retrieval to find approximate matches for a given query, accommodating variations like typos and misspellings. It employs string distance metrics to measure the similarity between strings.

    Apart from being fast, Open File in Solution and Find Symbol in Solution support this technique, so you can expect more meaningful results with fewer, less accurate search queries.

    Furthermore, beyond fuzzy searching for inexact matches, VA will also match capital letters. For example, if you have a class named MyClassName, searching for “mcn” would find it. Similarly, suppose you have a global variable named myGlobalVariable and type “mgv” – the lowercase “my” is treated as if it were MyGlobalVariable, providing expected results.

  • Move Class feature

    Refactoring and moving entire classes can be a hassle. This feature has completed its beta phase to provide full support for porting an entire class to the file(s) of your choosing.

  • Bonus QoL Change: Select all items in open file in solution (Ctrl + A)

    You can now select and highlight multiple files and open them simultaneously when using open file in solution. The usual shortcut Ctrl + A works.

    What these changes mean for you:

    As a C++ developer, you frequently search for files and symbols in massive projects. So even small reductions in wait times or interruptions cumulatively boost your overall productivity to a significant degree.

Summary

Performance improvements are and will remain the focus of Visual Assist in upcoming releases. As projects grow larger and C++ features grow in complexity, we too must adapt and scale our performance to meet the increasing workload and demands on our parser and product capabilities.

This is our most important aim: speedy performance and accurate responses so you can focus on thinking and problem solving—the crucial parts of coding.

We’re only halfway through the year, so let us know what we should improve upon next. Thank you for your continued use and support of Visual Assist!

The post Catching up with VA: Our most recent performance updates first appeared on Tomato Soup.

]]>
https://www.wholetomato.com/blog/2024/07/21/catching-up-with-va-our-most-recent-performance-updates/feed/ 0 3848
Visual Assist 2024.4 release post – ARM Support https://www.wholetomato.com/blog/2024/06/12/visual-assist-2024-4-release-post-arm-support/ https://www.wholetomato.com/blog/2024/06/12/visual-assist-2024-4-release-post-arm-support/#respond Wed, 12 Jun 2024 22:00:59 +0000 https://www.wholetomato.com/blog/?p=3839 It’s our pleasure to announce a new Visual Assist release, headed by a major addition—supporting ARM! We hope you find this release useful. Visit our website to download the release. ARM support Big news for...

The post Visual Assist 2024.4 release post – ARM Support first appeared on Tomato Soup.

]]>
It’s our pleasure to announce a new Visual Assist release, headed by a major addition—supporting ARM!

We hope you find this release useful. Visit our website to download the release.

ARM support

Big news for Visual Assist’s device support! Windows ARM is now supported starting this release, Visual Assist 2024.4. Visual Assist is now available as a fully ARM-native plugin, fully supported in Visual Studio’s ARM build. This means that Visual Assist is now fully compatible for those of you using Macs or Windows devices with an ARM processor. 

We first asked our community about ARM support some time ago. At the time, while it was clear ARM was growing for Macs, it was unclear how strongly it would grow for Windows and we planned support at a future time. Since then, we’ve seen growing interest and customer requests – and we’re happy to deliver! The appearance we see is that many people, including large companies, are increasingly interested in or using ARM for Windows.

There are many advantages to using Windows ARM devices, from battery usage to performance. One key one is that many developers target ARM devices and are used to debug remotely; while debugging on-device or on-simulator remains important, it can be slow and doing minute-to-minute development on a device that shares the same CPU architecture can be very useful.

ARM is a completely new front for us and we would like to know more about how we can improve the experience for ARM users. If you’re part of the group that would benefit from this update, please let us know more by answering this short survey.

Path “/” delimiter

This simple change adds an option for users who are used to using “/” as path delimiters for searching directories. This comes at the heel of users from different operating systems sharing how their default style of delimiter is not supported. 

With this change, you can now choose what the default delimiter will be used. This will apply to most of Visual Assist’s search windows such as Open file in solution and the like.

Bug fixes and improvements

Apart from the above major fixes, we have a couple of minor bug fixes and QoL changes. The highlights are a fix for recognizing one of the features in the standard library. 

The complete list is below: 

  • Fixed issue where std::tuple would not be recognized in some cases.
  • Move Class to New File will no longer jump to a new file before showing the dialog.
  • Fixed broken Discord invite link.

Send us a message or start a thread on the user forums for bug reports or suggestions. Don’t forget to join our Discord too!

Visit our download page to update to the latest release manually. Happy coding!

The post Visual Assist 2024.4 release post – ARM Support first appeared on Tomato Soup.

]]>
https://www.wholetomato.com/blog/2024/06/12/visual-assist-2024-4-release-post-arm-support/feed/ 0 3839
Visual Assist 2024.3 release post https://www.wholetomato.com/blog/2024/05/02/visual-assist-2024-3-release-post/ https://www.wholetomato.com/blog/2024/05/02/visual-assist-2024-3-release-post/#respond Thu, 02 May 2024 20:42:22 +0000 https://www.wholetomato.com/blog/?p=3811 Another Visual Assist update?! VA 2024.3 is headlined by a dramatic improvement to the performance of Find References. This release also features both a fix and an improvement related to Move Implementation. We also have...

The post Visual Assist 2024.3 release post first appeared on Tomato Soup.

]]>
Another Visual Assist update?! VA 2024.3 is headlined by a dramatic improvement to the performance of Find References. This release also features both a fix and an improvement related to Move Implementation. We also have some key features exiting their beta phase (try them out!). Lastly, performance for C# should be better than ever with key fixes rolling out in this release.

Download the release now from our website.

Better find references results in multiple faster features

If you’ve updated to at least Visual Assist 2024.1, you may have been enjoying the benefits of the significantly improved parser performance that cut initial parsing time fifteenfold. In this release, we’ve added something even bigger: performance improvements not at startup, but all the time

Find references, the feature that looks for symbol usage within the current project or solution, has been greatly improved for performance and speed. But the Find References engine is used for many other common and key features in Visual Assist! Renaming finds references in order to rename them; implement methods finds methods in order to know which ones do and do not exist; and so forth. That means that this performance improvement applies to many key features and navigations; Rename, Change Signature, Implement Methods and more.

Visual Assist’s Find references window. Takes significantly less time to find all references in 2024.3.

Test Results

The development team ran a few tests to compare the performance of find references between the new Visual Assist version versus an older version of the same plugin. Furthermore, they also tested it against the performance of Visual Studio’s default Find References. 

The test was done on Unreal Engine 5.3 source code using Lyra game examples with two symbols: TOptional and MakeBox as the basis for which references are to be searched. The test was done using Visual Studio 2022 17.8 and Visual Assist 2024.3 & 2024.2. Time was measured from the start of Find References to all references found.

The result of the tests are as follows:

Setup 1 – TOptional:

Run 1 Run 2 Run 3 Average
Visual Assist 2024.3 5:11 4:25 4:17 4:37
Visual Assist 2024.2 14:27 18:02 13:12 15:13
Visual Studio 2022 38:26 * * 38:26
Setup Specs:AMD Ryzen 7, 7800X3D processor, Team T-Force Delta 32GB (2 x 16GB) 288-Pin PC RAM, Crucial T700 Gen5 NVME M.2 SSD
* Test timeout. 

 

Setup 2 – MakeBox:

Run 1 Run 2 Run 3 Average
Visual Assist 2024.3 0:42 0:45 0:43 0:43
Visual Assist 2024.2 1:41 1:40 1:34 1:38
Visual Studio 2022 2:34 2:22 2:27 2:27
Setup Specs:AMD Ryzen 7, 7800X3D processor, Team T-Force Delta 32GB (2 x 16GB) 288-Pin PC RAM, Crucial T700 Gen5 NVME M.2 SSD

As one can surmise from the results, the latest update brings Visual Assist’s symbol finding performance well above that of default Visual Studio’s and other similar plugins. Further testing on other platforms will be undertaken. Please refer back to this page later for more testing.

Exiting Beta: CUDA core development support & Move Class feature

Two VA features enter their stable phase and are now on general availability. If you have not tried these yet, we highly recommend trying them out as it provides a lot of usefulness that might not be readily apparent.

  • CUDA support
    First added in 2023.4, CUDA support allowed Visual Assist to recognize CUDA files and parse and highlight them like regular C/C++ files. This feature now enters full supported status and you can reliably use Intellisense-like features for CUDA files.
  • Move Class feature
    Refactoring and moving entire classes can sometimes be a hassle. This feature moves from beta to supported status and allows you to easily choose an entire class and port it over to file/s of your choosing.

Create File: specify a directory + auto implementation.

This is a tiny but useful quality of life change for creating files. Prior to this change, Visual Assist would sometimes display a failure error and ask you if you wanted to Create File or to stop if a target was not found. Now, it runs create file automatically and you can hit Cancel instead.

Furthermore, a bug fix for when using create file: Visual Assist will consistently move the implementation afterwards. (In the past, it sometimes failed to do so.) 

These two changes will hopefully make your experience more seamless and intuitive.

Discord link and feedback options in the Help menu

Introducing our newly opened Discord server for all Visual Assist users. We’re hoping for this hub to function like our forums wherein users can request for changes, report bugs, and share useful information and tips around the plugin.

As it’s a WIP, anyone who is interested in helping us manage and build the community is welcome to do so. Send us a message here if you’re interested.

Furthermore, we’ve added new feedback channels in one of our menus. Navigate to Help and browse new feedback options and let us know what you think!

Bug fixes and improvements

Apart from the above major fixes, we have a couple of minor bug fixes and QoL changes. The complete list is below: 

  • Fixed issue where Move Implementation would not move the implementation if a new file needed to be created.
  • Improved editor performance when editing C#.
  • Fixed Add Include issue where C headers would sometimes be added instead of their C++ counterparts.
  • Fixed issue where Move Class to New File would sometimes not be offered near macros.

Send us a message or start a thread on the user forums for bug reports or suggestions.

Visit our download page to update to the latest release manually. Happy coding!

The post Visual Assist 2024.3 release post first appeared on Tomato Soup.

]]>
https://www.wholetomato.com/blog/2024/05/02/visual-assist-2024-3-release-post/feed/ 0 3811
Visual Assist 2024.2 release post https://www.wholetomato.com/blog/2024/03/28/visual-assist-2024-2-release-post/ https://www.wholetomato.com/blog/2024/03/28/visual-assist-2024-2-release-post/#respond Thu, 28 Mar 2024 18:45:09 +0000 https://www.wholetomato.com/blog/?p=3797 It only has been a minute since the last performance-focused release but Visual Assist 2024.2 is here, squeezing even more performance to set it apart from other coding assistants! Continuing the theme of the last...

The post Visual Assist 2024.2 release post first appeared on Tomato Soup.

]]>
It only has been a minute since the last performance-focused release but Visual Assist 2024.2 is here, squeezing even more performance to set it apart from other coding assistants! Continuing the theme of the last version, this release is focused on getting rid of interruption or downtime, and overall just making the Visual Studio experience as responsive as possible.

Download the release now from our website.

Significantly faster plugin startup time—especially in large solutions.

This update refers to the time it takes for Visual Assist’s features to become functional. Every time you close and open a solution, the plugin’s features take a few moments to load—or at least that’s how it was before. With this update, time-to-functional is more or less instantaneous even in extremely large solutions

As soon as Visual Studio calls on Visual Assist to start loading, you can immediately see coloring, syntax highlighting, and all the navigation and features are accessible. (Note: How Visual Studio initializes plugins and components is indeterminate; results may vary slightly depending on how many components it loads first before Visual Assist.)

This is not to be confused with the initial parse time update that we did in VA 2024.1 which is only a one-time process that happens with each new solution.

Further improvement to our initial parse time.

As mentioned above, we made significant improvement with the initial project parsing. Most of the benefits from 2024.1 were the result of optimizing how Visual Assist goes through files as it traverses references and includes. 

To summarize, Visual Assist used a cache for parsed directories so that it does not have to access the hard disk when an include is referenced multiple times—this significantly reduced the initial parse time.

In 2022.2, however, the developers have squeezed more performance by optimizing smaller items such as string operations, parse logic, etc. This produced a relatively modest but still significant decrease in project parse time.The result is a up to 50% faster parse time versus the previous version. Or in absolute units, that means VA 2024.2 is around 20 seconds faster than VA 2024.1 in our test scenario, where the Lyra demo is now ready in under a minute.

Testing:

Initial parsing time is defined as the point where the Visual Assist starts parsing up to the end where it completes it. This project used the latest Visual Studio 2022 version 17.8.6, again on the Lyra sample game project provided by Epic Games. This is using the same high-end PC and laptop setup used to test the 2024.1 changes.

Setup 1:

Run 1 Run 2 Run 3 Average
Visual Assist 2024.1 01:09 01:05 01:03 01:06
Visual Assist 2024.2 00:54 00:51 00:54 00:53
Setup Specs: AMD Ryzen 7, 7800X3D processor, Team T-Force Delta 32GB (2 x 16GB) 288-Pin PC RAM, Crucial T700 Gen5 NVME M.2 SSD on 

 

Setup 2: 1.19x faster

Run 1 Run 2 Run 3 Average
Visual Assist 2024.1 01:30 01:31 01:27 01:29
Visual Assist 2024.2 01:18 01:15 01:12 01:15
Setup Specs: – CPU: 12th Gen Intel(R) Core(TM) i9-12950HX, DDR5-4800 (2400 MHz) 32 GB (2×16 GB), 2 TB SSD,  ASUS ROG Strix SCAR 17 SE (2022) G733CX laptop on UE 5.2.1 Lyra Game

 

Setup 3: 1.54x faster

Run 1 Run 2 Run 3 Average
Visual Assist 2024.1 02:15 02:02 02:06 02:07
Visual Assist 2024.2 01:28 01:16 01:24 01:22
Setup Specs: – CPU: 12th Gen Intel(R) Core(TM) i9-12950HX, DDR5-4800 (2400 MHz) 32 GB (2×16 GB), 2 TB SSD,  ASUS ROG Strix SCAR 17 SE (2022) G733CX laptop on UE 5.3.2 Lyra Game

Improved add include for Unreal Engine.

Adding includes when working with Unreal projects has been improved in two ways. First, add include formatting in C++ generally uses either alligator brackets or quotation marks. Generally, <> are for system includes and “” are for user includes, however, there is a stylistic convention when working with Unreal. 

This update adds logic such that when you’re adding includes in an Unreal project, Visual Assist will consistently choose quotations—the preferred style for Unreal development.

Second, the include directory that is used when adding includes will now produce more accurate paths. Visual Assist will try to make sense of directory paths, subfolders included. This is especially useful when working with Unreal Engine which is known to arbitrarily produce paths.

Unreal Engine changes how solutions are generated; and while these are not actually used to build your game, these incorrect include directories are still read and used to generate other include paths when adding new includes. VA adds includes perfectly for normal C++ projects, but this situation may pose issues with some UE solutions, because some solutions could have incorrect include paths set up. 

This manifests as very long and unwanted paths, such as this one when adding the player controller: #include “../../../../../../../Source/Runtime/Engine/Classes/GameFramework/PlayerController.h”

Now, VA instead traverses the directory structure and figures out the paths, instead of trusting the solution. We replaced our logic to mostly ignore the include directories given to use by the solution in lue of traversing the directory structure ourselves. This lets us build our own ‘effective’ list of include directories which we will use to generate include paths for new includes.

For the above example, it would now add: #include “GameFramework/PlayerController.h”—which is what you expect and want as a UE developer. 

Fix syntax coloring in C# for Visual Studio 2022.

A recent Visual Studio 2022 update changed an API that Visual Assist uses to provide coloring and syntax highlighting. This update broke Visual Assist’s coloring and syntax highlighting for C#. 

A near total rewrite has been implemented and syntax coloring should be working now. However, there may be a slight difference in how Visual Assist colors C# files as we reoptimize with the rewritten code.

Syntax highlighting and coloring in C++ has remained unaffected but Visual Assist plans on implementing the new API setup for it as well. This should also fix some minor coloring issues. 

Fixed compatibility issues with GitHub Copilot.

Visual Assist is now completely compatible with Copilot, Microsoft’s AI coding assistant. 

Earlier this year, a bug report was filed on our forums describing a situation where Visual Assist seems to be interfering with Copilot’s chat functionality. This has led to the unwanted situation wherein users have to disable either Copilot or Visual Assist, as some features may not work simultaneously.

All known incompatibility issues have been resolved and addressed in 2024.2. If you encounter any similar bugs, please send us a bug report.

Fixed Open File in Solution issue when the filter starts with a dot.

When starting a query with a dot (.), Open File in Solution may sometimes fail to display the expected results. 2024.2 fixed the ‘dot’ filtering which was a common user complaint.

Search filtering features are available by starting with a dot to find files that begin with the filter, or contain the dot and substring. A filter that ends with a dot matches the ends of file names. For example “string.” finds files whose base names end with “string”. This dot filtering is also possible in other dialogs of Visual Assist that support filtering.

Bug Fixes & General Improvements

Apart from the above major fixes, we have a couple of minor bug fixes and QoL changes. The complete list is below.

  • Fixed UI conflict with GitHub Copilot.
  • Fixed issue where Add Include would sometimes not add the new include.
  • Fixed long Add Include paths for some symbols in Unreal Engine 5.3.x.
  • Fixed issue where Open File in Solution would sometimes not display results when the filter starts with a dot.
  • Fixed issue where C# syntax coloring would not be applied in Visual Studio 2022 17.9.0.
  • Fixed issue where readability-magic-numbers Code Inspection would not properly underline hex numbers.
  • Fixed issue where GoTo would not navigate to classes without a constructor.
  • Fixed issue where suggestions could show suggestions for non-existent types.
  • Updated Create Account link to point to the correct page.
  • Added Alt+O to Recommended Keyboard Shortcuts as Visual Studio 2022 now uses that binding.

Send us a message or start a thread on the user forums for bug reports or suggestions.

Visit our download page to update to the latest release manually. Happy coding!

The post Visual Assist 2024.2 release post first appeared on Tomato Soup.

]]>
https://www.wholetomato.com/blog/2024/03/28/visual-assist-2024-2-release-post/feed/ 0 3797
Visual Assist 2024.1 release post https://www.wholetomato.com/blog/2024/01/31/visual-assist-2024-1-release-post/ https://www.wholetomato.com/blog/2024/01/31/visual-assist-2024-1-release-post/#respond Wed, 31 Jan 2024 09:32:52 +0000 https://www.wholetomato.com/blog/?p=3725 The first release of the year is here with Visual Assist 2024.1. This update is headlined by the overhaul of our parser, which significantly reduces users’ initial startup times for projects. Also in this release:...

The post Visual Assist 2024.1 release post first appeared on Tomato Soup.

]]>
The first release of the year is here with Visual Assist 2024.1. This update is headlined by the overhaul of our parser, which significantly reduces users’ initial startup times for projects. Also in this release: key behavioral fixes for a few or VA’s navigation features, a UI update for the ubiquitous dropdown toolbar, and a plethora of bug fixes and QoL improvements.

Download the release now and get the benefits of VA 2024.1.

Significantly faster initial startup time

va initial parse startup speed update

Initial parse time is defined by how long it takes Visual Assist and Visual Studio to become fully active, starting from the moment a new file is loaded up for the first until it fully completes its initial parse (i.e. all features loaded and functional.)

Startup times just got extremely buffed in the first release of Visual Assist this year. The initial project parsing that Visual Assist executes when opening projects for the first time has now been significantly reduced. An example Unreal Engine project, when opened for the first time, used to take 15 minutes; it now takes just under two minutes instead! This is a huge improvement, and you will see this reflected in all projects that are opened and parsed.

More testing is underway to provide a better and more accurate performance number, but the developer team has found excellent results in their tests so far. Reports show a trend of having significantly reduced parse time for a sizable Unreal Engine project—with results averaging up to fifteen times faster initialization.

Update on Initial Parsing Time: More Testing Results

More testing results for Visual Assist’s updated parser are in! Here are the results:

Initial parsing time is defined as the point where the Visual Assist starts parsing up to the end where it completes it. This project used the latest Visual Studio 2022 version as of Feb 10 (VS 2022 17.8.6) on the Lyra sample game project provided by Epic Games. Two performance benchmarks on two different devices were done using the same methodology. 

Device 1  (High-end Desktop PC)

Run 1 Run 2 Run 3 Average
Visual Assist 2024.1 0:01:13 0:01:05 0:01:06 0:01:08
Visual Assist 2023.6 0:11:55 0:11:57 0:12:42 0:12:11

Device 2 (Gaming-class laptop)

Run 1 Run 2 Run 3 Average
Visual Assist 2024.1 0:02:12 0:02:17 0:02:10 0:02:13
Visual Assist 2023.6 0:29:37 0:28:52 0:30:09 0:29:33

Both test runs show very exciting results for the overhauled VA 2024.1 parser over its immediate predecessor VA 2023.6.

The test showed an average 1075% faster parse time using a high-end desktop PC; and 1333.08% faster parse using a powerful albeit relatively less performant gaming laptop. That’s 11 and 13 times faster, respectively. 

There is variance in the advantages gained between the two devices, with a significant performance edge on the less powerful laptop. We suspect the gains could be much larger on low and mid-end computers or laptops.

Curious to see how VA 2024.1 performs on your platform? Download a free trial of Visual Assist and try it for yourself now.

Navigate directly to a class constructor definition from an explicit constructor call

This neat addition to VA’s find reference and go to reference features allows users to find and navigate to a class’s constructor definition from a call to that constructor. 

Highlight or click over a constructor and use the shortcut Alt + G to navigate instantly to the default constructor.

Improved and expanded header selection when using Add Include

This release greatly improves VA’s Add Include detection and expands the number of actual includes supported. 

If you have not used this feature extensively VA can automatically add includes directives for you if it detects you are using an undeclared feature or type from a known library such as STL or even your own code elsewhere. Specifically, this update adds many new types baked into C++ such as std::stringstream and std::once_flag.

In essence, using Add include should automatically insert the correct include under many more circumstances.

Code completion dropdown toolbar now displayed by default 

The coding completion toolbar will now be turned on by default and will be displayed more frequently. This new quality of life change brings a visual UI as you write code. VA tries to predict your intended actions so the options shown will always be contextual apart from being accurate.

Furthermore, when you type code, the code completion UI will be shown by default regardless if you are hovering your cursor over the current portion of the code.

code completion toolbar visual assist

The code completion toolbar is displayed as you type code.

For very large projects and long source code, you can use the filter options (highlighted in the screenshot above) to select which options are shown in the new toolbar.

Bug fixes and improvements

For this release, we have severak fixes—both from examining recent features and user reports. The most notable of these improvements include functional visual changes to a plethora of features and better parser recognition of Unreal code.

  • Fixed visual issues with completion dropdown toolbar
  • Fixed issue where trial activation dialog could display an error and prevent activation
  • Fixed issue with new “Magic Numbers” detecting Code Inspection where it was highlighting only a portion of the constant
  • Fixed issue where logging could overflow and cause a crash when enabled alongside very large solutions
  • Fixed issue where preprocessor directives in shader files were sometimes colored as methods
  • Fixed issue where Unreal Engine Create***Subobject symbols were not recognized by our parser
  • Fixed issue where changing the signature of an Unreal Engine method which requires a *_Validate thunk would result in rewriting the return of the *_Validate thunk to void.
  • Fixed issue where typing a dot the start of the word in a few of our dialogs would result in no hits being displayed

Many thank to those who submitted their suggestions and error reports. Please continue reporting problems you may find along the way. To report bugs, you can send us a message or start a thread on the user forum.
You can also check our download page to update to the latest release manually. Happy coding!

The post Visual Assist 2024.1 release post first appeared on Tomato Soup.

]]>
https://www.wholetomato.com/blog/2024/01/31/visual-assist-2024-1-release-post/feed/ 0 3725
Ensuring Code Quality: Why Every C++ Developer Needs Unit Tests https://www.wholetomato.com/blog/2023/10/31/ensuring-code-quality-why-every-c-developer-needs-unit-tests/ https://www.wholetomato.com/blog/2023/10/31/ensuring-code-quality-why-every-c-developer-needs-unit-tests/#respond Tue, 31 Oct 2023 23:09:59 +0000 https://blog.wholetomato.com/?p=3469 Modern programming languages evolve and are continuously refined even further with each new update. During these incremental stages of development, components such as compilers, IDEs, libraries, their units, their components, and tools undergo changes. Furthermore,...

The post Ensuring Code Quality: Why Every C++ Developer Needs Unit Tests first appeared on Tomato Soup.

]]>

Modern programming languages evolve and are continuously refined even further with each new update. During these incremental stages of development, components such as compilers, IDEs, libraries, their units, their components, and tools undergo changes.

Furthermore, there are also rapid changes in operating systems and hardware systems. This means that if you are developing applications professionally, you must test your units or components at the beginning of your main application development to make sure it is compatible with the newly released versions. 

C++ is a very powerful and modern programming language but to keep up with ever changing industry demands, standard language practices and conventions constantly change. Thus, C++ applications need be to be regularly maintained by software developers and engineers.

All these require rapid unit testing to ensure that company and tech requirements are met using better memory management and improved runtime performance of the main application. Let’s learn more about unit testing and how it’s used to maintain source code.

Why do developers need to test C++ Code?

Developers need to test C++ code for various crucial reasons. First and foremost, testing is a fundamental means of detecting and addressing bugs, errors, and issues within the codebase. By running tests, developers can catch problems early in the development process, saving time and resources. Additionally, testing ensures that the software behaves as expected and meets its requirements and specifications. 

It also plays a pivotal role in regression prevention, safeguarding existing functionality as code evolves. Moreover, tests serve as documentation, providing examples of code usage and clarifying its intended behavior, making it easier for developers to understand and work with the code. Testing encourages good coding practices, promoting modularity and maintainability. It facilitates collaboration by allowing multiple developers to work on a project with confidence. 

But more importantly, performance is another aspect that can be tested and memory and CPU usage are really important in C and C++ programming—it’s one of its main strengths. Ensuring the safety of your product and minimizing memory usage is crucial for achieving reliability and usefulness, as it also impacts the performance of your application during runtime. Increased CPU usage can lead to slower operations, making your app lag behind those of your competitors. This will result in higher energy consumption and higher battery usage in mobile applications that are not liked by users. 

However, this performance comes at a cost. C++ is considered to be a little harder than other programming languages because you need to have a solid grasp of how to manage and use memory. Furthermore, C++ can be extended with headers of libraries, units, and components giving it even more complexity. Consequently, diagnosing problems and tracking issues in C++-based applications require more skill and know-how. Launching a version of an application without testing can lead to unwanted outcomes such as the dreaded blue/black windows screen. Failure to properly test code can also lead to random performance drops, higher CPU usage, and unoptimized energy consumption.

For example, using multi-threading development skills on the CPU, GPU, and memory operations is important in programming, but it can give rise to problems in synchronization of multi-threaded operations and accessing data for reading and writing. Thus, multi-threading functions/methods or classes/libraries should be rigorously tested before general availability. In C++, testing multithreaded and parallel-programming application codes requires more professional skills than testing traditional C++ code.

Nowadays most of these problems can be monitored by tools baked into operating systems, which means it is easier to detect issues on runtime. Thus, there should be minimal reasons to publish and use untested applications. C++ developers should test their codes and other codes embedded into the main code.

What is unit testing and why do I need to use it?

Unit testing is a technique for developing and  experimenting with software applications that focuses on individual units or components of a main software application. This process seeks to validate whether each unit or component meets the project requirements.

Generally, unit testing is applied in the early stages of the development process before any of the code is released as an alpha or beta release. Every unit or component needs to be updated based on the requirements  of the operating systems or with the coding  standards and conventions of a language.

Generally, tests do not require technical developer skills, but in some tests, there may be more precise work that can lead to better informative results.  These tests involve computational, multi-tasking applications such as AI applications or other computational engineering applications. These applications are mostly based on C/C++ codes or  are using languages that are related to C++ modules or libs, such as Python, Delphi, etc.

Unit testing is also applied to test different versions of units or components of a software system. Sometimes new versions of units may not fit your requirements or may cause problems during the runtime of your applications. Here are some of the problems:

  • lower performance issues
  • higher memory or CPU usage issues
  • graphical issues
  • crash issues (rare)
  • Random freezes on runtime. 

If there are problems in your main applications, it may be hard to define which unit or component causing this kind of issue. This is why unit testing is important in the early stages of development. Thus, the developer or the dev team determines whether these tested units and/or components are suitable for use or not.

Here are few bad excuses example for not doing unit tests and some tips on how to possibly address them:

Testing our software is too difficult!

  •  try to redesign or refactor
  • try to decouple
  • try TDD which helps ensure a cleaner design

We can’t test now. We are too pressed for time.

  • Technical debt accrues and bugs are more time consuming in the long run
  • prioritize, but make sure you test the most relevant partsHere are few bad excuses example for not doing unit tests and some tips on how to possibly address them.

Unit testing may be applied manually for some specific unit or components or they can be automated for general purposes to test some parts of units. These tests are applied on run-time when the code is changed to ensure that the new code does not break existing functionality.

Unit tests are generally small codes that have a unit or component and are applied to validate possible units of code. This code may be using a function or a method of a class or library. These are tested in isolation from the main software system. Thus, developers may test these units to identify possible problems and they may find a way to fix these problems in the early stage of the development process. This improves the overall quality of the main software application and reduces bugs, and issues in the main software, and reduces the time required for later testing.

Executing basic unit testing

How can I do better unit testing and code maintenance in C++?

When you do unit tests there are many C++ features to help maintain your code. Here are some features included in the Visual Assist C++ productivity plugin that can be used in application development, when testing a unit, or using a unit in the main application:

Visual Assist is one of the definitive plugins that conceptualized and shaped most of the current features you see now in Visual Studio. And to this day it continues to develop user-centric design for maximum productivity and usability.

 

 

 

 

 

 

The post Ensuring Code Quality: Why Every C++ Developer Needs Unit Tests first appeared on Tomato Soup.

]]>
https://www.wholetomato.com/blog/2023/10/31/ensuring-code-quality-why-every-c-developer-needs-unit-tests/feed/ 0 3469
Summer CodeFest: Magnificent or Malevolent: Maps! Measured, Monitored, & Magnified! [Mrecap] https://www.wholetomato.com/blog/2023/08/27/summer-codefest-magnificent-or-malevolent-maps-measured-monitored-magnified-mrecap/ https://www.wholetomato.com/blog/2023/08/27/summer-codefest-magnificent-or-malevolent-maps-measured-monitored-magnified-mrecap/#respond Sun, 27 Aug 2023 13:42:03 +0000 https://blog.wholetomato.com/?p=3380 Webinar overview:  Std::maps is a staple in the C++ world for sure. It’s reliable and useful, but in this presentation, David Millington goes a level deeper and examines how other features offered beyond the standard...

The post Summer CodeFest: Magnificent or Malevolent: Maps! Measured, Monitored, & Magnified! [Mrecap] first appeared on Tomato Soup.

]]>
Webinar overview: 

Std::maps is a staple in the C++ world for sure. It’s reliable and useful, but in this presentation, David Millington goes a level deeper and examines how other features offered beyond the standard library can be used to maximize the usefulness of the data structure. 

Quick Refresher on Maps

Maps are essentially a way to store key-value pairs in an ordered structure. This creates an associative array that can be used to lookup connected pieces of data. Maps are ubiquitous. Value-key lookup is used everywhere: filenames to files, index number to row/column, ID number to name, and the list goes on. 

Maps can be ordered or unordered. They are also similar to static arrays and vectors but they possess a few key differences such as memory management, performance, and appropriate types—watch this section of the webinar to learn more.

Things to Remember from the Webinar

 

Slide Deck Presentation

Replay

The post Summer CodeFest: Magnificent or Malevolent: Maps! Measured, Monitored, & Magnified! [Mrecap] first appeared on Tomato Soup.

]]>
https://www.wholetomato.com/blog/2023/08/27/summer-codefest-magnificent-or-malevolent-maps-measured-monitored-magnified-mrecap/feed/ 0 3380
Summer Codefest: Lambdas go Baa! [Recap] https://www.wholetomato.com/blog/2023/08/21/summer-codefest-lambdas-go-baa-recap/ https://www.wholetomato.com/blog/2023/08/21/summer-codefest-lambdas-go-baa-recap/#respond Mon, 21 Aug 2023 17:56:22 +0000 https://blog.wholetomato.com/?p=3365 Webinar overview:  This presentation by product manager, David Millington, talks about the convenient way to define an anonymous function object added in C++11. This topic was chosen because while it’s extremely useful, the data we...

The post Summer Codefest: Lambdas go Baa! [Recap] first appeared on Tomato Soup.

]]>
Webinar overview: 

This presentation by product manager, David Millington, talks about the convenient way to define an anonymous function object added in C++11. This topic was chosen because while it’s extremely useful, the data we see is that there tend to be two groups of C++ developers: those who use them extensively, and those who barely use them.

When to use lambdas:

The main benefits of using lambdas are:

  • Improves readability for you or your team.
  • Anonymity makes them easier to maintain (no names needed for smaller functions/functors).
  • Localizes functions to your code.

Furthermore, lambdas are especially useful if your logic goes inside something else. These code layering problems are a nuisance to reading code—lambdas make it easier to “localize” logic.

Comparing lambdas with traditional functor

A comparison between a sort functor written in traditional structure vs a lambda.

On the left is a standard functor with structs and operators written traditionally. It works and functions just as a lambda would but it is longer and arguably more difficult to comprehend when viewed in the context of actual source code.

On the other hand, a lambda is seen as significantly shorter and easier to read. With the structure of a lambda, the code being called is emphasized directly after the functions. The syntax is also unmistakable; just look for the following method syntax:

  • [ ] – capture state
  • ( ) – function
  • { } – body of method

Skip to 18:18 of the replay to learn more about lambda syntax and how to structure inline functions.

Summary: other tips for using lambdas

Here are a couple of other things you should look out for according to the presentation:

Slide Deck Presentation

Replay

The post Summer Codefest: Lambdas go Baa! [Recap] first appeared on Tomato Soup.

]]>
https://www.wholetomato.com/blog/2023/08/21/summer-codefest-lambdas-go-baa-recap/feed/ 0 3365
Summer CodeFest: Modern C++ with Modern 3D [Recap] https://www.wholetomato.com/blog/2023/08/20/summer-codefest-modern-c-with-modern-3d-recap/ https://www.wholetomato.com/blog/2023/08/20/summer-codefest-modern-c-with-modern-3d-recap/#respond Sun, 20 Aug 2023 06:27:57 +0000 https://blog.wholetomato.com/?p=3346 Webinar overview: 3D Graphics in C++ Dr. Yilmaz Yoru shares his knowledge on graphics, as well as its counterpart analyzers and calculations used in 3D C++. He uses C++ Builder for most of his examples...

The post Summer CodeFest: Modern C++ with Modern 3D [Recap] first appeared on Tomato Soup.

]]>
Webinar overview: 3D Graphics in C++

Dr. Yilmaz Yoru shares his knowledge on graphics, as well as its counterpart analyzers and calculations used in 3D C++. He uses C++ Builder for most of his examples but almost any compiler can be used for the projects he demoed. Check out his website and other projects here.

Why use C++ for 3D

C++ is one of the top options if you are working with 3D graphics for the same reason you use it in embedded systems and high frequency trading—speed and performance. 

Any programming language can execute basic 2D graphics, but if we want to display 3D graphics in real-time (e.g. 3D simulations or rendering for video games),  then a language and environment that runs fast is essential. Furthermore, C++ also provides support for some of the most popular 3D libraries available such as OpenGL (GLUT) or Direct3D libraries. 

Features of C++ used in 3D

There are a couple of useful features in C++ that can be used in general programming as well as 3D work. Watch the session to grasp the fundamentals of these features and how it can be used in 3D C++. Some of the features included:

  • Class features (constructors, move, copy, move operator, etc.)
  • std::array
  • std::vector
  • std::map
  • lambdas
  • templates
  • unique_ptr
  • std::sort

We have other sessions in the Summer CodeFest that talk about some of these features such as lambdas and templates. Visit our blog to find them.

Color Management and Color Applications

[In modeling for 3D,] Pixels are the real graphics.

Graphical work in 2D/3D is primarily managing how the colors of pixels change and the underlying mathematics that decides when and how these changes happen. 

The bulk of the work is computational and applied mathematics. Determining how pixels change will rely on complex mathematical models. And consequently in modern 3D, programmers must find a way to visualize gigabytes worth of numbers. Fortunately, the C++ features mentioned earlier can greatly simplify this as you are working more closely with the actual data and memory—and the results can be shown in real time too.

As discussed earlier, 3D work is fundamentally the crunching of numbers using appropriate mathematical operations and models. Here are some examples shared in the presentation:

  • Rotation matrices (used in 3D projection, vectors, robotics)
  • Euler formulas (shows how a single axis parameter in 2D can be rotated to create 3D shapes)
  • Quaternions (used to describe orientation or rotations in 3D space using an ordered set of four numbers)
  • Octonions, rotors, and beyond (even more complex scalar and complex vectors using advanced algebra)

 

Slide Deck Presentation

Please email Dr. Yilmaz for his copy of his presentation slides.

Replay


You can also find Dr. Yoru’s website here.

The post Summer CodeFest: Modern C++ with Modern 3D [Recap] first appeared on Tomato Soup.

]]>
https://www.wholetomato.com/blog/2023/08/20/summer-codefest-modern-c-with-modern-3d-recap/feed/ 0 3346
Visual Assist 2023.4 now released https://www.wholetomato.com/blog/2023/08/17/visual-assist-2023-4-released/ https://www.wholetomato.com/blog/2023/08/17/visual-assist-2023-4-released/#respond Thu, 17 Aug 2023 20:44:35 +0000 https://blog.wholetomato.com/?p=3336 VA 2023.4 is now published and is now available to download!  This release marks a major milestone in Visual Assist’s history as it starts its official support for Unity engine development. Also in this release:...

The post Visual Assist 2023.4 now released first appeared on Tomato Soup.

]]>
VA 2023.4 is now published and is now available to download

This release marks a major milestone in Visual Assist’s history as it starts its official support for Unity engine development. Also in this release: start of support for CUDA development for C/C++ and numerous parser improvements. Read on further to get the complete details of the changes and improvements in this release.

Start of official support for Unity

It’s been a long time coming but Whole Tomato is glad to announce that the upcoming 2023.4 build will feature the first of many Unity-specific features. Nope, not the hivemind—we are of course talking about the very versatile game engine and game development platform.

For those unaware, the Unity engine is the backbone of both 2D and 3D games ranging from wildly popular and suspicious games, all the way to full blown highly-acclaimed triple A titles.

Visual Assist has been popular for helping game developers deal with complex C++ code. Starting from the upcoming release, Visual Assist will expand its focus to C# game development. Users can expect VA staples such as refined navigation, intelligent autocomplete, code refactoring, and the like to work as well for C# work.

Furthermore, users can also submit feature requests specific for Unity development. We are starting with shaders—more on this below—but if you have any suggestions as to what features are missing in your Unity development, do let us know by emailing support.

Shaders for Unity

The start of official support for Unity development is headlined by shader file support. Similar to our previous addition of supporting HLSL, we are kicking off Unity updates by adding its shader files to our list of supported languages.

CUDA C/C++ Development

If you are a data scientist, software engineer, or a plain hobbyist looking to harness the power of your GPU for general purpose programming tasks, then you would most likely know about Compute Unified Device Architecture (CUDA). This programming model developed by Nvidia allows programmers to utilize the multi-core performance of graphics cards for other non-graphic applications (although it’s perfectly fine to use for 2D/3D too!)

If you are interested in CUDA, then rejoice! VA 2023.4 also marks the start of official support for CUDA development. Visual Assist’s can now parse and analyze CUDA related syntax, libraries, and APIs so you can have IntelliSense-like features, navigation, and highlighting for CUDA (.cu) files.

A CUDA file with proper syntax highlighting and code analysis features.

Parser Improvements: template functions with auto / trailing return type and std::tuple autocompletes 

With VA 2023.4 will now properly highlight and parse trailing return type features that bypasses a C++ limitation where the return type of a function template cannot be generalized if the return type depends on the types of the function arguments. This release specifically deals with some of the edge cases reported by our users.

Trailing return type features can be used by declaring a generic return type with the auto keyword before the function identifier, and specifying the exact return type after the function identifier. Learn more about it here.

The parser is aware of sum and proper syntax highlighting and navigation features are applied.

Also fixed in this release are initializations of std::tuple autocompletes. This improves how the VA parser handles certain templated types. In the end, users will find better completion suggestions when you are typing in your codebase, such as when typing std::tuple.

Better Add Include logic

Visual Assist can add include directives for headers that resolve unknown symbols in the current C++ source file. The underlying logic for add include has been improved for better context-awareness resulting in better predictions on where to place the new include.

Add include now inserts new lines in most logical place.

Add include can be accessed by hovering over unknown symbols and opening the quick actions and refactoring menu ( Shift + Alt + Q ).

Some other spring cleaning-type improvements

We’ve also made some changes to a few minor things to the UI and the options in the app that you should know about. Firstly, our shader support has been available for a few rounds of releases already and we’re excited to announce that it has finally finished its beta phase and will now be enabled by default. 

Secondly,  we’ve streamlined our game Development tab of our options dialog. This is to make room for upcoming additions (stay tuned!)

Thirdly, we’ve tweaked some tomatoes and icons along the way to better respond to your actions and better display what options are available to you. Relevant options and menus will be emphasized when they are needed; secondary options will subtly fade into the background otherwise. This is in line with our commitment to distraction free coding.

Lastly, if you’ve missed or haven’t installed the latest version yet, you may have noticed that the Visual Studio marketplace listings for the 32 and 64-bit versions of Visual Assist have now been combined. Versions 2010 – 2022 will now be accessible from one listing.

Bug Fixes

  • Fix for ‘VaMenuPackage’ package error affecting VS2022 17.7.0 3.0 load
  • Fixed issue where some types with leading macros before template definitions were not parsed correctly.
  • Fixed issue where autocomplete of some types, such as std::tuple, would produce partial results.  
  • Fixed rendering of suggestion list tomato icons in Visual Studio 2022. 
  • Fixed issue where the VA Navigation Bar could become smaller than intended.
  • Fixed Code Inspections error that could happen in some cases in Visual Studio 2022 17.6+. 

Thanks to those who submitted their feedback and bug reports. Keep ‘em coming. Send us a message or start a thread on the user forums for bug reports or suggestions.

Contrary to the preview blog statement, VA 2023.4 is a bit different as it will be released simultaneously—no rolling release mechanism as it includes some crucial updates we want to share to everyone as fast as possible. You can also check our download page to manually update to the latest release too. Happy coding!

 

The post Visual Assist 2023.4 now released first appeared on Tomato Soup.

]]>
https://www.wholetomato.com/blog/2023/08/17/visual-assist-2023-4-released/feed/ 0 3336
Summer CodeFest: What the Hex? Ports and Adapters Architecture with C++ [Recap] https://www.wholetomato.com/blog/2023/08/15/summer-codefest-what-the-hex-ports-and-adapters-architecture-with-c-recap/ https://www.wholetomato.com/blog/2023/08/15/summer-codefest-what-the-hex-ports-and-adapters-architecture-with-c-recap/#respond Tue, 15 Aug 2023 22:26:25 +0000 https://blog.wholetomato.com/?p=3321 This session has concluded watch the replay or download the slides below. Common pitfalls when scaling applications When scaling applications, two common pitfalls often arise: spaghetti code and a lack of proper testing. This can...

The post Summer CodeFest: What the Hex? Ports and Adapters Architecture with C++ [Recap] first appeared on Tomato Soup.

]]>
This session has concluded watch the replay or download the slides below.

Common pitfalls when scaling applications

When scaling applications, two common pitfalls often arise: spaghetti code and a lack of proper testing. This can occur for various reasons, but one of the most common reasons is the lack of a coding style guide or an overarching design structure.

For instance, when starting a project, it’s fairly simple. An input and one or two outputs. However, as the project grows or the requirements expand, programmers can resort to an experimental approach each time a new component is added. They can also resort to using manual testing—which works for simple unit tests for small projects but overtime becomes too cumbersome. 

The lack of a design structure makes projects prone to gradually growing complexity. As a result, the experimental app ends up in production as an inefficient system that demands continuous maintenance. To avoid breaking essential business logic and harming the overall business, developers allocate unnecessary development time to making one-off solutions.  The time and effort is compounded due the previous iteration’s shortcomings.

Using hex architecture can help address scaling issues.

Hex structure vs traditional three-layer architecture

There is nothing wrong with the traditional 3-layered structure composed of the presentation tier, the application tier, and the data tier. And for most applications this will usually be enough. However, theoretically, as you add more business logic and more functions, the complexity ramps up exponentially. In that case, a traditional approach may no longer be the most efficient. You can always scale and automate by expending more resources, or you can take a step back and reorganize your resources.

A hex structure, contrary to what the name suggests, is not a 6-tiered structure. Instead, it’s an analogy for the freedom of a developer to add ports and adapters—sort of like a honeycomb structure where you can keep adding more hexagons and there would still be no gaps. In the traditional approach, the presentation, business, and data side flow directly to each other; in hexagonal architecture, you add interfaces (or buffers) in between fully functioning components making them semi-autonomous. You would only have to think about how what data passes from one to another and how communication is processed.

Fortifying your app with hexagonal architecture

The Hexagonal architecture provides a solution to this problem by utilizing dependency inversion control, which separates business logic from implementation details like databases and REST clients. It also fosters a clear separation of concerns between components, ensuring a more organized and manageable application as it grows.

Ports and Adapters

As the name suggests, hexagonal architecture utilizes standalone components with a functional core in the middle of the design structure. This means that expansion, maintenance, and designing is easier because the program’s components and roles are clearly defined. Buffers between these components allow easy addition and removal as well as facilitate efficient communication among the program’s functions. 

So how do you initiate a program with a hexagonal design structure? Watch our short presentation hosted by Nuno Castro to get a brief introduction and some great examples. This session has concluded. Browse the presentation slides and replay below.

Presentation Slide Deck

Watch the Replay

The post Summer CodeFest: What the Hex? Ports and Adapters Architecture with C++ [Recap] first appeared on Tomato Soup.

]]>
https://www.wholetomato.com/blog/2023/08/15/summer-codefest-what-the-hex-ports-and-adapters-architecture-with-c-recap/feed/ 0 3321
Summer CodeFest: Next-Level Concurrency: Enhancing Scalability with C++20 [Recap] https://www.wholetomato.com/blog/2023/08/04/summer-codefest-guide-next-level-concurrency-enhancing-scalability-with-c20/ https://www.wholetomato.com/blog/2023/08/04/summer-codefest-guide-next-level-concurrency-enhancing-scalability-with-c20/#respond Fri, 04 Aug 2023 18:46:42 +0000 https://blog.wholetomato.com/?p=3309 This session has concluded watch the replay or download the slides below. The first Summer CodeFest presentation has concluded! Whole Tomato’s very own lead developer Chris Gardner lead the first session on enhancing your program’s...

The post Summer CodeFest: Next-Level Concurrency: Enhancing Scalability with C++20 [Recap] first appeared on Tomato Soup.

]]>
This session has concluded watch the replay or download the slides below.

The first Summer CodeFest presentation has concluded! Whole Tomato’s very own lead developer Chris Gardner lead the first session on enhancing your program’s scalability with concurrency techniques in C++!

We’ve prepared a short introductory article about concurrency and a short history on C++ support for threads in this article so you can better understand the session.

What is Concurrency?

Concurrency is an umbrella concept that encompasses multithreading and other techniques that are used to handle multiple tasks simultaneously. It involves managing shared resources (like variables, files, memory, etc.) to avoid race conditions and ensure thread safety.

A term that is almost synonymous with concurrency is multithreading. This is the concept of running multiple threads (smaller units of a process) within a single process. Each thread has its own stack and shares the same heap with other threads in the process. Multithreading is useful for parallelizing tasks and taking advantage of modern multi-core processors.

With parallel processing, programs can execute tasks simultaneously instead of sequentially which cuts completion time.

There is a difference between parallelism and concurrency, but we won’t get to that here as we need to dive into concurrency in C++. If you want to learn more about the theories, you can read more about it here.

The benefits of concurrent processing

The two main benefits of using concurrency is performance and division of labor. Learning how to program for multithreading may be hard to wrap your head around at first. Humans are usually sequential when it comes to executing tasks. Similarly, a single CPU core is only ever doing one task at a time, but it task switches extremely fast much like our brains. 

With the right conceptual program, computers can employ multiple cores or even virtual threads to run tasks in parallel—it does not need to fake with fast task switching. This allows your program to actually use memory and variables in such a way that two tasks can access it simultaneously.

For example, in processing-heavy tasks such as HD video playback, you can divide the processing labor between the video crunching and the interface. The first thread will take care of reading the disk, decoding the image and sound bytes, and finally sending the video and sound to the hardware. On the other hand, the second thread can handle the user inputs such as play/pause, stopping, and the like. This allows your program to focus on each task with a separate “brain”. 

The two threads can communicate with each other only when needed so the overall experience is way more responsive (benefits the user) but is also easy to manage the program (benefits the programmer).

The difficulty in learning parallelism is often in how and when these separate threads should communicate with each other. 

(Note: Relatively, C++ is not a concurrency-oriented language because it usually relies on its innate speed to run complex tasks sequentially—but that’s not to say there is no use for parallelism in C++)

Scaling programs using concurrency and multithreading in C++

In C++ 2011, multithreading support was added to the C++ standard. This included useful components and C++ developers were able to use concurrency without the use of environment-specific extensions.

Included in the Standard library are the following tools and features:

  • thread-aware memory models
  • Classes for managing threads
  • Managing and protecting shared data
  • Synchronizing operations between threads
  • Low-level atomic operations

To get a better understanding of how to incorporate concurrency and multithreading in your C++ code, sign up for the following tutorial hosted by Whole Tomato’s very own lead developer.

Explore modern C++20 multithreading and powerful parallelism techniques. As programs get more complex, computers get equipped with even more CPU cores. Learn to optimize applications for peak performance with real-world examples and practical insights with C++20’s new concurrency features.

This session has concluded watch the replay or download the slides below.

Presentation Slide Deck

Watch the Replay

 

The post Summer CodeFest: Next-Level Concurrency: Enhancing Scalability with C++20 [Recap] first appeared on Tomato Soup.

]]>
https://www.wholetomato.com/blog/2023/08/04/summer-codefest-guide-next-level-concurrency-enhancing-scalability-with-c20/feed/ 0 3309
Summer CodeFest: C++ coding camp hosted by Whole Tomato https://www.wholetomato.com/blog/2023/07/20/summer-codefest-c/ https://www.wholetomato.com/blog/2023/07/20/summer-codefest-c/#respond Thu, 20 Jul 2023 22:28:34 +0000 https://blog.wholetomato.com/?p=3268 CodeFest happened on August 17th, 2023. Registration is not available now. Stay tuned and find out when next CodeFest begins! Get ready to unwind with Whole Tomato at our first Summer C++ CodeFest! Join us...

The post Summer CodeFest: C++ coding camp hosted by Whole Tomato first appeared on Tomato Soup.

]]>
CodeFest happened on August 17th, 2023. Registration is not available now. Stay tuned and find out when next CodeFest begins!

Get ready to unwind with Whole Tomato at our first Summer C++ CodeFest! Join us for two weeks of laid-back learning, collaboration, and coding sessions. Expand your C++ coding skills and ignite your passion for coding in a join-when-you-can environment.

Why this virtual coding camp for?

C++ is one of the most established procedural and object-oriented programming languages but it has also undergone numerous revisions throughout its lifetime. What you may have learned from using prior versions as a wee developer in C++11 may have drastically changed in the most recent version of the C++ standard (C++20). 

But as C++ developers ourselves, we understand that keeping up with the ever changing standards may sometimes feel like an unnecessary chore—if what we’re using works, don’t fix it, right? 

And while it’s certainly cool to be using new stuff in itself, we feel that there are potential benefits from modern C++ that are extremely underutilized. Getting familiar with modern techniques and strategies such as lambdas, structured bindings, and the like can not only optimize performance, it can make our work much much faster and easier too!

This is why we are holding our first ever summer code fest! This is a two-week long event where in usual Tomato fashion, we present short, highly digestible sessions about specific practices you should know about and use in your everyday  C++ workflow. 

Who is this coding camp for?

Junior developers looking to expand their skill set with modern C++ practices and strategies, and intermediate C++ developers that are stuck in the old ways are all welcome to join. While we will be primarily using Visual Studio with some features provided by Visual Assist, anyone with a C++-capable IDE will be able to benefit.

What topics will be covered?

At the Summer CodeFest, we invite you to join our mini lectures on a variety of C++ topics, condensed into 30 to 45 minute sessions with additional time for audience Q&A. Some of our specialized topics will include concurrency structures, lambda functions, and C++ templates.  Here are other things you can expect to learn at our coding camp:

  • The most important developments from C++ 11 all the way to C++ 20.
  • Modern practices and strategies that you should be using regularly
  • Life hacks and expert advice from our professional C++ presenters

Event Schedule

The Summer CodeFest will have four sessions, each ranging from 30 to 45 minute presentations.

  • Session 1: Next-Level Concurrency: Enhancing Scalability with C++20

    with Chris Gardner
    Explore modern C++20 multithreading and powerful parallelism techniques. As programs get more complex, computers get equipped with even more CPU cores. Learn to optimize applications for peak performance with real-world examples and practical insights with C++20’s new concurrency features.
    August 8 – 10:00 AM CT

  • Session 2: What the Hex? Ports and Adapters Architecture with C++

    with Nuno Castro
    In this session, we’ll dive into Hexagonal architecture. Explore how to build scalable applications effectively and address challenges with logic changes when refactoring code and maintaining application integrity during logic changes.
    August 10 – 10:00 AM CT

  • Session 3: Modern C++ with Modern 3D

    with Yilmaz Yoru
    This is a journey to modern 3D with modern C++, we will walk you through to modern 3D in C++. Rotation matrix, vectors, Viewport3D, 3D objects, 3D engines, animation, and more.
    August 11 – 1:00 PM CT

  • Session 4: Lambdas go Baa!

    with David Millington
    Many C++ developers still use functor objects instead of lambdas. That might be because they’re “ol’ reliable”, or lambdas seem complex, or there just seems no need. But lambdas are exciting, simpler than you think, and really useful.
    August 15 – 10:00 AM CT

  • Session 5: Tips and Tricks using C++ Templates

    with Miguel Angel Moreno
    Discover the many ways you can take advantage of C++ templates in your day to day coding. Templates are a very useful feature of C++, yet many developers still think of them as “too complex” to use. In this presentation we will show you some tips and tricks that will encourage you to start using templates in your next coding project.
    August 16 – 11:00 AM CT

  • Session 6: Magnificent or Malevolent? Maps! Measured, Monitored, & Magnified

    with David Millington
    Good old std::map. We use it everywhere. But what about some of the others? Like std::unordered_map — why would you use that? And is it true that the STL collections have inbuilt performance issues by design? Are there are collection classes out there that we could use instead?
    August 17 – 10:00 AM CT

 

The Summer CodeFest will be made up of multiple sessions organized and presented by a number of C++ experts, with some of our friends in the industry guesting for some of the sessions. You can choose which of these sessions you want to watch. Replays will also be provided but we encourage everyone to attend live so we can answer your questions and demonstrate them live to you. All content will be in English unless otherwise indicated.

Joining is easy and free. Sign up using the individual registration links or click this all-in-one link to register and add all of the sessions to your calendar. 

The post Summer CodeFest: C++ coding camp hosted by Whole Tomato first appeared on Tomato Soup.

]]>
https://www.wholetomato.com/blog/2023/07/20/summer-codefest-c/feed/ 0 3268
Everything you need to know about code inspections https://www.wholetomato.com/blog/2023/06/13/everything-you-need-to-know-about-code-inspections/ https://www.wholetomato.com/blog/2023/06/13/everything-you-need-to-know-about-code-inspections/#respond Tue, 13 Jun 2023 20:01:08 +0000 https://blog.wholetomato.com/?p=3257 By now you might have heard about Visual Assist’s code inspections—it has been a staple of almost all recent updates and we hosted two webinars discussing it. This article sums it all in an easy...

The post Everything you need to know about code inspections first appeared on Tomato Soup.

]]>
By now you might have heard about Visual Assist’s code inspections—it has been a staple of almost all recent updates and we hosted two webinars discussing it. This article sums it all in an easy to read and convenient way.

What are code inspections?

Code inspections is a feature in Visual Assist that automatically checks source code for issues and code smells, and suggests the appropriate fix. The main benefit of using code inspection is better overall code quality with minimal effort.

Code inspections work by utilizing code checkers, sometimes referred to as static analyzers. These are tools that analyze your source code passively—it happens as you type your code. You do not need to actually compile and execute your code to detect a problem (i.e. finding bugs and errors using run-time techniques such as testing).

Code issues are underlined in blue. Line information and a description of the issue is also shown in the VA Code Inspection Results window.

It looks for common patterns, broken coding conventions, and potential bugs in the code using algorithms and special techniques. The purpose of code checkers is to catch problems early in the development process, which can save a lot of time and effort later on. 

What issues can it detect?

The issues and code smells that can be detected vary widely from stylistic infractions on coding convention, all the way to system critical errors.  Here are some of the common fixable issues:

  • Detecting and updating obsolete coding syntax
  • Highlights possible readability issues and broken coding conventions
  • Checking type-related errors (such as making invalid type conversions or assigning values of incompatible types, using uninitialized variables, or.)
  • Wasted resources due to inefficient memory allocation/deallocation.
  • Other issues of non-obvious, but potentially dangerous, incorrectness

Visual Assist’s code inspection feature is based on LLVM’s /Clang-Tidy code analysis engine so you can be sure that it covers a variety of checks targeted at finding security and API usage bugs, dead code, and other logic errors. Additionally, we extend the functionality through the use of ‘evaluated’ checkers (more below).

READ: More examples from a blog by Bartek from C++ Stories

Evaluated and unevaluated checkers

Code checkers are added gradually to the list of Visual Assist code inspections. All checkers that are in the list are thoroughly evaluated, checked, and tested. Evaluated checkers often include changed functionality that is not in the base clang-tidy, making them more reliable and safe. This is a key part of the value of the checkers we include. Using evaluated checkers guarantees that the code will be refactored properly and any suggested fix will not break anything.

On the other hand, unevaluated checkers are still based on Clang-Tidy’s extensive list but have not undergone the same quality assurance tests as its counterparts. Almost a hundred unevaluated checkers have been added in Visual Assist 2023.2.

Note that unevaluated checkers will still suggest the recommended fix and behave like normal checks, but users are advised to manually ensure that everything is working correctly. The benefit that this brings is that developers can know what and where a potential issue lies—which is oftentimes the bulk of the work.

Why use code inspections to fix issues and refactor code?

Running code inspections lists down issues in a window for you to examine before implementing fixes.

Code inspections read source code line by line, analyzing the structure, logic, and syntax. It pays attention to specific patterns or coding conventions that may indicate potential issues. As they encounter a line of code, it uses a set of rules and algorithms to determine if the code adheres to best practices or if there are any deviations.

Using code inspections automates a lot of the manual checking and verification that developers would traditionally do. With it, it no longer matters how familiar a developer is on a project, or how large a solution is—it all goes under the same level of scrutiny.

it provides some of the following benefits as well:

  • Be able to utilize modern coding practices without actually knowing them.
  • Improve code quality with minimal refactoring risk.
  • Detecting potential code issues early.

WATCH: Understand how code inspections are evaluated

How to use code inspections to eliminate code smells

First, make sure to enable it by navigating to Extensions -> VAssistX -> Code Inspection (beta) -> Enable code inspection. 

Then you can either click on detected issues underlined in blue, use the Quick Refactoring Menu (Shift + Alt + Q) while on the highlighted issue, or use the code inspection dialogue to implement changes in batches.

WATCH: Code inspections in action

Visual Assist by Whole Tomato: Filling Gaps in Visual Studio for C/C++ and C# Developers

Visual Assist is a productivity extension for Visual Studio development work. It provides a set of intelligent refactoring, navigation, code highlighting and generation features for C, C++, and C# development. With its highly-efficient memory management and minimal UI, Visual Assist gives developers uninterrupted access to advanced features without slowing down the IDE.

Visual Assist is one of the definitive plugins that conceptualized and shaped most of the current features you see now in Visual Studio. And to this day it continues to develop user-centric design for maximum productivity and usability.

Download Visual Assist here.

The post Everything you need to know about code inspections first appeared on Tomato Soup.

]]>
https://www.wholetomato.com/blog/2023/06/13/everything-you-need-to-know-about-code-inspections/feed/ 0 3257
Visual Assist 2023.2 released https://www.wholetomato.com/blog/2023/05/17/visual-assist-2023-2-released/ https://www.wholetomato.com/blog/2023/05/17/visual-assist-2023-2-released/#respond Wed, 17 May 2023 16:00:51 +0000 https://blog.wholetomato.com/?p=3218 The second update to Visual Assist in 2023 is here. This update features an extensive series of upgrades to code inspections, shader extension support, and a number of quality fixes to the IDE. Download the...

The post Visual Assist 2023.2 released first appeared on Tomato Soup.

]]>
The second update to Visual Assist in 2023 is here. This update features an extensive series of upgrades to code inspections, shader extension support, and a number of quality fixes to the IDE. Download the latest version of Visual Assist now.

Greatly expanded code inspections with over 100 new Clang Tidy checks

The biggest item in this release is the added support for all code checks available from Clang Tidy. Code inspections are semi-automatic checks that prompt the user when Visual Assist’s engine recognizes outdated syntax or an otherwise correctable code issue. 

For context, Visual Assist’s code inspection is based on a series of checks from LLVM Clang Tidy. And before we add support for a new check, we rigorously test it for accuracy and compatibility. This process ensures that the check will give consistent suggestions for almost all use cases. In fact, this is the process undertaken for the two new added code inspections in this release—more on them later.

What we’ve added is the ability to use unevaluated Clang Tidy checkers as Code Inspections straight from Visual Assist. This greatly expands the types of code issues that can be detected with code inspections enabled. There is a slight tradeoff in that you may need to do some manual testing when using unvetted checks. Take a look at the full documented list of Clang Tidy checks.

The latest addition to our list of vetted code inspections are for bugprone-swapped-arguments and bugprone-argument-comment. These checks look for potentially swapped arguments by looking at implicit conversions and detect typos in argument comments and suggest automated fixes for them, respectively.

Lastly, we’re also announcing that code inspection is officially out of beta and is now running on Clang engine version 15.0. The beta label is mostly a formality and all functionality should function the same. If you haven’t, we highly advise enabling code inspections.

group code inspection by severity

Protip: When running comprehensive code inspection checks in a file, you can sort and group issues by level. Code inspection levels refer to an arbitrary metric representing severity given to a code check. Level one signifies critical, level five being on the level of a reminder, and zero refers to unflagged checks.

Extended Shader File Customization

Visual Assist 2023.2 better Shader Support

Due to consistent demand and great feedback, a significant portion has also been given to further improve our support for shader files. In fact, as of this release, it is in the last phases of beta testing and will most likely be available for general support very soon.

In this release, you can now use custom shader file extensions (there are no longer extensions considered “default”). Coloring and syntax highlighting has also been drastically improved, with almost all bugs ironed out as well.

Enable support for shader file parsing by accessing Visual Assist Options ->> Game Development ->> Enable support for shader files.

Enable Visual Assist Shader Support

Integrated-style extensions menu (pre-Visual Studio 2019)

In Visual Studio 2019, the toolbars and plugins were rearranged. Instead of being able to access your plugins in the main toolbar, you had to instead go under the Extensions menu. 

For the most part, this made sense—it’s easier to find all installed plugins and access their features correspondingly. However, for users who had one or a handful of plugins or are more comfortable using the mouse instead of shortcuts, the extra step might be bothersome (e.g. mouse users with only VAX installed).

Some users expressed interest so we’ve added the option for an integrated-style menu for extensions (similar to the pre-VS 2019 setup). 

This new menu mode can be enabled via Extensions ->> VAssistX ->> Visual Assist Options ->> Display ->> Switch to Legacy Style Main Menu.

Implement Virtual Methods context menu option to check / uncheck all.

The last of the new features in this release is a quality of life change. Inheriting from other classes is made much easier and intuitive using the Implement Virtual Methods feature.

While in the dialog, we added a small tweak that allows users to check and uncheck all possible methods using a simple checkbox. Neat little addition, we hope.

Visual Assist’s Implement Virtual Methods feature provides a neat little dialog to make inheriting from other classes quick and intuitive.

 

Bug Fixes

  • Fixed issue where installer exe could report errors after a successful install.
  • Improved auto type deduction for const, pointers and chained function calls.
  • Fixed issue where Code Inspections could fail with the latest MSVC includes.
  • Fixed issue where shader coloring may not be applied to the correct file extensions.
  • Fixed issue where shader coloring sometimes not applied to files opened automatically on solution load.
  • Fixed issues which could lead to the VA Navigation Bar being drawn incorrectly.  
  • Fixed issues which could lead to missing icons.
  • Improved tab completion in C# to interact better with build in tooling.
  • Fixed minor visual theming issues in various VA dialogs. 

Much thanks to those who submitted their feedback and bug reports. Keep ‘em coming. Send us a message or start a thread on the user forums for bug reports or suggestions. Happy coding!

The post Visual Assist 2023.2 released first appeared on Tomato Soup.

]]>
https://www.wholetomato.com/blog/2023/05/17/visual-assist-2023-2-released/feed/ 0 3218
C++ Refactoring Tips And Tricks https://www.wholetomato.com/blog/2023/02/23/c-refactoring-tips-and-tricks/ https://www.wholetomato.com/blog/2023/02/23/c-refactoring-tips-and-tricks/#respond Thu, 23 Feb 2023 21:26:28 +0000 https://blog.wholetomato.com/?p=3021 In the world of software development, features are constantly updated and new functionality is continuously added. Gradually, keeping up with the latest and best coding standards becomes complex. This slows can slow down operations and...

The post C++ Refactoring Tips And Tricks first appeared on Tomato Soup.

]]>
In the world of software development, features are constantly updated and new functionality is continuously added. Gradually, keeping up with the latest and best coding standards becomes complex. This slows can slow down operations and affect how code is maintained and updated. The act of maintaining and modernizing code is done through a process called code refactoring. In this article, we will talk about C++ refactoring and how it helps improve Visual Studio productivity.

What Is C++ Refactoring?

Refactoring is the process of improving or updating existing code without changing the functionality of the program. In the process of refactoring, you can improve the design, structure, and implementation of the software, and clean up unnecessary dependencies, code duplications, and other types of confusion.

In software development, development teams are constantly extending the code and adding new functionalities. Over time, the quality of the code can deteriorate, which causes difficulties in its understanding and the occurrence of errors. Code refactoring makes it possible to improve the readability of the code, simplify it, create a modern architecture, simplify the maintenance process, and reduce the number of errors.

What Are The Advantages Of C++ Refactoring?

  • Making code easier to understand and analyze.
  • Simplifying the addition of new functionality to software results in increased development efficiency.
  • Improvement of software architecture.
  • Optimizing resource usage.
  • Increased security.
  • Productivity improvement.
  • Simplifying the process of finding and fixing errors.
  • Reducing the number of errors.

When Should We Start Refactoring A Code?

For effective refactoring, the developers must be familiar with the code. In addition, to avoid errors in the refactoring process, it is important to have sufficient code coverage with automated tests.

You should think about code refactoring in the following cases:

  • The code is hard to understand. In this case, the process of updating the code and finding errors becomes longer, and it is possible to create duplicates, unnecessary dependencies, and even more complexity of the code.
  • Software slowdown. When the code is complex and has many dependencies, it can slow down the software. This leads to dissatisfaction among end users who may refuse to use it.
  • The presence of a large number of errors in the code. If the code is complex and confusing, the debugging process becomes much more difficult. Fixing one error may cause others to appear. To avoid this, it is important to refactor the code to simplify it as much as possible.
  • Code duplication. Each element of the program must be unique. If there are duplications in the code, it increases the time to read it and makes it difficult to understand, as well as increases the probability of errors.

What Are C++ Refactoring Best Practices?

  • Before refactoring, it is important to cover the code with automated tests.
  • Refactor incrementally, making small changes to the code while keeping the program in a working state.
  • Separate the processes of refactoring and creation of new functionality. No new features should be added during refactoring.
  • The result of refactoring should be simpler and more understandable code.
  • For testing a few refactoring iterations, use not only unit tests but manual testing too.
  • Follow the coding standard used by your company.
  • Remove deprecated code such as dynamic exception specification.

How To Refactor Code Easily?

Visual Assist is a productivity extension for Visual Studio that provides advanced code refactoring tools, quick navigation, rendering, correction, code maintenance, and code inspection functions. Using the Visual Assist C++ extension, you can easily improve code readability, simplify it, and fix broken code. You can refactor separate class or several dependent classes simultaneously.

How To Access Refactoring Commands?

You can access the refactoring commands in several ways:

  • Go to the desired symbol and open the context-sensitive quick action and refactoring menu using the Shift+Alt+Q short keys.

C++ Refactoring Tips And Tricks

  • Use the context menu of the text editor to open a complete list of refactoring commands.
  • Place the cursor over the desired symbol to display the icon, then click the icon to open the context menu.

C++ Refactoring Tips And Tricks

How To Change The Signature Of A Method?

Visual Assist allows you to change the method name, return type, visibility, names, types, number, and order of parameters in a simple dialog box. Automatic signature change is possible in all inherited and overridden methods, as well as in all method references.

C++ Refactoring Tips And Tricks

How To Encapsulate The Field?

With Visual Assist, you can create accessors to a member field by encapsulating the field. Accessories are created and assigned automatically. You can create accessor methods next to the declaration in the header file and can stay in the header file or implement them in the source file.

C++ Refactoring Tips And Tricks

How To Extract The Method?

You can quickly simplify long methods and make them easier to read and understand. To do this, highlight the required code segment and call the Extract Method refactoring. Visual Assist automatically detects the method signature, moves the selected code segment into the new method, and replaces the segment with a call to the new method.

C++ Refactoring Tips And Tricks

How To Move Implementation?

In C/C++, you can easily move a method implementation from the source to the header file and vice versa. To do this, select the desired method, call up the refactoring context menu, and select the move command.

C++ Refactoring Tips And Tricks

In addition, it is possible to move all methods from the header file to the source file in one operation. To do this, call the move command from the class name. This will bring up a dialog where you can select the methods you want to move.

C++ Refactoring Tips And Tricks

How To Rename?

Visual Assist provides the ability to quickly and accurately rename symbol definitions and declarations, all references to them, and occurrences in comments and lines in the active project and throughout the solution. You can rename classes, enums, fields, macros, methods, method parameters, and variables. To do this, choose Rename from the refactoring menu, specify a new name, and use the preview to determine which occurrences of the symbol need to be renamed.

C++ Refactoring Tips And Tricks

You can also rename the document and related files without breaking the build. Visual Assist automatically updates files, projects, and solutions and then propagates the renames through source control systems that integrate with Microsoft Visual Studio.

How to automatically inspect your code?

Visual Assist provides a function to check the code for certain quality issues based on LLVM Clang tidy. It diagnoses and corrects common programming errors, such as style violations, misuse of the interface, and errors that can be detected by static analysis. The code inspection function runs in a process separate from the Visual Studio process. This avoids reducing IDE performance.

Enable code inspection in the Visual Assist options to highlight code issues in the Visual Studio text editor. Code inspections will appear as a blue line on the line where an issue is found. You can click on this to accept the suggestion. You can also scan an entire file and make batch edits.

C++ Refactoring Tips And Tricks

Here are some of the code inspection checks available in Visual Assist. If you want the complete list, head on over the list of code inspections.

Code Inspection LLVM/Clang Equivalent

and Documentation

Calling std::move() when it is not needed performance-move-const-arg
Check emptiness with empty() instead of size() readability-container-size-empty
Constructor of shared_pointer can be replaced with make_shared modernize-make-shared
Constructor of unique_ptr can be replaced with make_unique modernize-make-unique
Escaped string literal can be written as raw string literal modernize-raw-string-literal
Find bug-prone usage of string comparison functions bugprone-suspicious-string-compare
Find manually-defined constructor definitions that do not initialize all fields cppcoreguidelines-pro-type-member-init

 

 

Are you interested in how to improve developer productivity in Visual Studio using Visual Assist and C++ refactoring? Download a free trial of Visual Assist today.

The post C++ Refactoring Tips And Tricks first appeared on Tomato Soup.

]]>
https://www.wholetomato.com/blog/2023/02/23/c-refactoring-tips-and-tricks/feed/ 0 3021
Visual Assist 2023.1 released https://www.wholetomato.com/blog/2023/02/15/visual-assist-2023-1-released/ https://www.wholetomato.com/blog/2023/02/15/visual-assist-2023-1-released/#respond Wed, 15 Feb 2023 16:46:31 +0000 https://blog.wholetomato.com/?p=2978 The first update to Visual Assist for 2023 is here. This update features an extensive list of improvements and bug fixes for a variety of users. And if you haven’t, download the latest release here....

The post Visual Assist 2023.1 released first appeared on Tomato Soup.

]]>
The first update to Visual Assist for 2023 is here. This update features an extensive list of improvements and bug fixes for a variety of users. And if you haven’t, download the latest release here. We hope you find them useful! 

Improved parser auto type deduction for pointers

This release updates how Visual Assist handles auto type specifiers, particularly when reference is coming from a pointer. Previously, there was a change that when auto assignments are used, any flags (such as const) may be ignored. With this release, VA now has better pointer deduction avoiding such instances.

Parser support C# tuple deconstruction

This update is useful for those using the C# equivalent of the previously released tuple deconstruction for C++  to avoid verbose initialization of variables.

Visual Assist C# tuple deconstruction

What this update does is that when you assign multiple variables at once using a predefined struct, VA will be able to recognize those variables. Consequently, this allows its features such as syntax highlighting and navigations to function properly. 

Add parser support for C++ 17’s structured binding from a constructor

This is a simple fix for an edge case for structured bindings that happens when a constructor is used. Similar to the last fix on tuple deconstruction, what this update does is that when you use the auto function to assign variables from a struct, it will now function properly even when a constructor is called.

Support for custom shader file extensions

When we added shader language and HLSL support, one of the most prominent user requests was to be able to enable support for non-standard/custom shader extensions. 

custom shader file support extension

With 2023.1 you can now add custom files by adding the extension in a text field under Options ->> VAssistX ->> Game Development ->> General.

Better code formatting and behavior for Unreal Engine copy-paste

Users can recall that when typing Unreal-specific code, there is unintended indentation behavior as a result of VS not understanding UE specifiers such as UFUNCTION and UMACROS.  

With Visual Assist enabled, the automatic indentation present in default Visual Studio is disabled. And in this release, we’ve improved on this behavior by extending it to copy-paste. What this means is that when copying or cutting blocks of Unreal Engine code, the pasted code will still have the correct indentation in place.

unreal engine text format pasting visual studio

New UI in Find References results

Previously, when using find references, the default scope of the search was the currently opened project or file. This update is for those who found that results shown by find references seem to be incomplete— it is now more apparent that you have the option to specify the scope of the search (ie. just the open project or the entire solution).

In this release, there is a newly added notification after every search that prompts the user to redo the operation for the whole solution.

Code inspections for bugprone-inaccurate-erase and bugprone-bool-pointer-implicit-conversion

Lastly, we’ve added two new code inspections based on clang tidy for bugprone-inaccurate-erase and bugprone-bool-pointer-implicit-conversion.

The first one is useful if you use std::vector and you are using remove() or erase() which often uses hard to read/type syntax. This inspection makes sure that when you use erase(), it works properly. 

The second one is useful when you have a pointer as an argument to an if statement (or anything resembling a bool). This is because it has to be dereferenced first or else it will default to a True. This check notifies the user if the pointer has not been dereferenced. 

Both of these checks are useful because in both of these instances, the code will still compile successfully—giving a false impression that everything would work as intended.

Bug Fixes

We also have a couple of bug fixes. And although they are small bugs, we hope this would be beneficial to users who encountered problems around the following:

  • Fixed issue where icons may be missing in Visual Studio 2022.
  • Fixed issue where folders / JSON files may be unnecessarily created when hovering the mouse cursor over symbols.
  • Fixed convert suggestion listbox keyboard shortcut display to update when the shortcut is changed. Note: shortcuts shown are now dynamic.

Keep the reports coming. Send us a message or start a thread on the user forums for bug reports or suggestions. Happy coding!

The post Visual Assist 2023.1 released first appeared on Tomato Soup.

]]>
https://www.wholetomato.com/blog/2023/02/15/visual-assist-2023-1-released/feed/ 0 2978
Visual Assist 2022.4 now available https://www.wholetomato.com/blog/2022/11/09/visual-assist-2022-4-now-available/ https://www.wholetomato.com/blog/2022/11/09/visual-assist-2022-4-now-available/#respond Wed, 09 Nov 2022 16:37:39 +0000 https://blog.wholetomato.com/?p=2717 The fourth update to Visual Assist 2022 is here! This release updates some core Visual Assist behaviors, adds a key C++ language feature, and adds support for external configuration files. The release also continues initiatives...

The post Visual Assist 2022.4 now available first appeared on Tomato Soup.

]]>
The fourth update to Visual Assist 2022 is here! This release updates some core Visual Assist behaviors, adds a key C++ language feature, and adds support for external configuration files. The release also continues initiatives on shader code from the previous release.

If you haven’t updated yet, download the latest release here.

Parser changes

One of the highlights of this release is improvements to Visual Assist’s parser. The parser is core to how Visual Assist understands (and therefore suggests) code.

Numerous upgrades and fixes have been undertaken to make the parser smarter. This makes it recognize modern C++ code standards and practices, thereby minimizing unwanted behavior as well. Here are some of them:

  • Now distinguishes between std::get and std::tuple.
  • Now understands parameters declared with “out int” in C#
  • Fixed parser getting confused with case’1′ inside switch statement.

Expect a steady stream of updates to parser behavior. If you encounter any bugs or errors submit a bug report on our community forums.

Support for C++17’s structured bindings

With the parser changes, VA 2022.4 also includes added support for C++17’s structured bindings. Structured bindings enable users to declare multiple variables initialized from a tuple or struct, simplifying and improving code readability.

VA’s improved parser recognizes structured bindings introduced in C++17, adding support for VA features such as code suggestion and navigation.

With this change, variables that are contained within the binding are now recognized. For example, typing a dot will now be properly colored and displayed on the navigation bar. You can also rename, search, and perform all the other actions you would expect from VA.

Continued HLSL improvement

The recently-added High Level Shading Language (HLSL) support has been augmented with coloring support for a variety of file types. This includes matrix types double4x2 and fixed3x4, and some base types such as min10float3. Because HLSL typically lacks corresponding header files, a more sophisticated understanding of code was required.

For those who are unaware, official HLSL support shipped with the previous release. HLSL and Unreal’s USF and USH files now integrate with VA’s core features.

Respecting VSCode excludes config files

Visual Assist now includes an option to consider configuration instructions similar to those used in VSCode settings .json files. This comes at the request of those who wish to skip unnecessary parsing when building solutions. 

This means that you can open a file without needing to parse an entire project or a solution, saving precious time. This is a way to essentially tell Visual Studio and Visual Assist to “open a file but do not parse anything else apart from a specific part.”

Enable the option to detect and honor exclude settings via ticking a checkbox in Visual Assist options. Here is an example of a configuration file with exclude settings:

An example configuration that VA will now recognize. Note: The actual JSON files are often configured in VS Code itself through a UI.

A new code inspection

This release also adds an inspection for bugprone-string-integer-assignment—a check based on LLVM/Clang-Tidy. It checks for easy-to-miss instances of assigning an integer to  std::basic_string<CharT> (std::string, std::wstring, etc.).

Access other code inspections by accessing the following:
(If you are not seeing options, please remember to enable code inspections!)

  • Quick Actions and Refactorings menu ( Shift + Alt + Q
  • VAssistX ->> Code Inspection (beta) ->> VA Code Inspection Results

Minor bug fixes

  • Fixed comments getting duplicated in tooltips.
  • Fixed issue where VA’s tooltips would not appear if IntelliSense was disabled
  • Fixed issue where VA Outline tooltip spreads across two monitors with different DPI settings could cause the system to freeze.
  • Fixed issue where tomato icon may become black on hover in VS 2022
  • Fixed issue where class method name that begins with “using” is missing from MIF.

For more information about the changes in this release, head on over to the documentation. We hope you find these changes useful. Happy coding!

The post Visual Assist 2022.4 now available first appeared on Tomato Soup.

]]>
https://www.wholetomato.com/blog/2022/11/09/visual-assist-2022-4-now-available/feed/ 0 2717
Visual Assist 2022.3 now available https://www.wholetomato.com/blog/2022/08/18/visual-assist-2022-322-3-now-available/ https://www.wholetomato.com/blog/2022/08/18/visual-assist-2022-322-3-now-available/#respond Thu, 18 Aug 2022 21:18:07 +0000 https://blog.wholetomato.com/?p=2584 Visual Assist 2022.3 is out with new graphics shaders support, code inspection checks, and new navigation options

The post Visual Assist 2022.3 now available first appeared on Tomato Soup.

]]>
Visual Assist 2022.3 is out and brings some exciting news for those working with graphics shaders! It also adds a pair of code inspection checks, as well as a new navigation option for Open File in Solution.

Visual Assist HLSL support

High-level shader language (HLSL), while vaguely similar to C in syntax, is a distinct language and thus most native Visual Studio features may behave differently.

This may bring some frustration, and that’s what VA intends to fix! We’ve had some manual registry edits to let VA work with shaders, but that hasn’t been well-known and we’ve also wanted to improve our internal support before officially supporting the language.

Which is why we’re excited to announce that Visual Assist ‘s features will now work for HLSL, USH and USF files—the latter two being the Unreal Engine-specific shader files.  This includes:

  • Code navigation features
  • Syntax highlighting 
  • Context-aware smart suggestions
  • Automatic code generation prompts
Visual Assist support HLSL

Basic HLSL syntax highlighted by Visual Assist.

Please note that support is still in early beta – marking ‘beta’ is standard practice for us for key new features – and that some complex features like refactoring may have some issues. We ask that when you work with HLSL and Visual Assist to send feedback our way to improve behavior.

We often focus on Unreal Engine, where VA is widely used, but HLSL files are used across the graphics industry and this feature is useful for all developers writing shaders, no matter the technology or engine you’re using.

VA enable HLSL support

Note: Because it’s in beta, shader file support is disabled by default. To enable it, go to Visual Assist Options ->> Game Development ->> Enable support for shader files

Two new code inspection updates

The first check involves flagging constructors with incomplete initialized fields. Constructors don’t always initialize all fields. And some types don’t have initialization that leaves them in a ‘good’ state – one example is a pointer type. This check flags constructors that leave fields of those types uninitialized.

The second checks for a common mistake when using std::string::compare (or other string types like wstring) method to compare strings. To elaborate, the compare method returns three possible values (instead of a simple boolean True or False) because its primary use is for sorting. If your code is using it where an equality or inequality check would work and be more readable or easier to understand, this check recommends it.

visual assist code inspection for std::string::compare

Check for std::string::compare

 

 

 

 

 

Access Visual Assist’s code inspections by accessing the following:
(If you are not seeing options, please remember to enable code inspections!)

  • Quick Actions and Refactorings menu ( Shift + Alt + Q
  • VAssistX ->> Code Inspection (beta) ->> VA Code Inspection Results

 

New Linux-style navigation in Open File in Solution

Open File in Solution will now accept forward slashes to filter certain directories. Adding a forward slash ( / or \ ) before a string will filter all files not contained in a directory starting with the string. This is a productivity feature: on many keyboards / is easier to type than \, and so several customers requested the forward-slash work. A small feature, but one we think shows our dedication to useful details.

And for those who are unaware, Open File in Solution also accepts the following:

  • Negative filtering ( – )
  • Multiple entries ( , )
  • BeginsWith filter ( .string)
  • EndsWith filters ( string. )

You can learn more about available options in the documentation.

Even more

There are several quality fixes as well, since every release we aim to make it better. For more information about the changes in this release, head on over to the documentation.

We hope you find the new inspections and shader support useful, and as always, happy coding!

The post Visual Assist 2022.3 now available first appeared on Tomato Soup.

]]>
https://www.wholetomato.com/blog/2022/08/18/visual-assist-2022-322-3-now-available/feed/ 0 2584