trevmex's tumblings

Java Coder, JavaScripter, Rubyist, Functional Programmer, Agile Practitioner.

Setting up SourceGear DiffMerge with Perforce in Mac OS X

I use Perforce at work and I rather dislike the merge tool that comes with it, p4merge. Mainly because it tends to crash while doing merges often.

I got so sick of it, I sought out alternatives, when I came across DiffMerge by SourceGear. It is free, and seems to crash less than p4merge. The trick is to get Perforce (p4v) to use it.

I found a great blog post about just this over at Ed’s Blog, but it was for Windows. In the comments section, Zeya has a solution for the Mac version of p4v, which after some tinkering I got to work. Here is how:

(Prerequisite: have p4v installed.)

  1. Download and install DiffMerge. Make sure to select “OS X 10.6+ Installer (Intel).” The DMG does not contain the necessary components.
  2. Open p4v in the /Applications directory, or execute this in the Terminal:
    open /Applications/p4v.app
  3. Click on the P4V menu, then Preferences (or press Cmd-,).
  4. In the Preferences window that appears, click on Diff in the list on the left.
  5. Click on the Other application radio button.
  6. In the Location text area, type:
    /usr/bin/diffmerge
  7. In the Arguments text area, type:
    -nosplash %1 %2
    image
  8. Next, click on Merge in the list on the left.
  9. Click on the Other application radio button.
  10. In the Location text area, type:
    /usr/bin/diffmerge
  11. In the Arguments text area, type:
    -nosplash -m -r %r %1 %b %2
    (note this is different that Diff)
    image

  12. Click the OK button.

That’s it! Now, the next time you do a diff or merge in p4v, DiffMerge will be used instead of p4merge. Much better!

#JavaOne Adopting Java: Create Java’s Future. Now. [Notes]

Martijn Verburg, Séti Afanou

ACRONYM CITY!!!:

  • JUG - Java User Group
  • JCP - Java Community Process
  • JSR - Java Specification Request
  • RI - Reference Implementation
  • TCK - Technology Compatibility Kit

Java EE’s RI is usually JBoss or GlassFish

If you want to have an RI you have to pass the TCK (their test suite).

Adopting a JSR starts here.

You should get involved in shaping Java if you like coding in Java. If you don’t then other people (not you) will be the people shaping the language, and that could be a bad thing for you…

JUGs can get involved with JSRs in lots of ways. One of the big ones is through training, testing and debugging.

One of the fun things about the program is that you can meet lots of people from other JUGs around the world.

Every single JSR is developed out in the open. It is all public and open for comment.

You can join the virtual JUG if you do not have a JUG near you.

Java is build by OpenJDK. You can compile Java 9 right now!

A great way to give back is to try out the new APIs (write an app that runs against a proposed API) and see if it works the way you expect.

You can work on RIs themselves as well! One fun one is JavaMoney.

There is also a units and measurements API that you can contribute to as well.

Oracle is the lead for most of the Java EE JSRs, if you want to get involved with them, check out java.net.

You can also join the “Expert Group” for a JSR, but fair warning it is a 20-40 hour per week time sink if you decide to do that.

If you are really insane, you can ask to join the executive committee. There is almost no tech work on the executive committee, it is almost all lawyer work.

If you want to get involved with a JSR, make sure you contact the Spec Lead before diving in.

Great information, thanks!

 ()

#JavaOne James Gosling, Robots, the Raspberry Pi, and Small Devices [Notes]

James Gosling, José Pereda, Johannes Weigend, Shai Almog, Jens Deters

Java can be used to program any number of embedded systems. James Gosling, the father of the Java language is using JavaSE embedded on ARM to power robots in the ocean to do research.

Also, it seems that the embedded comminuty REALLY LIKES Netbeans as an IDE.

Java works great on RaspberryPI hobby hardward boxes. RaspberryPis are cool because they allow you to rapid prototype hardware project for very low cost. There is a great library called Pi4J to help you write Java code on a RaspberryPi.

RaspberryPis are a great thing to play with your kids with. They are good tools to get your kids excited about programming and computer engineering.

Fun stuff!

Solarized Dark for Slack

We use Slack at work for intra-office communication. It is a great tool, but I don’t really like the default color scheme. Fortunately, you can customize it (well at least the sidebar).

I like Solarized colors, so I set about making a Solarized Dark Sidebar Theme. Here is how you do it:

  1. Click on your name in the bottom right and open Preferences:
  2. Click on the Sidebar Theme tab on the left.
  3. Click the link on the bottom of the pane that says: Feeling adventurous? You can customize your theme and share it with others.
  4. Copy this line:
    #002B36,#073642,#268BD2,#93A1A1,#268BD2,#93A1A1,#B58900,#859900
  5. Paste the line in the box at the bottom of the dialog:
  6. Click Done.

And voila! You now have solarized Dark colors in your Slack Sidebar:

Enjoy!