- File > New > Project ...
- Checkout from SVN
- Choose "Select/Create Location"
- Enter URL of repository/directory, "Next >"
- Use tree display to pick project directory where ".settings" root of the source tree exists, "Next >"
- Enter project information (Project name, workspace location, allow local obstructions)
- "Finish" to allow it to check everything out.
A blog for me to record random things I do. I really don't expect anyone other than myself to ever look at it, but I'm happy if they do. Don't be surprised if posts are half complete, poorly edited, or don't make any sense. I'm sure they made perfect sense to me at the time. ;-)
Thursday, December 3, 2009
Checkout SVN project with subclipse
To beging working on an Eclipse project that is stored in Subversion, do the following:
Friday, November 20, 2009
Ugly comments = ugly code
I like the blog entry that Will Kruse found:
http://www.itworld.com/development/84780/if-comments-are-ugly-code-ugly
I associate it with "code hygiene." It basically explains that programming is "detail oriented" and if a programmer isn't willing to take the time to make the comments correct (everything from semantics to syntax to spelling), then chances are they aren't taking the care necessary to make the code correct, either. Lots of evidence of "TODO" items or "Does this work?" comments are an exact indication of code health.
I find this true in the code I write. And it doesn't necessarily equate to the volume of comments. When I really dedicate care to what I'm developing, the quality of the comments tend to reflect the same level of the code quality. (I also tend to be a very pedantic, verbose commenter.) On the other hand, when I slam stuff together, I (being the pedantic verbose type) tend to write long winded comments explaining logic with questions and hints at potential bugs. "Well ... I think this is going to work" and "TODO: finish this," etc.
Interesting food for thought.
http://www.itworld.com/development/84780/if-comments-are-ugly-code-ugly
I associate it with "code hygiene." It basically explains that programming is "detail oriented" and if a programmer isn't willing to take the time to make the comments correct (everything from semantics to syntax to spelling), then chances are they aren't taking the care necessary to make the code correct, either. Lots of evidence of "TODO" items or "Does this work?" comments are an exact indication of code health.
I find this true in the code I write. And it doesn't necessarily equate to the volume of comments. When I really dedicate care to what I'm developing, the quality of the comments tend to reflect the same level of the code quality. (I also tend to be a very pedantic, verbose commenter.) On the other hand, when I slam stuff together, I (being the pedantic verbose type) tend to write long winded comments explaining logic with questions and hints at potential bugs. "Well ... I think this is going to work" and "TODO: finish this," etc.
Interesting food for thought.
Thursday, October 29, 2009
Using CollabNet desktop explorers with Team Forge
There are a couple Windows desktop plugins that I've used for working with documents, artifacts, and tasks in Team Forge.
http://desktop-vs.open.collab.net/servlets/ProjectProcess?pageID=3794
(goes to here: http://www.open.collab.net/servlets/OCNDirector?id=CICDWE1.2)
The latest Desktop Windows Edition seems to be pretty damn good. Best feature: you can edit a document IN PLACE. Click to edit, opens directly into Word, then when you save, it goes directly back to CollabNet. It even asks for a version comment.
- SourceForge Explorer - Windows .NET application that interacts with CollabNet Source Forge online web application to work with documents, artifacts, and tasks.
- TeamForge Explorer - same .NET application as Source Forge explore but updated for new Team Forge naming and feature set.
- CollabNet Desktop Windows Edition - a different (also .NET) implementation that seems to share code implementation with the Eclipse edition of the same tool.
- CollabNet Desktop Eclipse Edition - plugin for Eclipse for working with code, tasks, artifacts, and Documents.
http://desktop-vs.open.collab.net/servlets/ProjectProcess?pageID=3794
(goes to here: http://www.open.collab.net/servlets/OCNDirector?id=CICDWE1.2)
The latest Desktop Windows Edition seems to be pretty damn good. Best feature: you can edit a document IN PLACE. Click to edit, opens directly into Word, then when you save, it goes directly back to CollabNet. It even asks for a version comment.
Friday, October 2, 2009
HOWTO Ubuntu network configuration in VMware
I've run a couple Ubuntu images on my machine lately and keep forgetting how/where to re-initialize the network settings. The easy answer is:
/etc/network/interfaces
Then rerun the network startup script:
/etc/init.d/networking restart
Bingo. It should reset the networking stuff.
To make this work properly in the VMware image, you need to make sure that "Devices > Network Adapter > Connect has been selected. I typically use "NAT" mode which results in outgoing connections from the VM, incoming traffic from the host OS, but the VM is not reachable by other machines on the network. "Bridged" will allow reachability from the network, but probably requires that you can get multiple DHCP addresses from the same MAC.
/etc/network/interfaces
Then rerun the network startup script:
/etc/init.d/networking restart
Bingo. It should reset the networking stuff.
To make this work properly in the VMware image, you need to make sure that "Devices > Network Adapter > Connect has been selected. I typically use "NAT" mode which results in outgoing connections from the VM, incoming traffic from the host OS, but the VM is not reachable by other machines on the network. "Bridged" will allow reachability from the network, but probably requires that you can get multiple DHCP addresses from the same MAC.
Monday, September 28, 2009
First adventure in dirt biking
I get to scratch another item off my personal bucket list. I've always wanted to learn to ride a dirt bike. Last weekend a friend took me dirt biking (think 'motorcycles in the woods') out in George Washington National Forest in western Virginia near Edinsburg, VA. It was a great time. The particular set of trails was called Peters Mills Run and (maybe?) Taskers Gap. More information here: http://atvconnection.com/Resources/ATV_Trail_Guide/Mid-Atlantic-ATV-Trails.cfm
We spent a bunch of time on hard pack clay trails infused with rocks (typical VA terrain). Some of the hills were pure jumbled bunches of rocks (think baseball and soccer ball sized gravel). Some was more of a "loumey" terrain with sand/dirt mix. It had rained a lot, so there were lots of puddles and a lot of general slipperyness. I found my weak points were located in sharp turns with berms that you were supposed to use as banking for turning. I could never get it right and would wash out the front wheel and take a tumble. It even resulted in one very nice over-the-bars tumble when I washed out the front, hit the berm, and went flying.
I have to say -- it was a blast. We only went about 28 miles, but it was fun and very tiring. I road raced motorcycles briefly about 10 years ago, but hadn't been on a bike since then. This was waaay different, but very enjoyable in a completely different way. I have to admit to being a bit bashed and bruised, but generally fairly well off. The friends I went with said I did quite well for the first time out. I attribute that to a combination of previous motorcycle experience, mountain biking experience, and jet ski racing experience. It still resulted in a half dozen spectacular wipeouts, albeit at slows speeds (10-15 mph). Thankfully, the body armor works fairly well. (Note to self: make sure elbox pads are tight enough to not slide up your arm when you hit the ground, leaving big road-rash skids up your forearm.)
I was riding a 4-stroke 450cc bike that worked pretty well for me. (might have been a hond CR 450?) It was nice that it was very torquey and could easily grunt it's way out of low RPM pulls. This reduced my need to shift, which was quite helpful given the fact that I hadn't ridden a bike in 10 years and the clutch/shift/brake/turn/throttle thing was much less natural than I remember it. The clutch was cable driven and VERY stiff for my weak wrist.
On the day after, my forearm is very sore and rashed from my first fall. Otherwise, I've got a small bump on the knee and my quads are getting more sore by the moment. Overall: not to bad for my first experience.
Some notes to myself for pointers:
We spent a bunch of time on hard pack clay trails infused with rocks (typical VA terrain). Some of the hills were pure jumbled bunches of rocks (think baseball and soccer ball sized gravel). Some was more of a "loumey" terrain with sand/dirt mix. It had rained a lot, so there were lots of puddles and a lot of general slipperyness. I found my weak points were located in sharp turns with berms that you were supposed to use as banking for turning. I could never get it right and would wash out the front wheel and take a tumble. It even resulted in one very nice over-the-bars tumble when I washed out the front, hit the berm, and went flying.
I have to say -- it was a blast. We only went about 28 miles, but it was fun and very tiring. I road raced motorcycles briefly about 10 years ago, but hadn't been on a bike since then. This was waaay different, but very enjoyable in a completely different way. I have to admit to being a bit bashed and bruised, but generally fairly well off. The friends I went with said I did quite well for the first time out. I attribute that to a combination of previous motorcycle experience, mountain biking experience, and jet ski racing experience. It still resulted in a half dozen spectacular wipeouts, albeit at slows speeds (10-15 mph). Thankfully, the body armor works fairly well. (Note to self: make sure elbox pads are tight enough to not slide up your arm when you hit the ground, leaving big road-rash skids up your forearm.)
I was riding a 4-stroke 450cc bike that worked pretty well for me. (might have been a hond CR 450?) It was nice that it was very torquey and could easily grunt it's way out of low RPM pulls. This reduced my need to shift, which was quite helpful given the fact that I hadn't ridden a bike in 10 years and the clutch/shift/brake/turn/throttle thing was much less natural than I remember it. The clutch was cable driven and VERY stiff for my weak wrist.
On the day after, my forearm is very sore and rashed from my first fall. Otherwise, I've got a small bump on the knee and my quads are getting more sore by the moment. Overall: not to bad for my first experience.
Some notes to myself for pointers:
- Riding standing up is the way to go. It allows the bike to move around under you and react to bumps much better
- When standing (or sitting), keep the pegs in the arch of your foot, not balls. Not sure why, but it works. Definately keeps your calves from tiring, as well.
- Motocross boots are heavy and have NO feel to them. (Shifter or brake) You learn to get more of a feel of whether the brake is working from the way the bike reacts.
- NEVER react by grabbing the front brake. There's not enough traction usually, so it will most likely just wash out the front wheel. Learn to use the back brake.
- When in doubt, give the bike blips of throttle. It behaves much better when it has a little momentum.
- Dirt bike leaning/balance is the opposite of road bike. With a dirt bike, you lean the bike over, but stay upright on top of it. Use the back wheel to brake/throttle slide and get it pointed right, then accelerate. (Road bike you slide down inside the bike, keeping it leaning up to get more ground clearance.)
- Most of the time, you want to keep your weight forward to avoid wheelying. Expecially going up hills.
- The suspension's ability to go over huge rocks and bumps is amazing. Use it.
- When sitting, get forward in the V of the saddle so you are near the center of balance. Tendency is to sit back, which means "wheelie."
- Don't even think about going out without the right gear unless you plan on doing nothing but roads. And frankly, that might not even be wise. More armor is better when you are learning. (heavy boots, knee guards, elbow guards, chest protector, gloves)
- It is waaay more tiring than I expected. That might have been a result of the hill climbs and rock scrambles we were doing which requires quite a bit of concentration and bouncing around.
- Camelback is good. Drink a lot.
Friday, September 25, 2009
Subclipse handles file renaming (refactoring) of Java classes properly
I started playing with CollabNet desktop and particularly Subclipse within Eclipse. Some things I liked.
To refactor without the subclipse plugin, I had to do the following:
I also noticed that Subclipse and Tortoise SVN seem to "play nice" with checked out versions of code. That is, you can alternate back and forth between using Subclipse and Tortoise to operate on files.
Refactoring
Subclipse DOES handle refactoring of classes. That is, if you rename a class, it will create subversion events to delete the old class and add the new class. For example, renaming A.java to B.java shows a "Add B.java with copy-from path of A.java." This means that it preserves the version history over time.To refactor without the subclipse plugin, I had to do the following:
- Use "Rename" to rename the class. This fixes all the code and simply renames the existing file as the new file. (OldClass --> NewClass)
- Do a SVN "Update" to get the old file back in the directory (OldClass.java)
- Delete that OldClass.java file and rename the NewClass.java back to OldClass.java. SVN should show you that the file has been locally modified.
- Do a SVN Rename to rename OldClass.java back to NewClass.java.
- SVN "Check for Modifications" (status) should show you a "delete" of OldClass.java and a "add" of NewClass.java with a copy-from path of OldClass.java
I also noticed that Subclipse and Tortoise SVN seem to "play nice" with checked out versions of code. That is, you can alternate back and forth between using Subclipse and Tortoise to operate on files.
Labels:
eclipse,
java,
refactoring,
subclipse,
subversion
Thursday, September 24, 2009
Great stick figure explanation of AES encryption
I really enjoyed this. It gives a great "poor man's" introduction to how encryption like AES works, how it is fast, yet how it is backed up by some really mind-blowing math.
http://www.moserware.com/2009/09/stick-figure-guide-to-advanced.html
http://www.moserware.com/2009/09/stick-figure-guide-to-advanced.html
Subscribe to:
Posts (Atom)