Showing posts with label good. Show all posts
Showing posts with label good. Show all posts

Tuesday, October 23, 2012

Curl Is Great

Trying some HTTP code I've written. A redirect works in Chrome, but not in Safari, and not in Firefox.

What gives?

The developer tools in Safari and Firefox are not up to the job. I have some potential posts on the webkit developer tools queued up, so let's leave it at that for now.

So, after a while, my thoughts turn to telnet. But before I get to try it, I get a better idea, as it would turn out: trying the 'curl' command. (The headline should perhaps read cURL, for the capitalization pedants.)

And this message is written to the terminal:
* no chunk, no close, no size. Assume close to signal end
Aha! Yes of course. This is what the words 'good feedback' can mean.

You just need to give curl the '-v' option.

Monday, September 17, 2012

Eclipse Great Feature: Move Updating References And Commit

Some of the lists in Eclipse allow for bulk operations on them. Find references is one of them.

This allows for the following extremely useful procedure to work: you move and/or rename your Java type definition. This causes uncommitted edits. If you're a mis-en-place, clean, only-does-one-thing-at-a-time operator, you'll just do a commit all to commit these changes. But, if you're like me, you usually discover out-of-place types (classes, interfaces) while working on something else. Anyhow; there may for many possible reasons be uncommitted changes that you're not ready to commit. This makes it difficult to separate the files to commit from the files to keep 'dirty' (let's not consider the case where the same file contains both kinds of changes right now).

That's where for move refactoring operations, the 'Find References' feature will (may?) work fine: the list of found references seems to allow bulk commit. Select all the files you want, and then pop up (left mouse button click or Ctrl-click) the contextual menu. Team > Commit, and you will have your referencing occurrences committed.

This leaves the moved definition file changes, unfortunately. So of course the commit-all is really preferable, if appropriate for your situation.

It would be great if Eclipse would give you an option like: "Would you like to commit all the changes caused by your last action, File moved?".

And if it'd separate relevant changes from irrelevant changes in the same file, that'd be magic.

And if it'd allow selecting actions to commit, from a list of recent actions, that'd be more magic.

Anyway, there is actually a simple two-thirds-of-the-value solution for this: list files in "mtime" (last changed time) order, and allow selecting a range to commit. (Deleted files will be an wrinkle, though.)

I have some more tips on moving files in Eclipse, but they'll have to wait.

So that's that. Consider this a first in a (potential, no promises) series of Eclipse workflow posts. I'd like to know if there are already such things written, so please comment if you know.