my development environment

roippi

Developer
Since there's a few threads around with people sharing login/logout scripts, sharing aliases, etc. I thought I'd share all the stuff in my development environment. In case any budding devs out there want to poke at the source code. :)

Environment: win 7. I'd prefer linux, honestly, but I've got too many other things on my dev laptop that require windows.

SVN: tortoise SVN. Mandatory.

random text editor: gVIM. Optional, but it's very nice to have a proper text editor for one-off tasks. I recommend taking an afternoon and teaching yourself the basics of either gVIM or emacs if you don't know either.

IDE: eclipse. I do like netbeans but I've moved away from it for a few reasons I won't mention here. There are a few modifications to eclipse that will make your life SO MUCH easier:

modify your .project file to use a JDT builder. This is an "incremental" type builder, and builds on the fly as you code. The result is that you can make a change, hit the little "play" button to run the project, and it runs instantly! Waaay better than fully compiling in ant every time. You could spend an hour trying to figure out how to configure this in the GUI, google around for another hour, and finally figure out that you need to hand-edit your .project file. Or you could just use mine: View attachment .project.txt (remove the .txt extension, forums won't accept it otherwise). NOTE: a JDT builder is now included in the default .project file. Not necessary!

Set up your mafia-specific formatter standards. Instead of teling you all the settings, I'll just link you to a file that imports all of my settings. View attachment mafia_coding_conventions.xml.txt Again, remove the .txt extension. You can apply this file by going to window>preferences>Java>Code Style>Formatter and selecting import. Why is this nice? After you code something, select what you've done and hit ctrl-shift-F. VOILA, everything is magically perfectly compliant with mafia coding standards. Note: mafia includes a format.xml in /util/ that does mostly the same thing. You can use that instead, mine is just tweaked a bit.

Change compiler compliance to 1.4. window>preferences>Java>Compiler. This will remove all of the warnings you'd get about generics and type safety since (currently) Java is 1.4 compliant. When we move to 1.5 compliance, obviously change that setting.

Tweak warnings and errors
. window>preferences>Java>Compiler>errors/warnings. I'll leave this up to you. If you don't know what most of this stuff means, leave it alone until you do.

That's mostly it! I also have subclipse installed. This is mostly unnecessary since you should be using tortoisesvn, but it does provide some fancy SVN integration with Eclipse. Most importantly, it will provide a quick colored diff in the sidebar of what you've changed/added/deleted from BASE- I like that a lot. If someone needs help getting that up and running I'd provide help in a separate post. It's clunky to get set up but really pretty cool once you do.
 
Last edited:

roippi

Developer
I may add a step-by-step guide for how to get eclipse up and running if that would help people. There's some not-entirely-intuitive steps you have to take that I completely glossed over in the above post.
 

slyz

Developer
That doesn't sound anything like my development environment (notepad++ and an explorer-like program that allows me to search for files that contain specific text).

Then again, I didn't single-handedly revamp Daily Deeds, Quest Tracking, etc... :)
 

roippi

Developer
Haha. Veracity also has mentioned that she basically just uses a pair of emacs windows when coding. I don't know how you guys live like that.. ;-)

I think that using an IDE is way friendlier to nascent devlings. Mafia's a big project and the more hand-holding you can get when starting out, the better.
 

Veracity

Developer
Staff member
Ha. Yes, Emacs and a shell, with svn and ant and execution of KoLmafia via the command line. No IDE. No graphical svn client - although I am considering getting one, since my real work also uses svn and I have found it tricky to retrieve old versions of code from deleted directories, on occasion. I am considering "Versions". I DO have Eclipse installed and a KoLmafia workspace, but I find that I am (currently) much less efficient developing with it, primarily because the editor is not Emacs. It is nice to be able to put in breakpoints and stop threads and see what they are doing, and such.
 

slyz

Developer
I recommend taking an afternoon and teaching yourself the basics of either gVIM or emacs if you don't know either.
I took some time to launch VIM today, and followed a small tutorial. I looks really powerful once you get the hang of it, but that might take some time. Tomorrow I'll give emacs a try :)
 

holatuwol

Developer
Environment: Back then, Windows XP SP2 and Mac OS X 10.4 depending on where I was when I wanted to fix a bug (at school vs. at home). I now use my Mac mainly for managing music and watching anime so I don't code on it anymore. So for development, I switched to Xubuntu 11.04 (Ubuntu with XFCE) because I got tired of Windows Update running all the time on Windows 7.

SVN: When I was on Windows, I started out with TortoiseSVN, switched to command-line SVN, and eventually used SmartSVN from Syntevo which has nice filtering capabilities. Since it's Java, it will run on other operating systems also, and I liked it on OS X 10.4. Nowadays, I use git-gui (the stock Git GUI client) on top of SVN for git-grep and for being able to stage my commits (SmartSVN workspaces were nice, but not quite as nice as Git local commits), so I don't use an SVN client anymore.

IDE: Back in the day, I coded in TextPad. Sometimes I'd bring out Eclipse if I got tired of manually pasting in my imports or if I was on my Mac, since I'm not too comfortable in vi/emacs and XCode was weird. As for the version of Eclipse, I usually install Eclipse Classic and then install C++ tools because they provide some cool command-line functionality that I write into shell aliases / batch scripts.

Nowadays, I use SublimeText, which is the only editor on Linux I liked (it's fairly priced for a text editor, too). I switch to Eclipse whenever I need to drill down, if I need to step through code, or if I need to move methods around because it does provide some handy "replace everywhere" refactoring tools. If I'm debugging something other than the UI, JRebel is nice to avoid having to restart (I got a two-year license before they doubled prices, ouch).

Configuration: I had Eclipse auto refresh a file on open since I tend to rollback my work a lot. I also redid SublimeText's and Eclipse's "resource/type open" key bindings to match default IntelliJ key bindings, because I'm so used to them. I also set up "remote" debugging of KoLmafia which connects to localhost:8000 (which the "exec" target in the build.xml opens up). Other than that, I shut down almost all the warnings and import the cleanup.xml, format.xml, KoLmafia.importorder from the util folder in the KoLmafia source.
 
Last edited:

fronobulax

Developer
Staff member
Netbeans on Windows 7. TortoiseSVN and gVIM. Occasional use of Cygwin.

In general I tend to use the same tools at home that I am forced to use at work. The last time that I had the opportunity to switch to Eclipse I never could get things working to my satisfaction so I didn't switch. roippi's instructions suggest that I might have more success the next time I try.
 
Top