Tomato Soup https://www.wholetomato.com/blog Visual Assist Team Blog Tue, 31 Dec 2024 08:19:33 +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 Tomato Soup https://www.wholetomato.com/blog 32 32 227787260 Visual Assist 2024.9 release post https://www.wholetomato.com/blog/2024/12/31/visual-assist-2024-9-release-post/ https://www.wholetomato.com/blog/2024/12/31/visual-assist-2024-9-release-post/#respond Tue, 31 Dec 2024 08:19:33 +0000 https://www.wholetomato.com/blog/?p=4025 Happy Holidays! Visual Assist 2024.9 makes its way to general availability this holiday season!  This update introduces a key update to Find References and a new refactoring. We are also introducing a new way to...

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

]]>
Happy Holidays! Visual Assist 2024.9 makes its way to general availability this holiday season! 

This update introduces a key update to Find References and a new refactoring. We are also introducing a new way to experience Visual Assist—more on this below! And of course, thanks to your feedback, we also have bug fixes and general QoL improvements.

Visit our website page and download the release now.

Replace Find References Tree Control

Whenever you execute a Find References command, the results are shown in  a dialogue at the bottom of the windows. In 2024.9, a portion of the results dialog and the logic behind it was overhauled to (1) make the UI display results faster and (2) to add the ability to search and filter through those results.

Before this update, it may sometimes take a half second or so to display all the references and symbols as the UI tries to catch up with the greatly improved Find References speed.  Now, when you are working with large projects or code bases, there will be minimal lag even as the parser incrementally adds hits to the results dialog.

Additionally, as a result of the overhaul, there is a new feature that allows users to actively search through the found results, even as the primary search is still ongoing. You don’t have to wait for the complete search in order to interact with the results.

Move Method to Base Class (New refactoring)

A new refactoring has been added: the Move Method to Base Class is a powerful tool for improving the design and maintainability of your code. This feature allows you to take a method that was originally implemented in a child (or derived) class and move it to a base (or parent) class.

This essentially transfers the method implementation, for instance, to the base class, and updates the derived classes to remove the redundant implementation. This makes derived classes smaller and more manageable—and thus, more maintainable, more readable, and overall cleaner code.

New Visual Assist Integration Modes 

This release introduces two new available integration modes for the Visual Assist plugin. The available integration modes allow users to personalize their experience with Visual Assist. The two available modes are partial integration and full integration mode.

Partial integration sets fewer features on by default and will not change default key mappings—a more vanilla Visual Studio experience. This may be useful for those using Visual Assist for a few key features, or for those who are accustomed to the default VA experience.

Full integration is the recommended setting as it embodies the experience that VA was designed for. It exposes all code completion, code navigation, autosuggestion features, and the like. Furthermore, it also exposes some of our less apparent features more.

One of the main purposes of this mode is to make it easier to find and familiarize with the features inside Visual Assist. This applies even for beginners as they can see more and use more of the available features and functions.. 

Additionally, it’s the more flexible option as it can be easier to disable a few things manually but keep everything else.  As such, you can consider full integration as the setting that maximizes your experience of all the benefits Visual Assist has to offer. And on the other hand, consider partial integration as the classic version that keeps development a bit more zen with fewer buttons and shortcuts to learn.

New “Ray” style row indicator

Visual Assist’s way of highlighting the current selected line/row now has a new option. This makes the current line appear a bit more unique, and gives it a thinner edge appearance. To be more precise, we added a new style unique to the current iteration in Visual Studio. The new style utilizes a “ray” top and bottom line going across the editor. 

Unit Test Code Generation feature

For those following the Google Test framework, you can use this new feature to create boilerplates to skip the tedium of setting up the test framework and verifying your test’s structure. With just a few clicks, you can create a new test file, pre-filled with test structure and essential placeholders, saving you significant time and effort.

To use this feature, just activate the feature on a class, and VA will create a new file with the foundation you need to start writing tests.

Availability & Feedback

This release is available starting December 30 and can be downloaded via the Whole Tomato downloads page. As always, we encourage your feedback, especially on recently introduced features, to help us make a better experience for you.

Thank you for your continued support, happy holidays and happy coding! If you have any questions or encounter any issues, feel free to reach out to our support team.

Download the release now.

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

]]>
https://www.wholetomato.com/blog/2024/12/31/visual-assist-2024-9-release-post/feed/ 0 4025
Test Driven-Development and UI/UX Design: A Practical Guide [Webinar Recap] https://www.wholetomato.com/blog/2024/12/22/tdd-unit-testing-ui-guide/ https://www.wholetomato.com/blog/2024/12/22/tdd-unit-testing-ui-guide/#respond Sun, 22 Dec 2024 14:12:54 +0000 https://www.wholetomato.com/blog/?p=4029 Don’t you wish your code came with an undo button for every mistake? So do all developers who accidentally pushed a bug into production! But we got the next best thing: Unit testing. This webinar...

The post Test Driven-Development and UI/UX Design: A Practical Guide [Webinar Recap] first appeared on Tomato Soup.

]]>
Don’t you wish your code came with an undo button for every mistake? So do all developers who accidentally pushed a bug into production!

But we got the next best thing: Unit testing. This webinar will show you how to stop breaking your codebase (and your spirit) by writing tests that catch errors before they escape into the wild. Perfect for developers who know they should test but don’t know how—or why.

What You’ll Learn:

  • The differences between two schools of TDD and when to use them.
  • How to implement CI pipelines and automate your test execution.
  • Practical techniques for leveraging static analysis tools and code profiling.
  • Real-world case studies that highlight successful approaches to refactoring and performance optimization.

In this webinar, our experts shared their best practices for developing high-quality C++ code, offering valuable insights to apply in your projects.

This webinar features insights from experts in software design and development, covering practical applications and real-world scenarios to help you streamline your workflows.

This webinar has concluded. Scroll down to watch the replay and review the highlights.

Webinar Replay

Webinar Highlights

Introduction

0:19-1:35: About Nuno: product manager for Visual Assist, clean code enthusiast, contact info shared, alongside mission of Visual Assist and upcoming new version announcement.

Message and Story

1:40-5:12: Importance of programmers writing good quality software and Nuno’s experience with different software development approaches (design thinking, waterfall, agile).

Test-Driven Development Overview

5:12-8:10: Discovery of test-driven development (TDD) and its impact on software quality. Explanation of TDD and the Red-Green-Refactor cycle. Importance of small increments, immediate feedback, and other TDD benefits.

Practical Exercise Setup

8:17-10:09: Overview of the Mars Rover exercise, rules, and references.
10:09-11:00: Visual Studio 2022 setup for the Mars Rover project (source files and test project creation).

First Test Case

11:00-12:08: Writing the first test: Initial position at (0, 0), facing north.
12:08-13:11: Creating the Rover class and implementing execute() to return an empty string initially.
13:11-16:16: Making the test pass by returning the expected position and direction.

Second Test Case

16:16-18:15: Writing the second test: Rotating right from north to east.
18:15-20:09: Updating Rover to handle the “right rotation” command and making the test pass.

Refactoring and Patterns

20:09-20:59: Recognizing patterns in the test code and introducing Google Test fixtures for code reuse.
50:06-52:11: Introducing and implementing a current position variable. Writing and running tests to confirm functionality after the changes.
52:11-53:28: Extending functionality to the left method and replicating the test-driven approach used for the right method.
54:00-55:18: Cleaning up and optimizing the code after successful test results, ensuring all tests remain green.
56:00-56:48: Summary of the refactoring process and demonstration of the final Rover and Direction class setup.

QnA

[56:48–59:02]
Introduction to the Q&A session with Nuno Castro and Ian Barker. The discussion opens with strategies for writing tests for projects without existing tests. Suggestions include starting with end-to-end tests and gradually adding component-specific tests during future changes.

GUI Tools, A/B Testing, and Metrics

[59:02–1:03:07]
Overview of GUI testing tools like SmartBear’s TestComplete and their use in desktop and web testing. The discussion transitions into A/B testing, explaining its purpose and real-world examples (e.g., Coca-Cola product testing). The importance of metrics to gauge feature usage before redesign or development is also highlighted.

Agile Methodologies and Encouragement for TDD

[1:03:07–1:06:50]
Reflection on Agile methodologies, balancing speed with system stability, and evolving approaches such as Facebook’s shift from “move fast and break things” to prioritizing reliability. The session concludes with encouragement to adopt Test-Driven Development (TDD) and a nod to the value of unedited coding demos to showcase realistic problem-solving.

Self-Development, Testing, and TDD Approaches

[1:10:01–1:13:36]
Introduction to self-development as both a science and an art. Discussion includes testing strategies to ensure business logic isn’t broken, addressing overfitting in tests, and balancing test coverage with real-world solutions. User stories are highlighted as a foundation for design, followed by a comparison of the Chicago and London schools of TDD.

Design, User Experience, and Business Logic

[1:13:36–1:17:01]
Emphasis on designing user interfaces first and iterating on user experience challenges. The discussion incorporates Don Norman’s insight that user errors often indicate interface design issues. It concludes with balancing business logic with test coverage in TDD.

Closing

[1:17:01–1:18:00]
The importance of prioritizing timely application releases over perfectionism is discussed. The webinar ends with closing remarks, thanks to participants, replay information, and a final farewell.

The post Test Driven-Development and UI/UX Design: A Practical Guide [Webinar Recap] first appeared on Tomato Soup.

]]>
https://www.wholetomato.com/blog/2024/12/22/tdd-unit-testing-ui-guide/feed/ 0 4029
How to Query File Attributes 50x faster on Windows https://www.wholetomato.com/blog/2024/11/14/how-to-query-file-attributes-50x-faster-on-windows/ https://www.wholetomato.com/blog/2024/11/14/how-to-query-file-attributes-50x-faster-on-windows/#respond Thu, 14 Nov 2024 15:52:55 +0000 https://www.wholetomato.com/blog/?p=4010 Imagine you’re developing a tool that needs to scan for file changes across thousands of project files. Retrieving file attributes efficiently becomes critical for such scenarios. In this article, I’ll demonstrate a technique to get...

The post How to Query File Attributes 50x faster on Windows first appeared on Tomato Soup.

]]>
Imagine you’re developing a tool that needs to scan for file changes across thousands of project files. Retrieving file attributes efficiently becomes critical for such scenarios. In this article, I’ll demonstrate a technique to get file attributes that can achieve a surprising speedup of over 50+ times compared to standard Windows methods.

Let’s dive in and explore how we can achieve this.

This is a blog post made in collaboration with Bartlomiej Filipek from C++ stories. You can visit his blog here.

The inspiration

The inspiration for this article came from a recent update for Visual Assist – a tool that heavily improves Visual Studio experience and productivity for C# and C++ developers.

In one of their blog post, they shared:

The initial parse is 10..15x faster!

What’s New in Visual Assist 2024—Featuring lightning fast parser performance [Webinar] – Tomato Soup

After watching the webinar, I noticed some details about efficiently getting file attributes and I decided to give it a try on my machine. In other words I tried to recreate their results.

Disclaimer: Idera, the company behind Visual Assist, helped me write this post and sponsored it.

Understanding File Attribute Retrieval Methods on Windows

On Windows, there are at least a few options to check for a file change:

  • FindFirstFile[EX] – with Basic, Standard and LargeFetch options
  • GetFileAttributesEx
  • std::filesystem
  • GetFileInformationByHandleEx

Below, you can see some primary usage of each approach:

FindFirstFileEx

FindFirstFileEx is a Windows API function that allows for efficient searching of directories. It retrieves information about files that match a specified file name pattern. The function can be used with different information levels, such as FindExInfoBasic and FindExInfoStandard, to control the amount of file information fetched.

WIN32_FIND_DATA findFileData;
HANDLE hFind = FindFirstFileEx((directory + "\\*").c_str(), FindExInfoBasic, &findFileData, FindExSearchNameMatch, NULL, 0);

if (hFind != INVALID_HANDLE_VALUE) {
    do {
        // Process file information
    } while (FindNextFile(hFind, &findFileData) != 0);
    FindClose(hFind);
}

Additionally you can also pass FIND_FIRST_EX_LARGE_FETCH as the additional flag to indicate that the function should use a larger buffer which might bring some extra performance.

GetFileAttributesEx

GetFileAttributesEx is another Windows API function that retrieves file attributes for a specified file or directory. Unlike FindFirstFileEx, which is used for searching and listing files, GetFileAttributesEx is typically used for retrieving attributes of a single file or directory.

WIN32_FILE_ATTRIBUTE_DATA fileAttributeData;
if (GetFileAttributesEx((directory + "\\" + fileName).c_str(), GetFileExInfoStandard, &fileAttributeData)) {
    // Process file attributes
}

GetFileInformationByHandleEx

GetFileInformationByHandleEx is a low level routine that might be tricky to use, but gives us more control over the iteration. The main idea is to get a lerge buffer of data and read it on the application side, rather than rely on sometimes costly kernel/system calls.

Assuming you have a file open, which is a directory, you can iterate over its children in the following way:

while (true) {
    if (!GetFileInformationByHandleEx(
        hDir,
        FileFullDirectoryInfo,
        pInfo,
        sizeof(buffer))) {
        DWORD error = GetLastError();
        if (error == ERROR_NO_MORE_FILES) {
            break;
        }
        else {
            std::wcerr << L"GetFileInformationByHandleEx failed (" << error << L")\n";
            break;
        }
    }

    do {
        if (!(pInfo->FileAttributes & FILE_ATTRIBUTE_DIRECTORY)) {
            FileInfo fileInfo;
            fileInfo.fileName = std::wstring(pInfo->FileName, pInfo->FileNameLength / sizeof(WCHAR));
            FILETIME ft{};
            ft.dwLowDateTime = pInfo->LastWriteTime.LowPart;
            ft.dwHighDateTime = pInfo->LastWriteTime.HighPart;
            fileInfo.lastWriteTime = ft;
            files.push_back(fileInfo);
        }
        pInfo = reinterpret_cast<FILE_FULL_DIR_INFO*>(
            reinterpret_cast<BYTE*>(pInfo) + pInfo->NextEntryOffset);
    } while (pInfo->NextEntryOffset != 0);
}

std::filesystem

Introduced in C++17, the std::filesystem library provides a modern and portable way to interact with the file system. It includes functions for file attribute retrieval, directory iteration, and other common file system operations.

for (const auto& entry : fs::directory_iterator(directory)) {
    if (entry.is_regular_file()) {
        // Process file attributes
        auto ftime = fs:last_write_time(entry);
        ...
    }
}

The Benchmark

To evaluate the performance of different file attribute retrieval methods, I developed a small benchmark. This application measures the time taken by each method to retrieve file attributes for N number of files in a specified directory.

Here’s a rough overview of the code:

The FileInfo struct stores the file name and last write time.

struct FileInfo {
    std::wstring fileName;
    std::variant<FILETIME, std::filesystem::file_time_type> lastWriteTime;
};

Each retrieval technique will have to go over a directory and build a vector of FileInfo objects.

BenchmarkFindFirstFileEx

void BenchmarkFindFirstFileEx(const std::string& directory, 	
                              std::vector<FileInfo>& files, 
                              FINDEX_INFO_LEVELS infoLevel) 
{
   WIN32_FIND_DATA findFileData;
   HANDLE hFind = FindFirstFileEx((directory + "\\*").c_str(),
                                   infoLevel, 
                                   &findFileData, 
                                   FindExSearchNameMatch, NULL, 0);

   if (hFind == INVALID_HANDLE_VALUE) {
       std::cerr << "FindFirstFileEx failed (" 
                 << GetLastError() << ")\n";
       return;
   }

   do {
       if (!(findFileData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)) {
           FileInfo fileInfo;
           fileInfo.fileName = findFileData.cFileName;
           fileInfo.lastWriteTime = findFileData.ftLastWriteTime;
           files.push_back(fileInfo);
       }
   } while (FindNextFile(hFind, &findFileData) != 0);

   FindClose(hFind);
}

BenchmarkGetFileAttributesEx

void BenchmarkGetFileAttributesEx(const std::string& directory,
                                  std::vector<FileInfo>& files) 
{
   WIN32_FIND_DATA findFileData;
   HANDLE hFind = FindFirstFile((directory + "\\*").c_str(),
                                &findFileData);

   if (hFind == INVALID_HANDLE_VALUE) {
       std::cerr << "FindFirstFile failed (" 
                 << GetLastError() << ")\n";
       return;
   }

   do {
       if (!(findFileData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)) {
           WIN32_FILE_ATTRIBUTE_DATA fileAttributeData;
           if (GetFileAttributesEx((directory + "\\" + findFileData.cFileName).c_str(), GetFileExInfoStandard, &fileAttributeData)) {
               FileInfo fileInfo;
               fileInfo.fileName = findFileData.cFileName;
               fileInfo.lastWriteTime = fileAttributeData.ftLastWriteTime;
               files.push_back(fileInfo);
           }
       }
   } while (FindNextFile(hFind, &findFileData) != 0);

   FindClose(hFind);
}

BenchmarkStdFilesystem

And the last one, the most portable technique:

void BenchmarkStdFilesystem(const std::string& directory, 
                            std::vector<FileInfo>& files) 
{
    for (const auto& entry : std::filesystem::directory_iterator(directory)) {
        if (entry.is_regular_file()) {
            FileInfo fileInfo;
            fileInfo.fileName = entry.path().filename().string();
            FILETIME ft{};
            ft.dwLowDateTime = pInfo->LastWriteTime.LowPart;
            ft.dwHighDateTime = pInfo->LastWriteTime.HighPart;
            fileInfo.lastWriteTime = ft;
            files.push_back(fileInfo);
        }
    }
}

BenchmarkGetFileInformationByHandleEx

void BenchmarkGetFileInformationByHandleEx(const std::wstring& directory, std::vector<FileInfo>& files) {
    HANDLE hDir = CreateFileW(
        directory.c_str(),
        GENERIC_READ,
        FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE,
        NULL,
        OPEN_EXISTING,
        FILE_FLAG_BACKUP_SEMANTICS,
        NULL
    );

    if (hDir == INVALID_HANDLE_VALUE) {
        std::wcerr << L"CreateFile failed (" << GetLastError() << L")\n";
        return;
    }

    constexpr DWORD BufferSize = 64 * 1024;
    uint8_t buffer[BufferSize];
    FILE_FULL_DIR_INFO* pInfo = reinterpret_cast<FILE_FULL_DIR_INFO*>(buffer);

    while (true) {
        if (!GetFileInformationByHandleEx(
            hDir,
            FileFullDirectoryInfo,
            pInfo,
            sizeof(buffer))) {
            DWORD error = GetLastError();
            if (error == ERROR_NO_MORE_FILES) {
                break;
            }
            else {
                std::wcerr << L"GetFileInformationByHandleEx failed (" << error << L")\n";
                break;
            }
        }

        do {
            if (!(pInfo->FileAttributes & FILE_ATTRIBUTE_DIRECTORY)) {
                FileInfo fileInfo;
                fileInfo.fileName = std::wstring(pInfo->FileName, pInfo->FileNameLength / sizeof(WCHAR));
                FILETIME ft{};
                ft.dwLowDateTime = pInfo->LastWriteTime.LowPart;
                ft.dwHighDateTime = pInfo->LastWriteTime.HighPart;
                fileInfo.lastWriteTime = ft;
                files.push_back(fileInfo);
            }
            pInfo = reinterpret_cast<FILE_FULL_DIR_INFO*>(
                reinterpret_cast<BYTE*>(pInfo) + pInfo->NextEntryOffset);
        } while (pInfo->NextEntryOffset != 0);
    }

    CloseHandle(hDir);
}

The Main Function

The main function sets up the benchmarking environment, runs the benchmarks, and prints the results.

std::wstring directory = argv[1];
const auto arg2 = argc > 2 ? std::wstring_view(argv[2]) : std::wstring_view{};

std::vector<std::pair<std::wstring, std::function<void(std::vector<FileInfo>&)>>> benchmarks = {
    {L"FindFirstFileEx (Basic)", [&](std::vector<FileInfo>& files) {
        BenchmarkFindFirstFileEx(directory, files, FindExInfoBasic, 0);
    }},
    {L"FindFirstFileEx (Standard)", [&](std::vector<FileInfo>& files) {
        BenchmarkFindFirstFileEx(directory, files, FindExInfoStandard, 0);
    }},
    {L"FindFirstFileEx (Large Fetch)", [&](std::vector<FileInfo>& files) {	BenchmarkFindFirstFileEx(directory, files, FindExInfoStandard, FIND_FIRST_EX_LARGE_FETCH);
    }},
    {L"GetFileAttributesEx", [&](std::vector<FileInfo>& files) {
        BenchmarkGetFileAttributesEx(directory, files);
    }},
    {L"std::filesystem", [&](std::vector<FileInfo>& files) {
        BenchmarkStdFilesystem(directory, files);
        }},
    {L"GetFileInformationByHandleEx", [&](std::vector<FileInfo>& files) {
        BenchmarkGetFileInformationByHandleEx(directory, files);
    }}
};

std::vector<std::pair<std::wstring, double>> results;

for (const auto& benchmark : benchmarks) {
    std::vector<FileInfo> files;
    files.reserve(2000); // Reserve space outside the timing measurement

    auto start = std::chrono::high_resolution_clock::now();
    benchmark.second(files);
    auto end = std::chrono::high_resolution_clock::now();

    std::chrono::duration<double> elapsed = end - start;
    results.emplace_back(benchmark.first, elapsed.count());
}

PrintResultsTable(results);

Performance Results

To measure the performance of each file attribute retrieval method, I executed benchmarks on a directory containing 1000, 2000 or 5000 random text files. The tests were performed on a laptop equipped with an Intel i7 4720HQ CPU and an SSD. I measured the time taken by each method and compared the results to determine the fastest approach.

Each test run consisted of two executions: the first with uncached file attributes and the second likely benefiting from system-level caching.

The speedup factor is the factor of the current result compared to the slowest technique in a given run.

1000 files:

Method                         Time (seconds)       Speedup Factor
FindFirstFileEx (Basic)        0.0014831000         162.868
FindFirstFileEx (Standard)     0.0014817000         163.022
FindFirstFileEx (Large Fetch)  0.0011792000         204.842
GetFileAttributesEx            0.2415497000         1.000
std::filesystem                0.0609313000         3.964
GetFileInformationByHandleEx   0.0044168000         54.689

// second run:
Method                         Time (seconds)       Speedup Factor
FindFirstFileEx (Basic)        0.0013805000         44.947
FindFirstFileEx (Standard)     0.0011310000         54.863
FindFirstFileEx (Large Fetch)  0.0009071000         68.404
GetFileAttributesEx            0.0616772000         1.006
std::filesystem                0.0620496000         1.000
GetFileInformationByHandleEx   0.0025246000         24.578

Directory with 2000 files:

Method                         Time (seconds)       Speedup Factor
FindFirstFileEx (Basic)        0.0014455000         150.287
FindFirstFileEx (Standard)     0.0015029000         144.547
FindFirstFileEx (Large Fetch)  0.0012086000         179.745
GetFileAttributesEx            0.2172402000         1.000
std::filesystem                0.0609186000         3.566
GetFileInformationByHandleEx   0.0025069000         86.657

Method                         Time (seconds)       Speedup Factor
FindFirstFileEx (Basic)        0.0012020000         50.908
FindFirstFileEx (Standard)     0.0011614000         52.688
FindFirstFileEx (Large Fetch)  0.0008887000         68.856
GetFileAttributesEx            0.0611920000         1.000
std::filesystem                0.0611760000         1.000
GetFileInformationByHandleEx   0.0025835000         23.686

Directory with 5000 random, small text files:

Method                         Time (seconds)       Speedup Factor
FindFirstFileEx (Basic)        0.0077623000         84.975
FindFirstFileEx (Standard)     0.0828258000         7.964
FindFirstFileEx (Large Fetch)  0.0144611000         45.612
GetFileAttributesEx            0.6595977000         1.000
std::filesystem                0.3022779000         2.182
GetFileInformationByHandleEx   0.0051569000         127.906

Method                         Time (seconds)       Speedup Factor
FindFirstFileEx (Basic)        0.0069814000         43.844
FindFirstFileEx (Standard)     0.0148472000         20.616
FindFirstFileEx (Large Fetch)  0.0140663000         21.761
GetFileAttributesEx            0.3060932000         1.000
std::filesystem                0.3011346000         1.016
GetFileInformationByHandleEx   0.0051614000         59.304

The results consistently showed that FindFirstFileEx with the Standard flag was the fastest method in uncached scenarios, offering speedups up to 129x compared to GetFileAttributesEx. However, in cached scenarios, FindFirstFileEx (Basic and Standard) achieved over 50x speedup improvements. The parameters for “Large Fetch” seems to increase the performance.

For the directory with 2000 files, FindFirstFileEx (Basic) demonstrated a speedup factor of over 179x in the first run and went down to 68 in the second run. In the directory with 5000 files, we can see that GetFileInformationByHandleEx takes crown and acheives 59x speedup, while other techniques reaches 43x max. Notably, std::filesystem performed on par with GetFileAttributesEx .

Further Techniques

Getting file attributes is only part of the story, and while important, they may contribute to only a small portion of the overall performance for the whole project. The Visual Assist team, who contributed to this article, improved their initial parse time performance by avoiding GetFileAttributes[Ex] using the same techniques as this article. But Visual Assist also improved performance through further techniques. My simple benchmark showed 50x speedups, but we cannot directly compare it with the final Visual Assist, as the tool does many more things with files.

The main item being optimised was the initial parse, where VA builds a symbol database when a project is opened for the first time. This involves parsing all code and all headers. They decided that it’s a reasonable assumption that headers won’t change while a project is being loaded, and so the file access is cached during the initial parse, avoiding the filesystem entirely. (Changes after a project has been parsed the first time are, of course, still caught.) The combination of switching to a much faster method for checking filetimes and then avoiding file IO completely contributed to the up-to-15-times-faster performance improvement they saw in version 2024.1 at the beginning of this year.

Read further details on their blog Visual Assist 2024.1 release post – January 2024 and Catching up with VA: Our most recent performance updates – Tomato Soup.

Summary

In the text, we went through a benchmark that compares several techniques for fetching file attributes. In short, it’s best to gather attributes at the same time as you iterate through the directory – using FindFirstFileEx or via GetFileInformationByHandleEx. So if you want to do this operation hundreds of times, it’s best to measure time and choose the best technique. What’s more, if you expect to have lots of files in a directory it’s good to check techniques offering larger buffers.

The benchmark also showed one feature: while C++17 and its filesystem library offer a robust and standardized way to work with files and directories, it can be limited in terms of performance. In many cases, if you need super optimal performance, you need to open the hood and work with the specific operating system API.

Back to you

  • Do you use std::filesystem for tasks involving hundreds of files?
  • Do you know other techniques that offer greater performance when working with files?

Share your comments below. And if you’re using C++, you can also download and try Visual Assist yourself for 30 days for free.

The post How to Query File Attributes 50x faster on Windows first appeared on Tomato Soup.

]]>
https://www.wholetomato.com/blog/2024/11/14/how-to-query-file-attributes-50x-faster-on-windows/feed/ 0 4010
C++ versus Blueprints: Which should I use for Unreal Engine game development? https://www.wholetomato.com/blog/2024/10/23/c-versus-blueprints-which-should-i-use-for-unreal-engine-game-development/ https://www.wholetomato.com/blog/2024/10/23/c-versus-blueprints-which-should-i-use-for-unreal-engine-game-development/#respond Wed, 23 Oct 2024 13:49:33 +0000 https://www.wholetomato.com/blog/?p=3983 Introduction When programming game elements in Unreal, developers have two main options: develop using Unreal’s visual blueprint system or develop using the C++ language.  The Blueprint system in Unreal Engine is a powerful visual scripting...

The post C++ versus Blueprints: Which should I use for Unreal Engine game development? first appeared on Tomato Soup.

]]>
Introduction

When programming game elements in Unreal, developers have two main options: develop using Unreal’s visual blueprint system or develop using the C++ language. 

The Blueprint system in Unreal Engine is a powerful visual scripting tool designed to help developers create gameplay mechanics without needing to write traditional code. Introduced in Unreal Engine 4 to make game development more accessible to non-programmers, Blueprints enable users to build systems by dragging and dropping pre-built nodes, representing code functions. Some developers treat blueprints as the be-all and end-all for programming in Unreal…

…but on the other hand, we have those who advocate C++ and its ability to program almost anything in Unreal. It has performance, versatility, and arguably makes you a better designer because you can control almost every mechanic of the game you are developing. 

In this blog post, we discuss the differences between the two approaches and hopefully it will help more people understand that it’s not an either/or decision and the most effective utilization is to use them to complement each other. 

Getting started: How to install Unreal Engine and Visual Studio

Introduction to Unreal’s Blueprint System

According to Epic, the creators of the Unreal Engine, the Blueprint Visual Scripting system is a “complete gameplay scripting system based on the concept of using a node-based interface to create gameplay elements from within Unreal Editor.”

Before Blueprints, Unreal Engine used a scripting language called UnrealScript (used in Unreal Engine 3 and earlier). While powerful, it required traditional programming knowledge and didn’t cater to artists or designers (which arguably comprise a greater bulk of game development) who needed to iterate rapidly without diving into code.

The idea was to make game development more accessible to a wider range of creators, especially those who weren’t programmers.

Fast forward to the highly acclaimed Unreal Engine 4 which was released in 2014, Epic introduced it with the visual scripting system. The idea was to make game development more accessible to a wider range of creators, especially those who weren’t programmers. Blueprints allowed developers to visually connect logic, making scripting easier and more intuitive. It was essentially UnrealScript’s replacement, offering drag-and-drop functionality to build gameplay systems.

The latest updates in Unreal Engine 5 have taken blueprints one step further. Performance enhancements allow Blueprints to run more efficiently and closer to native C++ speeds, making them more suitable for complex projects. Furthermore, users now have the ability to nativize Blueprint code into C++, offering the best of both worlds by combining visual scripting ease with C++’s runtime performance.

Learn more: Unreal's Beginner's Guide to Blueprints

Quick explainer why C++ is used for Unreal Engine (and game dev)

The primary reason why C++ is used in Unreal development is the same reason why it’s used in game development in general—speed and performance. Additionally, as alluded to in the previous section, Unreal development is essentially programming that uses a lot of C++ macros that combine complex code into more easy-to-use bits.

Generally, the C++ language integrates nicely into the more minute processes you may want to program for Unreal. For instance, it shines when you are processing longer arrays and loops that would otherwise be overwhelming to use using blueprints. You can also use C++ for making custom components and game mechanics that would otherwise be difficult in higher level languages.

There are many more areas and disciplines we can talk about when it comes to C++, but the bottom line is that C++ gives you more control with memory. This consequently means more control over the systems that you can work with when developing your game.

Sample C++ code for an Unreal Engine game project. Syntax highlighting provided by Visual Assist plugin.

Comparing Blueprints and C++

When you are starting out in development in Unreal you will often find a clash of opinions on whether you should learn the blueprints system or dive into it with C++. Some people use C++ or blueprints exclusively—here are two summaries of these two views:

Why people may start with ONLY blueprints:

Blueprints are much easier to pick up. You don’t need to dive into complex code—everything’s visual. You’re basically dragging and connecting nodes to create mechanics, which means you can start building right away. 

There is no need to learn C++ before you can make something cool. If you’re new to Unreal Engine or game development in general, this is a huge plus because you can see results fast, without getting stuck on syntax or debugging.

And here’s the thing: Blueprints were introduced by Epic themselves. Similar to all the options available to you inside the engine, blueprints is a super powerful system that can be used for most game mechanics. 

Unreal Engine has optimized them to run smoothly, and unless you’re doing something really performance-heavy (like complex physics simulations), Blueprints will handle it just fine. You can even do advanced logic in Blueprints—things like AI, UI, and game state management—without needing to touch C++.

The other big advantage is speed—not computing speed, that’s C++’s zone. We’re talking about prototyping speed, especially in the early stages of development. Blueprints lets you iterate faster. You can make changes on the fly, test new ideas, and tweak mechanics without waiting for code to compile or worrying about errors. It’s especially helpful in small teams or solo projects where you need to move quickly and stay creative.

Also, Blueprints make it easier for non-programmers (like designers or artists) to collaborate. If you’re working with others, they can understand and adjust the game mechanics without needing to learn C++. 

Now, that’s not saying Blueprints are the only answer, but for most cases, especially if you’re starting out or need to quickly build and test, they’re perfect jumping boards. You can always add C++ later if you need more control or optimization. But for rapid development, ease of use, and accessibility, Blueprints are a great way to go.

So, why Blueprints? Easy to learn, fast to prototype, powerful for most tasks, and great for collaboration. You can always dive into C++ later, but for getting started and getting things done, Blueprints are more than enough!

Why people may start using ONLY C++:

C++ can sound intimidating compared to Blueprints, which lets you drag and drop things easily. But here’s why C++ is worth the challenge. Think of Blueprints like using LEGO blocks—you can build cool things, but you’re limited to prefabs. You can only build stuff with the pieces you have. What if you wanted to create a curved surface when there’s no curved block available?

In C++, you can make your own custom blocks. Curved, straight, jagged, irregular, all’s available for you to create yourself. You can control every detail of how your game works, especially when you want something that Unreal Engine doesn’t offer by default.

Now, performance. When your game gets complex, like with a huge world or a fast-paced multiplayer, C++ runs circles around Blueprints. It’s just faster, talking directly to your computer’s hardware. Imagine you’re building a or an MMO—C++ will handle massive tasks way better than Blueprints. It’s the difference between a race car and a scooter.

And here’s a big one: the industry loves C++ developers. If you master it, you’re not just a game designer—you’re in high demand. Studios know C++ developers can dig deep into the engine, creating systems that Blueprints just can’t match in complexity or performance. Plus, the skills you learn in C++? They transfer to tons of other tech fields like finance, AI, or data analysis.

C++ is harder, but mastering it means you’ll be able to do anything in Unreal + others. You’re not just stuck building with what’s given—you’re creating from scratch. It’s more control, faster performance, deeper understanding, and wider career options. It’s harder, but trust me, once you learn it, you’ll be unstoppable. 

Summary:

Blueprints C++
Ease of use Beginner friendly: Easier to pick up. Steeper learning curve
Readability Uses visual nodes signifying properties. Easy to understand but gets complicated with increasing number of nodes quickly. Uses C++ code bases and solutions. Requires more knowledge but  a few lines of code can be equivalent to a screen full of blueprints.
Flexibility (use cases) Limited by what is exposed in the Blueprint system; hard to implement highly custom systems. Allows full access to everything under the hood. Access the entire engine with custom mechanics and optimizations.
Performance Fast enough for most cases. Not advisable for complex or critical components  High-performance; handles resource-intensive mechanics more efficiently
Collaboration Easy to understand (even for non-programmers) Usually read and written by C++ programmers only.
Usage Primarily used for rapid prototyping, simple logic, assets, scripts, and visual FX Primarily large, complex systems, performance-critical code, advanced customization, and low-level engine access.
Maintenance Can become unwieldy in large-scale projects; hard to track and refactor visual logic. Easier to maintain in large projects with proper coding practices; easier to refactor and debug.
Integration Built into the Unreal ecosystem, works and compiles into C++ Built into the Unreal ecosystem, works with Blueprints

Now wait a minute… Focus on the last row on integration. Both C++ and the blueprint system are integrated into the Unreal development ecosystem and work with each other? So what should I focus on first? Continue to the next section to find out what our suggestion is on the most optimal way of developing in Unreal.

The Most Optimal Approach for C++ vs Blueprints – Our Suggestion:

Using blueprints and C++ are not exclusive. They are both ways to program mechanics, albeit at different levels. Utilize each according to the task requirements.

If you’re coming into this blog post as a bonafide beginner, (no experience with programming, no experience with Unreal) then the most likely best approach for you is to begin using Unreal’s blueprint system. You can expose yourself to the fundamentals of game development and see where you fit in. Are you going to be a game designer handling assets and world building primarily, or do you see yourself as someone who deals with designing the core mechanics of gameplay? 

Either way, it may be best for you to start with blueprints first as its beginner-friendly learning curve can help you answer these questions.

Now, if you have studied both approaches and have a basic understanding of Unreal development, and you’re looking for an answer to the question: What should I master first? Or which is better to use: BP or C++?

There is a false dichotomy between C++ and blueprints. C++ is a programming language, and Blueprints is a scripting system; you don’t have to use either exclusively. In fact, it’s actually better to use both simultaneously. C++ and Blueprints are integrated and allow easy interoperability. 

C++ is naturally better-suited for implementing low-level game systems, and Blueprints is naturally better-suited for defining high-level behaviors and interactions and for integrating aesthetic assets. But luckily for us, the game engine is designed so that you can jump back and forth between native C++ code and the scripting nodes.

The bottom line is that you can use both. Or you should use both so that you can get the benefit out of both systems.

The best way is to create custom C++ functions or classes. Then connect it all in blueprints.

Here is an example:

Say you need to implement a pathfinding mechanic for a small game board. It’s best to write the pathfinding algorithm logic in C++ where you have the benefit of increased logic density, clarity, easy and powerful debugging etc. then expose that to blueprints where you can call it.

It’s worth noting that blueprints weren’t created as an alternative to writing C++, rather, blueprints were created to compliment complex game systems built in C++, by making it very easy to do things like assigning property values in editor as opposed to hard coding it. So as you get more and more familiar with the engine, try creating systems in C++ that you can then extend in blueprints for a very efficient workflow.

With this in mind, our suggestion is to use blueprints and get exposure to how the engine works, and when you’ve hit a wall of complexity that isn’t feasible with blueprints, you can extract the complex logic to C++ and use blueprint nodes to wrap that logic. 

Visual Assist’s own lead developer, Chris Gardner, shows how you can use C++ to create your own powerup in Unreal’s sample shooter game.

By adopting this hybrid workflow, you leverage the best of both worlds: the power and performance of C++ and the user-friendly nature of Blueprints for rapid iteration and testing. As you evolve in your development skills, this combination will enable you to create more complex and engaging gameplay experiences with greater ease.

Developer Protip: Make C++ Development Even More Simple

A lot of the difficulties in C++ come with learning its syntax and how it connects with what you see in the Unreal Editor. C++ can seem intimidating because of the level of abstraction needed. Developers, especially beginners, need all the support they can get.

Choosing your integrated development environment (IDE) is a fundamental decision when you decide to start learning C++ for Unreal. It contains the basic tools required to write and test your game software. And additionally, it provides nifty support and helpful prompts that can guide you.

If you’re coding using Visual Studio (one of the IDEs recommended by Epic themselves), here’s a must-have plugin for Unreal Engine development: Visual Assist. It is a plugin that was made to help Unreal developers working inside Visual Studio. It helps you navigate huge projects. It replaces some IDE features such as  find references with better alternatives. And it even helps your IDE understand Unreal-specific syntax, giving you essential highlighting and context-aware prompts.

Make Visual Studio work better with Unreal development by using Visual Assist.

Visual Assist’s own lead developer, Chris Gardner, shows how you can use C++ to create your own powerup in Unreal’s sample shooter game.

Conclusion:

In conclusion, navigating the world of game development with Unreal Engine involves understanding the complementary strengths of C++ and Blueprints. While Blueprints offer a user-friendly and visually intuitive approach, allowing developers to quickly prototype and implement gameplay mechanics, C++ provides the performance, control, and complexity necessary for serious projects. By recognizing that these two approaches are not mutually exclusive but rather to be used symmetrically, developers can create more efficient game systems. 

By leveraging the unique benefits of both C++ and Blueprints, you position yourself to create more engaging and polished gameplay experiences. Ultimately, whether you’re a newcomer eager to start building or an experienced developer looking to refine your skills, understanding how to effectively combine these tools will be invaluable in your quest to master Unreal Engine. Hence, It is not a question of C++ or Blueprints, but a statement; C++ AND Blueprints.

 

The post C++ versus Blueprints: Which should I use for Unreal Engine game development? first appeared on Tomato Soup.

]]>
https://www.wholetomato.com/blog/2024/10/23/c-versus-blueprints-which-should-i-use-for-unreal-engine-game-development/feed/ 0 3983
Visual Assist 2024.7 release post https://www.wholetomato.com/blog/2024/10/01/visual-assist-2024-7-release-post/ https://www.wholetomato.com/blog/2024/10/01/visual-assist-2024-7-release-post/#respond Tue, 01 Oct 2024 16:53:41 +0000 https://www.wholetomato.com/blog/?p=3971 We are excited to announce the release of 2024.7 of Visual Assist! This update introduces several powerful features aimed at improving your coding efficiency and project navigation. Download the release now. Here’s a breakdown of...

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

]]>
We are excited to announce the release of 2024.7 of Visual Assist! This update introduces several powerful features aimed at improving your coding efficiency and project navigation. Download the release now.

Here’s a breakdown of what’s new in this version:

New Features:

1. Context-sensitive Naming in Quick Action and Refactoring menu items (Shift + Alt + Q)

The Quick Action and Refactoring menu is a powerful menu that shows different options depending on the context and the placement of the text caret. For instance, it changes depending on whether you are on a symbol, include directive, or whitespace—and with or without a selection.

In this release, the menu will now take into consideration other symbols and applicable features that will make naming much more intuitive and inclusive of more possible actions. This also marks the start of making some of our menus more ubiquitous. 

2. Improved Read and Write Reference Highlighting

This adds an option to disable the highlighting of references when it is not needed. This is to improve readability and reduce visual clutter.

Specifically, read and write references will now stop highlighting as soon as you move your mouse away from the reference. This keeps your workspace clean while maintaining the ability to easily locate references when needed.

Visual Assist’s highlighting.

3. Feature: Sort Methods in Source (Beta)

We’re excited to release the Sort Methods in Source feature as a beta version! This feature allows you to quickly organize and sort methods in your source files, making it easier to keepnavigate large codebases organised. We welcome your feedback as we refine this feature for future updates.

4. Feature: Promote Lambda to Method (Beta)

The Promote Lambda to Method refactoringfeature is now available in beta. This feature allows you to easily convert lambda functions into regular methods, helping to streamline your code structure and improve readability. 

It is particularly useful for instances where you would like to reuse the same function in other places in the code. This feature takes that lambda and promotes it to a method in the corresponding class for it. 

Test it out and let us know how we can improve it! The settings can be found under the refactorings menu under Extensions under VisualAssistX, or just right click while in a lambda.

5. VA Nav Bar Dropdown for Project Switching

Switching between projects has never been easier! The VA Navigation Bar now allows you to seamlessly switch between multiple projects within your solution. This improvement makes project navigation faster and more intuitive—especially when working in large, multi-project environments that may have distinct code undefined in other workspaces.

6. New reserved string for VA code snippets

VA’s code snippets will now have more reserved string keywords for finding specific parent folders. Reserved strings are keywords that automatically expand when a VA Snippet is invoked. A reserved string obtains its value from an IDE setting, project property, system setting, or surrounding code.

In this case, we added a reserved string for automatically inputting the directory to the Cmake parent folder.

Reserved strings are grouped by type, and can be inserted in the VA Snippet editor via context menu, toolbar button, or keyboard shortcut (Ctrl+I).

7. Option to Adjust Overwrite Behavior When Accepting a Completion

Set up overwriting behavior options Visual Assist Extensions Options ? Enhanced Listboxes.

You can now choose how Visual Assist handles suggestions from a listbox. For instance, when you’re typing in between a word, VA would suggest to complete what you are typing. 

There are different results depending on whether the symbol succeeding the caret is known. If it is not a known symbol, VA overwrites the entire text after the caret with the auto-complete suggestion.

In any case, you can now choose the behavior of overwriting by navigating to the Visual Assist Extensions Options ?  Enhanced Listboxes ? Overwrite text when accepting from a listbox.

 

Bug fixes and improvements:

  • Fixed error when renaming items in particular cases
  • Fixed Move implementation header file error when on first line
  • Fixed quick info menu not showing all options properly when enabled.

 

? Availability & Feedback

This release is available starting September 30  and can be downloaded via the Whole Tomato downloads page. As always, we encourage your feedback, especially on beta and alpha features, to help us continue improving and delivering the best experience for developers.

Thank you for your continued support and happy coding! If you have any questions or encounter any issues, feel free to reach out to our support team.

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

]]>
https://www.wholetomato.com/blog/2024/10/01/visual-assist-2024-7-release-post/feed/ 0 3971
Making a case for investing in software tools: convincing yourself, your team, and your boss https://www.wholetomato.com/blog/2024/09/27/making-a-case-for-investing-in-software-tools-convincing-yourself-your-team-and-your-boss/ https://www.wholetomato.com/blog/2024/09/27/making-a-case-for-investing-in-software-tools-convincing-yourself-your-team-and-your-boss/#respond Fri, 27 Sep 2024 20:31:36 +0000 https://www.wholetomato.com/blog/?p=3958 Productivity is hard to calculate but there is a simple prerequisite to look out for: are your developers comfortable with their workstation. See how a team persuaded their management to invest in Visual Assist.

The post Making a case for investing in software tools: convincing yourself, your team, and your boss first appeared on Tomato Soup.

]]>
Introduction

Visual Assist has been a longtime partner for coding in Visual Studio. It adds missing features and sometimes even replaces the default features in the IDE. In fact, you can even argue that Visual Assist had a direct influence as to how some of the features in Visual Studio panned out.

But what makes Visual Assist (VA) such a compelling purchase? And what about it makes it a worthwhile software to continue using?

In this blog post, we share a story of how a small company that invested in VA a long time ago still remains staunch VA users despite numerous new alternatives available. Read on to find out what it is that keeps them renewing each year.

We found Ryan, a user who was director at a small software company developing games. They were the type of person who wanted to make sure that his team (no matter how small) had access to the best tools and resources needed to deliver good quality in reasonable delivery time.

The key word here is reasonable. Their reasoning was that in order to create “high quality” work, they had to foster a working environment and workstation that made it easy to be productive. He didn’t feel obligated to have ultra high-end PCs, posh offices, or crazy setups but they did invest into software until work felt easy and frictionless.

For Ryan, a frictionless workstation means that they had access to sophisticated enough tools that allowed them to focus on innovating and problem solving. They had built a reliable set of software: modeling tools, profilers, code analyzers, and coding assistants that made work comfortable—they didn’t have to do things 100% manually, they had tools smart enough to minimize their actions, and they could automate simple and repetitive tasks.

Making navigation faster and easier: Visual Assist’s Find Symbol

In the span of collecting and adding to their suite of software, they found Visual Assist, a productivity plugin for Visual Studio. They had a pain point in navigating projects that made their daily experience with their IDE cumbersome and uncomfortable, ergo bad for productivity.

Specifically, they were looking for a “find symbol” type navigation for Visual Studio C++. Particularly when they were browsing a large codebase, and they wanted to find some specific functionality but they did not know exactly what it will be called or where it will be. They needed a dialog box that would search for any symbol across opened and unopened workspaces and reactively respond and filter based on the string the user starts to type in. They expect the dialog to show classes and files (and much more) matching what the string query is.

The problem was that, while it was available in Visual Studio, the search results had to be searched manually across a scattered list of possible dialogs that were searched by: files by name, only symbols in the currently opened file, symbols in all opened files, and text across files (was experimental then).

Furthermore, it was unsuitable because of the matching and search algorithm that the default IDE is using. They needed something that can understand a more abstracted and an unexact version—they were looking for a ubiquitous search dialog with fuzzy search that performed well even on large code bases. 

That’s when they found Visual Assist. Here’s a quick comparison of how Visual Assist compares with the default IDE. 

The native find symbol feature in Visual Studio

The native find symbol feature in Visual Studio.

Visual Assist’s improved find symbol dialog. Provides more options.

By happenstance, it was recommended to them from an external developer and it fit exactly what they were looking for. It also did not mess with existing work pattern (and muscle memory) because it was just a plugin that added or augmented their current IDE for C/C++ and C# (i.e. easy deployment).

The Visual Assist plugin they added had a more comprehensive, powerful, and sophisticated search dialog that was both as performant as it was smart. It had fuzzy searching that made project navigation simpler. And it also had a much more intuitive and easy-to-use UI wherein they only have to click to configure instead of grappling with multiple different dialogs (minimized required actions).

Fifteen minutes saved daily, becomes an hour saved weekly, and becomes almost an entire workday’s worth in one and a half months.

Discovering something unexpected: Visual Assist’s Code Refactoring

After a few months of using Visual Assist, Ryan and team then discovered that their newly acquired plugin was a solution for another problem they didn’t know they had. This is one of those cases wherein before you discover that there was a better way to do it, you wouldn’t know how inefficient you were. 

The phantom pain point they had was maintaining code. Refactoring (translating and maintaining) code bases was a cumbersome and eye-straining process. It dealt with unfamiliar, often outdated code. While working on some deprecated projects or shelved projects, they had to update existing source to more modern C++ standards or more scalable code styles. This often involved manual checking and error-prone manual techniques.

With Visual Assist’s code refactoring and navigation support, the team was able to reduce code duplication and augment their intention actions when applying refactoring techniques. 

For example:

  • Read unfamiliar code as if they were your own: There is a feature that allows users to extract a method from a long function, after which users can either refactor, rewrite, rename, and reuse the method. They no longer had to fully comprehend unfamiliar code (e.g. code that was just inherited from a colleague no longer on the team) just to refactor them for the current project.
  • Get method placeholders instantly: Write out a class declaration and then have Visual Assist write the stubs for the member definitions for you in the corresponding source file, rename variables across the whole project,
  • Find and jump to declarations: Search for declarations/definitions faster than IntelliSense can find them, open a file anywhere in the solution in only a few keystrokes, etc. It’s quite handy and easy to use.

VA’s Renaming feature which shows instances of a variable, its context, and available options in one convenient dialog. This made searching, refactoring code, and writing new code faster by about 20%.

It’s like discovering a new shortcut to your office that makes your daily commute a few minutes faster—it seems like a marginal gain, but you realize it’s a task you do on a daily basis. 

That’s what they found with Visual Assist. Even if they weren’t actively looking for it, regular and continuous usage opened new opportunities to optimize their refactoring process. After discovering it, it would be difficult to revert to the original, more lengthy process.

To summarize:

    • It adequately solved multiple pain points.
    • It was inexpensive.
    • It was easily deployable to their current workflow.
    • It made their workflow more comfortable and efficient.

Making a case for investments in software

Unfortunately, there are many software companies that miss the importance of providing tools like these. Or in other words, they may not deem these as necessities as much as their developers. There are two ways to look at it. You are either the developer/end user, or you are the C-level procurement officer.

The goal of this post (apart from sharing a success story) is to show how to present a case to management that developers benefit from a comfortable environment, and that would require some investment in software. Otherwise, it’s like giving someone a hammer with no nails and expecting a house to be built in a reasonable time. Craftspeople need good tools. You might have a hammer and nails, but what if your only hammer is a rubber mallet? You’d be incredibly happy to finally get a metal nail hammer.

When you present a case (or when a case is presented to you), the normal reaction is to expect a numerical prediction of the returns. But as you may have surmised from the two examples we mentioned above, it’s not that simple for software tools:

  • It’s hard to quantify productivity.
  • There are some things you can only discover after using the tool.

However, that is not to say that it’s impossible to make a case for a tool. In Ryan’s case, his team was dealing with frustration in locating and navigating certain symbols. That’s expected because in Unreal’s sample shooter game alone, there are around 30 000 defined symbols, 1200 files and headers, and even more references to and from your symbols. What more could a full-fledged project be? 

At that point, it was obvious that simple navigation was a friction point in their daily workflow. If your hammer had a bendable handle you could argue that it’s still usable and could be enough to help build a simple structure. But with each successive swing, frustration and fatigue builds up. This also happens with developers in front of their computer. 

Now, even without a numerical representation, it becomes easier to convince decision makers that this tool is worth it just by simply observing how comfortable it makes developers in their workstation. (That’s why software tools often have free trial periods!)

Finally, it’s important to note that not unlike the coding development environment, tools and plugins require mastery as well. When you make a case for investments, it’s important to note that the value of a tool increases over time as users become more accustomed to it.

Before Ryan’s team first discovered VA’s refactoring features, the team had to rely on their own expertise and knowledge to refactor code bases. They first had to understand it themselves and then they had to rewrite code based on the latest coding standards and guidelines.

Overtime, they found that VA was intelligent enough to not only make navigating and reading code easier, it could actually do it for them. If you’ve ever done any coding or similar thinking-heavy tasks, you’d know that that brief moment can make you lose that train of thought you had—that happens often during coding. But with a coding assistant like Visual Assist, you get intelligent dialogs that show you everything you need to know. You can get suggestions as you write, meaning you get timely prompts so you can focus. You can even get it to write blocks of code for you automatically.

Here’s the bottom line: a refactoring tool like VA reduces distracted time and increases their productivity by letting them focus on the real essence of the application (the code) and less on the plumbing (jumping from page to page  for a single symbol definition).

Conclusion

There is no singular approach to finding out what or what not to invest in. And similarly, there is no magic bullet that will fix all productivity problems. But Ryan’s mindset on what his team needed and how he perceived the impact of a solution is a great start. 

The key takeaway here is how important it is to have a comfortable workstation because you can radically lower your productivity and your quality output if you’re not provided adequate tools to fulfill your job. Apart from price and other technical factors, buying decisions should also be based on how much it benefits you and your team.

Try Visual Assist

Interested in getting the same benefits for you or your team?

Whether you’re looking to boost your team’s productivity or optimizing your own development process, you can try out Visual Assist for yourself and understand yourself why Ryan’s team continue to use it until today.

 

The post Making a case for investing in software tools: convincing yourself, your team, and your boss first appeared on Tomato Soup.

]]>
https://www.wholetomato.com/blog/2024/09/27/making-a-case-for-investing-in-software-tools-convincing-yourself-your-team-and-your-boss/feed/ 0 3958
Success Story: Visual Assist for modeling and simulation software for automotive C++ https://www.wholetomato.com/blog/2024/09/26/visual-assist-automotive-c/ https://www.wholetomato.com/blog/2024/09/26/visual-assist-automotive-c/#respond Thu, 26 Sep 2024 17:50:44 +0000 https://www.wholetomato.com/blog/?p=3927 About the Client Based in Europe, the client is a global company specializing in the development and manufacturing of high-performance systems for vehicle technology. As a company that has been in the industry for over...

The post Success Story: Visual Assist for modeling and simulation software for automotive C++ first appeared on Tomato Soup.

]]>
About the Client

Based in Europe, the client is a global company specializing in the development and manufacturing of high-performance systems for vehicle technology. As a company that has been in the industry for over a century, their longstanding focus on innovation has positioned them as one of the top automotive manufacturers worldwide. As part of their commitment to quality, they have invested heavily in simulation tools for vehicle design, testing, and validation, ensuring efficiency and reliability for their partner manufacturers.

services offered by company

They engineer and produce various automotive technologies such as engine and electronics systems for passenger cars, commercial vehicles, and data measurement services.

 

Use case and challenges

We had the privilege of speaking with the lead developer and his team who create modeling and simulation software. We discussed their daily work and the challenges they face:

Use Cases:

  • They develop C++ applications in Microsoft’s Visual Studio for internal use.
  • They create bespoke programs for modeling components and simulating them in various scenarios.
  • Their primary language is using C/C++ in Visual Studio because it can be interfaced easily.

Challenges:

  • As an advanced tech provider, their workflow and output is highly specialized. Each project is tailor-made specifically for a certain client or customer.
  • They have huge legacy code bases that they have to maintain and modernize. 
  • Because of the precision involved in measurements, they handle large amounts of data from different sources of measurement.

Solution

Visual Assist was introduced to the team many years ago and it has since been a staple tool used daily by the developer team. They use Visual Assist for a variety of use cases including:

  • Refactoring and modernizing code is exponentially faster.
    Because their toolchain was initially built sometime in the 60’s, they had a lot of code modernization and translation projects. Then they also had to integrate them with new tools and update them to the latest coding standards.

    Visual Assist’s refactoring feature has been an indispensable asset in updating the outdated code structures, making them more readable, memory-safe, and maintainable. It takes the pain out of manually bringing legacy or deprecated code up to standard by automatically renaming variables or extracting methods, reducing the risk of introducing errors during manual updates. This includes refactoring to use modern, secure and safe coding styles. Effectively Visual Assist simplifies their C++ code maintenance so that they can focus on manufacturing and designing parts, not code.
  • Navigating old code and huge projects happens in a single click.
    Visual Assist greatly helps the team get around their huge legacy projects with smart navigation features. Finding and searching for certain sections of code is a cumbersome ordeal that VA just completely skips over with features like Find References, Find Symbols, the various Go To functions, and the like.
  • Snappier performance on large projects and solutions.
    When it comes to handling large amounts of data, Visual Assist’s optimized startup speed and low memory footprint provides the team snappy and accurate code assistance. Due to the repetitive nature of their projects, the few seconds that Visual Assist saves compounds over time and can boost productivity by as much as 20%. 

This non-exhaustive list is a testament to how Visual Assist can save hundreds of hours of valuable productivity time by providing smart suggestions, speedy features, and a satisfying experience for the Visual Studio IDE.

Interested?

Interested in getting the same benefits you or your team? Visual Assist is free to try for thirty days. 

Whether you’re looking to boost your team’s productivity or optimizing your own development process, now’s the perfect time to upgrade your toolkit with one of the most trusted Visual Studio plugins. Click on the link below to learn more about Visual Assist.

The post Success Story: Visual Assist for modeling and simulation software for automotive C++ first appeared on Tomato Soup.

]]>
https://www.wholetomato.com/blog/2024/09/26/visual-assist-automotive-c/feed/ 0 3927
Getting started with how to use C++ for embedded systems in financial services https://www.wholetomato.com/blog/2024/09/23/getting-started-with-how-to-use-c-for-embedded-systems-in-financial-services/ https://www.wholetomato.com/blog/2024/09/23/getting-started-with-how-to-use-c-for-embedded-systems-in-financial-services/#respond Mon, 23 Sep 2024 16:56:12 +0000 https://www.wholetomato.com/blog/?p=3919 In today’s fast-paced financial technology landscape, the demand for robust, high-performance software is increasing. At the core of the majority of financial innovations lies C++, a language revered for its speed, efficiency, and control.  As...

The post Getting started with how to use C++ for embedded systems in financial services first appeared on Tomato Soup.

]]>
In today’s fast-paced financial technology landscape, the demand for robust, high-performance software is increasing. At the core of the majority of financial innovations lies C++, a language revered for its speed, efficiency, and control. 

As financial institutions continue to incorporate advanced electronics and embedded systems into their operations—be it through the ATMs we rely on for banking transactions, the sophisticated high-frequency trading platforms, or the secure transaction systems that protect our finances, C++ has become an indispensable tool.

Embedded systems are central to the proliferation of financial services which require real-time processing capabilities that only a highly performant language like C++ can provide. The financial sector’s demands for speed, precision, and security make C++ the language of choice for developers tasked with building the systems that underpin our financial infrastructure.

In this blog, we explore how C++ is used in these mission-critical financial systems. We’ll examine why it is suitable for embedded systems in finance.

Embedded systems in financial services

What are embedded systems?

Embedded systems are specialized computing systems designed to perform dedicated tasks within larger devices or systems. Unlike general-purpose computers, they are optimized for specific functions, often operating with real-time constraints and limited resources. Common examples of embedded systems include automotive control units, medical devices like pacemakers, and home appliances such as microwaves or washing machines. These systems are crucial in industries requiring precise control and efficiency, even outside the financial sector.

How embedded apps and digitalization are transforming financial software

The primary driver of the increasing demand for embedded systems is digitalization. Or to be more specific, inevitable progress in tech is opening more ways to serve underbanked communities; these opportunities require more and more digital alternatives to traditional banking. 

About two decades ago, the fintech model relied on singular banks serving a whole community. Today, every business is expected to accept payments through digital platforms, credit cards, and other payment platforms. This has minimized the red tape and payments and financial services have become more seamless.

For instance, e-wallets and banking apps on smartphones have certainly made financial services easier to access, however, physical devices must still be available for businesses to use as terminals and portals for digital transactions. This is where embedded systems on devices come in.

Examples of Embedded Systems used in financial services

Point-of-Sale (POS) Systems

POS systems are ubiquitous in retail stores, restaurants, and other businesses that accept payments. These systems integrate embedded processors and software to handle various functions like:

  • Accepting credit/debit card payments
  • Tracking inventory and sales data
  • Generating receipts and reports

POS terminals are essentially embedded computers designed for payment processing and business management.

ATMs (Automated Teller Machines)

ATMs are self-service banking kiosks that contain embedded systems in the form of peripheral devices. Embedded systems help the main PC operating system manage the user interface, cash dispenser, and card reader. It can also communicate with the bank’s central computer system.

Contactless Payment Terminals

Contactless payment terminals are embedded systems that enable customers to make payments by tapping or waving their credit/debit cards or mobile devices near the terminal. These terminals use near-field communication (NFC) technology and are commonly found at retail checkouts and transit fare gates. Smartwatches, fitness trackers, and other wearable devices can be embedded with payment capabilities.

Section 2: C++ in finance and banking

Why financial embedded systems use C++

Embedded systems use C++ because it lets developers control hardware directly while still keeping the code organized and easier to manage.There is a good mix of low-level hardware control and high-level programming abstractions. 

C++ is great for devices with limited memory or processing power, like small sensors or controllers, because it helps the code run fast. It also allows developers to write code that can work on different types of devices without starting from scratch. This makes C++ a popular choice for many embedded systems. Additionally, C++ offers portability, making it easier to adapt code across different embedded platforms.

The demands of financial software

In the financial sector, software systems face exceptionally high demands. These systems must deliver extreme performance, steadfast reliability, and robust security to support critical functions like real-time trading, transaction processing, and risk management. The stakes are incredibly high, as even minor software failures can result in significant financial losses, security breaches, and a loss of client trust. 

C++ is well-equipped to meet these rigorous requirements. Renowned for its speed and efficiency, C++ enables developers to create high-performance applications crucial for environments where every millisecond can impact trading results. Its low-level memory control allows for precise management of system resources, ensuring both stability and responsiveness in financial systems. Additionally, C++ is supported by a comprehensive suite of libraries designed for complex financial operations, making it an ideal choice for developing secure and high-performing financial software.

Advantages of the C++ language in Financial Software

C++ Property How it compares to other languages used in finance
Lower level language: C++ code compiles into highly efficient machine-like code, providing real-time processing capabilities and scalability.  Faster than interpreted languages like Python or JavaScript, which are unsuitable for real-time performance requirements.
Speed and performance:Handles intensive computational tasks with minimal overhead, making it ideal for high-performance applications. 
Similarly popular in finance programming, Python offers simplicity and faster development cycles. However, it lacks the execution speed needed for high-performance financial software. 
Embedded-Specific Support: (e.g., no-exception builds) allows you to disable certain features (like exceptions) to minimize overhead. Languages like Java have less flexibility in trimming down features for embedded use.
Scalability and processing power: Can accommodate increasing volumes of data and transactions, a necessity in a growing financial sector.
Java strikes a balance between usability and performance but cannot match the raw processing power and system control that C++ provides.

Section 3: The challenges for C++ programmers developing embedded systems

In the high-stakes world of financial systems, performance optimization is not merely an option but a critical necessity. Financial applications, such as high-frequency trading platforms and real-time risk management systems, operate under intense performance constraints where even the smallest delay can have significant repercussions. As a result, C++ developers are tasked with continuously fine-tuning their code to meet performance requirements.

One of the primary challenges in this optimization process is managing memory. C++ provides low-level control over memory allocation, which allows for precise performance tuning but also demands that developers manually handle memory management. This responsibility includes careful allocation and deallocation to prevent memory leaks and ensure efficient resource utilization. 

Additionally, reducing latency is crucial in financial applications where timely processing of data and execution of trades are essential. Developers must implement strategies to minimize latency, which involves optimizing algorithms, data structures, and reducing the impact of I/O operations. Productivity enhancing tools such as Visual Assist C++ that simplify refactoring help here immensely as they can help spot unnecessary elements—more on helpful tools later. 

Maintaining code quality while optimizing performance presents another challenge. Performance enhancements often require low-level changes to the code, which can complicate readability and maintainability. Balancing the need for high performance with the necessity of keeping the codebase understandable and manageable is a continuous struggle for C++ developers working in the finance sector. 

Readability is an often underestimated facet of development. Embedded code can often be hard to read, or drop from C++ to lower-level C. For instance, when accessing IO pins on an embedded device via a cable plugged into “general purpose IO pins” (GPIO) you have to use the base-level language that can communicate with the hardware itself.  At that point, it’s key to have tooling that helps you understand and verify your code when you run it back from higher and lower abstraction between languages.

As simple as possible: C++ vs Embedded C++

When discussing C++ versus Embedded C++, it’s essential to understand that while they share a common language foundation, the environments in which they are applied significantly influence the design, usage, and constraints of these two variants.

The main difference with C++ in embedded systems is that it has to be more efficient because devices often have limited memory and processing power. Embedded C++ also involves directly controlling hardware, like sensors and processors, which isn’t as common in traditional C++. Finally, some C++ features, like dynamic memory management, are used less or even avoided entirely in embedded systems to avoid performance issues. Rather than using the standard STL, it’s common to use other libraries tailored for embedded use, like the ETL.

  • Memory management and constraints

C++ on a desktop or server system operates in a much more forgiving environment. It has access to extensive memory, high processing power, and can rely on an operating system for memory management and multitasking. In contrast, Embedded C++ targets microcontrollers or other resource-constrained devices, where memory (both RAM and flash) is limited, and there may not be an operating system at all.

For instance, in an embedded system, dynamic memory allocation using new and delete can be risky due to fragmentation, leading to memory exhaustion over time. Many embedded systems developers avoid heap allocation entirely, preferring static or stack allocation, or using custom memory management techniques tailored to the system’s constraints.

Some devices  such as ATMs or POS systems need a small amount of flash memory, a form of non-volatile memory, to keep a small database. For example, some systems need to keep the past 24 hours of transactions on the system itself as a backup for when the bank network has gone down unexpectedly. For these cases, reliable memory-efficient libraries for compression and embedded databases are used.

  • Performance and real-time requirements

Another significant difference arises in performance and real-time behavior. In standard C++ applications, performance is still important, but not necessarily tied to hard real-time requirements.

In contrast, embedded systems often have strict timing constraints, and code must execute within a specific time frame to meet system requirements. This demands careful optimization and the avoidance of certain C++ abstractions that can introduce unpredictable execution times.

For example, C++ standard library features like the Standard Template Library (STL) may not be suitable for embedded environments. Functions like std::vector or std::map can introduce hidden memory allocations and performance overhead, which can be detrimental in a real-time system. 

As a result, embedded C++ developers often resort to using lightweight custom libraries or writing their own data structures optimized for their specific hardware. You can use libraries like the embedded template library that provides STL-like functionality intended for embedded devices. You can also search this list of libraries from Github user “fffaraz” using the search term “embedded” for more resources specific to embedded systems.

  • Hardware Interfacing

Embedded systems often require precise control over hardware peripherals, like I/O pins, timers, or communication interfaces. This entails hardware-specific code, where developers directly manipulate memory-mapped registers to control the device.

In standard C++, you rarely deal with such low-level hardware specifics. Embedded C++ developers, however, often need to interact directly with hardware registers and bit manipulation, as shown in the examples with the ATM or POS systems. This introduces a level of complexity not typically found in standard desktop or server C++ development.

  • Debugging Challenges

Due to the very embedded nature of embedded systems, debugging is inherently more complex due to the lack of typical debugging resources available in standard C++ environments. Desktop developers can rely on sophisticated debuggers, full IDEs, and graphical interfaces to step through code, inspect memory, and trace program execution. In contrast, embedded developers often work without these luxuries. 

Debugging tools may be limited to physical devices that plug into the circuitry, or maybe testers and emulators that merely simulate the device. The best case scenarios will involve some form of rudimentary debugging tool integrated into the device. But for the most part, it will still be a step down from traditional C++ debugging.

Section 4: Pro tips for C++ developers for embedded systems

If you’re a novice developer or an intermediate C++ developer that’s looking to specialize as a embedded software developer, here are a couple of core competencies and guiding ideas that you can study, arranged in order of importance:

  • Understand the embedded systems basics
    Understanding the fundamentals of embedded systems and how they differ from general computing.

    • What are embedded systems? (Microcontrollers, sensors, actuators, etc.)
    • Key differences between embedded and traditional software development.
    • Real-time systems and their importance.

Recommended read/watch: “Introduction to Embedded Systems” by Jonathan Valvano (Textbook).

  • C++ for Embedded Systems
    Learning how C++ is used in resource-constrained environments.

    • Writing memory-efficient and performance-critical code.
    • Avoiding dynamic memory allocation (heap vs stack).
    • Using low-level hardware interfaces (registers, ports, etc.).

Recommended read/watch: “Embedded: Customizing Dynamic Memory Management in C++” by Ben Saks in CppCon 2020.

  • Learning Microcontrollers
    Gain practical experience with microcontrollers, one of the basic programmable elements in embedded development environments.

    • Introduction to microcontrollers (e.g., ARM Cortex, AVR, ESP32).
    • Setting up a development environment (IDE, toolchains).
    • Flashing code to the microcontroller.

Recommended read/watch: “C++ For Microcontrollers – Introduction”  by Mikey’s Lab

  • Optimization and Power Management
    Learn how to optimize embedded C++ code for performance and power consumption.

    • Code optimization techniques (e.g., loop unrolling, inline functions).
    • Power-saving modes in microcontrollers.
    • Balancing performance and power consumption.

Recommended read/watch: “Introduction to Embedded Systems” by Jonathan Valvano (Textbook).

  • Debugging Techniques for Embedded Systems
    Get a proper introduction to the  debugging techniques specific to embedded development.

    • Using in-circuit debuggers (ICDs) and logic analyzers.
    • Setting breakpoints, watching variables, and stepping through code.
    • Dealing with hardware-software integration bugs.

Recommended read/watch: Variety of courses from Feabhas

Visual Studio as the Go-To IDE

In embedded systems  C++ development, a few IDEs stand out for their ability to handle high-performance applications. CLion by JetBrains is popular for its strong code analysis and integration with CMake, supporting multi-platform projects. Its tools for memory profiling and real-time inspections are especially useful in financial software, where precision is key.

Eclipse CDT offers flexibility and powerful debugging features, with support for plugins and external tools like GDB. Its open-source nature makes it a cost-effective choice for developers aiming to optimize performance.

However, Visual Studio is the industry’s top choice, thanks to its advanced debugging tools like breakpoints and call stack analysis, essential for resolving issues in complex financial applications. For custom hardware, it’s common to only get Visual Studio support. It also offers code analysis, performance profiling, and cross-platform support, including Linux. These features make Visual Studio a comprehensive and scalable option, ideal for financial developers seeking reliability across multiple platforms.

Enhancing Productivity with Visual Assist

For C++ developers working in finance, Visual Assist is an indispensable extension that significantly enhances productivity. This powerful tool integrates seamlessly with Visual Studio, offering a range of features designed to make coding faster and more efficient.

A practical example of how Visual Assist can accelerate development is its Convert Pointer to Instance refactoring feature. In financial applications, optimizing memory usage is critical. This feature allows developers to easily convert heap-allocated pointers to stack-allocated instances, which can enhance performance and reduce memory overhead. By simplifying these refactoring tasks, Visual Assist helps developers focus on implementing and refining the core functionalities of their financial software. 

In summary, Visual Studio combined with Visual Assist provides a powerful toolkit for C++ developers in the finance industry, enhancing both the development experience and the quality of the final product.

Section 5: The Future of C++ in Embedded Systems for Finance

Emerging Trends

The integration of embedded systems into financial applications is becoming increasingly prevalent, driven by advancements in technology and the growing need for real-time data processing and enhanced security. Embedded systems, such as Internet of Things (IoT) devices and advanced security systems, are playing a crucial role in modern financial infrastructure. For example, IoT devices can provide real-time analytics and monitoring for financial transactions, while sophisticated security systems use embedded technology to protect sensitive data and prevent fraud. 

C++ is well-positioned to adapt to these emerging trends due to its versatility and efficiency. As embedded systems become more integral to financial applications, C++ continues to offer the performance and control needed to develop robust solutions. The language’s ability to interface directly with hardware and manage resources at a low level makes it ideal for embedded development, where precision and efficiency are paramount. Additionally, C++ is evolving to support new standards and libraries that enhance its capabilities for embedded applications, ensuring that it remains a key language in the financial sector’s future.

Preparing for the Future

To stay ahead in the field of C++ development for embedded systems, it is essential to engage in continuous learning and stay abreast of technological advancements. The financial sector is rapidly evolving, and developers must be proactive in acquiring new skills and knowledge to remain competitive. This includes familiarizing oneself with the latest developments in embedded systems, such as new IoT protocols and security technologies, as well as advancements in C++ standards and tools.

Leveraging new tools and technologies can also significantly impact productivity and reduce stress in high-pressure environments. For instance, adopting modern IDEs and development environments that offer powerful debugging, profiling, and refactoring capabilities can streamline the development process and help manage the complexities of embedded systems. Tools that automate routine tasks and provide advanced code analysis can save valuable time and reduce the cognitive load on developers, allowing them to focus on more strategic aspects of their work.

In summary, the future of C++ in embedded systems for finance looks promising, driven by the increasing integration of advanced technologies and the language’s continued evolution. By staying informed about emerging trends and adopting tools that enhance efficiency and reduce stress, C++ developers can position themselves for success in this dynamic and evolving field.

Conclusion

In this blog, we’ve explored the pivotal role of C++ in the development of financial software and embedded systems, highlighting its unmatched performance, reliability, and efficiency. We discussed how C++ meets the rigorous demands of financial applications by offering precise control over system resources and supporting complex, high-performance operations. Additionally, we examined the common challenges faced by developers, such as performance optimization and debugging, and how tools like Visual Studio and Visual Assist can alleviate these difficulties.

As financial systems continue to evolve and embedded systems become more integrated, C++ remains a critical language due to its adaptability and powerful capabilities. The language’s ability to deliver real-time processing and manage resources efficiently ensures its continued relevance in the financial sector.

We encourage readers to explore the benefits of Visual Studio and Visual Assist to enhance their development process. By leveraging these tools, developers can streamline their workflows, improve code quality, and handle the complexities of high-performance financial software more effectively. Embracing these technologies will not only improve development efficiency but also contribute to the creation of robust and reliable financial systems.

The post Getting started with how to use C++ for embedded systems in financial services first appeared on Tomato Soup.

]]>
https://www.wholetomato.com/blog/2024/09/23/getting-started-with-how-to-use-c-for-embedded-systems-in-financial-services/feed/ 0 3919
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
Installing Virtual Machines to use Visual Studio on Mac https://www.wholetomato.com/blog/2024/08/27/installing-virtual-machines-to-use-visual-studio-on-mac/ https://www.wholetomato.com/blog/2024/08/27/installing-virtual-machines-to-use-visual-studio-on-mac/#respond Tue, 27 Aug 2024 14:58:10 +0000 https://www.wholetomato.com/blog/?p=3868 There are many options for IDEs for developers who are working on a Mac; however, there may still be use cases and instances where the available options are insufficient. For example some projects and client...

The post Installing Virtual Machines to use Visual Studio on Mac first appeared on Tomato Soup.

]]>
There are many options for IDEs for developers who are working on a Mac; however, there may still be use cases and instances where the available options are insufficient. For example some projects and client requirements may dictate the use of Microsoft’s Visual Studio (VS)—which is predominantly designed for the Windows OS.

As a workaround for, what most Mac users have done (and is one of Microsoft’s recommendations) is to install a Virtual Machine on ARM Macs to emulate a Windows environment and use Visual Studio from there.

This guide will walk you through the entire process of installing and using Visual Studio on a Mac, with a special mention of a handy productivity plugin you can add to make its performance closer to a natively-installed app.

The Different Visual Studios on Mac

Before you dive right in, here’s something to consider before you install: there are similarly named versions of Visual Studio—and you need to know which one you are looking for.

The first one is the native app “Visual Studio 2022 for Mac” (VS 2022 Mac). The naming scheme is how Visual Studio Code is to Visual Studio—they’re two completely different products that confusingly share a similar name.

The native Visual Studio for Mac is largely based on Xamarin, another cross-platform framework for building native mobile apps on iOS, Android, and Windows. It is primarily used for C# or .NET development. Consequently, Visual Studio for Mac is also used primarily for C# development. 

VS 2022 Mac has been discontinued in favor of “Visual Studio Code” (VSC) for Mac. You can use Microsoft’s VSC with the new C# Dev Kit and related extensions in lieu of VS 2022 Mac. The caveat is that VSC may not be enough for C++ developers, or for C# developers who rely on VS’s frameworks and libraries for their app or program development needs.

Fortunately, if you’re opting for VSC on Mac, it may be good to know that there is less discrepancy between the Windows and Mac versions of VSC—just a few keystroke and shortcut differences. 

To summarize, here are the Visual Studios that you can use on Mac:

  • Visual Studio 2022 for Mac — the Xamarin-like native app
  • Visual Studio Code Mac — the VS text editor but on mac. Almost the same as Windows version
  • Visual Studio Code Windows — the VS text editor
  • Visual Studio Windows — the native Windows version (in our case, installed on a virtual machine)

Of course users can also opt to use alternative IDEs. In this blog, however, we will be teaching you how to install the second option—a virtual machine on your Apple-silicon Mac and installing Visual Studio, the complete Windows version, (VS for Windows on a VM) thereafter.

 

Why you may need Visual Studio for Windows on Mac

The primary reasons to use Visual Studio for Windows on a Mac are the following:

  • Maintain compatibility with Windows-based projects
  • Rely on certain features that are Windows version of Visual Studio-specific
  • developing .NET applications
  • working with Azure
  • or integrating specific third-party tools that are Visual Studio-specific
  • You use a Mac!

Other considerations may be based on developer preferences such as those who like Visual Studio for tasks like debugging complex applications, managing large solutions, or using specialized extensions that are only available on the Windows version.

For game developers using Unity, Xamarin developers building cross-platform mobile apps, or .NET developers focusing on backend and cloud development, using a VM allows you to retain access to the full suite of Visual Studio’s tools. This includes robust debugging features, integrated version control with Git, and comprehensive support for a variety of programming languages and frameworks.

Prerequisites for Installation

Visual Studio 2022 has official requirements which you can read here. However, we can summarize for some advice:

  • It runs on both Intel and ARM computers
  • You will need to install either the Intel or the ARM version of Windows. You can’t run the Intel version of Windows on an ARM Mac, not even in a VM. The ARM version of Windows runs Intel apps just fine, even including using a debugger, in our experience.
  • Dedicate lots of RAM and multiple cores to your VM. We recommend a minimum of 4GB of your host Mac’s RAM goes to the virtual machine. In general, the beefier a machine is in terms of RAM and cores, the more VMs you can run at once.
  • While you can use an old Intel Mac, the Apple Silicon ones are very performant and we strongly recommend using an M-series ARM Mac. Any of them. They’re all good.

If you’ve never used a virtual machine for development before, you might be worried about performance – after all, it’s not running directly on the hardware, right? In practice, this is not an issue. Modern CPUs have inbuilt support for running virtual machines and your VM is not emulated; it runs code directly on the CPU just like the host operating system does.

The biggest mistake people make is not giving a VM enough RAM or dedicated CPU cores. Run on a powerful machine and configure the VM to a couple of cores minimum, and at least 4GB of RAM minimum. If you do heavy computation on the VM (building large projects, etc) increase that. Make sure you have a host machine powerful enough that if you allocate, say, half its resources to the VM then both have enough resources to run. A Macbook Air has 8 cores, so you can allocate 2 to 4 to the VM; if you have 16GB of RAM, you can allocate 4GB to the VM and leave macOS 12GB. This kind of setup works well.

Before diving into the installation process, ensure your Mac meets the following requirements. To summarize, however, any recent computer will meet them in terms of performance—the more important components to consider are available RAM and disk space

Hardware Recommendations:

  • Processor: Modern M-series (Apple Silicon) or Intel processors are more than capable of handling Visual Studio within a VM.
  • RAM: Minimum of 4 GB (16 GB recommended for typical professional solutions).
  • Hard Disk Space: Minimum of 850 MB up to 210 GB of available space, depending on the features installed (20-50 GB of free space is typical). Installing Windows and Visual Studio on a solid-state drive (SSD) is recommended for increased performance.

By following the recommended setup, you’ll meet or exceed the necessary hardware requirements, making your development experience seamless even within a virtualized environment.

Step-by-Step Installation Guide

In this guide, we’ll walk you through installing Visual Studio on your Mac using a virtual machine. Since Visual Studio is no longer natively supported on macOS, setting up a virtual machine (VM) is the best approach to ensure you have access to the full range of Visual Studio features. Below, we’ll outline the steps using Parallels Desktop, a popular VM software for Mac.

Step 1: Choosing Your Virtual Machine Software

Before installing Visual Studio, you need to set up a virtual machine that runs Windows on your Mac. Here are some of the top options currently available:

  • Parallels Desktop: Known for its seamless integration with macOS, Parallels is user-friendly and optimized for running Windows on Apple Silicon (M1/M2) and Intel-based Macs.
  • VMware Fusion: A robust alternative to Parallels, VMware Fusion offers advanced features and supports a wide range of operating systems.
  • VirtualBox: An open-source option that is free to use, though it may require more manual configuration and might not offer the same level of performance as Parallels or VMware Fusion.

For this guide, we’ll focus on Parallels Desktop. This is the officially supported way Microsoft offers to run Windows on a modern ARM Mac.

Step 2: Installing Parallels Desktop

  1. Download Parallels Desktop:
    • Visit the Parallels Desktop website.
    • Click on the “Try Now” or “Buy Now” button, depending on whether you want a trial or full version.
    • The installer file will start downloading.
  2. Install Parallels Desktop:
    • Open the downloaded .dmg file.
    • Drag the Parallels Desktop icon to the Applications folder.
    • Open the Applications folder and double-click the Parallels Desktop icon to launch it.
    • Follow the on-screen instructions to complete the installation. You may need to grant permissions and sign in with a Parallels account.
  3. Set Up a New Windows Virtual Machine.

    • When you first launch Parallels Desktop, it will prompt you to set up a new VM.
    • Choose to install Windows from an ISO image file or from an existing Windows installation disk
    • Parallels may also offer the option to download and install Windows directly, streamlining the process

    • Follow the prompts to complete the Windows installation. This process may take some time as Windows sets up.
  • installing windows on a virtual machine
install confirmation for visual studio on virtual machines

If you’ve done everything correctly, you will get to this confirmation screen.

Step 3: Downloading Visual Studio for Windows

Now that you have Windows running on your Mac via Parallels, you can proceed with installing Visual Studio.

  1. Download Visual Studio:
    • Within your Windows VM, open a web browser and visit the Visual Studio download page.
    • Choose the edition of Visual Studio you want to install (Community, Professional, or Enterprise).
    • Click the “Download” button to start downloading the installer.

      Note: This is open on a browser window inside the VM.

       

  2. Install Visual Studio:
    • Once the download is complete, open the installer file.
    • Follow the on-screen instructions to select your workload preferences (e.g., C++ desktop development, .NET desktop development, ASP.NET and web development, game development with Unity).
    • Click “Install” to begin the installation. This process may take some time, depending on the selected workloads and your internet speed.
    • After installation, launch Visual Studio from the Start menu within your Windows VM.

      visual studio on a mac

Step 4: Setting Up Your First Project

  1. Once Visual Studio is installed, open it and select “New Project.”
  2. Choose the type of project you want to create (e.g., Console App, Web App, Mobile App).
  3. Follow the prompts to configure your project, including setting the project name and location.
  4. Click “Create” to generate your new project.
    Visual Studio open on a virtual machine

Using Visual Studio for Windows on Mac: Navigating the Interface and optimizing the Virtual Machine

When running Visual Studio on a virtual machine (VM) on your Mac, there are some key differences and considerations to keep in mind to ensure a smooth development experience:

Keyboard Shortcuts

Running Visual Studio in a VM can result in some keyboard shortcuts behaving differently than they would on a native Windows PC. This is due to differences in how macOS and Windows handle certain key combinations. Here are a few tips:

  • Cmd vs. Ctrl Mapping: Parallels lets you map macOS shortcuts to their Windows equivalents, enabling the use of familiar macOS commands like Cmd+C for copy and Cmd+V for paste in your Windows VM. This can be configured under Devices & Sound > Keyboard by enabling the “Use macOS shortcuts” option.
  • Function Keys in Parallels: Adjust the behavior of function keys (F1-F12) in Parallels to operate as standard function keys for Visual Studio commands. Access these settings via Parallels Desktop > Preferences > Shortcuts or under Devices & Sound > Keyboard for your VM.
  • Customize Mac System Settings: Alternatively, modify your Mac’s System Preferences > Keyboard by checking “Use F1, F2, etc. keys as standard function keys.” This avoids needing to press the Fn key when using function keys in Visual Studio within a Parallels VM.
  • Customizing Shortcuts in Visual Studio: If certain shortcuts aren’t functioning as expected within the VM, customize your keyboard shortcuts directly in Visual Studio under Tools > Options > Environment > Keyboard.
  • Windows Apps on the Mac Taskbar: Parallels can display Windows apps on the Mac taskbar. If you prefer a cleaner interface, disable this feature in Parallels settings to avoid taskbar clutter.
  • Folder Sharing in Parallels: Parallels shares many folders between your Mac and the VM by default. For increased privacy or security, customize sharing options to limit access to specific folders, such as only sharing your Downloads or a dedicated project folder.
  • System Resource Allocation: Optimize CPU, RAM, and disk space allocation for your VM based on your workload. Proper allocation ensures both your Mac and the VM perform smoothly during demanding tasks like code compilation.

Display and Resolution

When running a VM, Parallels offers different display modes to suit your workflow:

  • Fullscreen Mode: Parallels can run your VM in fullscreen, integrating it seamlessly into your Mac’s desktop environment. You can use macOS Spaces to switch between your VM and other macOS apps effortlessly.
  • Windowed Mode: If you prefer to keep your VM contained, Windowed mode lets you run Windows inside a resizable window on your desktop. This can be useful for quickly accessing other macOS applications without losing sight of your VM.
  • Coherence Mode: This mode allows Windows applications to appear alongside macOS apps on your desktop, blending the two environments. While it looks impressive, it can sometimes cause graphical glitches. In my experience, it’s a neat marketing feature, but not always practical for everyday use. However, some users find it very effective for their needs, so it’s worth experimenting with if you’re curious.

Parallels generally sets up Windows with the correct DPI settings automatically, so display resolution issues are rare. Adjusting these settings usually requires deliberate changes, making it easy to maintain a crisp and consistent interface across your VM and macOS.

Enhancing the Experience with Visual Assist

Developing on a VM can present unique challenges, but with the right setup and a few tweaks, you can create a development environment that’s nearly as effective as working on a native Windows machine. By paying attention to how keyboard shortcuts behave, optimizing performance settings, and ensuring good network connectivity, you can make the most out of Visual Studio in a virtualized environment on your Mac.

Visual Assist, renowned for its powerful productivity features, is now fully supported on ARM devices, including Macs with Apple Silicon (M1, M2, etc). Here’s how to install it:

  1. Initiate the Virtual Machine environment. Launch whatever VM you installed.
  2. Open Visual Studio on your Mac: Launch the Visual Studio application to begin the installation process.
  3. Navigate to Extensions > Manage Extensions: In the top menu, click on “Extensions,” then select “Manage Extensions” from the dropdown. This will open the Extensions Manager window.
  4. Search for “Visual Assist” and click “Install”: In the Extensions Manager, use the search bar to find “Visual Assist.” Once located, click the “Install” button next to the extension. You can also download it straight from the VS marketplace. The installation process will begin automatically.
    Visual assist ARM support
  5. Restart Visual Studio to enable the extension: After installation, restart Visual Studio to activate Visual Assist. Once restarted, you will have access to all the powerful features Visual Assist offers.

Benefits of Visual Assist on ARM Devices

With Visual Assist enabled on ARM devices, Mac users can experience a significant boost in productivity and code quality. Here are some of the key benefits:

  • Full ARM support. Visual Assist added ARM support which includes Mac silicon-based devices. For those using VMs, this is one of the best workarounds to getting a better VS experience.
  • Enhanced Code Navigation: Quickly jump to definitions, references, and symbols within your codebase. This feature allows you to navigate complex projects with ease, reducing the time spent searching for specific code elements and improving overall efficiency.
  • Refactoring Tools: Easily refactor code with powerful tools like Rename, Encapsulate Field, and Extract Method. These tools help maintain clean and organized code by automating common refactoring tasks, making it easier to implement changes and ensure code consistency.
  • Code Assistance: Improved IntelliSense with better suggestions and real-time error checking. Visual Assist enhances IntelliSense by providing more accurate and context-aware code completions, helping you write code faster and with fewer errors. Real-time error checking also helps you catch and fix issues as you code, reducing the likelihood of bugs in your final product.
  • Performance Optimization: Visual Assist is optimized for ARM architecture, ensuring smooth and efficient performance on M1 and M2 Macs. This optimization takes full advantage of the advanced capabilities of Apple Silicon, providing a responsive and lag-free development experience even for large and complex projects.
  • Advanced Code Analysis: Visual Assist includes advanced code analysis tools that help you understand and improve your codebase. These tools identify potential issues, suggest improvements, and provide insights into code complexity and maintainability, enabling you to write high-quality code.
  • Customizable Shortcuts and Commands: Tailor your development environment to your workflow by customizing shortcuts and commands. Visual Assist allows you to configure key bindings and commands to suit your preferences, making it easier to access frequently used features and streamline your coding process.
  • Seamless Integration with Visual Studio: Visual Assist integrates seamlessly with Visual Studio for Mac, providing a cohesive and unified development experience. The extension works alongside other Visual Studio tools and features, enhancing the overall functionality of the IDE without disrupting your workflow.

By leveraging the capabilities of Visual Assist on ARM devices, you can significantly enhance your coding experience on Mac. Whether you’re working on small projects or large-scale applications, Visual Assist provides the tools and features you need to be more productive and write better code.

Conclusion

Congratulations! You have successfully installed Visual Studio on a virtual machine. You should now be able to develop as you would normally on a native Windows device. Tech is always changing and we can assume that with advances in both hardware and software, we will be able to utilize more performance with less in the future—but for now, enjoy your new virtual machine, fit with a fresh install of Visual Studio! Happy coding.

The post Installing Virtual Machines to use Visual Studio on Mac first appeared on Tomato Soup.

]]>
https://www.wholetomato.com/blog/2024/08/27/installing-virtual-machines-to-use-visual-studio-on-mac/feed/ 0 3868
Visual Assist 2024.6 release post – Important fixes for Visual Studio https://www.wholetomato.com/blog/2024/08/01/visual-assist-2024-6-release/ https://www.wholetomato.com/blog/2024/08/01/visual-assist-2024-6-release/#respond Thu, 01 Aug 2024 15:50:31 +0000 https://www.wholetomato.com/blog/?p=3856 VA 2024.6 is here and is available to download! This release features small but crucial updates. IMPORTANT: Users of 2024.5 should upgrade as soon as possible, or install the previous version 2024.4. To get the...

The post Visual Assist 2024.6 release post – Important fixes for Visual Studio first appeared on Tomato Soup.

]]>
VA 2024.6 is here and is available to download! This release features small but crucial updates.

IMPORTANT: Users of 2024.5 should upgrade as soon as possible, or install the previous version 2024.4.
To get the latest version, v
isit our website now and download the new update.

Visual Assist 2024.6 brings two critical fixes for Visual Assist’s interaction with Visual Studio.

  • The first fix in this release addresses a critical issue that could sometimes cause Visual Studio to crash when saving files. This fix enhances the stability of the IDE, ensuring a smoother and more reliable experience while working on your projects.
  • Secondly, we have resolved an issue where the Visual Studio installer would crash on versions of Windows older than Windows 10. This fix ensures that users running older operating systems can install and update Visual Studio without encountering disruptions. This should provide a seamless setup experience across all supported Visual Assist-supported versions of Visual Studio.

We appreciate your patience and feedback as we continue to improve Visual Assist for all our users. Please continue to report issues and we will do our best to get them sorted out quickly.

The post Visual Assist 2024.6 release post – Important fixes for Visual Studio first appeared on Tomato Soup.

]]>
https://www.wholetomato.com/blog/2024/08/01/visual-assist-2024-6-release/feed/ 0 3856
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
On the recent video game industry layoffs https://www.wholetomato.com/blog/2024/05/15/video-game-industry-layoffs/ https://www.wholetomato.com/blog/2024/05/15/video-game-industry-layoffs/#respond Wed, 15 May 2024 15:42:28 +0000 https://www.wholetomato.com/blog/?p=3824 Like many others, we have been shocked and increasingly concerned to hear of the recent gaming studio closures and layoffs. Cumulatively, this has impacted far more in this industry than any of us would have...

The post On the recent video game industry layoffs first appeared on Tomato Soup.

]]>
Like many others, we have been shocked and increasingly concerned to hear of the recent gaming studio closures and layoffs. Cumulatively, this has impacted far more in this industry than any of us would have expected.

Many of our most ardent Visual Assist champions are game developers, so for us, these cuts are not simply about numbers. This is about our user community – your careers, your livelihoods, and your families. And while the challenges and uncertainties that those affected now face might seem daunting, we know that carving out a career in the gaming industry requires talent, discipline, and grit. So if you are one of those personally affected by the cuts, even if your current situation feels overwhelming, we believe in your ability to rebound and forge a rewarding and successful career.

And as a company deeply rooted in this industry, we want to help. Maybe you can benefit from Visual Assist while you’re looking for a new position…maybe while making a demo. Maybe you’ll start a solo game and be the next indie hit. Maybe you simply want to keep your coding skills sharp while looking for your next opportunity.

To that end, we’re offering a 25% discount on our flagship product, Visual Assist, for any developer impacted by the recent layoffs. No questions asked, no proof of eligibility required – just an immediate 25% off on a personal license to help get you back on your feet.

You can grab the discount by using this link to get it now. While we know it’s not much, it’s our way of supporting and standing with those who’ve been affected. Since so many of you rely on Visual Assist for your work, we’ll ensure you still have the tools you need no matter your employment or economic situation.

And, of course, beyond the discount, know that our team is here to provide any resources or guidance you might need during this transitional period. Whether it’s helping you get more out of Visual Assist or collaborating on what we can do to improve the product for you, please reach out to us any time. We’re here to help!

Ultimately, our encouragement for those affected is to stay strong and remain vigilant. This is a highly competitive yet highly rewarding industry. New opportunities will come, even if you can’t see them yet. Take a break to clear your head if you need. We’ll be here when you get back.

The post On the recent video game industry layoffs first appeared on Tomato Soup.

]]>
https://www.wholetomato.com/blog/2024/05/15/video-game-industry-layoffs/feed/ 0 3824
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
Installing Unreal Engine 4/5 + Visual Studio: A complete step-by-step guide with pictures https://www.wholetomato.com/blog/2024/03/07/installing-unreal-engine-4-5-visual-studio-a-complete-step-by-step-guide-with-pictures/ https://www.wholetomato.com/blog/2024/03/07/installing-unreal-engine-4-5-visual-studio-a-complete-step-by-step-guide-with-pictures/#respond Thu, 07 Mar 2024 21:19:21 +0000 https://www.wholetomato.com/blog/?p=3773 Unreal Engine 5 has been out for a while now and along with it came exciting improvements and new features for users to enjoy. If you’re an aspiring game developer who is looking to dive...

The post Installing Unreal Engine 4/5 + Visual Studio: A complete step-by-step guide with pictures first appeared on Tomato Soup.

]]>
Unreal Engine 5 has been out for a while now and along with it came exciting improvements and new features for users to enjoy. If you’re an aspiring game developer who is looking to dive into the world of Unreal Engine development without any background, chances are you’re wondering—”where do I even start?” Read on further to see how to download, set up, and install both Visual Studio and the Unreal Engine client.

Why Visual Studio?

Visual Studio is the de facto IDE for editing Unreal’s C++ projects. Unreal Engine (UE) is designed to integrate smoothly with Visual Studio (VS), allowing you to make source code changes in your projects quickly and easily, and immediately see results upon compilation. Setting up VS to work with UE can help improve efficiency and the overall user experience for developers using UE.

Installing and Getting Set Up

Things You Need to Download Before Doing Everything:

  • Visual Studio (VS22 Recommended)
  • Epic Games Launcher for Unreal Engine (You download UE using the launcher)
  • A sample game project (Optional downloadable from the UE marketplace)

Step 1: Installing Visual Studio

First up, you want to install Visual Studio, the IDE of choice for Unreal Game development. It is recommended to install the latest version of Visual Studio, or any version from VS 2022 to take advantage of 64-bit address space with virtually unlimited memory limit—this will be useful for working with Unreal’s project sizes.

You can pick between a professional (commercial for teams) and a community license (free for individuals). Download the bootstrap .exe and open it to start the installer.

You will then be shown a number of customization options for workloads, additional components, and installation location. For the workloads, which contain components you need for the programming language or platform that you’re using, we recommend installing the following: 

  • .NET development
  • Desktop development C++
  • Game development C++.

Adding Visual Studio Tools for Unreal Engine

Make sure to tick the following items when choosing your workloads.

Visual Studio has come a long way with its integration with Unreal Engine’s features and dev tools. Microsoft has added extra support for Unreal that enables you to add UE classes, view UE logging, and more, all from within Visual Studio.

Step 2: Installing the Unreal Engine editor

Next up, you need to install the Unreal Engine editor. This allows you to open and run pre-cooked versions of the games you will develop. This allows you to run unsaved, uncompressed, and uncompiled programs using the Unreal Engine. This makes it easier to run, edit, tweak, demo, and overall quickly test things in your games.

To download the Unreal Engine editor, you first have to download the Epic Games launcher and follow the installation process. Once you have the Epic Games launcher installed, sign up for an Epic Games account using whatever login option you prefer.

Once you have logged in, you can navigate to the Unreal Engine tab and start downloading the Unreal Editor. This will also install the editor in your system automatically. The most common way to open the Unreal Editor will be through this launcher. You could also double click your *.uproject file or if you prefer, open the Visual Studio solution and then compile and run the editor from there. 

Use the dropdown on the top right to choose which version of Unreal you want to install (in most cases, the latest version will be the best choice.) Follow the instructions and customize your install locations and shortcut options if you prefer.


Tip: There is usually a prompt to associate UE with Visual Studio, but in case it has not followed the succeeding steps. In the “Edit” menu of the Unreal Editor, navigate to “Editor Preferences” and then navigate to the “Source Code” section. Choose the corresponding Visual Studio version as the preferred source code editor.

Step 3: Finding sample project files

Congratulations! You have installed the two primary programs needed for Unreal Engine development. At this point, you will decide whether you would like to use the blueprint visual scripting system or C++. For the purposes of this tutorial, we will go further and set up C++ project files. (Remember for when you progress: it is more efficient if you use both the blueprint system and C++ in tandem.) 

Creating a game from scratch is a gargantuan task. And even with a game engine handy, it may still feel overwhelming. Luckily, Epic provides a number of free sample projects so you can test the waters out and familiarize yourself first before starting a project entirely on your own.

Browse through the marketplace or the sample game projects available inside the Epic Games library. This catalog will include almost every genre of games, tech demos, and sample studios that you can think of. 

Epic Games has provided a number of sample games and projects so you can jump right in and practice your development skills.

For this tutorial, we chose the Lyra Starter game—a sample FPS game continuously updated with the latest UE has to offer. You can easily invest hundreds of hours just tweaking the gameplay, graphics, and user interface systems to get better at the complexities of the C++ integration.Choose and download your sample game of choice and save it on your system.  This will save the game files, preconfig files, and most importantly a *.uproject file—a text file that contains basic settings for your game project, which can be conveniently read by the Unreal Editor to launch your game. This will also be useful for the next step.

Choose your install location and click on create and wait for the process to complete. This will create the essential project files for editing the source code in Visual Studio.

Step 3: Building your first project files and opening for Visual Studio

To open the  downloaded game file source code in Visual Studio, you have to make a Visual Studio project file (or its collective known as solutions).

Navigate to where you created your project files.. If everything was installed correctly, this will have a *.uproject file that will have an entry for the associated source code. This allows you to generate a Visual Studio solution based on the UE Lyra Game source code. Right click on the *.uproject file and click on “Generate Visual Studio project files”.

Right click a *.uproject file to create source folder that contains .cpp and .h files.

This will build a Source folder that contains .cpp source files, .h header files, and a .sln Visual Studio solution file that you can open inside Visual Studio. 

Launch Visual Studio and open the corresponding solution. This will start a short loading process as your project initializes, but don’t worry; it’s just the initial pre-project parsing. Opening the same solutions in the future will take significantly less time.

This process maps out the entire network of source files and builds a database of symbols so that the IDEs navigation and search features work. If you’ve reached this far, congratulations! You have successfully set up Unreal Engine and integrated its source code for development in Visual Studio.

A Lyra game C++ header file opened in Visual Studio.
Note: Syntax highlighting and navigations are added by a nifty tool called Visual Assist—more on that later!

Making changes to your first project

After installation, you may want to start as simply as possible to familiarize yourself with the process of using the Unreal Editor in conjunction with Visual Studio C++ to change or add gameplay mechanics to your sample game. 

You will find that Visual Studio development comes with its own set of workflows before you can see actual results in the editor. You may be writing new code, debugging, or compiling projects. And it may be easy to lose track of what comes after which. 

If you want to get your hands dirty on an actual project, it is highly recommended to watch the following tutorial on how to add a powerup pickup to the sample shooter game. Watch and learn to set up projects, find project files, retrofit existing assets, and write and build your own C++ to make new content.

Watch and learn how a seasoned Unreal dev sets up Visual Studio + Unreal Engine. See how you can use C++ to add your own power up. Watch the tutorial here.

Removing false errors in Unreal Projects

When you first start working on an Unreal solution you will notice that there are syntax and symbols specific to Unreal development. Unfortunately, these symbols and functions can be mislabeled or flagged as false errors by Visual Studio as they are not part of the normal C++ workload. The C++ files will still compile but this caused a lot of confusion, especially among beginners. 

A group of game developers grew tired of the false errors and unresponsiveness of the IDE in large gaming projects, so they built their own tools tailored specifically for Unreal. The developers from Whole Tomato created a plugin called Visual Assist that understands Unreal Engine syntax—improving the frustrating situation they were in.

Overtime, the plugin grew from adding simple syntax comprehension and handy navigations to a full-fledged productivity augmentation for Visual Studio C++. The plugin developed a smart parser that understood what users were trying to accomplish, and thus was able to visually provide timely and contextual assistance in real time.

Red squiggles under source code signify errors. However, these are all normal Unreal Engine code mislabeled by the IDE.

Visual Assist remains one of the top productivity plugins for C++ and Unreal Engine work. It is responsive, performant, and parses your game files extremely fast so you can jump right in with complete support. You can download Visual Assist and try it out for yourself on freshly installed or existing Unreal projects.

 

The post Installing Unreal Engine 4/5 + Visual Studio: A complete step-by-step guide with pictures first appeared on Tomato Soup.

]]>
https://www.wholetomato.com/blog/2024/03/07/installing-unreal-engine-4-5-visual-studio-a-complete-step-by-step-guide-with-pictures/feed/ 0 3773
See you at San Francisco for GDC 2024! https://www.wholetomato.com/blog/2024/03/07/see-you-at-san-francisco-for-gdc-2024/ https://www.wholetomato.com/blog/2024/03/07/see-you-at-san-francisco-for-gdc-2024/#respond Thu, 07 Mar 2024 15:26:35 +0000 https://www.wholetomato.com/blog/?p=3765 Whole Tomato will be at the Game Developers Conference 2024! The makers and developers of Visual Assist will make their return to Moscone Center in San Francisco from March 18-22 for GDC 2024! Whole Tomato...

The post See you at San Francisco for GDC 2024! first appeared on Tomato Soup.

]]>
Whole Tomato will be at the Game Developers Conference 2024!

The makers and developers of Visual Assist will make their return to Moscone Center in San Francisco from March 18-22 for GDC 2024! Whole Tomato will be at booth number P1769 sharing space with a sister company, Assembla! Two of the best tools for game development in one booth—efficient!

GDC has always been one of the most awaited gaming events for video game professionals every year. It’s also one of the few opportunities for us to meet with daring new developers, colleagues in the industry, and of course enthusiastic users. That’s why we are excited to physically meet the community once again in this year’s GDC! 

We hope to see you there!

PS: We will be handing out exciting prizes and giveaways for our booth visitors!

Book an appointment with us

If you’re attending GDC and have access to the conference virtual platform, you can book a meeting with any of team members. Use the link below and navigate to the Teams section and take your pick among our dazzling booth members.

 

The post See you at San Francisco for GDC 2024! first appeared on Tomato Soup.

]]>
https://www.wholetomato.com/blog/2024/03/07/see-you-at-san-francisco-for-gdc-2024/feed/ 0 3765
What’s New in Visual Assist 2024—Featuring lightning fast parser performance [Webinar] https://www.wholetomato.com/blog/2024/02/21/whats-new-in-visual-assist-2024-featuring-lightning-fast-parser-performance-webinar/ https://www.wholetomato.com/blog/2024/02/21/whats-new-in-visual-assist-2024-featuring-lightning-fast-parser-performance-webinar/#respond Wed, 21 Feb 2024 23:53:12 +0000 https://www.wholetomato.com/blog/?p=3748 Webinar overview: In this webinar, we discuss the latest developments in Visual Assist with a focus on the latest release. Get an inside look at what the developers added for VA 2024.1 and what you...

The post What’s New in Visual Assist 2024—Featuring lightning fast parser performance [Webinar] first appeared on Tomato Soup.

]]>
Webinar overview:
In this webinar, we discuss the latest developments in Visual Assist with a focus on the latest release. Get an inside look at what the developers added for VA 2024.1 and what you can expect to be added to the toolset in the upcoming months.
.
The Visual Assist team showcases the new features and improvements featuring the newly improved parser time for initial project startups—giving huge gains for those working with huge solutions.

Expect the following in this webinar:

  • Watch the latest improvements in action featuring the newly improved parser speed
  • Familiarize with the other features added in VA 2024 you should be using
  • Learn more about upcoming developments
The webinar is happening on March 13, 2024 | Wednesday 10 AM CST and will be presented by Whole Tomato’s own product managers, David Millington and Nuno Castro, and lead developer Chris Gardner.
Register now and see VA 2024.1 in action: faster performance, tweaked navigations, and more productivity for a hassle and frustration free experience in Visual Studio!
This webinar has concluded. Scroll down below watch the replay or access the slide dec.

Slide Deck Presentation

Webinar Replay

The post What’s New in Visual Assist 2024—Featuring lightning fast parser performance [Webinar] first appeared on Tomato Soup.

]]>
https://www.wholetomato.com/blog/2024/02/21/whats-new-in-visual-assist-2024-featuring-lightning-fast-parser-performance-webinar/feed/ 0 3748
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