Dec 06 2007
What stuff do you use when coding?
Some people have asked me this, so here’s an answer.
Data Types
For my own personal projects in C, I prefer to use Oracle’s primitive data type definitions found in oratypes.h. For consistency and maintainability reasons, when working on commercial code or the internals of another database (Postgres, Ingres, SAP DB, Firebird, SQLite), I use their already-defined types.
For my own personal projects in Java, I prefer to use the built-in Java types and avoid third-party libraries wherever possible.
Portability Libraries
For my own personal projects in C, if I have to write something complex and highly portable, I generally choose the Apache Portable Runtime (APR) library.
Data Access APIs
As far as the C-language goes, if it has to be portable, I’ll choose either ODBC or Embedded SQL. If I have to write something for a specific database, I’ll choose their native API.
Interactive Development Environments
On UNIX/Linux I prefer vim, but am just as happy with vi.
On Windows I prefer gvim and the C/C++ compiler’s make. But, I am familiar with the MSVC++ IDE.
Compilers
On Linux I prefer gcc over Intel. On native UNIX, I’ll use gcc but will opt for the native C compiler if it is available or in a case where high-performance is required.
On Windows, MSVC++ or Intel C++.
Debuggers
On Linux I prefer gdb or the Intel debugger, but will opt for native debuggers on real UNIX platforms. That reminds me, I have to send my hash table-based breakpoint implementation to the gdb community; it’s much faster than the current linked-list implementation when you’ve got thousands of breakpoints.
On Windows, I’m happy with the Microsoft or Intel debugger.
Parser Generators
For C, I’ll use PCCTS or YACC/Bison. For C++ or Java, I prefer ANTLR. I’m not yet completely confident in the C code generated by ANTLR 3, but I hope to soon make that my parser generator of choice for all languages.
Hand-Written Parsers
While I’ve written both types of parsers by hand, I generally prefer to write them as recursive-descent instead of shift-reduce.
Multi-threaded or Multi-process?
For me, it depends on what the program needs to do. But, if the program wouldn’t benefit from any particular architecture, I opt for multi-threading.