Showing posts with label free tools. Show all posts
Showing posts with label free tools. Show all posts

Monday, August 24, 2015

Boost Your Productivity With Vim

I was surprised to realize today that I have never written about one of my favorite tools that I use to write code. It's something that absolutely transformed my day-to-day coding. If it was suddenly taken away from me I would feel like I had gone back to the dark ages. That's right, I'm talk about Vim. Or more specifically Vim key bindings. Vim (Vi IMproved) is an old text editor that was first released in the 90's and is an improvement to an even older editor called Vi. The intriguing part of Vim for me was not the 20 year old piece of software but the system that it used to edit and navigate text. It's very efficient, requiring the coder to reach for his or her mouse almost never.

Lest you think that I've abandoned my favorite text editor, the real power of Vim for me is not the actual software. In fact, I've only opened it up a few times out of curiosity. The power of Vim is the standard that it's set. There are Vim emulator plugins for every major text editor out there including Sublime, Atom and even JSBin. This means that if you invest the time into learning Vim commands they will be almost universally applicable across your development tools.

Want to quickly go to the end or beginning of the current line? Change everything within the quotes? Delete everything from your cursor to the end of the line? Quickly go to a line number? Change the casing of the selected text? This and much, much, much more can be done with just a few Vim commands.

Here are a few of the commands that convinced me that I should learn Vim:

  • A Go to the end of the line and start inserting new text.
  • I Same as A but go to the start of the line
  • ci" Delete everything within the quotes and start inserting new text
  • C Delete everything from the cursor to the end of the line and start inserting
  • 545 gg Go to line number 545
  • ct, Delete everything until the "," and start inserting new text

These are just a few of the commands that I use every day. While it's significant learning curve, the time investment is worth it to me. After all...

There are endless tutorials available for you to learn Vim. After learning just a few of the basics I made it my practice to add one or two new commands to my personal reference on a regular basis. After a few weeks you'll wonder how you ever lived without it.

There are a few drawbacks that come to mind. Firstly, after a few months of using Vim, your fingers will start automatically typing commands into non-Vim interfaces. This can get annoying. Also, you've probably already realized that the learning curve is pretty steep. If you are not in a code editor on a daily basis then it's probably not worth the investment.

But if you're in the mood to boost your productivity and give your poor mouse a break you may want to play some vim golf and see how it goes. :)

Monday, May 25, 2015

Staying in the Zone with AMD Butler

A few months ago, I built a simple plugin for Sublime Text 3 for managing AMD dependencies called AMD Butler. Now it's hard for me to picture coding without it. If/when I make the switch to Atom this will be the first thing that I port over from Sublime.

AMD Butler is all about staying in the zone. First, let's take a look at life without it:
  1. Get a great idea
  2. Start coding
  3. Decide to add an AMD dependency
  4. Stop coding
  5. Scroll to the top of your file
  6. Remember and type the exact module id
  7. Scroll down to the factory function parameters
  8. Remember the order of the dependencies
  9. Think of what to name the return parameter
  10. Scroll back to where you were working
  11. Completely forget what you were doing
Now let's look at life with AMD Butler:
  1. Get a great idea
  2. Start coding
  3. Decide to add an AMD dependency
  4. Execute the AMD Butler add command
  5. Type the first few letters of the module id and hit enter
  6. Continue coding in the zone
This is what it looks like: 

AMD Butler dynamically crawls your existing modules and builds a quick list. It only takes a few keystrokes to find the correct one and then it automatically adds it to your list of dependencies with an appropriate associated factory function argument. All without affecting the position of your cursor. This is especially nice to use after slurping ESRI JS modules. No more scrolling, no more trying to remember module names or preferred argument aliases. Just quickly add a dependency and get back to what you were doing.

There's also commands for sorting, removing and pruning unused dependencies.

AMD Butler can be installed via Sublime Package Control. Head over to it's GitHub page to checkout the code or report any issues.

Thursday, June 28, 2012

How to Get Started Using Aptana Studio 3 for ArcPy Development (Screencast)

Just put together a short (10 min) video of how to set up Aptana Studio 3 and it's Pydev module for developing python scripts that use ESRI's ArcPy module. Let me know what you think!


Cross-posted on http://gis.utah.gov/developer/.

Monday, September 13, 2010

Modify Feature With Sketch

This was something that I really missed when I upgraded to 10. To install go to Customize -> Customize Mode -> Add from file... and select the ModifyWithSketch.tlb file in the folder ModifyWithSketch\bin\Debug. Then you will have a new tool in the Commands tab under "Developer Samples" called "Continue sketching an existing..". You can drag this to any toolbar. To use, just select an existing feature and then click on the tool.

Saturday, September 11, 2010

My Custom Bookmark Manager/Map Book Generator Add-in

When I first got to Sandy City, there were some mxd's set up to produce a map book of all of our work management areas. The problem with making a map book of these areas is that they are irregularly shaped requiring different map extents. So the only solution was to use map bookmarks. To print the map book you had to manually zoom to a bookmark, change the title to match the area, press print and repeat for 20 areas! This got old very quickly so I developed an extension for ArcMap that did the work for me. I called it, "Bookmark Manager" (this was before ArcMap had it's own bookmark manager). It worked well for me and I thought that it was generic enough that others might be interested so I posted it on ESRI's Code Gallery.

Almost 3,000 downloads later, I'm getting emails from people all over the world that are using it. I had no idea that it would be this popular! It's been really fun to talk with them and see how they are using it.

The most common problems that people have with it are related to installation. With the old 9.x COM customization model, I had to create a custom setup project to install my extension. It was complicated and not fool-proof. So when I found out about the new Add-in architecture that ESRI introduced at version 10 I couldn't wait to implement it with my Bookmark Manager. Over the last few days I had some time to work on this. I now have my entire extension packaged into one self-installing .ESRIaddin file. I'm hoping that this will make sharing it a lot easier. If you are interested you can check it out in the new Code Gallery.

Anyone else using Add-in's yet?

Thursday, September 2, 2010

Aptana + JSLint = Better JavaScript & Hurt Feelings

JSLint is a tool developed by Douglas Crockford that searches for errors in your JavaScript code. From his site:
JavaScript is a sloppy language, but inside it there is an elegant, better language. JSLint helps you to program in that better language and to avoid most of the slop.
You can go to www.jslint.com and paste your code into the box and it will help you find errors. However, there is a much better way to take advantage of JSLint built right into Aptana Studio. You can go to ESRI's ArcGIS Server Blog to find out how to implement it. Then try not to be offended when it tears apart your code!

Tuesday, June 29, 2010

WinDirStat - Cool Free Tool

WinDirStat is a great way to see what files are on your computer and how much memory they are using. After analyzing your drive, it produces a cool, interactive treemap like this: