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

Free Software Movement

Det finns en hel del missförstånd kring fri programvara. Ett klargörande kopierat från FSF:

In general we do not believe it is wrong to develop a program and not release it. There are occasions when a program is so useful that withholding it from release is treating humanity badly. However, most programs are not that important, so not releasing them is not particularly harmful. Thus, there is no conflict between the development of private or custom software and the principles of the free software movement.

Återkoppling från en Coding Dojo

Det är otroligt kul och inspirerande att se Coding Dojos tas emot så väl ute bland de företag jag besöker. Att det är väl mottaget bland utvecklare är uppenbart och kan bl a förklaras med “Code wins arguments”. I “gamla” inkörda team där diskussioner gått i stå och nötts länge kan helt plötsligt helt ny dynamik uppstå. De “gamla” argumenten som gått fram och tillbaka men bara varit abstrakta och teoretiska skall helt plötsligt omsättas i kod, med/inför kollegorna och “helt plötsligt” går det från abstrakt till konkret och inte bara fåtalet engagerar sig och har en uppfattning, utan flertalet.

De Coding Dojos jag driver hos kunder är just detta – praktiska övningar med ett mål eller en poäng. Ingen föreläsningsserie man sitter och nickar igenom och sedan släpper vind för våg. Med riktiga övningar, där alla deltar och skriver kod själva ökar deltagandet, engagemanget och det kritiska granskandet.

Eftersom det ofta uppstår diskussioner med uttryck som “jag brukar göra såhär”, “oj, så har jag aldrig gjort, eller tänkt” så är det viktigt att det inte finns lönesättande chef(er) på plats. Om deltagarna är rädda för att säga fel och börjar väga sin ord så försvinner en stor poäng med dojon. Jag försöker få alla att vara spontana med hur de tänker, att exponera hur de jobbar utanför dojon så att de kan få konstruktiv feedback på sitt arbetssätt. Lönesättande chef och/eller beställer behöver givetvis återkoppling också. Här följer ett exempel från förra veckan.

Hej Kund!

Efter lite hackiga, trevande steg med första övningen tyckte jag mig se en enorm skillnad till tillfälle två. Det märks att flera utvecklare försökt sig på det vi övade i vardagen! Jag tror mig se att så gott som alla utvecklare har fått en ny infallsvinkel till hur de ser på sin kodskrivning och den synen utvecklade vi med en mer realistisk övning ihop med mockning. Det var mycket bra frågor som dök upp, vilket tyder på att de är engagerade, intresserade, verkligen försöker anamma en annan kodordning och har en sund kritisk inställning till vad de gör själva (det är ju inte jag som skriver koden under övningen – jag bara guidar och ger tips)!

Övning 1:

Vi tog en enkel basövning (String calculator).
Vi introducerade red-green-refactor, Arrange/Act/Assert, bottom-up.
Vi tog baby steps bokstavligen med 1 minut som tidkrav att gå från röd till grön.
Vi såg triangulering som ett sätt att driva fram funktionalitet.
Grå zon: “täcker testen all funktionalitet? om inte, har vi använt test-driven utveckling?”

Övning 2:

Vi tog in en ny, ganska stor uppgift som är mycket mer realistisk (tagen från produktionskod).
Vi lade på ett nytt moment/tanke i form av en “testbacklog”. (Verkade vara en ny idé – diskuterade VAB-scenariot och vikten av att kunna dela kod ofta.)
Vi lade på mockning med Mockito. (En del var redan bekanta med Mockito.)
Grå zon: “ett par antydningar till att ändra kod utan att testen uttrycker den funktionella ändringen i koden”.
Vi refaktorerade kod lite oortodoxt (utan test, utan undo/bortkommentering).

Det var mycket motiverande för min del att se utvecklingen i teamet, det var en helt annan “mognad” i TDD-tänket och ett bra driv/bra dialoger. Parprogrammeringen såg bitvis fullständigt klanderfri ut – mycket kul att se! Nästan all kod drevs fram från test (två, tre tillfällen fanns antydan till att skriva kod som inte var testdriven/täckt av test).

Utvärderingen i slutet bjöd mer på kod- och designdiskussioner (jag vill aldrig avbryta sådant) så vi hann inte “utvärdera” så mycket, men på tavlan skrev jag upp:

+ bra frågor
+ bra övning
! refactoring gjorde koden mycket mer läsbar
! smidigt med @Mock
? Använda TestNG nästa gång

Mitt förslag är att vi nästa gång utvecklar i flera par parallellt (en dator per par med Eclipse är vad som behövs), lägger på Clean Code-aspekter och använder samma uppgift och ser hur vi kan få koden att se ut på olika sätt.

Munin template update

I like to have day, week and month in one view.

/etc/munin/templates/munin-nodeview.tmpl
<tr>
  <td><a href="<TMPL_VAR NAME="URLX">"><img <TMPL_IF NAME="STATE_WARNING">class="warn"</TMPL_IF><TMPL_IF NAME="STATE_CRITICAL">class="crit"</TMPL
  <td><a href="<TMPL_VAR NAME="URLX">"><img <TMPL_IF NAME="STATE_WARNING">class="warn"</TMPL_IF> <TMPL_IF NAME="STATE_CRITICAL">class="crit"</TMP
+ <td><a href="<TMPL_VAR NAME="URLX">"><img <TMPL_IF NAME="STATE_WARNING">class="warn"</TMPL_IF> <TMPL_IF NAME="STATE_CRITICAL">class="crit"</TMP
</tr>
</TMPL_LOOP><!-- End of SERVICES loop -->
</table>

Four Week Review of Lenovo ThinkPad Tablet

Lenovo ThinkPad Tablet Product Image

I recently got myself a Lenovo ThinkPad Tablet. As with most gadgets, there’s a hate/love relationship and this post is my list of pros and cons. But first – the background to why I got this device is that I wanted to

a) be able to more efficiently read RSS streams, and

b) be able to read, write and reply to e-mail.

My previous phone, a Nokia N900 fully help me achieve the e-mail tasks. It was really great in all ways related to communication (Skype, Jabber/GTalk etc). However, the browsing and blog/RSS reading experience was not really up to the level I found acceptable. It basically was too slow: I lost interest and jumping from RSS to a browser was way too slow.

This summer I got my first Android based phone, a Sony Ericsson Xperia Arc. It works good in almost every way. (The address book is terribly slow – I have just under 800 contacts and somehow that is a problem performance wise. The N900 handled this much better, and a physical keyboard also speeds up filtering and helps UX aspect.) However, reading RSS and web pages on this device I found to be too slow, again. So, while I got a device with a much greater list of available apps (which I rarely have any use for), a much worse calendar and sub-par ability to write and reply quickly to e-mail –  it essentially didn’t meet my expectations. The N900 fixed task b, the Arc fails on both tasks a and b.

I will not compare this ThinkPad Tablet  with an Ipad – I knew upfront that the user experience would be flawed in comparison. I’ve been using both versions 1 and 2 of the Ipad, and they simply don’t cut it. Although the major issues with version 1 (multitasking and switching between apps) has been fixed, as soon as I want to contribute/create content the Ipad runs up short. The on screen keyboard is OK if you want to type less than 140 characters, but I typically actually type when I work (I’m productive – I produce code and add value to conversations, as opposed to merely consume).

So, this is a four weeks review of the latest geadget of mine.

Lenovo ThinkPad Tablet Product Image

Pros

Meets both functional expectations, a and b (YAY!)

It works great for reading RSS (GReader Pro works almost flawlessly – only bug/feature enhancement would be to mark a an entry as read when moving away from it, not just by having opened it) and switching to a browser is acceptably slow (the switch is instant, loading the page is primarly limited to the 3G connection – the Dolphin for Pad app does a great work).

Contact manager

Works really well and makes great use of this screen. No lag at all, speedy and help me get work done. (However, I expected to be able to make phone calls, not sure why this is not enabled.)

Calendar

Works really great on this screen

Decent

Battery is perfectly OK

I’ve only been using it for a couple of weeks by now, but it lasts a full day playing Spotify music (from local storage mostly) for 3-4 hours. Pulls/receives (push) ~50 e-mail. Pulls RSS feeds every 4th hour. It still has more than enough juice to feed my RSS reading and e-mail replying urge on the tram on my way home.

Hardware design

Hardware button to turn auto orientation on and off. It’s light enough to carry around. Keyboard is wonderful to type on. I don’t use the pointing device and would actually prefer to have it removed or at least disabled (note about Ctrl key below).

Format, Screen, Performance

Well, in most regards this is really a great tool – I enjoy using it more than I’m annoyed by the issues it brings (see below). It’s almost like the thin computer with detachable keyboard I guess I’m really after.

Cons

DOES NOT CHARGE BATTERY WITH NON-BRANDED CHARGER

This is insane. I feel the industry left that problem years ago. Here it comes back as an uninvited ghost. This is really ridiculous. I already have a small array of micro-USB chargers at my desk and at home. WHY OH WHY do I have to buy TWO chargers for this tablet (on for home, on backup at work – and ideally yet another one for travelling/on the move). Seriously, this is ridiculous. (However, since the battery is OK, this becomes less of an issue than one can expect. As the battery’s performance degrades, I guess this’ll become more alarming.)

Screen lock is not responsive enough

It actually is something I struggle with more than half of the times I unlock the screen. See next:

Folding tablet with keyboard doesn’t prevent waking up

Yep, If I fold it up to carry with my I have to make sure I use a really untight grip, or the “mouse” buttons at the bottom of the keyboard gets pressed, sends an event, and wakes up the screen. My only workaround is to manually lock the screen before I fold it up. But that also forces me to use the screen lock which I really don’t want to – it’s in the way of me getting work done. This is the most annoying thing about this gizmo currently.

The main problem here is that the keyboard surpasses the screen lock completely. Simply press any button twice (first wake up, next to pass the screen lock) and you’re there.

Undocking from keyboard folio

This is very doable but requires two hands, some technique and a firm hand. It’s really not convenient and I rarely succeed to undock it in under 30 seconds. Not a big issue though – I don’t have the need to unplug this very often at all.

Ctrl key doesn’t work like as expected

Ctrl+arrow keys doesn’t move a word, and thus Ctrl+Shift+arrow doesn’t select a word. I expected this to work like on any OS cramped out after 1990’s (this was “standard” on my first computer ever, an Atari STE boosted with 1024 MB RAM). This is limiting but I can live with it.  (I bet you hitting Ctrl+4 in CKEditor won’t work either – changing the paragraph to a H4 headline, like in the wordpress blog editor. Actually, writing short blog entries would work but a longer one, like this one, is painfully slow.)

Headphone/microphone noise

There’s constant buzz and “static” noise when using the wire for sound. Terrible. Workaround – use bluetooth for sound (or HDMI, not for headset though). With a lot of activity going on (not sure if it’s wifi, internal/external storage or 3G) it gets worse. It’s like the background noise of a cellphone call. Terribly annoying.

Headphone/microphone jack layout is non-standard

I have many wired headsets with a microphone. None of them works in this socket – one channel is “zeroed” out – I guess microphone and either ground or one of left/right is swapped in some way. Terribly annoying. On my Sony Ericsson Arc phone, and the N900, I could plug in either a connector with three or four fields (left, right, ground, microphone).

The accompanying headset does work but is a really sheep one. And, why ship a headset with microphone when dialing is disabled? Makes little sense to me (Skype, basic note taking/recording, voice commands – sure).

Automatic adjustment of screen brightness is not good

It jumps up and down and takes really long to adjust when moving from a light room to a dark one. I control this manually and I’ve not really seen any device handle this very good. Best in class in my opinion is Apple’s Macbook Air.

Spotify and other newly launched processes suddenly dies

When the Spotify GUI is open, at random it is reaped (I think) to clear up RAM. This kills playback and I have to restart the app. Reaping processes/apps unfortunately happens way too often. Dolphin for Pad dies 1 time out of ten launches, approximately.

3G connectivity is much worse than on Sony Ericsson Arc

It works OK, is fully acceptable, but it’s also quite easy to see that it performs much worse (data transfer wise) than compared to my Sony Ericsson Arc. Not sure if the keyboard folio is part of explanation to this.

Browsers hidden from task list

In the list of tasks that is running none of Firefox, Dolphin and the android vanilla browser. Unless it was started from the Home screen – if it’s started from an Intent from inside any other application (such as e-mail, gmail, RSS) it’s not visible in the task list. Very strange but I also think this is an Android Honeycomb 3.1 feature/bug and has nothing to do this tablet specifically.

The firmware upgrade broke keyboard support

Had to do a firmware reset (after the upgrade) to get the Swedish keyboard layout back. This means re-install everything, re-enter all passwords (WHY can’t twitter, facebook, linkedIn etc allow each other’s OAuth?) in apps and each browser (WHY can’t the Android OS provide an authentication mechanism, like Mozilla’s suggestion), re-arrange the home screen (remove all the Lenovo-fluff). Business device level of “tested” – how could this slip through, really?

Bugs or misbehaviors

Yes, there are tons of minor bugs I don’t care to much about, but will list them anyway.

  • The Market app for Honeycomb is excellent and terrible. It makes good use of landscape mode, but that’s the only mode it runs in!
  • You can’t review apps from the Market app – you have to open a browser, find the app (there’s no “open in browser button”) and do it that out-of-app way.
  • I have bought some 10 apps to use on my phone. I’m not interested in having Talking Tom Cat on the tablet however, so I’ve chosen not to install that app. This unfortunately means that NO new apps will install just by clicking the Install button. Instead it queues up and sits in “My apps” list/view and waits for manually selecting it in that view and press Install again. It does charge my credit card right away though …
  • Can’t make phone calls. It simply lacks this feature. Not important but I kind of expected this to work since I’ve seen Galaxy Tab 7″ users use their pads (tablets) as a complete phone replacement. I really could do without my phone if the tablet had call support. SMS works perfectly.
  • Since phone calls aren’t supported there’s really no reason that the tablet announces a bluetooth SCO profile (phone headset – this is high priority, two way audio with lower latency and lower fidelity compared to A2DP which is high fidelity one way audio intended for video/music).
  • A2DP – or at least the play/pause, next and previous-buttons on my mostly brilliant Sony Ericsson MW600 bluetooth headset doesn’t work with the tablet. It’s otherwise working great and so far I’ve had no stability or sound quality issues at all. The folio keyboard has buttons media buttons that work really well so this is not a big issue for me. It’s just that I was surprised this doesn’t work.
  • Screen flashes before going to sleep. (Before it goes to sleep, the screen is dimmed on all android devices, but on this device it starts by going to full brightness and then down to something very low before coming to a short pause, then being turned off.)
  • TestApp – there’s an uninstallable app called TestApp that has all rights available, eats about 70 MB of RAM. Gives no clue to what it actuall does.
  • Home screen has one Android vanilla widget for gmail, one Android vanilla widget for my wendt.se IMAP account, one Android vanilla widget showing upcoming events from my (10) Google calendars, one GTasks widget showing one Google Task list, ~20 app icon/shortcuts, 3 contacts. This consumes > 100 MB of RAM. With all visible
  • The Lenovo ThinkPad logos on the leather keyboard folio is located on the wrong side. Not that it bothers me, but it’s a clue of how much effort they really spent on this product.
  • There should be two speakers, and none of them should be placed where you put your lap (make sure they’re on opposite sides of the device so you always something out of it, and NOT covered by the keyboard folio dock …)
  • A couple of times, the e-mail app got stuck in some data transfer/synchronization mode and I’ve had to actually reboot the device to get out of that state. Has happened more than twice.
  • Twice the device has rebooted spontaneously at the exact same location (at the Domkyrkan bus stop) when reading RSS on my way home. Connectivity issue lurking and a switch of GSM cells happens at this location?

Lenovo ThinkPad Tablet Product Image

Summary

This device certainly meets my initial functional requirements – I’m now on top of the constant stream of RSS feeds I want to keep up with and I’ve been writing e-mails much faster than ever before! So to that end, I’m very happy with this Lenovo ThinkPad Tablet. It also meets most secondary functions as well (spotify, calendar, …). However, there are some – or rather LOTS of – glitches that I didn’t expect to see in this rather expensive device. In total, it cost me about 600 € including the nice-looking leather keyboard folio and I really didn’t expect the “screen is activated from keyboard click when the ‘lid’ is closed” issue.  If the following issues were fixed, in order, I’d be perfectly happy:

  1. stop activating screen/wake up when it’s folded/lid is closed
  2. stop killing Spotify, Dolphin and reboot
  3. charge from any micro USB charger (doesn’t have to be full speed, but just take whatever you get and use it in whatever way you can)

Unimportant misc notes

  • I did consider getting a Transformer – but there’s no 3G on that and I don’t want to fiddle with wifi hotspot on my phone because that EATS battery and I don’t want to depend on two devices to read RSS
  • The backside coating/material on the ThinkPad Tablet is much nicer compared to the Ipads’ aluminumish slippery alternative
  • There might be some case+keyboard pack that would’ve worked well with the Ipad. I searched but didn’t find one. Nor did the ones I looked at for the Galaxy Tab really look like something I’d like to work with on the tram. Lenovo’s folio keyboard is a regular USB device (keyboard+pointer) and so does not contain a battery that needs charging/replacing after some time.

vilket_är_lättast_AttLäsaTyckerDu

Jag har skaffat mig en åsikt: det_är_lättare_att_läsa_vanlig_text_så_här, änAttLäsaDetNärDetStårSammanSkrivetUtanNågonWhiteSpace. De flesta känner till att vi mnäskionr kan lsäa ord unta srröte poerblm bara start- och slutbokstaven står på rätt plats. FrsöökGröaSmmaaSakMedDtetaTxbtelcok. Så, jag har skaffat mig åsikten att underscore är en bra idé att använda i t ex namn på test(metoder). I JavaScript brukar de flesta testramverk erbjuda följande mönster:

TestCase("Nu testar vi logiken i UserManager", {
    "lägga till en användare": function() {
        var before = this.userManger.getUserCount();
        this.userManager.addUser("Fredrik", "Wendt");
        var after = this.userManger.getUserCount();
        assertThat(after, equals(before + 1));
    }
});

Det är då ganska lätt att se vad som gått fel när en rapport säger:

In Suite "Nu testar vi logiken i UserManager", the test "lägga till en användare" failed.

I Java kan vi inte använda blanktecken som del av identifierare. I Java 7 kan man iaf använda 1_000_000 för att skriva ut en miljon, yay! Men det löser inte problemet med att få läsbara namn på test(metoderna). Understreck till räddning!

Ett problem som följer med understreck är att Eclipse rätt ur lådan inte stödjer att hoppa inom identifierare som innehåller just understreck: ctrl+höger hoppar alltså till slutet av hela identifieraren. Med AnyEditTools (finns på Eclipse Marketplace) blir detta problem ett minne blott, och man får också hjälp att konvertera mellan Camel Case och Underscores. Perfekt julklapp! :)