Coding Tools

Programmers discuss here anything related to FreeOrion programming. Primarily for the developers to discuss.

Moderator: Committer

Message
Author
jackbunny
Krill Swarm
Posts: 11
Joined: Thu Jul 03, 2008 8:35 pm

Coding Tools

#1 Post by jackbunny » Sat Aug 02, 2008 8:02 pm

Alright now that I'm actually digging into the meat of the code (just took me three weeks :P), I'm looking to improve my Linux coding environment. I've piddled with Eclipse, but I'm not sure how well that would work with scons as it has a built in makefile system. I remember that tzlaine said he used XEmacs and I've had other developers suggest using Vim. I've also heard that this argument is as old as Linux itself and aruging one over another is like saying saying "My text editor can beat up your text editor." I've not had experience with either. My main question, I guess, is there any sort of step through debugging to be had anywhere? Or do I need to "code like a man" and step up my mental step through skills ;). Any advice welcome. Thanks.

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 12268
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: Coding Tools

#2 Post by Geoff the Medio » Sat Aug 02, 2008 8:51 pm

If you want a full-featured IDE, there's always Visual Studio on Windows...

User avatar
loonycyborg
Compilation Expert
Posts: 219
Joined: Thu Jul 06, 2006 10:30 pm
Location: Russia/Moscow

Re: Coding Tools

#3 Post by loonycyborg » Sat Aug 02, 2008 9:46 pm

Geoff the Medio wrote:If you want a full-featured IDE, there's always Visual Studio on Windows...
Unfortunately, Visual Studio doesn't work under wine.
jackbunny wrote: My main question, I guess, is there any sort of step through debugging to be had anywhere? Or do I need to "code like a man" and step up my mental step through skills ;)
GDB and ddd, GUI frontend for it.
In Soviet Russia, forum posts YOU!!

Maz
Space Floater
Posts: 22
Joined: Tue Jan 29, 2008 6:25 am

Re: Coding Tools

#4 Post by Maz » Sun Aug 03, 2008 11:12 am

Eclipse can also co-operate with gdb. And you can always do compiling using terminal.

User avatar
tzlaine
Programming Lead Emeritus
Posts: 1092
Joined: Thu Jun 26, 2003 1:33 pm

Re: Coding Tools

#5 Post by tzlaine » Sun Aug 03, 2008 7:46 pm

One advantage to using emacs over vi (that has nothing to do with personal taste) is that the keybindings for emacs show up in other places, meaning you only have to memorize one set. For instance, most X terminal programs recognize the emacs keybindings, but not vi.

jackbunny
Krill Swarm
Posts: 11
Joined: Thu Jul 03, 2008 8:35 pm

Re: Coding Tools

#6 Post by jackbunny » Mon Aug 04, 2008 3:31 am

Thanks to everyone for the advice. I know Visual Studio and I'm trying to steer away from it. I've considered using eclipse for editing and compiling from command line also. I'll likely wind up doing a combination of eclipse and emacs (which I'm trying to learn). I've found some good guides for using emacs as a text editor. My challenge now is to set it up to make it more c++ development friendly, which I've not been able to do yet. By friendly I mean syntax hi-lighting and the like. Thanks again!

Maz
Space Floater
Posts: 22
Joined: Tue Jan 29, 2008 6:25 am

Re: Coding Tools

#7 Post by Maz » Mon Aug 04, 2008 4:39 am

I have never really used any other text editor on linux but vi(m). Okay, I once tried using emacs, and I found out it could've been good operating system - if someone wrote a decent text editor for it. :p

Well, seriously. I just thought that I'll remind you vi(m) allows you to map all keys as you wish. But the real power of vim is, that you do not need any other input devices but keyboard with standard numbers, letters and esc. And that's what it intended for. It is done back when there were machines without mouses. Nowadays it is extremely usefull when you need to do your work over ssh.

But as you stated, vim Vs emacs is anxient war, and there will not be solution to this question. It is really only up to you :)

User avatar
igrok
Space Krill
Posts: 7
Joined: Tue Jul 22, 2008 4:43 am
Location: Massachusetts, USA

Re: Coding Tools

#8 Post by igrok » Mon Aug 04, 2008 6:12 am

Yes, don't be fooled by vi(m). For a long time I thought it was a simple, but confusing, text editor. Then I started using it, but only learned a few of the commands.

Once you have learned a good portion of the commands available, you can work very efficiently with no need to move your hands between keyboard and mouse. It's seems very counter-intuitive to have a text entry mode and a command mode, but it ends up making you more efficient!

I also hear there's a plugin for eclipse that mimics vi. I imagine there's another that mimics emacs.

gustavsen
Space Krill
Posts: 3
Joined: Thu Nov 16, 2006 1:26 pm

Re: Coding Tools

#9 Post by gustavsen » Mon Oct 20, 2008 4:51 pm

Eclipse is huge and nasty... (IMO) I suggest try Netbeans too...

btw: when you learn just 20/30 vi(m) commands your will love it...

User avatar
OndrejR
Space Dragon
Posts: 339
Joined: Thu Oct 02, 2008 11:00 pm
Location: Slovakia

Re: Coding Tools

#10 Post by OndrejR » Tue Oct 21, 2008 8:30 am

jackbunny wrote:Alright now that I'm actually digging into the meat of the code (just took me three weeks :P), I'm looking to improve my Linux coding environment. I've piddled with Eclipse, but I'm not sure how well that would work with scons as it has a built in makefile system. My main question, I guess, is there any sort of step through debugging to be had anywhere? Or do I need to "code like a man" and step up my mental step through skills ;)
Eclipse has scons plugin:
http://nic-nac-project.de/~lothar/eclip ... lugin.html

To setup project, you also need subversion plugin. The best svn plugin for Eclipse is subclipse:
http://subclipse.tigris.org/

Eclipse has one huge advantage - it is open source multiplatform IDE and comparable with Visual Studio.

User avatar
OndrejR
Space Dragon
Posts: 339
Joined: Thu Oct 02, 2008 11:00 pm
Location: Slovakia

Re: Coding Tools

#11 Post by OndrejR » Tue Nov 11, 2008 11:56 pm

I wrote guide how to comfortably develop FreeOrion under Linux with Eclipse IDE. For more info see wiki under Compile->Linux or directly from here.

stride
Space Floater
Posts: 31
Joined: Sun Sep 28, 2008 3:05 pm
Location: Horten, Norway

Re: Coding Tools

#12 Post by stride » Thu Jan 22, 2009 10:49 pm

My experience? Well... if you do programming for a living, or just do alot of it, getting used to using console tools and keyboard only is a big plus. There is a reason the most common unix commands being short and quick to type. OK... I'll admit they look somewhat cryptic in the beginning.

Programmers tend to get a little hooked every once in a while, and things cannot go fast enough. That's when you notice hunting for tiny buttons and things to click on really slows you down.

If you cant get away from Windows, spend some time learning the keybord shortcuts.

:)

User avatar
OndrejR
Space Dragon
Posts: 339
Joined: Thu Oct 02, 2008 11:00 pm
Location: Slovakia

Re: Coding Tools

#13 Post by OndrejR » Fri Jan 23, 2009 12:02 am

stride wrote:If you do programming for a living, or just do alot of it, getting used to using console tools and keyboard only is a big plus. There is a reason the most common unix commands being short and quick to type. OK... I'll admit they look somewhat cryptic in the beginning.
Getting used to console tools is one thing. But autocomplete, refactoring, code formating, ..., is another. I want IDE which helps me with everything I can think about. I want to think about algorithm and not howto compile something. With Eclipse I save file and Eclipse automatically compiles FreeOrion(and in Java imports, code formatting don't bother me). Keep It Simple Stupid.
stride wrote:Programmers tend to get a little hooked every once in a while, and things cannot go fast enough. That's when you notice hunting for tiny buttons and things to click on really slows you down.
For example I design uml model and then click and I get code which when I later somehow change I get this changes back to uml model. With two clicks.
stride wrote:If you cant get away from Windows, spend some time learning the keybord shortcuts.
every manager wrote:You don't need to know shortcuts and commands. You need to know how something works and where to find it or to know someone who knows. And when you want something to do, you do it the quickest way or the cheapest way or with decided quality. If my time is too precious to me and you want high quality code and want it quick, IDE helps. I appreciate everything which saves my time. Operating system and programming language is not important.

User avatar
strooka
Space Kraken
Posts: 165
Joined: Tue Jun 23, 2009 5:34 pm
Location: Bielefeld, Germany

Re: Coding Tools

#14 Post by strooka » Fri Jan 29, 2010 11:14 pm

I've tried out Eclipse but i didnt manage to create the project Files As i started. So i Went to KDevelop3. It doesnt recompile the whole project when you Change headers, but it doesn't compile parallel.

I like it to have all Things under control with cmake, i don't Know how it is Managed in Eclipse, but there Seem to Be almost no differences when editing.

User avatar
OndrejR
Space Dragon
Posts: 339
Joined: Thu Oct 02, 2008 11:00 pm
Location: Slovakia

Re: Coding Tools

#15 Post by OndrejR » Sun Jan 31, 2010 4:09 pm

Compilation with cmake is on wiki - Compile with eclipse. After all is set up, you click on external tool and select created link.

Post Reply