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.

Fantastisk utvecklarvår i Göteborg 2012!

Aldrig förr har utvecklarcommunityn i Göteborg varit så sprudlande som den är nu, iaf om du frågar mig! Till att börja med har vi minst tre rejäla konferenser, tyvärr inte fyra då Nordic Ruby går av stapeln i Stockholm i år. Hur som helst – ovanpå det har vi ju javaforum, nforum och alla user groups på Meetup, liksom SweNug, Alt.net, OWASP och en mängd andra aktiviteter som t ex Göteborgs Agilister och allt som anordnas av DataFöreningen Sverige (DFS).

Att vi har detta utbud i Göteborg tycker jag är kanon! Det ger varje utvecklare en möjlighet att välja själv, att inte bara vara tvingad till att stirra blint på en leverantörs erbjudanden, bara en teknik, bara en grupp – dvs inte bara smalna av och ramla in i “samma gamla hjulspår”, utan verkligen har en möjlighet att bredda sin insikt, kompetens och sitt nätverk.

Det som är än mer glädjande är att i all denna “konkurrens” så har verkligen de flesta user grupper jag varit i kontakt med satt just utvecklarna i första rummet. Det finns ett litet undantag som sätter sina egna ekonomiska intressen före utvecklarna i user groupen och försöker kontrollera informationen som når utvecklarna, istället för att låta medlemmarna själva bestämma vad de tycker. Jag gissar att detta blir uppenbart så småningom och att en ny grupp bildas spontant – som är till primärt för utvecklare, inte ett bolags ekonomiska intressen.
(Min uppfattning är att utvecklare är intelligenta, självständiga individer som är helt kompetenta nog att ta egna informerade beslut, inte få “så här skall du tycka och göra” nedtryckt i halsen. Nåväl, det lär som sagt självregleras inom tid.)

Så, without further ado: här är min lista på vårens toppar i Göteborg 2012!

Konferenser

WebCoast, 16-18 mars, Lindholmen Science Park (en unconference)
Software Passion Summit, 19-20 mars, Clarion Hotel Post (Centralstationen)
Scandinavian Developer Conference, 16-17 april, Svenska mässan (Korsvägen)
dev:mobile, 12 juni, Folkets hus (Järntorget)

User Groups etc

(Dessa har ju återkommande möten och byter emellanåt plats – därav blir datum/adress inte så intressant.)

OpenJDK session at JFokus, Stockholm

OpenJDK logotype

Yesterday evening some 30 people met to talk about OpenJDK. Apart from one unlucky fellow that asked for “pointers on how to move from Java 5 to Java 6”, it was mostly political and community related issues discussed. The only technical topic discussed was really the (awkful) build system.

Access to properties like in java fx

The first topic that came up was a question whether Java SE (or rather “Java the language”) would get property access added, like that available in JavaFX. No one could really answer, the person asking for it was asked to join the mailing list(s) and ask for this feature.

Build infrastructure/system

Next up was the question if Oracle/OpenJDK are working on improving the build system, as well as restructuring the code base to make it easier to find your way in it. It’s apparently quite hard to navigate and find the parts your looking for.

Historically, we were told, Java started out as a code base for Solaris. Then there were some thing added for some other OS, and another, and another and so – it was never really a multiplatform layout set out from the beginning.

Photo of Dalibor TopicOne suggestion was to make a “mocked OS”, which mocks everything out and makes for a good reference point when you want to start out support for a new platform. “Look at Windows” Dalibor Topić replied with some laughter following within the group. A more serious reply was to look at how the new Mac OS port is being handled. As I understood it, currently it lives by its own (in branches?) since Oracle has not decided to step up and support that platform yet. If it matures enough and reaches a quality level high enough for adoption, then Oracle might take on supporting it. Regardless, people wanting to port OpenJDK to a new platform can look at how this all works out.

IcedTea was mentioned of course, but I really don’t remember the reference to it, or the point made. :-)

OpenJDK contributors

Next question was out of pure interest from someone that wanted to know who, outside of Oracle, that contribute to the project these days.

  • Linux, BSD communities initially
  • Canonical, IBM recently
  • SAP contributed hotspot fixes, AMD for their CPUs
  • and academics/individuals

How do you contribute to OpenJDK?

Photo of Yara SengerThis was brought up by a Brazillian JUG organiser Yara Senger, and was discussed for quite a long time. Her focus, as I understood it, was to make sure to engage not only the top coders of the community, but people at all levels and most importantly people that have advanced from the “beginner” level. Some people made subtle points saying that not everyone might be up for the task – this is not your everyday Java bean your going to write …

On a more concrete level, Cecilia Borg, said that this is something they are in fact looking into and their current take is to try to engage the community via the user groups. The London JUG apparently has made some substantial work here, with code review programs, efforts on automating the manual tests that needs to be carried out for OpenJDK releases, and also the “adopt a JCP” program.

Photo of Cecilia Borg
“NetBeans did a good job [with engaging the community]” and lowering the barrier on getting involved and onboard.

Several times, it was said that “we need to provide a virtualbox image where everything’s set up” in order to move away from new comers spending time on simply trying to get it to actually build, and focus on getting “real” work done instead.

JEP for RIPE-MD

Photo of Leif-Jöran OlssonLeif-Jöran Olsson (ljo, from eXist-db fame) asked if there is work planned or going on for adding more non-proprietary cryptographic algorithms (such as RIPE-MD) now that MD5 sums for instance to an increasing level is being seen as non-reliable.  This led to a brief introduction on JEPs – JDK Enhancement Proposals (much like Python’s PEPs I assume – this was new to me). It was not clear to me who is allowed to add JEPs. But the discussion also led to the next topic:

How does one become a committer?

This is actually well documented under the Bylaws headline on openJDK website.

And that was 60 minutes of OpenJDK discussions.

QR-kod till visitkortet

  1. Gå till http://zxing.appspot.com/generator/och fyll i:
    1. Contents: Contact Information
    2. Data …
    3. Encoding: MECARD
    4. Tryck “Generate ->”
  2. Kopiera strängen från textfältet som nu uppdaterats och börjar med “MECARD:N:…”
  3. Gå till http://www.terryburton.co.uk/barcodewriter/generator/ och fyll i:
    1. Symbology: QR Code
    2. Contents: «klistra in från punkt 2 ovan»
    3. Options: eclevel=M
    4. Tryck “Make barcode”
    5. Tanka hem EPS-filen

Terry Burton har tydligt licensierat sitt arbete med MIT/X11-licens vilket grovt innebär att man skall tacka upphovsmännen i ev derivat man framställer (källkodsmässigt), och att dess utdata kan användas i alla syften som önskas.

ACTA – något att akta sig för

Dear MEP,

I urge you to vote no on ACTA and to communicate its severe problems to your colleagues. ACTA’s vague language locks us into obsolete copyright and patent laws, preventing democracies from updating their laws to unlock new economic and social opportunities. It criminalizes harmless remixes by ordinary users if they achieve ‘a commercial scale’ (art 2.14.1) which many amateur videos do on sites like Youtube. And it criminalizes legitimate websites by making them responsible for user behavior (‘aiding and abetting’ art 2.14.4). Worse, it permanently bypasses the democratic process by empowering the ‘ACTA Committee’ to ‘propose amendments to [ACTA]’ without your approval. (art 6.4)

In other words, it’s impossible to know what you’re voting for!

The global movement against the US law SOPA showed that internet freedom is a crucial issue which belongs in the legislative process of each country. You should view ACTA as an attempt by a handful of companies to circumvent the democratic process, and you should vote against it.

Thank you. Please reply if you have any questions.

/ Fredrik Wendt, Göteborg, Sweden

ACTA as PDF from europa.eu