Posts tagged: C

Nine tools I can’t live without (for Windows)

First, a relevant disclaimer: I use Windows mostly for two purposes, test my Perl modules under a Windows environment, and printing some stuff as my Mac sometimes can’t find some Windows printers in the network. This said, my Windows runs in a virtual machine, and I install these tools right after installing Windows.

Browser

The first thing you need to know is that Windows does not include a web browser. It includes a tool that is mainly used to download a Web browser. Its name is Internet Explorer, and you can use it to download Firefox, Google Chrome, Safari or Opera. In my main machine, I use Firefox. There are some features that I like that are not available on other browsers. But for my virtual machine I need a tool to check my mail, and to download some other tools. Not much more.

Antivirus

Now I am cheating. In my virtual machine I do not have an antivirus installed. It is too easy to reinstall a new virtual machine, and you all know that an antivirus running is wasting some resources that can be relevant for virtual machines. Nevertheless, I want to suggest two antivirus. In fact, I suggest these two because they are the two I install when I need one (note that I do not install both, I install one or other). I am not sure what is the best. Avira seems to be lighter, AVG seems to be more professional and heavy.

Both these antivirus software have their professional paid version. This means that if you like their performance, you can buy the paid version for better protection. They also include some functionality that are common on current antivirus software, like trojan detection and web site security.

 

Connectivity

I need to transfer files to and from my Mac and/or Linux servers to the Windows machine. For that I can make the file available to download, or I can use a tool to copy files. As FTP is not that secure, the best approach is to use SCP or Secure Copy. For that, I suggest WinSCP tool. It also support FTP, but its main strength is the ability to use the SSH protocol.

A similar necessity raises when I need to connect to a Linux server from Windows. Again, I do not need this when using a virtual machine, as I can use a terminal from the host machine to ssh anywhere I want. But if you have a dual boot machine, or you just work on windows, then you will need this. Putty is the better telnet/ssh client I ever seen for Windows. It not only supports ssh, but it also supports ssh keys, making your connection even more secure.

Version Control

My main repository of code is still a SubVersion one. I am now using GitHub a lot, too, but my main tools are still in the old SVN repository. To checkout and commit from Windows I use TortoiseSVN. Not only because it has a nice and cute logo, but because it integrates perfectly in Explorer. Also, I love a recent feature, where TortoiseSVN commit message window auto-completes your commit messages with the filenames or contents of the modified files. Very cool.

Text Editor

I do not use that much Windows to have a dedicated IDE. I usually use Notepad++ for my editing needs. It knows about file encoding, it knows about end-of-line differences among operating systems, it knows how to highlight main programming languages, it is light and easy to use. It is not full of features, but I do not need them. Or at least, I think I don’t. Also, I confess I never dig much all of its potentialities.

Programming Language

My main programming language is Perl. I occasionally need some C, and some of my Perl modules link to C and C++. So, to fill my need for these three programming languages I choose to install Strawberry Perl. I never ever used Perl with so ease in Windows before Strawberry Perl. It supports more than 90% of CPAN modules, and it includes a C and C++ compilers (gcc based) and a make command. What else one needs?

Compression Tool

Windows knows (it its recent incarnations) about what are zip files. But it ignores all about rar, gzip, bzip2 or tar files. Most Perl modules come in tgz format, so I need a tool to extract them. Most people tend to use WinRar or 7zip. I am not sure why, but I prefer IzArc. It is lightweight, supports most compression algorithms, and integrate pretty well with explorer.

PDF Visualizer

If up to now I defended the use of lightweight applications, now I’m going to the other side, and my choice to read PDF documents is Adobe Reader. There are other free and more lightweight applications, like FoxIt Reader, but I had so many trouble with PDFs and PDFs compatibility that I prefer to have the application from the PDF creators. I know that doesn’t mean much, but at least it can work as an excuse.

What I miss…

There are some tools that I miss. First, I miss a decent command prompt window. One that let me select text, copy and paste easily, that let me make full screen, that let me change easily the font, and not just some stupid predefined sizes. Together with this, a decent command prompt, or shell, with better completion, better prompt configuration, better history, etc. To install cygwin is not an option. For that, I would use linux.

Also, and as I stated above, now I am using GitHub a lot. Then, I miss a Git client. I tried TortoiseGit but it didn’t work well for me. Probably it was a beta release, and now it is better. I need to test. I used the Git binary, that includes a Git shell, and mostly works. But it do not integrate well with the operating system.

DevC++ and their lack of discernment

If you know me, you know that I program mainly C and Perl, that my preferred editor is Emacs, and that I use mostly Mac OS X for that task.

But, I teach programming, and sometimes I teach programming to students that never heard of Linux or, worse, that never used the command line of Windows. Given this, I tend to search for simple solutions to help them do not deal with the command line so I can use more time for the task of learning how to program.

With that in mind, I decided to suggest a C IDE for windows. The main IDE (I think) is Visual Studio. Although it is paid, there are protocols between Microsoft and the universities to use their software for free for academic purposes. But the Visual Studio installation disc is some hundreds of megabytes. That is not very portable. Also, the application is quite heavy when running. I decided to search for an alternative, and found DevC++. It is just 10 megabytes of download, uses GCC (or MinGW), and works quite well.

It just have one big and stupid problem. Although DevC++ is being developed for more than a decade, their developers did not implement, yet, a pause mechanism for when you are running a console program. In their faq they suggest to add a ‘system(“PAUSE”)’ in the end of the code. That is just stupid! Why to have to add such a line in your code, just during development, and then remove it when you want to ship the application? It would be quite more interesting to have an option in the IDE to force that window not to close. Some other similar applications, like the Lazarus IDE for Pascal, include that option already.

Now I need to decide if I should go back to Visual Studio, if I should explain why DevC++ doesn’t work properly, and explain how to add a pause at the end of the application, of if I should go back and teach students how to test their applications right from the command line.