Tagged "java"

otool <=> ldd. Conditional ASAN

Figured out that otool -L has the equivalent side-effect as ldd.

-XXaltjvm, dtruss and ASAN

Been a while since I’ve posted anything technical, but in any case it is good to be back!

How to include JNI Symbols in your DLL

Firstly, use the magic pragma __declspec(dllexport). But this will cause compiler header mismatches between the header and the source files, unless you mangle both of them.

Make `javac` silent on warnings

It is typically uncommon for people to encounter warnings of the kind:

Command Line Parsing using JFlex

What started out as a small set of commands for a tool I’m writing is slowing growing unwieldy to have to warrant enough repetitious code to parse the command line manually, and to wade through lines of if/else or switch statements (Don’t you preach to me about the virtues of using the Command design pattern, for it is still unwieldy because it does not handle the parsing of arguments even the hash saves you from having long branching segments of code, which I don’t mind.

Tab Completion for Vim (Updated)

As I’ve said before, I wasn’t really satisfied with the original tab completion script, which didn’t perform all the possible search completion combinations vim is capable of.

Profiling in Java

In any Computer Science lectures that has anything to do with the topic of profiling, the story of how 'awk' got a performance boost by 25% just using gprof never fails to not be mentioned.

Cscope with Vim for finding Java symbols

Cscope, like ctags, allow you to find symbols in your source from multiple files in your project easily.

The Dangers of Auto-boxing in Java

This is one of the those subtle bugs that I have unwittingly coded in because of the inherent laziness that is afforded by Autoboxing, a feature that was available with Java 1.

Vim Remade: Working on Java with all of Netbeans' features

The title sounds like a bold claim, given that the comparison sounds like one between apples and oranges.

Vim Tips for Java #6: Auto-Bracketing Within Vim

One of the things that I’ve learnt that Netbeans is able to do, was the ability to perform auto-bracket completion.

Vim Tips for Java #5: Folding Code Blocks to prevent Visual Blindness

When dealing with large source files, there is a tendency for visual blindness to kick in, where there is just too much code everywhere for you to find things like the start of a method or a particular important segment of code, in a sea of random visual clutter.

Vim Tips for Java #4: Use 'Tab' for Syntax Completion

Note: This tip has been updated, please see Tab Completion for Vim (Updated) instead.

Vim Tips for Java #3: Use Omni-Completion (or Intellisense) for syntax completion

As much as I like vim, Netbeans trumps it when we talk about automatic syntax completion.

Passing variable length arguments to a Java Method

It is not well known fact that Java can actually handle variable length arguments passed to its method calls.

Vim Tips for Java #2: Using exuberant-ctags

ctags is a great tool for programmers. It creates an index to your source code to allow you to trawl through them for cross referencing.

Vim Tips for Java #1: Build Java files with Ant automatically

Ant is a great tool for compiling large projects with a large number of Java files.