When you first become interested in learning how to program, it can be difficult to find a place to start. A lot of questions come up, especially if you're new to the idea of programming entirely. After you pick which language you want to learn, you have to worry about how you're going to write the language.
In today's Null Byte, I'm going to walk you through some of the methods and options you have at your disposal when writing out code. This is essential in your journey to becoming a programmer, because if you aren't comfortable in your work environment, you won't be spending enough time programming. Our mission is to find the method that works for you. We can either use an IDE, or a text editor with programming support. We have a few options to choose from, so let's get started.
An IDE, or Integrated Development Environment, is a software application that provides comprehensive tools to make programming easier. This usually includes, but is not limited to:
- Code editor. This is what you would use to edit the contents of a script or piece of code. Think of it like a text editor.
- Syntax highlighter. This will highlight key words for you that are associated with the language in use. This makes code easier to read and understand. Keeping code pretty is a breeze.
- A compiler and/or an interpreter. These tools will aid you by compiling your code (for compiled languages) or executing the script directly from the IDE (interpreted languages).
- Automation tools. Code completion, autotabbing, and tag closing are all a part of this. These features speed up programming time greatly by effectively closing tags and code for you automatically. These tools also assist in formatting. By placing code into blocks, they can be minimized for readability and organization.
- A debugger. A debugger will try to automatically find and sometimes fix bugs in code for you.
An IDE is honestly more useful for people programming in compiled languages, such as C, Haskell, or Visual Basic. Here is a list of some great, free IDEs:
- Eclipse (OS independent) - An IDE with too many features to count. Available for all platforms, Eclipse has an extensible plugin system which allows modification of supported languages and features. Eclipse does everything mentioned above, and allows support for any language through its plugin system.
- NetBeans (OS independent) - A great IDE with support for many languages. The NetBeans platform allows applications to be developed from a set of modular software components called modules. Applications based on the NetBeans platform (including the NetBeans IDE) can be extended by third party developers.
- Geany (OS independent) - Geany is a lightweight, cross-platform GTK+ text editor. It's actually not a full IDE, but a text editor with loads of IDE features. A few of them are: Auto-completion, syntax highlighting, code blocks, an embedded terminal emulator and its extensible via plugins.
- Visual Studio Express (Windows) - VSE is a lightweight IDE that focuses on simplicity and ease-of-use for new programmers. It's the best IDE on Windows for a novice to programming. It covers the most common languages on Windows, such as: C/C++, Visual Basic, .NET, J#, C# and more. This is the greatest toolset avaiable for Windows, especially if you are a game programmer (Fun fact: Xbox uses C#), or mobile apps developer or weekend hacker.
Using a text editor is commonly used for programming in scripted, or interpreted languages. Normally, a text editor used for code will have features to assist in programming, such as:
- Code blocks
- Syntax highlighting
- Autotabbing on new lines
When you code in a text editor, it is just for simplicity and ease of use. They are lightweight and simplistic. The following is a list of a few of the great editors:
- SciTE (OS independent) - SciTE, or the Scintilla Text Editor, is an extremely light text editor with support for many languages, syntax highlighting, and autotabbing. It is my personal favorite GUI text editor for programming because of its speed and ease of use. It also requires very few dependencies (Linux users only).
- Notepad++ (Windows) - Notepad++ is nearly identical to SciTE. The only thing we see different is theming and a wider variety of supported languages for syntax highlighting by default.
- Nano (GNU/Linux) - Nano is the lightest, and simplest text editor I've ever used. It can be tweaked with a little hack to enable syntax highlighting. I've already written a guide about how to enable syntax highlighting, you can find it here. Nano looks especially great in a terminal with a monospaced font.
- Emacs (*nix) - GNU Emacs has over 1,000 commands. It also allows the user to combine these commands into macros to automate work. It's fast and very extensible. Emacs on Mac even comes with support for syntax highlighting on many languages.
- Vim (GNU/Linux, Windows) - Vi Improved, or Vim, is an extensible terminal-based editor forked from Vi. Vim is operated completely from the keybindings and commands created using its own vimscript configuration. It supports syntax highlighting and much more. Vim is a very effective text editor for programming with the help of a few plugins.
There are many other choices to choose from, but with this basic list at your fingertips, finding and picking the right editor to program will be a breeze. It all essentially boils down to what you prefer in your environment. Make the choice!
If you enjoy Null Byte, you should come join the IRC and chat with us. Don't be afraid to speak, and wait for a response patiently. People tend to "idle" in IRC, and check their messages every so often, so you might not get an instant reply. Idle with us!
Want to start making money as a white hat hacker? Jump-start your hacking career with our 2020 Premium Ethical Hacking Certification Training Bundle from the new Null Byte Shop and get over 60 hours of training from cybersecurity professionals.
Other worthwhile deals to check out: