Coder's Toolbox
Goto page 1, 2  Next
 
Post new topic   Reply to topic    mudlab.org Forum Index -> Coding
View previous topic :: View next topic  
Author Message
Yui Unifex
Site Admin


Joined: 11 May 2005
Posts: 47
Location: Florida

PostPosted: Sat Jun 04, 2005 11:23 pm    Post subject: Coder's Toolbox Reply with quote

Most experienced coders I meet have a long list of tools they use to improve their efficiency. These tools range from databases to source control management systems to text editors. What tools help you sling code?

Most of my storage is done with PostgreSQL. Subversion allows Eiz to simultaneously merge with and make fun of my code. I also use TortoiseSVN to handle the client side of my Subversion repository. Scripting is handled by Python for .NET, the integration of which is fantastically simple to use. XML-RPC.Net allows clients to communicate with the server in a straightforward fashion. Unit tests have made me an even lazier coder than I was before, because I can now make far-reaching changes without (much) fear of introducing obscure bugs. To this end, NUnit and TestDriven.NET are invaluable. While we're on the subject of unit tests, it's also useful to see what code they do and don't cover. NCover helps there.

And all of these tools are free to use.
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address
Author Message
eiz



Joined: 11 May 2005
Posts: 152
Location: Florida

PostPosted: Sat Jun 04, 2005 11:35 pm    Post subject: Reply with quote

I use Steel Bank Common Lisp, Objective Caml and the Glasgow Haskell Compiler to prototype code, which I then horribly mangle and translate to C#. I use jEdit for most of my text editing needs, with several useful plugins, in particular Templates, Console, and XML.

For building C and C++ programs I typically avoid the hassle of make and use Jam. Boost is of course indispensible. I should use Splint on my C programs, but I don't. For embedded scripting in C/C++, I am a big fan of Lua.

For my parsing needs, I use ANTLR, which supports Java, C#, and C++.

For my work on Mozilla apps, I use the Venkman JavaScript Debugger and Edit CSS. Another neat trick I use is (and this only works with the latest alphas) putting * :hover { outline: 1px solid red; } in my user CSS.

The other thing I really use when coding is not software, but a second monitor. Being able to view documentation and code at the same time is extremely helpful.

For my private source control repositories, I use darcs, although many of the older ones are still in CVS.

--

P.S. I've mentioned before that I don't like Haskell. Those days are over. There were about four different things that won me over: Scrap your boilerplate, Template Haskell, Parsec, and Software Transactional Memory.
Back to top
View user's profile Send private message Visit poster's website
Author Message
Kyuss



Joined: 13 May 2005
Posts: 37
Location: Southern Hellinois

PostPosted: Sun Jun 05, 2005 1:19 am    Post subject: Reply with quote

Arrow Fshell+Pico+gdb = "all.a.diku.coder.needs..."

This is a lie of course, but its all Ive ever used.

Hell it took me 2 years to discover what gdb was.
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
Author Message
Yui Unifex
Site Admin


Joined: 11 May 2005
Posts: 47
Location: Florida

PostPosted: Sun Jun 05, 2005 1:20 am    Post subject: Reply with quote

Kyuss wrote:
Hell it took me 2 years to discover what gdb was.

Which is precisely why I think sharing this sort of information is important! I can't tell you how many coders I've introduced to software like Subversion, PostgreSQL or NUnit, that they've loved immediately but never knew existed.
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address
Author Message
eiz



Joined: 11 May 2005
Posts: 152
Location: Florida

PostPosted: Sun Jun 05, 2005 1:25 am    Post subject: Reply with quote

Unifex, tell him about your life pre-gdb. And pre-make!

I still don't know how you discovered addr2line before gdb...

And of course, I forgot to mention... Valgrind! After gdb, this is probably the single most valuable tool for debugging a C or C++ program. Related to this is the Boehm-Demers-Weiser garbage collector.
Back to top
View user's profile Send private message Visit poster's website
Author Message
Kyuss



Joined: 13 May 2005
Posts: 37
Location: Southern Hellinois

PostPosted: Sun Jun 05, 2005 1:41 am    Post subject: Reply with quote

I would really really really really really really really really really really love
to use valgrind, how ever, the mud box runs BSD. Hope to have a better
box, running linux, before August. (mud has run for years on a 333mhz
p2 on bsd). box has 256megs ram, mud uses 190-220 megs at any given
time. isnt a whole lot else the box can do. nor does the box have sql on it.

whats addr2line anywho?
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
Author Message
Kjartan



Joined: 13 May 2005
Posts: 110

PostPosted: Sun Jun 05, 2005 3:22 pm    Post subject: Reply with quote

Another worthwhile related thing is to make yourself a really really small mud world for use with valgrind and efence, and just for general testing. I do most of my testing in an 8-room world, so that my compile/run/test/crash cycle time doesn't include a minute of mud bootup, or even 15 seconds, but something under a second.

I use CVS; how does subversion compare? (I don't doubt it's better, but is it enough better to be worth switching?)

Otherwise: vi, make, gdb, efence, valgrind. I think these have all been mentioned earlier in this thread except efence (and, strangely, vi - come on people, doesn't anybody use it anymore? Or just won't admit it?)

Efence puts each memory allocation at the top (or bottom) of a page with an out-of-bounds page just above (below) it so if you step even one byte off the end, it seg faults. This is great for detecting pointer errors. If I were starting a mud today I'd write it in java or C# (i.e., java) and have no pointers, and mmm automatic garbage collection *drool*.
Back to top
View user's profile Send private message Visit poster's website
Author Message
eiz



Joined: 11 May 2005
Posts: 152
Location: Florida

PostPosted: Sun Jun 05, 2005 3:34 pm    Post subject: Reply with quote

I considered mentioning electricfence, but valgrind is just cooler. For non-jedit text editing (i.e. in a shell) I use vim. SLIME/Emacs for Lisp code, too.

Subversion basically tries to be a better CVS. It's still a centralized model with a lot of the limitations that come along with that, but in particular it supports atomic changesets (huge deal), sane handling of directories, proper rename support, non-retarded binary file handling, and various other niceties. You can convert a cvs repository to svn easily, without losing information. See cvs2svn. There's a TortoiseCVS-alike called TortoiseSVN, and a Visual Studio plugin called AnkhSVN.

If I were starting a MUD today and unifex wasn't such a crybaby imperative wimp, I'd code it in Objective Caml. It's fast (competitive with C++, and vastly faster than the likes of Java, even with HotSpot), high level, statically typed, and not nearly as complicated or weird as Haskell.
Back to top
View user's profile Send private message Visit poster's website
Author Message
Teelf



Joined: 12 May 2005
Posts: 21
Location: Seattle, WA

PostPosted: Sun Jun 05, 2005 3:42 pm    Post subject: Reply with quote

SQLite is my backend of choice for MUDs. Its completely embedded in the MUD itself so there is no dependancies or configuration issues for it when installing the MUDbase. It supports most of th e major features of big SQL's including transactions, except for foreign keys.

And I use netbeans now for my java coding. Eclipse seems to have gotten quite slow on linux (at least if you have a large codebase).
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address
Author Message
Traithe



Joined: 13 May 2005
Posts: 50

PostPosted: Sun Jun 05, 2005 10:28 pm    Post subject: Re: Coder's Toolbox Reply with quote

Yui Unifex wrote:
Unit tests have made me an even lazier coder than I was before, because I can now make far-reaching changes without (much) fear of introducing obscure bugs. To this end, NUnit and TestDriven.NET are invaluable. While we're on the subject of unit tests, it's also useful to see what code they do and don't cover. NCover helps there.


Anyone mind pointing an unwashed heathen in the direction of a decent writeup of these "unit tests", or explaining the basics? They sound pretty helpful.

All I've turned up on Google so far seems to be language-specific tools for performing them, but very little on what they do and why they're useful.
Back to top
View user's profile Send private message Visit poster's website
Author Message
Traithe



Joined: 13 May 2005
Posts: 50

PostPosted: Sun Jun 05, 2005 10:29 pm    Post subject: Reply with quote

And incidentally, in a pathetic attempt to contribute something substantively useful to the thread, if any of you are OS X users I can't recommend Xcode highly enough as an IDE.

Starting Etherea was what finally spurred me to try it - before then, I was strictly a pico-on-the-shell kinda guy - and damn, I cringe to think of all the time I could've saved had I been using this back in 2002 when I started SoI.

It's a beautiful, beautiful thing. Laughing

(Especially the distributed build feature - quite useful when your primary system's a slightly underpowered powerbook G4, and you've got an idle G4 desktop to help shoulder the burden.)
Back to top
View user's profile Send private message Visit poster's website
Author Message
eiz



Joined: 11 May 2005
Posts: 152
Location: Florida

PostPosted: Sun Jun 05, 2005 10:40 pm    Post subject: Reply with quote

Traithe wrote:

Anyone mind pointing an unwashed heathen in the direction of a decent writeup of these "unit tests", or explaining the basics? They sound pretty helpful.


Here you go. You might want to take a look at the Boost test library.
Back to top
View user's profile Send private message Visit poster's website
Author Message
Traithe



Joined: 13 May 2005
Posts: 50

PostPosted: Sun Jun 05, 2005 10:44 pm    Post subject: Reply with quote

Thanks. Smile
Back to top
View user's profile Send private message Visit poster's website
Author Message
Tyche



Joined: 13 May 2005
Posts: 176
Location: Ohio, USA

PostPosted: Mon Jun 06, 2005 12:59 am    Post subject: Reply with quote

For source control I use subversion as well.

sloccount is nice utility for code statistics. splint is a nice precompiler syntax checker when using c/c++. gprof is useful for profiling. I've found gcov to be less useful.

I use purify and memproof for debugging and leak detection.

I use ultraedit and textpad a lot. I've used multiedit in the past. They all have similar features, nearly identical in a boring way. No code folding though which I like and one can find in scite, but scite is pretty barebones otherwise.

I develop almost entirely on windows XP however I'm using vmware which is a PC emulator and allows you to run many os's under windows or unices. Also cygwin tools and ash are much more useful than the XP command tools and default shell.

For building I use make and jam, or rake depending on what I'm working with.

For databases I use DB2 and Berkeley DB. I also use sqlite for quick and dirty stuff.

Many languages, but C++ and Ruby are the ones I use most these days. For hobby programming that is.
Back to top
View user's profile Send private message Visit poster's website
Author Message
Terloch



Joined: 06 Jun 2005
Posts: 1

PostPosted: Mon Jun 06, 2005 1:46 am    Post subject: Reply with quote

I use CVS for source control, and have had little problems with it, or need to change...

Eventually I do want to start integrating SQL or some other form of DB ino my code to control some things a lot easier, but I'm lazy, and between my full-time job, which involves travelling, and school, and two little kids, well, I do what I can.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    mudlab.org Forum Index -> Coding All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Powered by phpBB © 2001, 2002 phpBB Group
BBTech Template by © 2003-04 MDesign