Apache AGE + Apache NetBeans: 10 Functionalities to Speed up code development
Tags: apacheage, programming, netbeans
Published: 2023-05-27 00:07:36

Over the past month, I have been working on a new grammar for Apache AGE using the NetBeans IDE. As a result of this experience, I have identified several features that can speed up the code development process.

In this post, I will share 10 of these features essential for those who wish to take full advantage of the IDE environment and develop more quickly and efficiently. Over the next few days, I will publish other posts with more tips on using NetBeans so that you can further optimize your workflow.

## 1. Debug

You don't have to spend hours in the terminal looking for the correct line number to stop or typing each variable to print. Use the interface to monitor all variables and structures and evaluate the code step by step, quickly detecting errors.

<figure>
  <img src="https://dev-to-uploads.s3.amazonaws.com/uploads/articles/k20zzjxvrsb6ftn9d6ql.gif"
  alt="Figure 1 - Netbeans 17 debug tool.">
  <figcaption>Figure 1 - NetBeans 17 debug tool.</figcaption>
</figure>

## 2. Accessing definitions with Ctrl + click

Are you studying a new code and need to review a structure definition? Have you found a bug in a function and want to see how it was defined? Navigate to where the structure, function, or variable was declared with Ctrl + click.

<figure>
  <img src="https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9e2ty7yj92ahbc6ywqcg.gif"
  alt="Figure 2 - Link to function declarations demonstration on Netbeans 17 using Ctrl + click.">
  <figcaption>Figure 2 - Link to function declarations demonstration on NetBeans 17 using Ctrl + click.</figcaption>
</figure>

## 3. Multiple cursors

Do you need to type several identical or similar lines within the same code? Speed up the process with multiple cursors. Hold down Ctrl + Shift and click elsewhere in the editor to create many cursors and type all at once.

<figure>
  <img src="https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vlel7jqgrtuukhtzar8l.gif"
  alt="Figure 3 - Using multiple cursors in Netbeans 17 with Ctrl + Shift.">
  <figcaption>Figure 3 - Using multiple cursors in NetBeans 17 with Ctrl + Shift.</figcaption>
</figure>

## 4. Parameter passing

With an IDE, you don't have to pass commands to the terminal every time you run the program. Just set default commands for Run and Debug, then choose an option. The parameters will always be saved there.

<figure>
  <img src="https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c4v6vkua2zmjxg80i6ft.gif"
  alt="Figure 4 - Configuring commands for Run and Debug in Netbeans 17.">
  <figcaption>Figure 4 - Configuring commands for Run and Debug in NetBeans 17.</figcaption>
</figure>

## 5. Integration with Git/GitHub

These are some Git/GitHub features, among other functionalities, that you can use with the NetBeans IDE:

- View the lines that were changed.
- Monitor branches.
- Clone a repository.
- Create commits.

<figure>
  <img src="https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pinf02382vzkvilhwze9.gif"
  alt="Figure 5 - Git Diff demonstration.">
  <figcaption>Figure 5 - Git Diff demonstration.</figcaption>
</figure>

## 6. Spell-Checking

Have you ever had a typo corrected by a colleague? Don't take it personally. It happens! But you can avoid it by using the spell-checking tool.

<figure>
  <img src="https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zunobn15m8wv92olutyb.gif"
  alt="Figure 6 - Netbeans 17 spell checking.">
  <figcaption>Figure 6 - NetBeans 17 spell checking.</figcaption>
</figure>

## 7. Search tool

Search for variables, structures, and any other type of text within the project using the search tool.

<figure>
  <img src="https://dev-to-uploads.s3.amazonaws.com/uploads/articles/698w8xatsjuo4n40j7j7.gif"
  alt="Figure 7 - Netbeans 17 search tool.">
  <figcaption>Figure 7 - NetBeans 17 search tool.</figcaption>
</figure>

## 8. Autocomplete

Program faster using suggestions for autocomplete. Start typing the structure name, then hold down Ctrl + spacebar to view the autocomplete suggestions.

<figure>
  <img src="https://dev-to-uploads.s3.amazonaws.com/uploads/articles/thptgxt4au6t3kkqbf8c.gif"
  alt="Figure 8 - Netbeans 17 autocomplete tool.">
  <figcaption>Figure 8 - NetBeans 17 autocomplete tool.</figcaption>
</figure>

## 9. Code Assistance

Avoid unexpected compilation errors with Code Assistance. The assistant helps identify possible logic problems in your code and suggests corrections to prevent the code from breaking.

<figure>
  <img src="https://dev-to-uploads.s3.amazonaws.com/uploads/articles/sqy33oc2zkbt0xzyrgb6.gif"
  alt="Figure 9 - Fixing error in NetBeans 17 with the Code Assistant.">
  <figcaption>Figure 9 - Fixing error in NetBeans 17 with the Code Assistant.</figcaption>
</figure>

## 10. Integrated Console

The integrated console makes it easier to organize the environment and program everything in one place. You can use the OS terminal within the IDE.

<figure>
  <img src="https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qo4l8bpkrprs5oelwj8j.gif"
  alt="Figure 10 - Netbeans 17 integrated terminal.">
  <figcaption>Figure 10 - NetBeans 17 integrated terminal.</figcaption>
</figure>

## Conclusion

Using an IDE makes the developer's life much easier. It is possible to avoid unexpected errors and program more efficiently. The resources I use the most are Debug, terminal, parameter passing, and integration with Git/GitHub. Was any of these tips new to you? Do you know of any other advantages that I didn't mention? Feel free to share your thoughts in the comments below!

## Contribute to Apache AGE
Apache AGE website: https://age.apache.org/

Apache AGE Github: https://github.com/apache/age