Sep 10

Homebrew is my favorite package manager. If you installed Xcode just for brew than this post might be interesting for you.

Kenneth Reitz created a GCC Installer for OSX without Xcode! Thank you. This package is about 500 MB. Compared to Xcode you save at least 1,5 GB on your SSD.

So let’s go to work:

  • Remove Xcode
  • [code]sudo /Developer/Library/uninstall-devtools --mode=all[/code]
    This will delete Xcode. For more details see John’s post

  • Download and install GCC for Mac without Xcode
  • Currently 10.6 and 10.7 packages are available at https://github.com/kennethreitz/osx-gcc-installer/downloads

  • Install brew
  • /usr/bin/ruby -e "$(curl -fsSL https://raw.github.com/gist/323731)"
  • You’re done
  • You can verify your success when you receive meaningful version by calling gcc --version and brew --version

Caution:
You don’t need Xcode for formulas like gradle, groovy, maven, tomcat etc. Nevertheless some formulas will require Xcode!

Tagged with:
May 12

I’m looking for a way to identify if an application on my Mac stopped. I couldn’t find anything, so it was time to write my first AppleScript:

set network_connect_is_running to is_running("Network Connect")

if network_connect_is_running then
	repeat until network_connect_is_running is false
		delay 10 -- wait some seconds
		set network_connect_is_running to is_running("Network Connect")
	end repeat
	-- application stopped, so run a dummy app so that marcopolo can switch context
	tell application "NetworkConnectStopped" to activate
end if

on is_running(appName)
	tell application "System Events" to (name of processes) contains appName
end is_running

The code is quiet simple. Line 12-14 defines a function which checks if application appName is running. Line 01 calls this function and checks if the application “Network Connect” is running. The result is stored in the variable network_connect_is_running. Only if “Network Connect” is running (line 03) I want to start my listener. The listener (loop line 04-07) checks every 10 seconds if the application is still running. If not, the loop ends and I can start my trigger application “NetworkConnectStopped”.

So what is this all for?

I use MarcoPolo to switch my network connections. I use three contexts:
- home
- homeOffice (VPN)
- work
The contexts differ in things like proxy, printer, mounts.

The problem: MarcoPolo has no rule “Not Running Applications”

When I’m at home and start my VPN (Network Connect) I use this application to switch automatically to context “homeOffice”. When I finished my home office session and quit “Network Connect” I want to switch automatically to context “home” again. This can not be done with MarcoPolo so far. Now the above script comes into play. I stored this script as an application and start this listener when switching to context “homeOffice”. When I quit “Network Connect”, my listener recognizes this and starts the application “NetworkConnectStopped”. This application is created with the Automator and contains nothing but a “Pause” of 6 seconds. One more than the default MarcoPolo rule update interval. The last step is to add a rule “Running Application” to MarcoPolo which switches to context “home” when application “NetworkConnectStopped” is running.

Here are my MarcoPolo rules:

And here are my actions:

If you have suggestions or need more details feel free to comment.

Tagged with:
Dec 11

All of our team were to blind to recognize this feature – Pin Tab. Here is the scenario. You run your fast test suite locally. You have a couple of failed tests. You pick the first one, fix it, and run this test only to get fastest feedback. Stop. Now the results of your first run are gone, overwritten by the second run. Which other tests did fail? I can’t remember. We were looking for s.th. similar to the find dialog open in new tab. Couldn’t find it, a workaround was to copy/paste the result. Today I wanted to create a feature request. While I’m thinking about what I would expect I opened my IntelliJ IDEA and there it was: Pin Tab!

If you want to keep a result just press the pin at the left site. Now this tab is pinned. If you run another set of tests your previous result will remain. Cool. How could I overlooked it for so long?

Tagged with:
Nov 04

In one way or another you are using task lists, I’m sure.

A task list – as the name suggests – is a list of tasks. How does it normally works?

While you are coding your brain (and/or the brain of your pair) try to escape :) It creates thoughts like:

  • I need to test this and that as well
  • Here it might be cool to clean up the campground
  • The name of that class did not express the intention any longer, what is more suitable?
  • ..

These ideas of other tests and possible refactorings keep you from the current task. To keep focus write them down. Free your mind. If you finished your task, take the next one from the list. New ideas? Add them. Let the task list evolve. Clean up your list frequently. If you have tasks that you won’t do shortly, create user stories and sell them to your product owner.

This practice allow you to keep focus on the current task without loosing your ideas. You’ll have less context switches. It makes you more productive. Try it!

TDD Task Lists With IntelliJ IDEA

I use this Task Plugin. It is simple and easy to use. Every action can be triggered with the keyboard. Changing keyboard mappings can be done classically with IDEA’s keyboard mapping. Because of the missing Insert key on my MacBookPro I remapped Add Task. To go quickly to the Task Tool Window you can either map it to a key or use the switcher (Ctrl-Tab on OSX):

Tagged with:
Sep 25

Henrik Kniberg seems to had a great session with Mary Poppendieck about Social Technical Systems.

You must see this amazing presentation about What Motivates You! Great style, great content.

I wasn’t so wrong when I wrote about bonus systems.

Tagged with:
Feb 13

Lets say you earn 1200 gummy bears a year and get a bonus of 100 gummy bears. What would you say is your salary?

a) 1200
b) 1300

Probably you would answer a). If the bonus is paid for the extra effort and your personal engagement, i.e. something that you can control, what will be your answer? I guess still a), right? Why? Because even if you got in previous years a bonus, your manager can reject the bonus. Either in case of your under-performance – a thing that you can control or in case of a struggling company – a thing that you can’t control.

Now lets say you get several years a bonus of 100 gummy bears? What is your expectation of the next performance review? Let me guess, your answer will be 100 or more.

To sum it up: You expect the bonus each year but you do not account it into your salary. Mmh, not the best investment a company could make with that extra money.

What solution do I have? Flip the system!

Give the new developer a salary with a bonus. When you know the developer and her potential, turn it into a fix salary without a bonus.

Tagged with:
Mar 27

Today a peer has presented some code at the projector. The font size was to small for most of us.

screenshot1

Luckily at our company we have Intellij IDEA.

A great feature: Just press Ctrl and turn your mouse wheel towards you and… yes the font of the current file increases.

Then he switched to another file. Mmh, there was the small font again.

A rocking feature to address this issue: Ctrl + Backquote or View > Quick Switch Scheme.

Beforehand, define a second color scheme presentation (Settings > Editor > Colors & Fonts). Set a font size of e.g. 24 points.

If you held a presentation at a projector just do a Quick Switch Scheme. Press 1 (Switch Color Scheme). Next, select presentation and here we go:

screenshot2

Tagged with:
preload preload preload