Blog Archives - UltraEdit https://www.ultraedit.com/blog/category/blog/ UltraEdit Fri, 11 Oct 2024 18:59:11 +0000 en-US hourly 1 https://wordpress.org/?v=6.6.2 https://www.ultraedit.com/wp-content/uploads/2023/01/UE_logo_icon_white-1-1.png Blog Archives - UltraEdit https://www.ultraedit.com/blog/category/blog/ 32 32 Master UltraEdit’s Flexible Search Functions https://www.ultraedit.com/blog/master-ultraedits-flexible-search-functions/ https://www.ultraedit.com/blog/master-ultraedits-flexible-search-functions/#respond Thu, 10 Oct 2024 17:39:27 +0000 https://www.ultraedit.com/?p=32464 Introduction Every editor has a more or less good search function to search for text, numbers and characters. UltraEdit has integrated so many flexible options for this functionality that it will warrant and extensive explanation; but it is a worthwhile investment as it provides the user with extremely powerful tools for his daily usage. We […]

The post Master UltraEdit’s Flexible Search Functions appeared first on UltraEdit.

]]>
Introduction

Every editor has a more or less good search function to search for text, numbers and characters. UltraEdit has integrated so many flexible options for this functionality that it will warrant and extensive explanation; but it is a worthwhile investment as it provides the user with extremely powerful tools for his daily usage. We would like to describe the functionality in the following text and use various practical examples to show why the search functions of UltraEdit are considered so outstanding by many users.

Quick Find

Quick Find is the function that is intended for quick lookups and can be opened using the key combination Ctrl + F. This opens a small box in the top right-hand corner, which is helpful if the user wants to search quickly without using the large/normal search function.

Figure 1: Quick Find fly-out box

It is particularly practical that UltraEdit enters the word at the position of the cursor in the search field by default.

Note: The key combination Ctrl + F can be changed in the UltraEdit settings. To do this, go to the Key mapping category in the UltraEdit settings and select Quick find in the list. The existing key combinations are displayed in the right area and a new combination can be defined directly below.

Find and Replace dialog

The actual search is handled in UltraEdit via the Find and Replace dialog, which is displayed with 4 tabs at the top: Find, Replace, Find in Files and Replace in Files.

This dialog can be launched via the menu, the ribbon icons and various key shortcuts, whereby the desired tab is preselected depending on the key combination:

Command Shortcut Function
Find Alt + F3 Comprehensive search for strings
Replace Ctrl + R Replaces search results in Find
Find in files Ctrl + Shift + F Find functionality in a chosen files or directory
Replace in files Ctrl + Shift + R Replace functionality in a chosen files or directory

 

The figure below shows the Find and Replace dialog in its standard display, whereby the word located at the cursor is automatically transferred to the search field:

Figure 2: Find and replace dialog

The search parameters are as extensive as the user wants them to be. In the default setting, the dialog shows basic functions. Use the gear symbol at the bottom to open the advanced search options:

Figure 3: Find and replace dialog with its advanced options

Two further keyboard shortcuts are required to navigate through the search results:

  • F3 or Shift + F3: Find next result
  • Ctrl + F3: Find previous result

The In section defines the used search parameters, which includes current/all open files or the selected text. In addition to the options for searching for whole words, case sensitivity, and counting the number of matches found, there are many practical power functions that I have appreciated for many years and have fortunately found again in UltraEdit. This also has to do with editing source code, for example in C++ or in Delphi as well as in other languages. 

One feature I’ve used a lot in the past is the highlighting of all matches found. When I write source code, as in the following screenshot in Object Pascal/Delphi, and enable the option Highlight all items found, all hits found are highlighted in color, which gives me a better overview of where further adjustments may be necessary:

ultraedit find query settings options

Figure 4: Find option for highlighting all items found

I also find the option List lines containing string extremely useful, whereby a new result dialog with the string matches is displayed after the search. By double-clicking on a line, UltraEdit jumps directly to the respective line. This option is very similar to the Microsoft Word search function, for example, whose results navigation I really appreciate and I am all the more pleased that UltraEdit also makes this possible.

Regular expressions are also an important major topic in all kinds of searches. UltraEdit also supports them extensively and they will be described in more detail later in this text.

To conclude the Find function, let’s talk about the 3 button symbols above:

  • Circle with clock inside: shows a history of all previous search terms for possible reuse
  • Yellow star: allows to define favorites that can be loaded for quick reuse. The context menu contains the menu items Add to favorites, Edit favorites and Favorites – the last item contains the saved favorites in a selectable list
  • Green star and dot: can be selected as soon as the option Regular expressions is enabled and opens a list of regular expression options appropriate to the selected regular expression engine

Replace

If we move from the classic find function of text/code to the replace function, the basic functionality is retained, and in a simple sense is supplemented by a second string that replaces the search string. UltraEdit offers in the Replace tab the same basic functionality and extends it with the function buttons:

  • Replace: replaces the string from the “Find what” section with the string from the “Replace with” section (keeps the Find and Replace dialog permanently open)
  • Replace once: replaces the searched string from the “Find what” section with the string from the “Replace with” section once (closes the Find and Replace dialog afterwards)
  • Replace all: replaces all occurrences of the searched string from the “Find what” section with the string from the “Replace with” section (keeps the Find and Replace dialog permanently open)

Figure 5: Find and replace dialog with the Replace function opened

You will also notice that a small black icon button with two arrows has been added to the “Replace with” section, which conveniently swaps the two strings of the “Find what” and “Replace with” sections. It has happened to me many times that I wanted to undo a replaced string, for which the undo function can of course also be used. Depending on the text/code, however, it may make sense to simply swap the two sections and then replace them again.

Also relevant for the replace function and always very helpful for me is the option Preserve case. This power function causes UltraEdit to match the case of the replace string with the case of the found string with the condition of multiple rules:

  • if the word found is all lowercase, the replacement word will be all lowercase
  • if the word found is all UPPERCASE, the replacement word will be all UPPERCASE
  • if the word found is MixedCase, the replacement word will match the casing of the replacement word

We will illustrate this function with an example from the Delphi world. A corresponding click event is created for a button on a form and the procedure Button1Click is called as soon as the button is clicked. If we now enter “Button1Click” in the Find section and “ButtonActionClick” in the replace section, the following for all occurrences happens:

  • “button1click” will be replaced with ”buttonactionclick”
  • “BUTTON1CLICK“ will be replaced with ”BUTTONACTIONCLICK”
  • ”Button1Click“ will be replaced with ”ButtonActionClick”

Find/Replace in Files

Now that we have talked in detail about finding and replacing in the currently open file/document, we come to the supreme discipline, namely finding and replacing in complete files and directories.

This functionality is already known from various IDEs (Integrated Development Environments), such as Microsoft Visual Studio and Embarcadero RAD Studio, where it is used to search projects or entire project groups across multiple files, folders, and even drives.

UltraEdit’s professionalism is now emphasized by providing this powerful feature of IDEs in a text editor, and we will take a closer look at it below:

Figure 6: Find and replace dialog with the Find in Files function opened

What is immediately noticeable here is the adjusted search focus in the In section, where the default setting is the “Files listed” option – this searches the files located in the two edit fields below, “In files/types” and “Directory”. While the directory field can accept a directory either in text form, via the “Use active file path” button or via the browse button next to it, the upper field “In files/types” can be used to specify either individual files or wildcards. Multiple entries are separated by a semicolon and 3 typical examples might look like this:

  • *.pas;*.cpp
  • Testfile.txt;*.cpp;*.h
  • *.pas;TestForm.frm;*.dfm

In these examples, wildcards and named filenames are mixed, which UltraEdit can easily handle when the semicolon is used as a separator.

Further In section options are available for open files, favorite files (Application Menu -> Favorite Files) and project files – the latter searches all files within a currently open project. These three options ignore the edit fields “In files/types” and “Directory”, as these are only used with the “Files listed” option.

The Find button closes the Find and Replace dialog, the search is then performed and all results are displayed in the Output Window below. The respective files can be opened in the Output Window by double-clicking on the line with the file name. Anyone who is familiar with the Output Window will know that there are many more options available in a context menu via the right mouse button. These include collapsing/expanding the entire window content and copying the content to the clipboard.

Figure 7: Output Window with the results of the Find in Files search function

What is worth mentioning at this point, apart from the regular expressions (which we will come to at the end of this blog), are the interactive results.

When the Interactive results option is enabled, the Find in Files search will open a new Interactive results document. In this window all the Find in Files results are returned, but these results are immediately editable and the user doesn’t have to take intermediate steps to open matched files to edit the string that was searched for. This is effectively a window into the relevant portions of each matched file and the users may edit results individually as desired.

Figure 8: Interactive results window from the Find in Files function

If preferred and once the Interactive results document is opened, the user may switch to the Replace tab in the Find and Replace dialog. When focus is on the Interactive results document, the All open files option in the Replace dialog is dynamically changed to All results. If this option is selected, the user can use the replace operation interactively by pressing the Replace button, or uses Replace all to replace all matched strings in all files listed in the Interactive results document. When All results is selected in the Replace dialog, no other open files will be affected by the Replace all operation.

When direct editing of the results (either by typing or replace operations) are done, the user may close the Interactive results document. When the document is closed, a prompt appears asking whether the changes should be saved – changes would then be saved for all modified documents listed in the Interactive results document. This additional intermediate layer provides a clear way of keeping track of things, especially if there are many files that need to be changed.

The fourth major search function is Replace in Files, and here the Replace function is used in connection with listed files (names & wildcards as well as directories), favorite files or project files.

Figure 9: Find and replace dialog with the Replace in Files function opened

In the replace options, the user can include subdirectories, ignore certain hidden directories or file names/extensions and use the two options List changed files and Open matching files.

With the first option Open matching files is enabled, any files matching the specified parameters will be opened when the search completes. The second option List changed files instructs UltraEdit to list all the files that were modified in the Output Window. If enabled, each file change will be listed in the Output Window followed by the number of occurrences found and changed.

Regular expressions

Regular expressions have been widely used for many years and once you have understood the principle, you will never want to miss them again. In UltraEdit, the option to activate regular expressions is available in all 4 tabs of the Find and Replace dialog. Once activated, you can choose from 3 different expression types:

  • Perl: UltraEdit uses Perl style regular expressions based on the Boost C++ Libraries
  • UltraEdit: UltraEdit uses its own style regular expressions
  • Unix: UltraEdit uses Unix style regular expressions.

Regular expressions are search strings where certain characters (symbols) have a special meaning. The following symbols and associated functions exist in the original UltraEdit syntax:

Symbol Function
% Matches the start of line – this indicates the search string must be at the beginning of a line but does not include any line terminator characters in the resulting string selected
$ Matches the end of line – this indicates the search string must be at the end of line but does not include any line terminator characters in the resulting string selected
? Matches any single character except newline
* Matches any number of occurrences of any character except newline
+ Matches one or more of the preceding single character/character sets, where at least one occurrence of the character must be found
++ Matches the preceding single character/character set zero or more times
^b Matches a page break
^p Matches a newline (CR/LF) (paragraph) (DOS files)
^r Matches a newline (CR Only) (paragraph) (MAC files)
^n Matches a newline (LF Only) (paragraph) (UNIX files)
^t Matches a tab character
[xyz] Matches any characters between brackets (a character set)
[~xyz] Matches any characters not between brackets including newline characters (a negative character set)
^{A^}^{B^} Matches expression A or B
^ Overrides the following regular expression character
^(…^) Brackets or tags an expression to use in the replace command. A regular expression may have up to 9 tagged expressions, numbered according to their order in the regular expression.   

The corresponding replacement expression is ^x, for x in the range 1-9
Example:
If ^(h*o^) ^(f*s^) matches “hello folks”, ^2 ^1 would replace it with “folks hello”.

These symbols and associated functions result in many examples, some of which are described below to give you an idea of how they are used:

m?n matches “man”, “men”, “min” but not “moon”

t*t matches “test”, “tonight” and “tea time” (the “tea t” portion) but not “tea
time” (newline between “tea ” and “time”).

Te+st matches “test”, “teest”, “teeeest” etc. but does not match “tst”

[aeiou] matches every lowercase vowel

[,.?] matches a literal “,”, “.” or “?”

[0-9a-z] matches any digit, or lowercase letter

[~0-9] matches any character except a digit (~ means not the following)

 

The user can search for an expression A or B as follows:

“^{John^}^{Tom^}”

This will search for an occurrence of John or Tom – there should be nothing between the two expressions.

 

 The user can combine A or B and C or D in the same search as follows:

“^{John^}^{Tom^} ^{Smith^}^{Jones^}”

This will search for John or Tom followed by Smith or Jones.

 

Summary

UltraEdit offers flexible search and replace functions that work either for individual files/documents or complete directory structures. Countless options allow you to fine-tune the parameters and leave almost nothing to be desired. UltraEdit thus takes the step forward of providing much more powerful functions than many users are used from a text editor. As a result of these options, productivity is increased and search and replace is as powerful as the user works with this functionality – this blog provides the necessary know-how for this.

If you’re looking for a versatile text editor with powerful find and replace functionality, you can rely on UltraEdit. Download it now and try it for 30 days for free.

Try UltraEdit

 

The post Master UltraEdit’s Flexible Search Functions appeared first on UltraEdit.

]]>
https://www.ultraedit.com/blog/master-ultraedits-flexible-search-functions/feed/ 0
The Value of Hex Editors: Where they’re used https://www.ultraedit.com/blog/the-value-of-hex-editors-where-theyre-used/ https://www.ultraedit.com/blog/the-value-of-hex-editors-where-theyre-used/#respond Tue, 26 Mar 2024 16:45:16 +0000 https://www.ultraedit.com/?p=29095 For some professionals and developers, hex editors are crucial tools to have—especially in the digital era. It allows them to modify and have full control of every byte value within a binary file. And apart from that, they can be useful for plain text files as well as non-printable characters (e.g. when opening a config […]

The post The Value of Hex Editors: Where they’re used appeared first on UltraEdit.

]]>
For some professionals and developers, hex editors are crucial tools to have—especially in the digital era. It allows them to modify and have full control of every byte value within a binary file. And apart from that, they can be useful for plain text files as well as non-printable characters (e.g. when opening a config or source file with a character with no representation).

Hexadecimal notation, commonly referred to as hex, serves as a cornerstone of modern technology. It is a numbering system with a base of 16 that uses 16 symbols to represent values from 0 to 15. It includes the standard symbols 0-9 and the letters A-F (or a-f) to represent values from ten to fifteen. Its presence is evident in various industry systems, including binary file formats, memory, and network addresses.

Moreover, hex plays a crucial role in encoding ASCII characters, streamlining the transmission of text data. Hex editors serve as essential utilities, empowering users to navigate and modify binary data efficiently. 

In a nutshell, hex editors are indispensable for navigating the digital landscape, enabling precise control and manipulation of data formats.

What are Hex Editors?

Hex editors are extensively utilized by programmers, security professionals, system administrators, and other tech-related professionals to view and edit binary data written in a hexadecimal format. 

Although similar to text editors that edit plain text data, hex editors are tailored for working with binary data. This allows developers and users to edit individual bytes of data present in a file. 

What does a hex editor do?

Additionally, there are files that cannot be edited in a text editor. If you’ve ever tried opening a file without the corresponding program that can read it (e.g. a random .dat file), your system may automatically default to using a simple text reader to try and open it. This opens a garbage file that is illegible and unusable—unless you use a hex editor.

Why are Hex Editors Necessary?

Hex editors provide users  access to the raw bytes that make up a file. Most of us who use text editors see user-friendly interfaces and texts that we can understand. However, behind the scenes are strings of binary values that are represented by text humans can understand.

Peeking through these binary values can help both developers and users alike to do the following:

  • Troubleshoot and fix corrupted bytes of data

Corrupted data can stem from hardware malfunctions, software bugs, code tampering, and more. Its effect can be observed as data loss, crashes, or errors— affecting the productivity and utility of a system. 

Even the bytes of plain text files aren’t invulnerable against data corruption. Fortunately, hex editors offer users the ability to accurately locate and rectify corrupted bytes to their accurate values.

Note that the hex editor itself won’t tell you which byte(s) within the file is corrupted – you’ll need to know what to look for. But the hex editor provides a clear view into the bytes of the file so that you can easily do so, along with other tools like search/replace.

  • Finding and removing non-printable / out-of-range characters in plain text files

Non-printable or out-of-range characters may sometimes be in plain text files. Depending on the program or use case, they may need to be removed to ensure data integrity, functionality, and human readability. Hex editors can read non-printable characters that can interfere with operations like searching, sorting, or parsing text.

  • Data recovery

Being able to correct corrupted data, hex editors also allow users to recover lost data due to corrupted bytes. As mentioned previously this is achieved through inspecting and repairing binary data.

  • Easier debugging process

Through hex editors, developers can inspect the embedded strings that are in executable files to further understand their structure. If you have enough prior knowledge, you can make targeted changes, fixing errors, or applying updates to compiled executables without access to the original source code

  • Data modification and exploration

Hex editors are handy tools for exploring and tweaking file formats. By checking out how files are put together in binary, users can figure out how they work and adjust as needed. 

This could mean modifying game saves, modding games, adjusting settings in config files, or fixing up software files to make them work better.

Because you are editing specific bytes, you can alter certain executables with the proper know-how. Hex editors are commonly used to reverse engineer certain programs and executables because of how intricate it can be.

Limitations of hex editors

While extremely powerful and versatile, hex editors are not complete solutions. Editing singular files may not allow you the complete access you expect. For instance:

  • You can copy and modify data—but without the program to properly read the file, you cannot execute it.
  • You cannot bypass dependencies and third-party verification (digital certificates). In fact, altering even just a single byte in a digitally signed binary file will “break” the digital signature and introduce security issues if executed later.
  • Some applications rely on multiple files and programs to run. Editing one file does not automatically translate to a workable file.
  • You need some prior knowledge of when and where the relevant data starts. (How do you know where the “row data” starts and ends?)
  • It may be overwhelming editing files of significant sizes using a hex editor. You may miss fundamental editing features such as those in text editors.

Considerations when picking a hex editor

There are many hex editors in the market ranging from free open-source software to paid ones. However, there are many things that you would like to consider before committing to buying one. Here are some of them:

  1. Ease of use
  2. Ancillary editing tools
  3. Supported platforms
  4. Security
  5. Support and updates
  6. Credibility

Recommended Tools for Working with Binary Files

When working with hex editors, you would most likely be using data manipulation techniques and features found in text editors. That is why some developers use both text editors and binary file editors for their work.

However, it may be tedious to switch between a text and hex editor repeatedly. UltraEdit stands out as a 2-in1 text and hex editor with higher software security standards. UltraEdit combines both text and hex editors, removing the need to run two separate programs to edit textual and binary data. 

Renowned for being able to open and edit extremely large files, UltraEdit’s optimized performance allows it to effortlessly handle any project, ensuring swift editing without compromising efficiency. 

Security and privacy are also one of its strengths. It comes with many security features including data encryption support, password protection, and regular security updates—features that you appreciate if you regularly work with sensitive data and binary files. 

Compatible across multiple operating systems, UltraEdit ensures seamless integration into your workflow. It only requires one license for Windows, Mac, and Linux; allowing users to utilize the editor using up to three machines on any platform. 

Apart from being a text and hex editor, UltraEdit is a multi-purpose editor that includes a text editor, HTML editor, XML/JSON viewer, and a hex editor, empowering users to tailor the editor to their specific needs. 

With UltraEdit, you’ll experience a smooth, secure, and productive editing experience, making it the ideal choice for professionals and enthusiasts alike.

Try UltraEdit text editor with Hex mode.

The post The Value of Hex Editors: Where they’re used appeared first on UltraEdit.

]]>
https://www.ultraedit.com/blog/the-value-of-hex-editors-where-theyre-used/feed/ 0
Securing your software: How UltraEdit, a text editor, keeps your data safe https://www.ultraedit.com/blog/securing-your-software-how-ultraedit-a-text-editor-keeps-your-data-safe/ https://www.ultraedit.com/blog/securing-your-software-how-ultraedit-a-text-editor-keeps-your-data-safe/#respond Tue, 30 Jan 2024 04:17:47 +0000 https://www.ultraedit.com/?p=28654 UltraEdit (UE) employs stringent security measures to keep you and your data safe because your chain of software security is only as strong as its weakest link. Even as a native application with relatively fewer risks and vectors of attack, we will always ensure that your text and code editor have been fortified and vetted […]

The post Securing your software: How UltraEdit, a text editor, keeps your data safe appeared first on UltraEdit.

]]>
UltraEdit (UE) employs stringent security measures to keep you and your data safe because your chain of software security is only as strong as its weakest link. Even as a native application with relatively fewer risks and vectors of attack, we will always ensure that your text and code editor have been fortified and vetted properly.

We’ve discussed in a previous blog why a tool as unassuming as a text editor also needs to be security-hardened in this day and age. In this blog, you can read on further to find out what tools UltraEdit uses to protect you and your data and what measures it employs to ensure its source code’s integrity.

Our Latest Additions to the UE Development Pipeline

UltraEdit is proud to announce that the source code and third-party components used in its underlying architecture are secured by state-of- the-art static application security testing tools (SAST) and source code analysis (SCA) tools.

UltraEdit recognizes that many individuals and businesses expect to be able to trust our tools with their most important and, often, confidential data. These security integrations represent a significant investment in meeting and exceeding those expectations. Hardening the security of our products to this level exemplifies our unwavering commitment to the integrity and protection of our users’ data and systems.

UltraEdit is primarily secured in three ways:

ultraedit security techniques

Why are these tools necessary?

UltraEdit stands alone in a crowded market of IDEs and editing tools when it comes to security. Our commitment to providing tools that not only exceed expectations in terms of functionality but also in terms of safety and security is unparalleled. One of UltraEdit’s priorities and edge over the competition lies in its ability to secure your digital assets by building a robust text editor built with security in mind—not as an afterthought. 

The industry-leading third-party tools we use provide ongoing comprehensive analysis and hardening of our codebase and serve as credible verification of the security of our applications. These tools help us identify critical issues and vulnerabilities before they ever ship.

Static application security testing (SAST) via Kiuwan

Kiuwan’s Static Application Security Testing (SAST) tool provides UltraEdit developers with several benefits: detecting security vulnerabilities in source code as they are written, enforcing the team’s coding guidelines, and flagging potential bug-prone elements in the source code.

Software composition analysis (SCA) via Black Duck

Blackduck by Synopsys is a software composition analysis (SCA) tool that UltraEdit uses to detect, manage, and secure its third-party source code components. This is an essential tool especially now that UltraEdit is adding its own plugin ecosystem.

UltraEdit’s Approach to Security: A Blend of Tools and Techniques

UltraEdit follows a three-pronged approach when it comes to security. This process involves internal checks, industry standard practices, and the utilization of software security tools. Each aspect of this approach filters out more surface areas and possible points of vulnerability in the software’s source code. 

Read on further to see how UltraEdit uses the latest additions to its toolset to help improve security.

  • Manual and Peer Review

The first check comes in the form of manual peer review inside our development and engineering teams. Every edit or source code commit for any of our tools is inspected by a colleague before it is checked into source. Sharing written code also promotes transparency, early error detection, and collaboration, which are all essential for efficient software maintenance. 

It’s also the most accessible form of code protection; there’s no reason for a team or a company to not have a standard protocol involving manual peer review.

Keep in mind: Manual code review does have limitations, including the possibility of missing vulnerabilities due to human error or oversight. It’s also not easily scalable—something that might be of concern if you have multiple components or you’re dealing with multi-faceted source code applications.

In essence, though, this two-step manual process detects the most obvious errors and provides an avenue to ensure consistent coding standards. It’s also one of the easiest and most inexpensive options for securing source code; however, it must be augmented with other techniques such as automated testing.

  • Static Application Security Testing (SAST) tools.

To address the limitations of manual review, software developers employ automated tools and techniques. Static Application Security Testing (SAST) tools are automatic quality control tools that complement manual code review. By combining manual review with suggestions from SAST tools, the overall security of source code is improved, helping to reduce the number of flaws that may slip into production.

These tools are used to evaluate source code without running or executing it—thus the term static. They examine the program’s structure and syntax to identify potential issues and errors, such as coding mistakes, security vulnerabilities, and performance bottlenecks.

UltraEdit uses a dedicated source code analysis tool (more on this later) to scan source code for possible vulnerabilities. These help detect issues that are laborious to check manually. This filters out common software errors such as obsolete programming techniques, memory leaks, buffer overflows, race conditions – things that can cause crashes or data corruption – and the like. It can even be fine-tuned according to UltraEdit’s own coding guidelines and conventions, which ensures better and faster development.

Keep in mind: While SAST tools cover a lot of ground in terms of curbing software vulnerabilities, it is not a catch-all solution. Because it lacks the ability to recognize context in the runtime environment, it may produce false positives, identifying issues that are not actual vulnerabilities, and false negatives. 

They are also often reserved for specific languages—meaning if you add components outside the supported code language, it may miss out on highlighting issues entirely. 

But overall, using automated tools greatly reduces development time as they can catch possible flaws early into a development cycle with minimal effort. They are also easy to use and are a great addition to manual peer review.

  • Software Composition Analysis (SCA) tools

Similar to how SAST tools augment manual review, software composition analysis (SCA) tools can also cover some of the limitations of SAST tools. SCA tools are primarily used to analyze and manage the open-source elements of applications and software source code.

UltraEdit, like most modern software, has external dependencies. UltraEdit is not open source software but it does use open source components. This is one of the more crucial steps that not every publisher will take. This type of scan cross-verifies each and every line in UE’s open source dependencies with a database of known vulnerabilities maintained by security professionals. This database is continuously updated so that security issues can be detected and mitigated as part of the standard product build pipeline.

Many SCA tools also provide an automated inventory of all open source components within a software package, including those components version numbers. This information is often published publicly via something called a Software Bill of Materials (SBOM), a document that is now required by United States executive order for all federal software procurement.

Keep in mind: To properly work, SCA tools must rely on an up-to-date components database and list of known vulnerabilities. This means that obscure vendors or unpopular open source projects may sometimes take its time before it is identified properly. Developers must still exercise due diligence in choosing and maintaining the components they add to their source code.

However, SCA tools significantly reduce the time and effort required to track the provenance of libraries, plugins, and inherited components in your source code. This makes the SAST-SCA tool combo one of the most comprehensive security solutions available for software development. It vets most of the self-written code.

Threats and vulnerabilities in text editors

BI’s Internet Crime Complaint Center 2022 Internet Crime Report

The FBI’s Internet Crime Complaint Center 2022 Internet Crime Report shows the trend of total cybercrime complaints they received contrasted against the amount of losses incurred.

Apart from the internal code that a team of developers writes, modern software is also built upon other pre-existing software and code. This makes it cheaper and faster to turn what would be a gargantuan development project into a more reasonable one-month sprint. However, this interdependent network of code also increases the scope of code that has to be secured and verified.

Even in a text editor—a usually unassuming piece of software—malicious actors may exploit security flaws due to the developers’ mistakes or due to inadvertent vulnerabilities embedded in the components of the source code.

  • Security threats and vulnerabilities that can be present in a code or text editor include:
  • Abuse of Third-Party Plugins: Security risks in popular extensible text editors that allow hackers to abuse plugins and escalate privileges on targeted systems
  • Eval Injection: Improper neutralization of directives in dynamically evaluated code, which can lead to the execution of malicious code
  • Broken Authentication: When authentication credentials are stolen, malicious actors can hijack user sessions and identities to impersonate the original user.
  • SQL Injection: This can allow attackers to steal sensitive data, fake identities, and engage in various other malicious actions.
  • Remote Takeover Vulnerabilities: Critical vulnerabilities in open source text editors that could allow attackers to remotely compromise a victim’s server and steal sensitive data
  • Developer Negligence: Even without malicious actors, software may still become embedded with vulnerable components with security flaws if it gets published undetected.

Cybercrime takes on many forms: social engineering, network hacks, fraud, espionage, and a lot more. Each product or piece of software’s supply chain should theoretically be as fortified as possible. On the other hand, developer negligence and ignorance may also pose the same risks. Inadvertently using unverified source code and buggy, unreviewed code may bring as much harm as malicious actors.

The demand for extensibility has given birth to editor and IDE plugins—software components created by the open source community to solve each and every possible use case. Editor plugins and extensions provide exceptional flexibility and customizability to tailor to any user’s specific use case. (UltraEdit is adopting a modified version of this model.)

To mitigate these risks, it is important to use a combination of secure code review tools, regular testing during development, and monitoring and tracking repetitive issues. Secure code reviews can help identify and mitigate these vulnerabilities, ultimately strengthening the security of the code and text editors.

Looking forward: What to expect from UltraEdit

This blog post is meant to give you an idea about our approach to security and to share a bit about our two new security tools. There is no completely secure software available, period. But when it comes to security-hardened text editors, you can be sure that UltraEdit is one of the best (and maybe the only) choices available. Moving forward, UltraEdit will continue its endeavor to reinforce its security with the best industry practices.

Do you have specific use cases that need extra attention when it comes to security? The UltraEdit team is always looking for ways to improve the editor and its services. Send us a message detailing your use case, and we’ll make sure to consider it for the next release.

REGISTER NOW: Join our webinar on software security

security webinar sign up

The post Securing your software: How UltraEdit, a text editor, keeps your data safe appeared first on UltraEdit.

]]>
https://www.ultraedit.com/blog/securing-your-software-how-ultraedit-a-text-editor-keeps-your-data-safe/feed/ 0
What is a text editor? Help me choose one! https://www.ultraedit.com/blog/what-is-a-text-editor-help-me-choose-one/ https://www.ultraedit.com/blog/what-is-a-text-editor-help-me-choose-one/#respond Thu, 11 Jan 2024 01:04:24 +0000 https://www.ultraedit.com/?p=28304 Introduction: The History of Text Editors Back in the days of the nascent World Wide Web, I built my first website while in seventh grade on the then-popular website hosting platform Angelfire. I used Microsoft FrontPage to visually lay out tables and images, then uploaded via FTP the resultant HTML files it created to Angelfire’s […]

The post What is a text editor? Help me choose one! appeared first on UltraEdit.

]]>
Introduction: The History of Text Editors

Back in the days of the nascent World Wide Web, I built my first website while in seventh grade on the then-popular website hosting platform Angelfire. I used Microsoft FrontPage to visually lay out tables and images, then uploaded via FTP the resultant HTML files it created to Angelfire’s server.

I recall discussing with a friend (whose skills far surpassed mine) how HTML tables were so important for HTML layouts and what the future might hold for web design. At some point he said to me, “Tables won’t matter soon – the new Cascading Style Sheets (CSS) features are going to make them obsolete. In fact, I do most of my layout and design now by editing CSS files directly in Notepad.”

While I refrained from showing my ignorance at the time, I remember incredulously thinking, “What?! Why in the world would anyone be using Windows Notepad to edit websites? Can you actually do that?” So began my journey of learning source code and editing plain text files.

Decades later, not much has changed in how our tech works. Underneath the many layers of abstraction and multiple steps of obfuscation, the internet – and the whole of technology in general – still runs on plain text files.

While our advances in software and computing since my middle school experience have been exponential – so exponential, in fact, that some students don’t know what files and folders are – if you want to harness the power of your computer, your smartphone, the internet, or some programming language to build and create, it’s essential to comprehensively understand the important plain text base layer that undergirds all our tech. Hence this blog post. Let’s take a deep dive into what plain text is, how to edit it, and how to choose a text editor that works for you.

What is a plain text file?

Understanding the “atoms” and “molecules” of computing

In grade school, we all learned that atoms comprise everything. (Now we know about subatomic particles, but for the purposes of this analogy, we’ll stick with atoms as our basic building block.) Bond those atoms together in certain ways, and you have molecules. Molecules are the basis of the natural world – from the air we breathe, to the food we eat, to our own bodies and their complex biological systems, to the materials used to build homes and skyscrapers…and everything in between.

This is somewhat oversimplified, but you can think of computing using a similar model. At the most basic level, computers speak in binary, i.e. 0s and 1s. “On” and “off”. “Yes” or “no.” These basic units are called “bits” (short for “binary units”), and they are the atoms of the computer world. Everything a computer is used for – video games, SMS messaging, space shuttle launches – it’s all composed of bits when you break it down to the lowest level.

Like an atom, a bit by itself isn’t very useful. However, like molecules, when you start arranging multiple bits in more complex structures, they become more useful. A “byte” in computing is a grouped arrangement of 8 bits, and bytes are akin to molecules in our analogy. And yes, this is what the “byte” in megabyte, gigabyte, terabyte, etc. refers to.

Like molecules, these bytes can then be arranged themselves to create more complex structures. For example, they can form the data used to display a JPG cat photo on your screen, they can be arranged to output the sound of your coworkers’ voices through your speakers, or they can be arranged in sequences that represent alphanumeric characters – what we call “plain text.”

Plain text files

So human-readable plain text files are, basically, arrangements of bytes that represent human-readable characters. The process of actually translating binary into human-readable text (from on/off bits, to bytes, then to plain text) is known as character encoding. Essentially, the computer system is pre-programmed with a “translator” that knows which byte (or sequence of bytes) represents which human readable character. That’s how the computer knows what to display on your screen when you open a text file. It’s kind of like using a decoder ring to decrypt an encoded message. For a deeper dive on this, check out our Unicode power tip.

Binary (non-plain-text) files

Now, something like a JPG file isn’t going to be human-readable because the computer’s translator for a JPG doesn’t translate bytes to plain text data. Instead, it translates bytes to pixel data which is then shown on your screen as an image. You need an image viewing program for that, which comes with its own pre-programmed translator for those types of “molecules” (bytes). 

You can open a JPG in a plain text editor, and while you’ll see letters and numbers, you’re not going to see anything that makes sense to humans. That’s because the computer is using the wrong translator for the byte data “language” in the JPG file. The same is true for Word Docs (they’re not plain text), PDFs, EXEs, DLLs, and many other data formats. We call these formats “binary”. (By the way, if you need to edit a binary file, check out UltraEdit’s hex editor!)

hex editor edit image file

Opening a JPG image using a hex editor. This works because by encoding using hex notation, you can compress a longer binary string to save space.

Summary

In a nutshell, “bits” are the atoms of the computing world. When bits are arranged in groups of eight, it enables us to create different 8-bit combinations called “bytes,” which are the molecules of the computing world. These molecules can then be pieced together in meaningful ways inside of files to create all types of different “materials,” or data formats, that we can then use computers to translate to obtain information. One of those formats is plain text which can be used for creating source code files, log files, data and information storage, and a lot more.

How to edit plain text files?

Now that you have an understanding of what plain text is, you probably already know the answer to this question. You can edit plain text files with a text editor: a computer program that is designed to decode (read) and encode (write) plain text format. 

All operating systems include a plain text editor:

To edit plain text files, open your OS’s text editor (or one you installed on your own) and simply open the plain text file you want to edit. It’s that simple.

iOS and Android don’t typically come prepackaged with text editors, but there are many robust third party Android text editors and iOS text editors available. iOS does include a minimal text editor for opening plain text files on your iPhone or iPad, but it leaves a lot to be desired, and you’ll quickly find yourself wanting something beyond its basic featureset.

compare text editors

Each type of editor comes with their own sets of benefits. For example, the native Windows Notepad may be enough for editing small plain text files but you would need a specialized editor like UltraEdit if you want to execute more complex text operations.

What is a text editor?

As defined above, a text editor is a computer application that is designed to decode and encode (or “read”) plain text format. A text editor is used to create, change, or edit plain text files.

Many people use text editors to open and modify plain text files like programming source code, config files (think JSON, XML, etc.), documentation (things like wiki markup and Markdown), log files, and much more.

Revisiting our atoms/molecules analogy, we established that plain text format is just one possible “material” that can be formed with “molecules” (bytes). A text editor is a tool that allows you to work directly with this material, allowing for a pure and straightforward connection with the digital fabric. No frills — just you and the plain text canvas. 

How does a text editor work?

encoding text data

Every character in a string has a corresponding value depending on the encoding format used. The graphic above uses ASCII values. Each value can then be represented as bits or bytes.

When you open a plain text file with a text editor, the editor retrieves the raw binary data (all those 0s and 1s) stored on your computer’s hard drive, then translates that into a human-readable format to display in the text editor. Here’s a bit more about how that process works:

  1. You select the file to open. The editor accesses the file through your operating system and reads the binary data stored in the file.
  2. The editor loads the binary data into memory and then interprets the bytes of the binary data as human-readable characters based on a specific encoding. There are many, many encodings, but only a few really popular ones that are used today (ASCII, UTF-8, UTF-16, etc.). The editor must determine which encoding is correct for the file, because if it doesn’t, your human-readable plain text will wind up looking like nonsensical garbage. There are several methods a text editor can use to determine the correct encoding, but that’s a more technical topic for another day.
  3. Once the file is displayed in the text editor, the user (you) can begin making changes by typing into it, deleting existing text, cutting/copying/pasting, etc. Underneath the surface, the text editor adjusts the binary data accordingly. It’s like rearranging the atoms in our analogy to create new molecules.
  4. When you save your changes, the text editor takes the modified text (usually stored in your computer’s memory) and translates it back into raw binary, then writes that data back to disk, overwriting the original version of the file.

What’s the difference between a free online text editor and a text editor download?

At the time of this writing, there are several options available for a free browser-based text editor. Many websites offer this functionality at no cost. These online editors offer some benefits, including access from any computer or OS and the ability to store your text files in the cloud.

For some, an online, browser-based text editor is a good choice and does the job. But for many users, continued use will eventually expose some significant drawbacks. So what are the advantages of installing a native text over using one in your browser?

Performance: Native text editors run faster, with less system resources.

You’re probably already aware that your browser consumes a LOT of memory – often, far more than many other applications running on your system. That includes native text editors as well. 

If editing plain text is something you’re doing quite often, or if you’re working with larger plain text files, or if you want to have many files open at once, you’ll likely prefer the less resource intensive performance of a natively installed text editor. For example, with a browser based editor, the more changes you make to your text, the more memory the browser needs to keep track of things like undo/redo. Also, because of the way a browser works, an online editor is likely going to work your CPU harder. And God forbid your browser crashes before you save your changes…

If you just need to make a one-off edit or even a few quick changes, an online text editor will probably be okay. Otherwise, you really should be working in a native text editor application.

Functionality: Native text editors can just do more.

Modern web applications that run in your browser have admittedly become more feature rich over time. But they won’t ever be able to approach the functionality that a native application can offer. Certain functionality like file system access to find and replace in files, file system exploring, window tiling and cascading, feature-rich file tabs and more simply aren’t possible in an online text editor. And while web applications can offer a breadth of functionality, that functionality often doesn’t go very deep, leading to frustrating dead-ends when you’re trying to accomplish more in-depth or complex tasks.

Offline availability: For when you’re not connected to the internet.

These days, access to the internet is like access to air – we take for granted that it will always be available. And usually, that’s the case. But in those rare instances where there’s a service disruption or you’re out of WiFi range, it’s nice to have tools that are still fully functional. If you rely upon an internet connection to use your editor, you incur a potential point of failure that you wouldn’t otherwise have with a native text editor.

Configurability: Native text editors can be customized to a greater degree.

Online text editors do provide a level of customization and configuration, however most don’t come close to the flexibility of native tools. Many native text editors offer options – key mapping customization, for example – that are OS-specific or otherwise aren’t possible in the limited browser environment. Furthermore, you likely won’t find plugins or extensions available for online editors, whereas these are ubiquitous with most native text editors. 

You might find that an online text editor suits your basic preferences to a degree, but if you continue to work seriously with one, you’ll inevitably hit a limitation in customization or preferences that likely isn’t there with native editors.

Privacy: Your plain text files remain on your local hard drive.

When you open any file or paste any text into an online text editor, that data is going to someone else’s server. Even if the site claims that data accessed in its web application isn’t collected or stored (or is stored but is encrypted) there’s no way to truly verify this without access to the server and application itself. The general rule of thumb is don’t put anything on the internet that you wouldn’t want someone else to see or have.

While cloud storage is beneficial and has its applications, for private, sensitive, or valuable data you need a local editor. That’s the only way to ensure your data stays safe, private, and secure.

OS Integration: Native text editors integrate with your operating system.

Natively installed applications can integrate deeply with your operating system – and other installed applications – whereas online text editors can’t. For example, dragging-and-dropping selected files into an app to open them, associating file extensions to open in certain applications, launching apps from the file explorer context menu, invoking a program from a command line…these are all ways that native text editors can integrate with your OS-native workflow that browser based editors can’t.

If you’re doing any sort of meaningful editing or code development, chances are you’re working a lot with different files, applications, and services all installed locally into your operating system. It doesn’t make much sense to circumvent that cohesive environment for a less integrated experience with general editing tasks. 

native text editor vs online text editor

Can a text editor run code?

By definition, a text editor itself cannot run your plain text source code. It’s simply an editing tool. However, many editors can launch internal or external tools and processes (like interpreters and compilers) to run the code that you write. How this works is often unique to the source language you’re using.

It’s important to keep in mind that not all code works the same. Some code is open source, like HTML and CSS, meaning it’s delivered to the end user in its code format. The end user then uses their own tool (like a web browser) which makes the code useful.

Other source code is interpreted, which means it must be processed and run by some third party program. For example, Python code is sent to a Python interpreter program which then executes the instructions in the code. 

And of course, a lot of source code is compiled. This is similar to interpreted code, but instead of it being executed by the interpreter, the code is transformed into machine code by something called a compiler. The machine code is then executed by the computer (it’s CPU, GPU, memory, etc.) on which it’s run. Think of your EXEs and DLLs on a Windows computer; these are compiled machine code.

Within the context of writing source code in a text editor, you might do the following:

  • Write some HTML, JavaScript, and CSS, then launch a web browser preview to check your code changes. It’s not the editor that’s running your code but a web browser engine that’s incorporated into the editor.
  • Write some Python code and then launch a menu item to run it through the Python executable installed on your computer. The result of the code might be returned back to the editor as plain text. Again in this case, it’s not the editor running the code. It’s just sending it off for processing.
  • Write some C++ code in the editor and then click a button to compile it and launch the result. Perhaps after compiling, an actual application runs. The editor isn’t running the code here, it’s your actual computer, running machine code that the compiler created from the C++ you wrote.

Which text editor is best for Python/HTML/C++/etc…?

This is a tough question to answer. Certainly there are crowd favorites for different languages, but the reality is that users’ needs and preferences vary so greatly that there’s not necessarily any one standard.

For example, dedicated Python developers might opt for Python-specific editors like PyDev or Jupyter. These editors include specific tools for Python development and debugging and are referred to as integrated development environments (IDEs). For those who might only intermittently need to modify a Python script, a more general purpose and lightweight editor like Sublime Text or UltraEdit is often a good choice.

For C++ development, an IDE is almost a necessity. Visual Studio is the top choice for Windows, and XCode for Mac. For Linux, Eclipse and code::blocks are popular options. Some other IDEs rising in popularity for C++ are C++ Builder, CLion, and even VS Code.

When it comes to back-end web development, i.e. JavaScript, TypeScript, PHP, and Python, many users settle for VS Code, which, while not a true IDE, features a robust extension ecosystem that provides much helpful ancillary functionality. 

For front-end web development, like HTML, JavaScript, and CSS, many editors like UltraEdit work well. Again, it really depends on what you want out of your editor. Do you want a precise “surgeon’s scalpel” that is highly tailored to a certain language, framework, or workflow? Or a general purpose text editor like UltraEdit which can cover nearly all your editing needs and also includes FTP and SSH, but works for many other text editing jobs as well?

The best way to discover which text editor is best for you is to try them out for yourself. Remember that there are many different jobs a text editor can do beyond just source code editing. Don’t forget to explore as much as you can – you’ll often be delighted by what you discover!

So…which text editor is the best?

As mentioned in the last section, this is a very difficult question for anyone to answer, even for themselves. There is too much subjectivity involved, and it would be a daunting task for anyone to fully and fairly evaluate the vast array of text editors available today.

I’m tempted to provide a comprehensive list of text editors ranked by performance and functionality. But I’m not even sure I could trust my own rankings.

Instead, I’d like to lay some basic groundwork on how you can discover this for yourself.

Determine what’s most important to you in a text editor.

Are you looking for an “opinionated” editor that assumes a lot about your workflow; for example, that you’ll always be using Git, or that you’re restricted to just a few programming languages? Are you looking for a maximally “helpful” editor that aggressively offers to auto-complete the text you’re typing, rearrange your project for you, etc.? Or are you looking for maximum control and freedom and want the editor to stay out of your way as much as possible?

Is a powerful Find/Replace important to you? What about large file and data handling? Do you need to reformat data like JSON, CSV, etc.? Do you need functionality like FTP and SSH to interact with remote servers?

These are all things to think about when evaluating your next text editor.

Read reviews from other users.

It’s no secret that product reviews contain a treasure trove of useful information when you’re in the market for a new piece of software. Oftentimes, you’ll find use cases and solutions to problems from other users that you didn’t even think about. UltraEdit, for example, has over 1100 reviews on G2 and many more on various other review platforms.

Additionally, reviews can clue you in to potential issues or incompatibilities you may have with the text editor. It might become obvious after reading a review that the editor you’re considering is designed for one specific use case or language type, for example.

One word of caution, here – you can get lost in reviews! Gauging the opinions of others is a wise move, but if you put too much weight into it, it can result in analysis paralysis which makes decision-making very difficult. Take every review with a grain of salt, and remember, humans are not objective.

Consider factors beyond just the text editor.

The functionality and user experience of an editor are very important. The most important. But don’t fall into the trap of fixating only on features and functionality without considering other important factors.

For example, is security important to you? Maybe you work on proprietary source code or in an industry where all data must be kept private and safe. Not all editors offer the same level of security or even any security at all. And in the event that a vulnerability is discovered, the response time to patch may widely vary by publisher.

If security is important to you, take a hard look at UltraEdit – we’re one of the most secured and hardened editors available. This is a major reason why we are trusted by so many financial institutions, healthcare companies, and government agencies.

What about support? It’s great if you’ve read that a text editor can do just the thing you need, but what if you’re having trouble figuring out how to do it? Or maybe the editor doesn’t function as expected when you try it? Who can you reach out to? Most free and open source text editors don’t provide any level of professional support. Your best bet is searching online, perusing StackOverflow, or asking for help on forums (and bracing for the inevitable annoyed “RTFM” responses).

Contrast this with a professionally and actively supported product like UltraEdit, which includes world-class support. Need assistance figuring out a regex to extract data from your log files? No problem – send us an email, and we’ll respond with an accurate solution for your specific problem…often within an hour or less. 

Commercial support is also a significant factor for larger company and enterprise deployments. In these organizations, customizations and controls are often needed to ensure the editor complies with corporate policies. It’s invaluable having a support rep at your disposal who can help you with your custom deployment and configuration to meet the requirements of your unique environment.

Try it for yourself.

Finally, and most importantly, you shouldn’t use any text editor that you can’t at least try for a few days before a full license is required. There’s simply no substitute for “kicking the tires” of a text editor to ensure it does what you expect, meets your needs, and just feels right.

That’s why we offer a full 30-day free trial for UltraEdit and all our other products. The proof is in the experience. No amount of marketing or sales can beat a great user experience in a text editor, and we’d love for you to see for yourself! 😉

 

The post What is a text editor? Help me choose one! appeared first on UltraEdit.

]]>
https://www.ultraedit.com/blog/what-is-a-text-editor-help-me-choose-one/feed/ 0