LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


View Poll Results: Do you use the GUI or a VT to write source code?
I use a GUI. 18 58.06%
I use a VT. 13 41.94%
Voters: 31. You may not vote on this poll

Reply
  Search this Thread
Old 08-12-2011, 08:23 AM   #1
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442

Rep: Reputation: 76
Writing source code: VT or GUI?


Hi:

I'd like to know what you, programmers, use the most when writing source code: the virtual consoles (VTs) or the GUI. For example, if you use Vim, you can either run it in a VT or in the GUI. Or may be you prefer using an IDE, which would mean you are in the GUI.
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 08-12-2011, 08:44 AM   #2
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
As in most questions, the answer is 'it depends'. If the file is on a local disk, I will usually use a GUI editor, such as nedit. But if it is just a small file on which I want to make a quick change, I will use vi. If the file is on a remote host, and if I have a fast network connection, I will often use a GUI editor, if there is one. If the network is slower, I will usually use vi. I almost never use an IDE, although I've tried to convince myself that Eclipse can be worthwhile.
Your poll doesn't have a choice of 'Both'.
--- rod.

Last edited by theNbomr; 08-12-2011 at 08:45 AM.
 
Old 08-12-2011, 08:49 AM   #3
sycamorex
LQ Veteran
 
Registered: Nov 2005
Location: London
Distribution: Slackware64-current
Posts: 5,836
Blog Entries: 1

Rep: Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251
I use terminal (sakura) on i3 (GUI). Mostly I use Emacs or Vim.
 
Old 08-12-2011, 08:49 AM   #4
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
I almost every time use vim on CLI, although I also have GVim installed. No need for an IDE here. I program really seldom, and if so I only write small scripts in zsh or Python.
 
Old 08-12-2011, 09:51 AM   #5
Proud
Senior Member
 
Registered: Dec 2002
Location: England
Distribution: Used to use Mandrake/Mandriva
Posts: 2,794

Rep: Reputation: 116Reputation: 116
Personally, language-specific syntax colouring/highlighting is really nice, and second most desired is definition collapsing. Beyond that I like to keep things to the basic text editor + webpage documentation open, rather than depend on autocompletion, refactoring, immediate compilation error detection etc. Not that those don't probably save a surprising amount of time for a larger piece of work. I'm plenty happy using the command line, but won't abandon GUI stuff if I don't have to and it'll obviously make things easier. So if I have X/Windows in front (and no struggle to run Eclipse) yeah I might favour an IDE, or at least KWrite/Notepad++, and yet still config and build things rather manually.

Last edited by Proud; 08-12-2011 at 09:54 AM.
 
Old 08-12-2011, 10:11 AM   #6
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442

Original Poster
Rep: Reputation: 76
I personally prefer using Vim, or for that matter any other text editor, in the text console (VT). And the reason is this: I began programming when GUIs did not exist. And maybe because of this that the chars generated by the ROM character generator seem to me more legible than those "drawn" by the graphics card. Among other reasons, there are these:

1) The GUI uses equispacing (tries to equalize the space between chars). But this certainly works very bad. Not at all like the work of a printer.

2) With the not confessed purpose of making the GUI look like a book, it uses black foreground on white background. This is harmful to the eye and, in the long run, causes fatigue. It's like steadily watching a 40w light bulb at a distance of 0.50m. When you see a movie, why do you think the credits are white on black? True, you can invert the colors. But then the legibility decreases.

Of course, to sense the difference between the two scenarios, you should be over 40.
 
Old 08-12-2011, 11:18 AM   #7
Proud
Senior Member
 
Registered: Dec 2002
Location: England
Distribution: Used to use Mandrake/Mandriva
Posts: 2,794

Rep: Reputation: 116Reputation: 116
Most editors I know of offer a suite of monospaced fonts and also themes/colour palettes/schemes to cater to both of your concerns. E.g. I think Zenburn is popular beyond VIM.
http://slinky.imukuppi.org/zenburn/zenburn.png
 
Old 08-12-2011, 11:28 AM   #8
SigTerm
Member
 
Registered: Dec 2009
Distribution: Slackware 12.2
Posts: 379

Rep: Reputation: 234Reputation: 234Reputation: 234
Quote:
Originally Posted by stf92 View Post
Hi:

I'd like to know what you, programmers, use the most when writing source code: the virtual consoles (VTs) or the GUI. For example, if you use Vim, you can either run it in a VT or in the GUI. Or may be you prefer using an IDE, which would mean you are in the GUI.
I use GUI text editors, because VT does not support proportional/variable-width fonts, and proportional/variable-width font make (C++) code more readable. Regardless, you should be able to program anywhere using whatever editor is available, and on unix-like platform it makes sense to know VI. Relying on single editor is not a good idea.
 
Old 08-12-2011, 12:19 PM   #9
Proud
Senior Member
 
Registered: Dec 2002
Location: England
Distribution: Used to use Mandrake/Mandriva
Posts: 2,794

Rep: Reputation: 116Reputation: 116
I seriously can't comprehend not using monospaced font. You say for readability, but you're not reading prose, you're interested in spotting typos, missing characters, differences between similar(even copy-pasted) lines.
A different font for comments/long strings is about the only place I can see this being reasonable.
 
2 members found this post helpful.
Old 08-12-2011, 12:52 PM   #10
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442

Original Poster
Rep: Reputation: 76
I know this is not very constructive, but I'm a 100% with Proud.
 
Old 08-12-2011, 12:59 PM   #11
SigTerm
Member
 
Registered: Dec 2009
Distribution: Slackware 12.2
Posts: 379

Rep: Reputation: 234Reputation: 234Reputation: 234
Quote:
Originally Posted by Proud View Post
I seriously can't comprehend not using monospaced font.
That's not my problem. Are you a C++ programmer?

Quote:
Originally Posted by Proud View Post
You say for readability, but you're not reading prose,
There's a concept of literate programming, and recommendations to use long names for variables, classes and functions that would explain their purpose. Plus it was recommended by Stroustroup at one point.

Quote:
Originally Posted by Proud View Post
you're interested in spotting typos, missing characters, differences between similar(even copy-pasted) lines.
I do not see how monospace font would make it easier. One letter difference will make entire word change its width (instantly noticeable), which is not the case with monospace font where you'll have to read entire line to find the problematic character. Punctuation is also instantly noticeable, and it allows longer lines. I don't need to read every letter to recognize identifier.

Quote:
Originally Posted by Proud View Post
A different font for comments/long strings is about the only place I can see this being reasonable.
Look, I'm not forcing you to switch to variable-width font at the gunpoint, and if you're trying to change my preferences, that's not going to happen. If YOU don't like it, YOU don't use it. In my opinion, monospace font needlessly wastes screen space and is only useful for hexdumps/big horizontal tables (that can be frequently aligned with tabs even with variable-width font), it also makes code too "sparse" to read quickly. With variable-width font code provides a lot of visual cues (".:;()[]-<>*&^~=') that split wall of text into identifiers ("words"). Monospace makes everything look like a chessboard, which is confusing. Compare code with a book. Variable-width is more "book-like" so if you read a lot, that would make code easier to read (IMO).
Attached Thumbnails
Click image for larger version

Name:	1.png
Views:	41
Size:	32.0 KB
ID:	7781   Click image for larger version

Name:	2.png
Views:	34
Size:	29.0 KB
ID:	7782   Click image for larger version

Name:	3.png
Views:	38
Size:	38.0 KB
ID:	7783  

Last edited by SigTerm; 08-12-2011 at 01:06 PM.
 
0 members found this post helpful.
Old 08-12-2011, 01:07 PM   #12
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
@SigTerm: I wonder why you are so offended of Proud's opinion.
Quote:
That's not my problem.
He never said that.
Quote:
Look, I'm not forcing you to switch to variable-width font at the gunpoint
He never said that.
Quote:
if you're trying to change my preferences
He also never said that.

Keep calm man, this is a poll, the OP asked for opinions. No one wants to change your type of programming.
 
Old 08-12-2011, 01:14 PM   #13
SigTerm
Member
 
Registered: Dec 2009
Distribution: Slackware 12.2
Posts: 379

Rep: Reputation: 234Reputation: 234Reputation: 234
Quote:
Originally Posted by TobiSGD View Post
@SigTerm: I wonder why you are so offended of Proud's opinion.
I did not intend to sound offended (miscommunication?). I explained my position, that should be sufficient.

Last edited by SigTerm; 08-12-2011 at 01:34 PM.
 
Old 08-12-2011, 01:25 PM   #14
konsolebox
Senior Member
 
Registered: Oct 2005
Distribution: Gentoo, Slackware, LFS
Posts: 2,248
Blog Entries: 8

Rep: Reputation: 235Reputation: 235Reputation: 235
I use Vim on terminals or consoles. I also use nano sometimes when I feel like it; mostly when I need to have a very quick edit of a configuration file. On GUIs I have Notepad++ as my favorite (runs also on linux with wine). I've been using the editor way back since 2005 or 2004 (versions 2.x). I mostly use KWrite when I want to open a file for quick viewing or editing (got really used typing kwrite *). Before I had Notepad++ stable with wine, I always used KWrite for GUI. Netbeans, on the other hand seems delicious to code with and Bluefish is a good alternative when editing webpages.

I prefer monospaced fonts as I like strict coding. I love keeping my codes clean and in uniform style (polished that is). Even having a slight extra trailing space (mostly left out by auto-indents) and wrong indents (like having spaces instead of tabs) makes it feel so unfinished to me. For scripts and codes that are meant to run on terminals, I don't mind working them with Vim (I do it on times when I feel like not wanting to separate my hand from the keyboard; using alt-tab is slow when you have lots of windows that are already open) but I always finish them with Notepad++.

Zenburn is my favorite theme also but I sometimes use the default theme as well.

I don't use /usr/bin/write so I changed it to a script that accepts arguments and runs Notepad++ instead. That makes it easier for me to open files.
 
Old 08-12-2011, 01:32 PM   #15
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
I frequently use 'block copy's, where the selection is by row & column. I cannot imagine how this would work if the character cells were different, and text did not always align on even vertical columns. Same or similar objection to alignment of outer levels of indented text that visually accent blocks of code.
No, thanks. I have no use for proportional fonts in a programmer's editor.

--- rod.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Writing GUI front-ends: what language + what GUI library? pear Programming 7 07-07-2008 08:17 AM
LXer: Code Craft: The Practice of Writing Excellent Code LXer Syndicated Linux News 0 01-09-2007 04:03 AM
Is it possible to use a GUI to compile new software (Source code)? narayanaras Linux - Newbie 10 12-18-2006 09:02 PM
LXer: Democratization, Writing and Writing Code LXer Syndicated Linux News 0 11-22-2006 05:03 AM
C Source Code browsers with GUI support RohanShrivastav Linux - Software 1 02-17-2005 09:30 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 03:52 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration