Sunday, July 15, 2007

jVi and Netbeans

I found jvi.sourceforge.net the other day and I'm pretty smitten with it. It gives you a good implementation of viMproved in Java and integrates it with the IDE. I've been using NetBeans because that's the one the author is currently using and I just always think Eclipse is too slow. Netbeans too can hang at times which annoys me, but overall the jVi editor is fairly quick. NetBeans also has good Maven2 support through MevenIde. Our newest project at work is using Maven2 for it's builds, which I have mixed feelings on. It certainly forces you into a "right way" mentality which I wish some of our other projects had.

I'm getting pretty comfortable with NetBeans after the last 2 weeks or so, and I like it alot. Anyone who's worked with me know's I'm a miceless freak, and NetBeans does pretty good at letting me be 90% miceless. Here's a sample of how I work.

Ctrl-1 (Pop's up the project navigator) Arrow keys, pgUp, pgDown, and I believe Enter will open a file. You can also type a file name and it will find the first item listed in the tree and display it. Fairly slick, not quite as nice as ":new" sometimes, but it's also got it's advantages when bouncing between multiple packages. Tab-Completion would certainly be nice.

Ctrl-4 (Takes you to the output, I've thought about rebinding but this is the default and so I'm using it for now.)
You can hit shift-escape to fullsize the window which I do as I keep it small at 4 lines or so. Then you get a full build result view you can look at and just hit shift-escape again to get back to your normal tiled view.

I should note that all of the right tiles are just buttons that are sideways and pop up their window when you mouse over. The output window is about 4 lines at the bottom. I found this to be best as I really need the "Project" and most other windows to be big to be helpful, but they clutter the screen too much for my likes. The Ctrl-1 integration makes it nice, when I want something I hit the key and there it is, when I'm done it dissapears. Although, this layout is good, I still think I should be given like 30 pixels every direction back. But oh well.

I bound "Ctrl-E" to the editor, so that get's me back into jVi. I generally think Netbeans should keep you in the editor more, but that may bug me in other ways, so I could be wrong. Ctrl-Tab swaps between open windows. It can be slow loading up the Ctrl-Tab window list for some reason, which is probably my biggest annoyance. It may just be a more memory desired issue, or windows swap, both of which I probably could help it out with.

F11 Builds and Shift-F11 cleans before building. I used a cygterm window to do this for the first week or two. I'd just alt-tab and then hit up to get the command and return. It's nicer to have build errors hyperlinked to the code in NetBeans. I suppose I could have just got the maven / javac integration working from within vIm.

The biggest reason I've been keeping NetBeans is it's database browser and it's interface for running SQL. It's missing a couple of features like SQL history, but it's about as quick as the isql command line utility. So the DB commands make me like it allot. I kept coming back to it when I was doing database work for a bit of coding I was doing via vi on the AIX command line. Now I'm soo hooked on NetBeans, I'm trying to get everything done in it.

One issue I have had is getting our TomCat project to run in it. Just running the "mvn tomcat:run" crashes for me (some concurrent map mod or something, so it's probably running inside NetBeans with some JVM issue). I also haven't figured out the built in tomcat shipped with the NetBeans server, but maybe someday soon I'll sit down and finish figuring it out.

Overall, NetBeans buys me a few niceties like accurate code completion and perfect cscope ( "Ctrl-] from jVi" ) like functionality. It's a bit slow to startup, probably because it's building some large data structures, but it happily sits at 200 MB most of the time. I probably should bump it's max mem allowance up to 512 and see how that does (then again it may never need it.), but half of the slowness on startup seems to be the laptop hard drive. I still think a lightweight IDE written in C and built around vIm would be the best, but you've gotta take what you can get. The clewn project, is certainly a great first piece of that with the slickest GDB integration I've ever used.

Freedom includes your money?

I know there are two versions of the word Freedom in America. There's the Catholic version where your freedom really is your right to be able to do what is right. True Freedom is being freed of sins and the ways of death that the world seems to think disappeared. I had HBO which I had kept mainly for their NFL show which Laura and I thought was quite good. But when Bill Maher blasted Christianity back in March and HBO never said anything in response to his degradation of Christianity, we decided to drop it. But that's just a side point to this post. Mr. Maher certainly confuses Sex and it's relation to True Freedom and the American version.

The American version of freedom usually tries to focus on your ability to choose to do whatever you want. It certainly is related to the Catholic view and comes out of your gift of free will from God, but stop and think how free you really are. I was listening to a show by Fr. Benedict Groeschel and he was talking about how the drug addict has really lost his freedom. Think about it, if you physically feel like you have to have a fix, and your body physically is making it nearly impossible for you to go without it, then you're no longer free in that area of your life. Similar things happen to us in every day life though. I wonder how many people think about them, or even believe those actions are wrong anymore. Many people seem to do things, myself included, before they have a chance to decide what they want to do, or right after they decided they were not going to continue an action. As Paul said, "For the flesh has desires against the Spirit, and the Spirit against the flesh; these are opposed to each other, so that you may not do what you want." Gal 5:12 Still, that doesn't change the fact that we may pray for help and put our best effort into doing better.

But one place of free will which doesn't seem to be talked about, at least not much as wrong, is Taxes. I truly believe that we pay too much of our money for things which we should not. And this last 4th of July I had decided to write a post on it. More than likely people don't discuss this as we have little we can do to improve the situation, but it is one small thing to keep in mind as you go about your voting. Certainly other Moral issues like Abortion come into a much more critical play, but the right to keep the means you've worked hard for is certainly a valid one. And even if Taxes aren't directly mentioned, hand in hand with that are Government services which require money (well Government services all seem to require money) and so we should support only the ones we think we should pay taxes for. Not that some other organization can't do them.

Certainly though, by the Catholic definition of Freedom you should give something to your country. I think what politicians either knowingly through greed or coincidently through a desire to not say 'No', overly burden Americans, and that is wrong. Certainly, God is entitled to at least 10 % given back. And our government should have something for the many roads and such it provides, but Freedom by both definitions is based on our ability to exercise our free will to shape this world for God's glory. And certainly, giving 35% +/- 20% is not affording that freedom.