Eclipse popups and focus issue

I’ve made the switch and try to live with Unity. One of the issues I’ve had is that fact that hitting Ctrl+T or Ctrl+F8 goes away if the mouse pointer is positioned where the popup window will appear. Terribly annoying.

Today I found out that it’s related to a setting in CompizConfig Settings Manager called Focus Prevention Level which is a feature intended to prevent you from continue type or click in windows that just popped up without you discovering it. Setting this to Off removes the problem with Eclipse popup focus.

Screenshot of CompizConfig Settings Manager
Changing Focus Prevention Level using CompizConfig Settings Manager

Eclipse Application & Ubuntu/Gnome

Jag har blivit vän med Unity (när det inte krashar) genom att Compiz Config (ccsm) fortfarande tillåter mig göra allt jag vill. Efter ett par månaders användande av så skall det sägas att Gnome 3 känns som en mer slimmad och snyggare upplevelse än Unity (notifications fungerar riktigt bra, gillart skarpt), men också mer låst för tweakande.

Hur som helst, efter att man dragit in sina egna versioner av saker så ser det lite roligare ut att få upp fina ikoner för programmen man kör. Jag glömmer dock alltid var man gör detta och detta är min minnesanteckning för detta. :)

fredrik@wendt-machine:~$ cat >> .local/share/applications/eclipse-jee.desktop
[Desktop Entry]
Name=Eclipse JEE
Exec=/opt/eclipse-jee/eclipse
Icon=/opt/eclipse-rcp/icon.xpm
Type=Application
Screenshot showing Eclipse Icon in application launcher
Eclipse-ikon i programstartaren

Cake Sharing Public License

Jag stötte på en ny licens idag på jobbet – den används för ett internt verktyg. Klockren! :)

CAKE SHARING PUBLIC LICENSE
---------------------------
By using and installing this tool (hereby referred to as TOOL)
the USER (i.e a user of this TOOL) acknowledges:
- to always offer the CONTRIBUTORS (see list below) of TOOL cake/ice
cream/sweets (hereby referred to as SWEETS) whenever USER offer
someone else SWEETS in work-related environments (hereby referred
to as WORK SWEETS)
- to remind other USERs who are serving WORK SWEETS about this
agreement if they are not aware of it or have forgotten.
Redistribution of TOOL requires this license to be included.
In the case of redistribution, the effective CONTRIBUTORS is
the union of all CONRTIBUTORS from dependant software.
Contributing to TOOL requires the contributor to name herself/himself
in contribution list.

CONTRIBUTORS (so far):
...

Boxee, gdm, Ubuntu 9.04

SD-kortet som /home låg på har gett upp och vips så slutade massa saker att fungera. Vägen tillbaka var hård:

  • unclutter – plockar bort musmarkören
  • Gnome Display Manager (gdm) – behöver startas med Custom session (för xsession)
  • Sätta upp ny .xsession (se nedan)
  • Få boxee att använda rätt lircd-enhet: ta enhet från /etc/lirc/lircd.conf och peta in namnet i /opt/boxee/system/Lircmap.xml
  • echo “” > /usr/share/sounds/*-login.ogg

.xsession:

#!/usr/bin/env bash
xhost + &
xset -dpms s off &
xrandr --output VGA --mode 1360x768 &
xrandr --output LVDS --off &
unclutter &
/opt/boxee/Boxee
logout

Lircmap.xml:
<lircmap>
<remote device="iMON-PAD">
<pause>Pause</pause>
<stop>Stop</stop>
<forward>FastForward</forward>
<reverse>Rewind</reverse>
<left>Left</left>
<right>Right</right>
<up>Up</up>
<down>Down</down>
<select>Enter</select>
<pageplus>Chan+</pageplus>
<pageminus>Chan-</pageminus>
<back>Backspace</back>
<menu>WindowsKey</menu>
<title>MouseMenu</title>
<info>More</info>
<skipplus>NextChapter</skipplus>
<skipminus>PrevChapter</skipminus>
<display>AspectRatio</display>
<start>MultiMon</start>
<record>Record</record>
<volumeplus>Vol+</volumeplus>
<volumeminus>Vol-</volumeminus>
<mute>Mute</mute>
<power>Power</power>
<myvideo>Red</myvideo>
<mymusic>Green</mymusic>
<mypictures>Blue</mypictures>
<mytv>Yellow</mytv>
<one>1</one>
<two>2</two>
<three>3</three>
<four>4</four>
<five>5</five>
<six>6</six>
<seven>7</seven>
<eight>8</eight>
<nine>9</nine>
<zero>0</zero>
</remote>
</lircmap>

git vs Mercurial

Jag har mest praktisk erfarenhet av Mercurial (eller hg) – har kört det hos kund ett par år i projekt med flera team, många komponenter och många repon. Det funkar felfritt. Eclipse-pluginen har inga allvarliga buggar, gör det mesta och med lite kärlek så kan man köra cygwin ihop med det och nästan känna sig obehindrad. (doit.py är dock smidig när man hela tiden jobbar i flera repon och behöver göra in/out/commit/push/pull – ett script som kör ett kommando i flera kataloger samtidigt och sedan visar resultatet.)

Ändå föredrar jag git, i huvudsak på grund av en enda sak: hg har en designmiss kring brancher som gör att det blir halvt omöjligt att få till ett arbetsflöde likt git flow.

Git har också brister. Sitter man på Windows kan det (tydligen) problem med icke-ASCII-tecken i filnamn t ex, och oavsett om man kör GitExtensions eller msysGit så är det inte en “riktig” Linuxmiljö som git kör i. Sannolikheten är att man snart hamnar i konsollen ändå.

För Java-världen kommer det tack vara att Eclipse väljer att standardisera på git snart vara ett enkelt val – git-pluginen (egit+jgit) kommer helt enkelt få så mycket mer uppmärksamhet än hg-pluginen och därigenom fungera så mycket bättre.

För dotnet-världen är jag inte säker på vad som kommer hända. Jag tycker att det är solklart att git (mycket tack vare github) är den som vinner den stora massan, medan hg och bitbucket är stark tvåa. TortoiseHg vet jag är stabil och kompetent. TortoiseGit har jag aldrig beblandat mig med eftersom jag inte behövt köra git på Windows. De testskott jag gjort har varit med GitExtensions. Det har sett bra ut tycker jag, med bara en miss egentligen. I senaste versionen verkar man tappat bort “view file history”.

Slutligen har hg bra medföljande dokumentation (i CLI:et iaf), trevligt skriven, lätt att förstå. Det samma kan inte sägas om git – det är mer stekpanna mot huvud-nivå på den, även om den är tekniskt korrekt och inte så frånvarande eller inkomplett som det var i början när git fick som mest kritik (för just dokumentation).

Git är mer flexibelt, kräver lite mer av användaren. Hg har en designmiss men fungerar i övrigt klockrent. Båda är mycket kompetenta distribuerade versionshanteringssystem (DVCS).

Lite länkar

Popularitet på stackoverflow En Git vs hg-tråd Bra bloginlägg om tekniska skillnader Samma skillnader och budskap, annan paketering

software – the party industry

After reading Ryan Funduk‘s post on exclusion, my feelings are two-fold (at least):

  1. yes, life’s like high school. Who told you that it’d anything different just because people get older?
  2. yes, the Brogrammer trend with ninjas and gurus and rockstars and “poster names” is clear and parts of it’s really sad (I’d say most social structures look like this, regardless of industry or age)
  3. no, you’re partially wrong about social events like very specific tech conferences.
  4. no, the industry I “play” in does organize events and meetups like the ones suggested => is my community an exception?

Regarding meetups (4)

I’ve only been to one meetup where a pub or bar is the venue – Gothenburg Scrum Beers. We do however make sure we get a room on our own. And people eat – one typically needs food after work. Having a beer (or cola as in my case) doesn’t lead to everyone getting drunk. It may be more than that 1 glass/day recommendation, but it’s far from bar fights and even over consumption.

The other ones: JDojo@Gbg, GothPy, Scala Geats, CocoaHeads Göteborg, Android Göteborg, Javaforum, nforum, Cadec, Developer’s night(s) – is mostly organized in members’ offices, and pizza is common. If there’s a company backing the whole thing up (as in more than providing a venue), it’s common to see an alcohol option (whine or beer) when it comes to beverages. (Non-alcoholic options are typically sodas and bottled water.) Javaforum (and Cadec) from time to time has had these “after pubs”, where typically 50 people out of the 200 that attended the talks hang around for another hour and talk about tech, jobs in general and code. A sponsor has payed for the beer, but again – non-alcohol options are there and I’d say it’s a 50/50 distribution.

So, I don’t see that Meetups – or simply reoccuring user group meetings –  has this Brogrammer issue, nor the epic bar rounds. I really think it’s hard to feel excluded at these events.

Regarding conferences (3)

a) Yes I agree in that very few conferences really provides the possibility to spend time in a hacker’s lounge (as opposed to speaker’s lounge), hack nights etc. I’ve been proposing this several times but I guess not enough of us (me?) voice this request. (It’s also related to closing hours and cost for “another room”.)

b) Some conferences, or rather those with a very narrow audience, is to a large extent a social gathering of people that typically don’t meet in person (IRL if you like). They hang out at IRC channels, mailing lists and the sorts and thus really look forward to meet in person and have a great time. FOSDEM is such an event. While coding, hacking and talking tech certainly is great and fun (at least I think so, which is why Squeed’s tankesmedjor (Swedish for thought/think forge) are so awesome – we start out “working” and then progressively move towards “playing” in the evening/night, the difference really being how organized it is), if that’s what you do on a day to day basis – you can’t really blame people for doing other crazy things when the actually do meet in person.

That means, if you’re not part of that IRC/mailing list/community – you’ll feel you’re not there for the same reason, or even feel excluded to various degrees.

With FOSDEM, as an example – a free to attend conference – the alcohol/beer culture is a problem (that leads to the risk of leaving people feeling excluded). The official t-shirt even has “beer” on it, in one of six bubbles. (I’ve personally only been to one of the Beer Events (It was loud, first beer was free and not conference-only, so it was really crowded), and typically skip these since I don’t know a lot of people, and you can easily meet other people.)

Wrong?

I might’ve read Ryan’s post completely wrong. I don’t think Ryan’s wrong. I think he points to some problems we do have, but I’d like to stress that the industry I see is more diverse. (And I wrote this after seeing some of my local peers retweeting the link to his blog post.)

Ramblings

(I also have this line of thought where commercially “bigger is better”, and people that organize these parties are typically the ones sitting at marketing budgets/money and for them, their success is measured on “bigness”, thus organizing a big, “impressive” party is in the nature of their program – “one hell of a party” is rewarded with a raise, bigger budget, what have you… An awesome hack night might not hit the blogosphere/twitter stream and/or is harder to “visualize” to people sitting on the money.)

(Before I moved to Göteborg, I used to organize hakkernight(s) – hack events with demo scene like competitions and such but also a largely social event. Used to attract 256+ people and there was always a question of what to do with alcohol. Since it was open to non-adults, officially it was a totally non-alcohol event, but nothing prevented people from going out to eat and have a beer (or three). We had our school pay for a security guard, and that was all. The guards never had anything to do.)

Farbror Frej

Hå och hej med farbror Frej
Hej alla barn nu blir det barnprogram
Titta nu här vad farbror Frej tar fram
En lite rulle och nu ska ni höra
Vad man med sådana rullar kan göra
Sätt den i rumpan och tuta och kör
Så har vi gjort oss ett avgasrör

Hå och hej …
Ett litet finger och nu ska ni höra
Vad man med ett litet finger kan göra
Stick det i näsan och skojeli skål
Så har vi gjort oss ett mellanmål

Hå och hej …
En korv och ett snöre och nu ska ni höra
Vad man med korvar och snöre kan göra
Snurra på korven och titta så käckt
Så har vi gjort oss en egen fläkt

Hå och hej …
Ett litet papper och nu ska ni höra
Vad man med ett sådant papper kan göra
Riv det i bitar och flingeliflö
Så har vi gjort lite julesnö

Hå och hej …
En boll och en mejsel och nu ska ni höra
Vad man med bollar och mejslar kan göra
Bollen på mejseln och tusseli toss
Så har vi gjort oss ett tomtebloss

Hå och hej …
En tub tandkräm och nu ska ni höra
Vad man med tubar med tandkräm kan göra
Spritsa på hakan och klickeliklägg
Så har vi gjort oss ett tomteskägg

Hå och hej …
En liten nubbe och nu ska ni höra
Vad man med en nubbe kan göra
Gnid den på hakan och gnidelignej
Så har vi gjort oss en after shave

Effektkarta 101

Syfte

Varför skall vi bygga X?

Målgrupp

Vilka är de som kan skapa/uppnå effekterna som uppfyller syftet?

Användningsmål

Vad/vill behöver målgrupperna? Hur “aktiveras” målgruppen? (Dessa mål skall kunna mätas.)

Åtgärder

Hur ska produkten utformas för att användningsmålen skall uppfyllas?

git, ssh, windows

Work in progress

  • I’ll add screenshots
  • Link to instructions on Github, Gitorous and Bitbucket

TL;DR

  • With PuTTY tools setup SSH key-pair, make sure an SSH agent uses the key
  • Get public part of key to the remote git repo, make sure it works
  • Install msysgit and during installation, opt for PuTTY

Since this happens quiet often, I just thought I’d write up the setup here.

Setting up SSH

Generate a key pair

Get PuTTY installer for your platform and install all the tools. Start the PuTTY key generator and select RSA-type and bit length of 2048 bits (or longer). Enter a passphrase for the key you’re generating. The passphrase can be changed whenever you want to, as long as you remember it. You typically only need to enter it once per desktop session (login/logout, reboot) so it’s OK to pick a long and rememberable sentence. Final step: save the key pair somewhere locally. You don’t want to expose this keypair, although it should be safe for the next x years. The public part of the key however, you can distribute freely and send to anyone anywhere. On its own, the public key part is totally useless – it can only used to verify that you have access to the private key, nothing else.

  • The key pair is protected with a passphrase
  • The key pair is saved on your disk
  • The public part of the key is saved somewhere as well, probably next to the key pair file. (This public part is what you add to your account on Github, gitorous, bitbucket etc, it looks something like this: http://wendt.se/ssh/)

Starting a key agent

A key agent “unlocks” the private part of the keys it handles, and enables other programs, such as git, to use the keys for authentication without needing git to worry about how SSH works. So, start the PuTTY key agent, and if possible make sure that it starts every time you log in/start a desktop session. It’s a small program that can be accessed in the taskbar and you should now right click its icon, open it and click “Add key”. Locate the key pair, press OK and enter the passphrase to unlock the key and let the agent handle it until you log out or shut down the key agent.

Get the public part of the key to the Git repository

This is highly dependent on where the git repo is hosted. With a simple Linux host, you’ll simply add your key on one line to the .ssh/authorized_keys file in the account used for git access. You can verify that it works by running PuTTY to the host: start it, enter the hostname, click Connect and enter the username. If all is setup properly with key agent and you’ve added the public part of your key to the account’s authorized_keys, you should be logged in without being asked for a password.

Setting up Git on Windows

Get the installer, run it and when it asks about PuTTY – go for that option. The rest is a “click Next/OK” exercise.

Work that code

Just follow the instructions from the hosting service you use. Make a trivial change (add space, extra line etc), commit and try to push. It should just work.