Coding tools


Questions, Explanations, Howtos

Ziggurat Zagger

Posts: 3163

Joined: Friday, 6th January 2012, 18:45

Post Thursday, 19th April 2012, 20:25

Coding tools

So I've tried my hand at coding, and am having fun with it. So far, however, I've just been using Notepad++ to do my editing. I was wondering what type of tools the devs use and if they have any recommendations to make modifying code and tracking changes easier.

For reference, I'm on Windows XP, and am unlikely to install Linux in the foreseeable future.

Dungeon Master

Posts: 1613

Joined: Thursday, 16th December 2010, 21:54

Post Thursday, 19th April 2012, 20:49

Re: Coding tools

I'm on Windows 7 and can't be bothered to dual-boot Linux either, so I just use Notepad++ for editing and msysGit for Git and frequent grepping.Those two work fine for me, although I tend to just make fairly simple changes and don't have a ton to keep track of.
Last edited by Kate on Thursday, 19th April 2012, 21:01, edited 2 times in total.

Ziggurat Zagger

Posts: 3163

Joined: Friday, 6th January 2012, 18:45

Post Thursday, 19th April 2012, 21:00

Re: Coding tools

I played around with grep until I figured out the Find in Files feature of N++. I love using that, though it can take quite a while to search through all the files on my puny laptop.

Feeling my way through Git has been a bit challenging, though msysGit makes it about as easy as it could. Is there a way to "revert to master" if I want to get rid of any changes I've committed locally, or should I be creating a local branch for my own edits?

Dungeon Master

Posts: 1613

Joined: Thursday, 16th December 2010, 21:54

Post Thursday, 19th April 2012, 21:12

Re: Coding tools

Grepping for things seems pretty fast, but I've not compared it to Find in Files so maybe they'd just end up being similar. Getting the hang of some basic regexes made it a lot easier for me to find things, too.

It's probably good to get into the habit of working in branches, but you can do "git reset --hard origin/HEAD" to revert to master and get rid of your local commits. "gitk" brings up a gui and you can use that to revert to a specific commit, too.

Ziggurat Zagger

Posts: 3163

Joined: Friday, 6th January 2012, 18:45

Post Thursday, 19th April 2012, 23:32

Re: Coding tools

While it can be slow, it provides a list, organized by file name and line number, of all the hits. You can double-click on a hit and it will open that file and jump to that line. It supports regular expressions too, though I haven't used them in a long time so I would need to brush up.

Anyway, thanks for the feedback!
User avatar

Crypt Cleanser

Posts: 645

Joined: Wednesday, 14th September 2011, 09:36

Location: <---

Post Friday, 20th April 2012, 05:00

Re: Coding tools

MarvinPA wrote:"gitk" brings up a gui and you can use that to revert to a specific commit, too.


While giggle is a great tool, I prefer Qgit because it support Qt's theme.
User avatar

Dungeon Master

Posts: 4031

Joined: Thursday, 16th December 2010, 20:37

Location: France

Post Friday, 20th April 2012, 12:05

Re: Coding tools

ctags is quite popular too, and there is support for notepad++.
Personally, I use eclipse. It takes some time to set up and get used to it, but a visual debugger can be very very helpful sometimes. If your computer is up to it, installing linux in a virtualbox can be quite handy too.
<+Grunt> You dereference an invalid pointer! Ouch! That really hurt! The game dies...

Ziggurat Zagger

Posts: 3163

Joined: Friday, 6th January 2012, 18:45

Post Friday, 20th April 2012, 13:16

Re: Coding tools

Thanks, galehar. I'm browsing the Eclipse site now. Even if it turns out to be a bit too heavyweight for me, integrating ctags with N++ looks super-easy and very helpful.
User avatar

Ziggurat Zagger

Posts: 5832

Joined: Thursday, 10th February 2011, 18:30

Post Friday, 20th April 2012, 13:57

Re: Coding tools

Eclipse is what I use for my dev projects. It's great!
"Be aware that a lot of people on this forum, such as mageykun and XuaXua, have a habit of making things up." - minmay a.k.a. duvessa
Did I make a lame complaint? Check for Bingo!
Totally gracious CSDC Season 2 Division 4 Champeen!
User avatar

Crypt Cleanser

Posts: 645

Joined: Wednesday, 14th September 2011, 09:36

Location: <---

Post Saturday, 21st April 2012, 04:04

Re: Coding tools

galehar wrote: but a visual debugger can be very very helpful sometimes.


May you explain what is a "visual" debugger (or just post a screenshot) please?
User avatar

Dungeon Master

Posts: 4031

Joined: Thursday, 16th December 2010, 20:37

Location: France

Post Saturday, 21st April 2012, 11:54

Re: Coding tools

varsovie wrote:
galehar wrote: but a visual debugger can be very very helpful sometimes.


May you explain what is a "visual" debugger (or just post a screenshot) please?

It's a debugger with a window interface. Functionally, it's the same as gdb, but being able to set breakpoints and watchpoints with a mouse is easier. You automatically see all the local variable and can easily view expressions such as you or env. Navigate through complex structures with the mouse is awesome. Unfortunately, it doesn't work well with things like vectors. There's probably a way to do it, but I haven't looked into it yet.
<+Grunt> You dereference an invalid pointer! Ouch! That really hurt! The game dies...

Ziggurat Zagger

Posts: 3163

Joined: Friday, 6th January 2012, 18:45

Post Saturday, 21st April 2012, 23:37

Re: Coding tools

So yeah, eclipse looks very powerful, but I'm having trouble setting up a project from my local git repository so that it can use the existing makefile for compiles. I could just use it for editing, and handle all the builds from msysgit, but I was hoping to set it all up in one tool.

Protip: create an exception in your virus scanner for the build tools directory. I don't know why it took me this long to remember to do that. Builds are going noticeably faster.
User avatar

Crypt Cleanser

Posts: 645

Joined: Wednesday, 14th September 2011, 09:36

Location: <---

Post Sunday, 22nd April 2012, 00:39

Re: Coding tools

BlackSheep wrote:Protip: create an exception in your virus scanner for the build tools directory. I don't know why it took me this long to remember to do that. Builds are going noticeably faster.


Protip: Don't use dynamic virus scan.

Thank gakehar, it's a feature that also exist in other IDE that I use (QTcreator, Kdeveleop, code::block).
It's really more comfortable that keyboard only.
But I tend to prefer using KATE (text editor) plus Kdgb (debugger) than an IDE.
User avatar

Dungeon Master

Posts: 4031

Joined: Thursday, 16th December 2010, 20:37

Location: France

Post Sunday, 22nd April 2012, 08:36

Re: Coding tools

BlackSheep wrote:So yeah, eclipse looks very powerful, but I'm having trouble setting up a project from my local git repository so that it can use the existing makefile for compiles.

I haven't been able to do that with msysgit. Under Linux, I can make it use the Makefile, but under windows it's a mess.
<+Grunt> You dereference an invalid pointer! Ouch! That really hurt! The game dies...

For this message the author galehar has received thanks:
BlackSheep
User avatar

Mines Malingerer

Posts: 38

Joined: Friday, 13th April 2012, 05:35

Location: Palm Bay, Florida

Post Wednesday, 27th June 2012, 19:30

Re: Coding tools

galehar wrote:Personally, I use eclipse. It takes some time to set up and get used to it, but a visual debugger can be very very helpful sometimes. If your computer is up to it, installing linux in a virtualbox can be quite handy too.


Could use your insight on Eclipse. Seems to be straight forward, but I have a small issue with it. How do you guide it to the gcc, g++ executable? When I Run the source is gives me a "Path for project must have only one segment" error pointing to the fact that it can't find the gcc located at C:\msysgit\mingw\bin. It doesn't surprise me as I haven't told it where to find it, but it doesn't seem to be as simple as building a PATH to it. How did you go about it?

I tried using the HELP, but got "There is no help, die like a man!" error. j/k

Regards,
Thurman

--GNU is NU to me. I've always been a Visual Studio programmer.
One out of fouw people suffews fwom Ewmuh Fudd Syndwome. Guess whaaat?
User avatar

Dungeon Master

Posts: 4031

Joined: Thursday, 16th December 2010, 20:37

Location: France

Post Friday, 29th June 2012, 11:06

Re: Coding tools

Thurman wrote:How do you guide it to the gcc, g++ executable?

You don't. It needs to know the location of includes, but it's usually auto-detected fine. I have never been able to compile the game using eclipse under windows. I use it only to edit the source, then I run make from a terminal.
<+Grunt> You dereference an invalid pointer! Ouch! That really hurt! The game dies...
User avatar

Mines Malingerer

Posts: 38

Joined: Friday, 13th April 2012, 05:35

Location: Palm Bay, Florida

Post Saturday, 30th June 2012, 00:55

Re: Coding tools

galehar wrote:You don't. It needs to know the location of includes, but it's usually auto-detected fine. I have never been able to compile the game using eclipse under windows. I use it only to edit the source, then I run make from a terminal.


Hrm. Kinda makes it difficult to use it as a debugger then. If not Eclipse, then what's good for stepping through the code?
One out of fouw people suffews fwom Ewmuh Fudd Syndwome. Guess whaaat?
User avatar

Dungeon Master

Posts: 4031

Joined: Thursday, 16th December 2010, 20:37

Location: France

Post Saturday, 30th June 2012, 07:27

Re: Coding tools

You don't need to compile with eclipse to use the debugger. Just compile and run from a terminal, then attach eclipse' debugger to the process.
<+Grunt> You dereference an invalid pointer! Ouch! That really hurt! The game dies...

Return to Coding

Who is online

Users browsing this forum: No registered users and 1 guest

cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.