Is TDD Dead Or Alive?

July 10th, 2014 No comments

This blog post is for those of you who are unaware that there is a major debate in contemporary software development happening now, today. People have been wondering about the value of Test-Driven Development (TDD) for a long while, but it was not until David Heinemeier Hansson of 37 Signals  posted a blog article on St. George’s Day (23rd April 2014 and a significant day personally for me) called “TDD is Dead. Long live testing”. It started an unstoppable momentum of discussion into what is now a heated and controversial topic. So I encourage you read his article, first, if you are an experienced software engineer and then watch the videos.

After this article was posted to the Internet, Heinemeier Hanson, Martin Fowler and Kent Beck followed up with a series of Google Hangout recordings, in May and June, each one was about 30 minutes long. The last edition (part V and VII), which was full hour long was very revealing, because it was a question and answer sessions from the community and therefore extended the discussion to the wider audience. If you have 3 hours of free time, instead watching another Hollywood movie or re-runs of World Cup football, then it is well worth your time to listening (and/or watching) the entire series to understand the debate and different points of view.

As for my own opinion on TDD, it has a place in my toolbox like another hammer or a screwdriver, and it should be treated as such. To be a TDD practitioner requires skill and discipline; and the knowledge to believe that it is not appropriate in all situations. I have some sympathy with Heinemeier Hansson’s frustrated view, “Most people cannot just leave good ideas the f**k alone”. I witnessed a certain zealotry in a couple job interviews a few years ago, when interviewers used the technique like an officer using a truncheon to beat somebody with. If you didn’t write code in a correct view for the client, you were rejected. I raised suspicions in my head about the variations of different testing styles across different organisations and sectors. In the end, I have suspected that you do not have write code test first all the time, with the plethora of unit testing frameworks out there such JUnit, ScalaTest, Scala Specs. It is more important to have the ground level, there must be tests in the application and system software that exercise the customer’s acceptance requirement and produces a Minimal Viable Product. This is definite the road to follow.

PS: The first video in the series, “Is TDD Dead?”, starts here.

+PP+

 

Categories: Agile, Design, discourse, Education, technical, testing Tags:

Where Are All The Black People in IT?

July 5th, 2014 3 comments

Recently, I flicked through the faces of all of the presentations titles from Google I/O 2014 videos, I saw only one person who was black. She was from Ethiopia and was talking about a very worthy cause, solving the food shortage in Africa and making the cost of food production cheaper so that everyone could eat and be entitled to a decent life expectancy. She is Sara Menker, she flew in from Nairobi to give a valuable speech on Solver for X talk.

The proposition to improve food production is great and I don’t think that this purely the fault of the organisers, I am just sad that in the 21st century there are not a lot of black IT developers, designers or even architects around. For a profession that is much newer than a say Law. The London Metropolitan Policing in the United Kingdom has been found to institutionally racist, it is disappointing. In fact, I certainly have only ever seen a few black senior managers in my personal career. I can count them on three fingers and I met one of them a few times when Sun Microsystems was running JavaOne at the Moscone Center. When I worked at Deutsche Bank in the year 2001, my boss’s boss was a black senior manager responsible for OTC Derivatives IT trading desk. The other fellow worked in another financial organisation in the early noughties and I am not sure where he ended up in recent years.

When I look at this video listing page for I/O 2014, unfortunately it confirms my belief that the industry has failed to attract black people with significant talent or allow them to progress up the food chain. This is a massive big technology conference about mobile computing platforms and about exciting IT project; it has global attention. I am sure that there are good or great black people working at Google or outside in Android / Chrome space. Perhaps, they work in the background, or do not want the publicity (or celebrity). Probably smacking down Google is not fair, one can also point the finger at other technology businesses too, like Apple for instance.

As I scroll-flicked my touch pad up and down this videos page, I had an introspective. I looked within myself and I wondered why I had no trust with companies roles that promised great projects, exciting challenges and the prospects of career progression. I knew the answer to the riddle, somewhere I had learned to remember, “I believe it, when I see it”. That was what eventually said to myself. I remember begging my manager at the time, in 2002, at Deutsche Bank to use my allocation annual training budget so that I could visit JavaOne in 2002. The answer I got from him was typical and patronising, “How does this [JavaOne trip] help the business?”. No matter how much I tried to convince him about Java development and this conference was better than eyes forward training. He wouldn’t budge, so from then on, I lost my faith with companies and trust with senior management, I suppose. They talked a good game about your career, but seriously they couldn’t give too monkeys, because they were only concerned with theirs, and the truth was, that you in their eyes were just a resource that arrives at 9AM and leaves 18PM in order to complete yet another system integration or migration. I knew then that I had to find a way to make JavaOne by myself and achieve my dreams and future inspirations. I wanted to improve myself and get good at what I do. Eventually, two years later in my first stint as an IT contractor, I funded the whole trip to San Francisco. It was so worth it, there was no free ticket, just the conference, hotel and plane tickets. I was flush enough. It was also this experience with management that led to my foundation of the JAVAWUG, the Java User Group. There simply had to be other software developers out and about in London who cared about their experiences outside of the boundaries of commuting daily into and out of the workplace.

Never trust just words: It is a tough lesson that I learnt in my younger career and one that I hold up as rule of thumb. People say all kinds of things, usually laudable ideas that appeal to the greater or common good: but until they actually do it then it is not worth even remembering platitudes; and that is perhaps one more reason, why I choose to remain as an IT contractor, at least for the time being. It appears that I am not one of those fortunate people with the skin colour or the background who reach the IT Director or chief architect level. Sad, but true, so I go my own way, hard-core, no compromise.

+PP+

Buy My JavaEE 7 Book in Packt’s 10th Birthday Celebrations

July 4th, 2014 No comments

My publisher Packt are celebrating 10 years of success with over 2000 Titles in its Library. To celebrate this huge milestone, Packt is offering all of its eBooks and Videos at just 10.00 USD each. You have the perfect opportunity to buy my Java EE 7 Developer Handbook.

There you go :-)

+PP+

Categories: Book, JavaEE, javaee7, Writing Tags:

Contractor Rates Don’t Track With Inflation

June 30th, 2014 2 comments

Contractor rates have not been tracking inflation in the United Kingdom for the past decade from 2004 to 2014.
I found some information from the IT Jobs Watch site to back this claim.

Source data: IT Jobs Watch site on Java

People complain about contractors being expensive, but we have to take care of our means. We don’t paid on sick days, holidays or attendances to training or conferences. We must handle our own business accounts or delegate that to an umbrella company, add in paying for professional insurances and, if we are truly competent and lucky enough, pensions and life insurance. It all adds up and yet since 2004 contracting rates have actually remained constant relatively.

Inflation Rate

The UK Consumer Price Index (CPI) is the standard way the government looks at the cost of living and despite the economic turmoil is still on the increase over the past years from 2004 to 2014. Contractors have been squeezed too, and so when an investment bank makes a claim that you must cut your rate by 10% and then six month comes back and says we need another 10%, then I find this untenable. Actually it is quite patronising to all of us: digital workers. Why are permanent staff not having their salaries also reduced by the same margins? The bankers have ran off with the all of the money.

I did some quick calculations on the CPI data on inflation rates. I essentially took the average inflation rate per calendar year and graphed it between 2004 and 2014. Here is the graph:


Data Source: Rate Inflation bounds between 2004 to 2014

I calculated the contract rates as if they did track with average inflation rate from 2004 to 2014 with a Google Spreadsheet. Here is the resultant data.

							
	Year	Daily Contract Rate (GBP)					
		350	400	450	500	550	600
1.33%	2004	354.64	405.30	455.96	506.63	557.29	607.95
2.03%	2005	361.82	413.51	465.20	516.88	568.57	620.26
2.33%	2006	370.26	423.16	476.05	528.94	581.84	634.73
2.32%	2007	378.84	432.96	487.08	541.20	595.32	649.44
3.61%	2008	392.51	448.58	504.65	560.73	616.80	672.87
2.15%	2009	400.95	458.23	515.50	572.78	630.06	687.34
3.27%	2010	414.05	473.19	532.34	591.49	650.64	709.79
4.48%	2011	432.61	494.41	556.21	618.01	679.81	741.61
2.83%	2012	444.83	508.38	571.92	635.47	699.02	762.57
2.57%	2013	456.25	521.43	586.60	651.78	716.96	782.14
1.70%	2014	464.00	530.29	596.58	662.86	729.15	795.43

The first column is the average inflation rate for the calendar year. The remaining columns are simple compounds from the starting rate as the header column. For example the left hand cell is essential £354.64 = 1.33 * 350 per day, then you just rinse for the row and reuse the last rate and then repeat.

So even the underpaid Java contractor earning £350 per day in 2004 should actually be now taking home a net gross day rate of £464 per day. As contractors in 2014 this figure should completely astonish us all, because it is more than the this year’s average daily rate of £425 per day according to IT Jobs Watch site.

Stand up for your rights. Don’t give up the fight.

Something is wrong here? IT developers are being underpaid for the value of their work. If we take away the effects of the wider economy that universally causes salary freezes and rates stagnation for other industries and sectors, we still should have seen an increase of contractor rates, but the data is quite catastrophic and clear. It says for the entire decade of 2004 to 2014 we have stopped earning more money. Why is this so? I reckon the reason is that we are pathetic, weak and lazy. The fact is that we don’t respect our digital rights and clearly unless we demand them or have more respect for our profession; and tell other people in our industry that we should be earning more money that this erosion is set to continue for the foreseeable future.

What about banking? Am I safe?

I should also point out permanent salaries have alway gone through a similar run. If you are in the investment banking arena, still, then ask yourself a question, when did you last, as a regular staff member outside of traders, get a cash bonus at the end of the year? Bonuses are now stagnated and if you are fortunate to work in bank, there are paid into your bank account over three to five years. The experience now is certainly not like how it was in the millennium years when you could get up to 40% of your annual salary as a direct bonus for working on the critical Y2K or the Monetary Union of Europe EMU projects.

Oh yes, the average length of permanent job in IT is between two and three years when people get itchy feet and move on the next, granted people tend to be scared to jump ship in times like these of economic stress. Regardless of the retention figure, conceptually, the lines are blurring between contracting and renewing with the same client; and working permanently for a couple of years; and it should be clear that there really is no visible light between the two, we should stand together as one, and demand our digital rights and values of pay for the work we do.

PS: File this one also under #ITMustChange2014.

Addendum : Friday, 4th July 2014

In the original post, I realised that I had not covered the permanent side. The following illustration shows the Salary job trend from IT Job Watch for the period 2004 to 2014:

What do you visually notice immediately from this area chart? The salary bands are more constrained than those of contractors. The second thing that I noticed is that the average salary has barely risen still at the lower than CPI. In fact, the salaries on average has remained safe, risk averse and almost concerns. This is a good for the permanent person, who just does enough and treading the waters of the politics, the office and the role, surviving the restructuring etcetera, etcetera. It’s all very good. According to the data, it appears there is upper limit of developers cracking the £80K mark. That appears to be glass ceiling, which is certainly false for small subset of fortunate City of London investment banking roles, and I suspect, certainly wrong in the time before the economic downturn (2004 to 2008).

In the final analysis, for the prospective clients and disappointingly for the contractor state of the art that there are wild swings between the La creme de la creme and the uncle Bob-a-Job developers in comparison to the permanent chart. Not all contractors are the same, there are those who will undercut and go for the lower contractor rate and that may be acceptable to business, but in the long run, as a client it is worth remembering the old adage, “You get what you pay for”, which is less technical debt usually, better informed architectural decisions and sustainable software that you will be happy with in the future. If a client does continue with the papering over the cracks philosophy, then the eventually the levee will break.

+PP+

Here is Why DEV Contracting is Going Down the Tubes

June 28th, 2014 No comments

This came through the email box on 26th June 2014, verbatim text (apart from the emphasis mine)

Dear,
I am looking for Content management @ London, UK
Please share your contact number.
If this position of no interest, please refer your friends/ colleagues by making me in CC .
 
Job Spec:
·         Hands on experience in building and deploying enterprise level Web Content Management solutions on Adobe CQ 5.3 or above.
·         Should have experience on Adobe CQ 5.x integration with eCommerce and CRM systems (like SalesForce)
·         Should have deep knowledge on Multi-channel publish.
·         Very Good knowledge of Java Content Repository (API) suite, Sling web framework and Apache Felix OSGi framework is required.
·         Good experience is required on Java, JSP, Servlets, Ajax , XML, Jquery and JSON web technologies.
·         Hands on experience working with Java development tools like Eclipse required? Experience on deployment tools like Maven desired
·         Worked on RESTFUL and SOAP based web services
·         Experience with different SDLC methodologies
·         Good communication, team work and custom interaction skills is mandatory.

Skill :
Branding and Thought Leadership
·         Solution Architecture
·         Content Management Architecture
·         Adobe Day CQ
·         SOAP
·         Apache Maven
·         jQuery
 
 
Thanks,
Ha Silk In  Sober
*Recruitment Consultant
 
Datamatics HR & Consultancy Pvt. Ltd.
Switch Board: +91 20 39481313   UK: +44-2035002920
INDIA :The Hub,4th Floor | Lane 6, Off. North Main Road | Koregaon Park | Pune | 411001
UK office:Amba House, 5th Floor, 15 College Road, Harrow, Middlesex HA11BA
Switch Board: +44 (0) 203 021 3960
Fax: +44 (0) 208 711 3100
www.datamaticsgroup.com

Give up on the correspondence templates already

This recruiter’s correspondence is alarming, because she writes from a template and fails to address the addressee: Dear ____________(?), which is actually poor bottom-of-the-barrel tripe behaviour. Clearly, they do not live in the United Kingdom, and yet push a London telephone number. Would you do business with such a person? Would you rely on them if there was an issue with a timesheet or an invoice payment with this lazy first impression.
This recruiter also sent a linkedin request too, and I have now blocked them as spam. I marked their email address as spam also in Gmail.

Know your market, rates and margins

As contractors, we have to deal with a lot of email spam and it’s a whacko and cold business when foreign companies start getting into the action. It is no wonders that contractor rates have not improved in London in about 10 years. The contractor rates are comparable to 2006-2007, which is the on the balance hasn’t risen proportional with the cost of living and inflation. Yet these types of third-rate agencies can rely on a first time contractor or naive developer or even the desperate picking up this role and running with it, assuming they get the gig, until they find out the job is not as good they initially thought, because the agency is making idiot out of the contractor with an excessive daily-rate margin that is charged to the client.

The trick to this life is the margin charged to the client is hidden, it is on top of the contractor’s daily rate, which many contractor don’t care enough about ask. If they do ask the agency, then it is consider rude, why are you asking about the agency margin. Yet clients have a budget for their fixed projects in mind. What you happen to think is sweet deal, then months later turns into a raw deal. This is why I want this article to be found on the wider Internet, if nothing else it will educate.

Other readers may disagree, because they think that I am too hardcore or something like that, and that is really their career choice, but I certainly will not funding Datamatic Group’s BMW Z4 ambitions, time to name and shame and see IT change come about.

+PP+

Book signing at Devoxx UK 2014

June 28th, 2014 No comments

This is a post that almost got away. You probably already follow my twitter feed @peter_pilgrim. I had a fabulous book signing event on Friday. All I want to do express my thanks to the Java Community Process for supporting me and to my publisher Packt Pub for helping up expediently. Incidentally, the JCP is celebrating its fifteenth anniversary this month. It feels like age has passed by already, when I was Devoxx UK 2014 in north London.

Before the book signing began

One of the first JavaEE 7 Developer Handbook persons

It was tremendous to be at this event, which I know consider my home conference, Devoxx UK. My parents came just to the conference just before the book signing and I saw that they were lurking about the Oracle booth. They would be exactly where this photograph was taken or just behind. It was the very first time they had seen their son at a Java conference event. I hope I made them really proud of the struggle, and I will always keep fighting the power, believe that.

There were a lot of Java Champions in attendance. Antonio Gonclaves , the Paris France JUG Leader and Java Champion, is holding a copy of my book, how dare he? Antonio (R) is a long time book author with Java EE and his publisher is Apress.

This splendid photo reveals the size of the exhibition hall and the length of the queue.

By this time, it is all coming back to me emotionally. There is great joy and satisfaction being Java User Group leader and talking to developers about their passion, their technology and their desires; after all, leader ought to inspire, because it is all about the hope for the future. I felt great to be in a position to offer some advice, a good word or simply say, “Nice job. Keep on moving on. All the best.”

I think I know this fellow, this Head of Java Development at some digital agency in London. Isn’t it true though? ;-)

Last but not least, I thank Roberto Cortez from the Portugal JUG for taking the time to snap all of the book signing photos with my Canon EOS 700D. Of course, I save him a special book for all of his hard work and time.

Just what on earth is going on at the Devoxx UK reception? They are sitting down on the job. Huh? Seriously, thanks to all of you ladies and gentleman.
IMG_1739

World Cup [table] football has started in enough at Devoxx UK
IMG_1741

JDuchess are in the house
IMG_1743

Ted Neward is sporting this TomiTribe tee-shirt at their booth
IMG_1746

Working the Oracle booth when everybody at the technical sessions is a long day and hard work, obviously.
This is where I did the book signing and yes, we, software engineers, demand, inspire and create the Java future just like the poster says.
IMG_1748

In the middle is Richard Warburton, who had a book signing a day before for his Lambdas Java SE 8 tome.

IMG_1749

Another view of the exhibition area
IMG_1750

This was Adam Bien, another Java Champion, at his session about testing Java EE at Devoxx UK
IMG_1763

This was Maurice Naftalin talking about “Is Your Code Parallel-Ready?” in Java SE 8
IMG_1757

I quickly dipped into session about OpenUI5, a new HTML5 JavaScript and CSS responsive Web UI library. This was Christiane Kurz talking it up
IMG_1759

Finally, here is Stephan Janssen (L) and Andres Almiray (R) to bring the whole experience to a close

Devoxx UK is due to return next year 2015 for three days instead of two from the 17th – 20th June. The attendance went up from 500 in 2013 to 700 people
this year. The number of exhibitors, who set up this year, almost doubled in size since last year. It looks like Devoxx UK is now embedded as the Summer Java conference to attendance. Hope to see you there next year 2015.

Devoxx UK 2014 from Roy van Rijn on Vimeo.

+PP+


Categories: Book, Conference, Devoxx, discourse, javaee7 Tags:

LinkedIn Request, Facebook Requests

June 24th, 2014 No comments

Over 16 year age content

I use Linked-In as online curriculum vitae and a career profile, and you may have seen post earlier in the year about my disgust at the IT industry recruitment practices. I am up to now several hundred plus linked-in requests that have overloaded my mail inbox over there. Admittedly, I am too lazy and I do not the time to sieve through all the time in a precise many. Linkedin also changed their web interface so that now all messages and invitations are pagination whereas before the request would load on demand as you clicked on a “see more” button. I bet other linkedin users with thousands of pending requests have given up too and do not even bother.

Why do i care about this? Because Linkedin network for information technology is becoming a bit like the marketing and fashion industries, where certain jobs are available to you, because of glass ceiling of networkability and achievements, which I think is a terribly disappointing. I use linkedin to announce when I am available for contracting or when I am unavailable. I update the linkedin profile about six to eight weeks whereas I never bothered so much five years ago.

I have developed certain rules for linkedin request for accepting people in my network. I consider my network to a good resource of quality and the people in there deserve to be protected from the unscrupulous desires of bad human nature.

Time is not for wasting

For developers, designers and architects, do you fulfill one of these?

  • Have I met you personally at conference at JavaOne, Devoxx, Devoxx UK or user group meeting?
  • Have you spoken at one test technology conferences?
  • Are you a leading light in the community? A Java Champion, Oracle ACE Director, Microsoft MVP or a JUG Leader, Google Advocate.
  • Are you vendor person that I might know? Oracle, Red Hat, Tomitribe, JFrog etc
  • In particular did you ever attend more than once the Java Web User Group, which I used to run?
  • Have I ever worked with you in a contract or permanent role?
  • Are you someone from the recent past that I know? Did you get me a gig, or put in a good word for me? Have I ever done the same for you?

What have you done for me lately>

If I have never met you then you are an outsider:

  • Did you ever get me a face-to-face interview with the client?
  • Did you get me more than one interview? Are you a consistent player as a recruiter?
    (Since 2011, I have kept private special spreadsheet to tracking the efforts of all recruiters and individuals and what they have done. It is a like a league table of performance and I can see at glance exactly that what this guy did compare to that other fellow, when they called, what job they called about. Was there a real job behind it? I review it every couple of months or everyday when I looking for the next gig.)
  • What was your interviewing style? Did you come across as good guy? If you lacked good interviewing technique, or asked dumb obvious questions about what is the purpose of a java.util.Map then your linkedin/friend request was probably consigned to the dustbin /dev/null. I have also been to some so-called pair programming test interviews. I remember I went to one early last year for digital agency organisation, which was waste of time, because the architect was biased already against me. I was deliberately marked down for the gig because I am very used to developing with a MacBook Pro and Apple keyboard and their test machine was a Lenovo laptop with Windows XP Professional, the type of development machine with the red pencil rubber pointer thing and the feedback they said after the interview via the agent was that I was not used to programming for while. What wankery? Obviously, it didn’t help that I was also an IntelliJ IDE guy and out of sorts now with any Eclipse / Spring Tool Suite editing. Of course, I forgot the keyboard combinations. I am now so glad that I never got that particular job with hindsight, the guy was obviously a moron with a celebrity ivory-tower architect company title. So of course those idiots who interviewed me will never ever get a linkedin request accepted.
  • Did you ask me to complete some type of Java (Scala) test before a telephone interview for a contracting gig? If you did this, then your linkedin/friend request was sent also straight in the dustbin (or ignored). I remember last year there was one Scala job offering £800 per day and it was about solving a Chess problem (8-Queens) with Akka. Before you could get a telephone interview with the company, you had to spent a lot of time writing this AKKA program. I mean come on, this was a fucking Scala contracting position and not a permanent role. You expect a practising professional to go write a program before a telephone interview be seen? In the digital media business, they call this sort of free work before tendering a contract as speculative web design. I don’t do speculative development of any kind and I am not against pair programming tests. If you want to get some work done then hire me or find the next lackey who probably do it for pennies. Hey, you get exactly what you pay for life. The poor recruiter who sent me this request had his friend request deleted and of course the incident is tracked in my private spreadsheet.
  • Did you repeatedly send me permanent jobs when I explicitly said I am only interesting in contracting opportunities? Again your linkedin / friend request was sent to the dustbin in the sky. It really shows that you are not really helpful or probably not good at recruitment anyway and this is sort of spam in lazy in behaviour.
  • Did you contact me for Java or Scala job in Preston or Leeds even though I live and work in London? How was that going to geographical help the client? It shows a lack of understanding again and desperation to find a lackey for a job: in the dustbin. It is not my fault that talent does not live up north. There are probably lots of people up north who want a chance to do the work, can do the work, they live locally to the client, so why not give them the gig and stop wasting time. The same rule about location, location, location applies to job opportunities to work in Middle East, Gibraltar, Holland, Ireland and Australia. Actually I put these all under speculative enquiries and the digital dust bin.
  • Were you the person that promised to send the job specification and the job reference number? But you never ever did send those items to me, instead I wasted my time trying to figure if another job specification was duplication with another recruitment agency. Pathetic and therefore straight in the bin too. I am not going to fucking waste my time, because you don’t have organisation skills.
  • Were you the type of person that never ever got me feedback after an interview? If you did get feedback it was weeks too late, not in depth or just one liner. Also noted in the spreadsheet and the link request in the bin too.

All of this might be read as derisory, pedantic and contrite, yet these filters are particularly for me, because they are my filters. It works for me, I keep my sanity, you are free to lose yours. Because at the end of the day, I just want good contracts, good work projects, good teams and definitely I want to protect my career from falling off the edge of the earth. I have worked too long and hard now, to play silly games that people might play, for twenty years. If you enjoy gaming the system, then sending a linkedin request to me is a waste of time, because the people I have in my network also about ensuring their careers are sustainable. They are certainly not about here today and gone tomorrow variety. I like to think that I am reasonable fellow, I am quiet and polite in real life and just enjoy it while I can, for as long as I can.

Circles of trust, integrity and friendship

How to do it properly:

  • For developer workers, invite me for a quick chat over coffee or set up meet-up at lunch time in the city. At least, then I can get to know about you and you can find out about what I do. You never know it could be start of a beautiful connection, better gigs or even more opportunities.
  • For recruiters, I say, try to avoid common mistakes like I outlined above with the information. Avoid speculative enquiry and time wasting activities. As a contractor, I want to know what the type of job is, the contract rate is, length of contract and the name client, if you can tell me initially, the location of the gig, the start date or any other specific items.
  • For fans, follow me on Twitter, read to my stream of consciousness or listen some Audioboo recordings that I have done. I usually attend the big conferences Devoxx and JavaOne and have already down some book signings at them.

I do have a Facebook account and for Facebook requests I treat them with an even more attentive eye, even though I use that social network less than Twitter. Facebook is for more direct human relationships. I really have know you or have met you a few times before I let you into that one.

Categories: discourse, future, it, Network, technology Tags:

Mreža Magazine Interview

June 22nd, 2014 No comments

IMG_1855

A little over a month ago, I flew over to JavaCro and gave a keynote and a session presentation. I completed an interview for Mreža magazine, which is in Croatian. The organisers were graciously kind to send me a couple of souvenir copies of the magazine. Mreza, Croatia sent me physical copies of their magazine, where I was featured as a Java champion. This was so terrific and an honour. Thank you guys and gals.

I was in the garden today and I thought I thought I get some snaps of me holding Mreža, which has a circulation of 5000 units. Actually, the package came through the post on Friday. I was able to look at my post on Saturday morning. Mreza is a big magazine in the little country of Croatia and it has full of content about local news, Java (and JavaCro), Windows, Business, information, technology and recent trends. Of course in this July edition, I am sharing the billing with the Windows Phone 8.1, the main feature and on the front cover, and other sections on technology investments and start ups. This next photo is one for the homies!

IMG_1868

This is the start of lead article from the magazine spanning six full A4 pages from Mreža.

IMG_1870

It all starts on page 56. The full length photo in the magazine was taken from JavaCro 2014 where I was doing the book signing.

IMG_1877

The following folk deserve my thanks:

Branko Mihaljević, Predsjednik / President Hrvatska udruga Java korisnika (HUJAK) / Croatian Java User Association (CroJUA)
Zoran Jankovic – Mreža interviewer

Special respect to the whole TomiTribe who have also made my memories of Summer 2014 ones of happiness.

Categories: community, Education, Interview, JavaEE Tags:

Scala Maps and Sorting

June 4th, 2014 Comments off

This is blog entry originally written in the middle May 2014. I also seem to writing this code every 3 months or so and then I forgot. So I need a trigger to remember exactly how to work Scala Maps and sort the entries by key.
Let’s break out the Scala REPL.

Welcome to Scala version 2.10.4 (Java HotSpot(TM) 64-Bit Server VM, Java 1.7.0_51).
Type in expressions to have them evaluated.
Type :help for more information.

We will create a map of collection of String associated with Integer elements. This data might have come a key value storage or you may have a similar requirement to work with statistical data.

scala> val map = Map( "Jane" -> 3, "Peter" -> 10, "Steve" -> 1, "Anna" -> 5, "Megan" -> 15, "Brian" -> 7, "Sally" ->  8 )
map: scala.collection.immutable.Map[String,Int] = Map(Megan -> 15, Anna -> 5, Jane -> 3, Brian -> 7, Steve -> 1, Sally -> 8, Peter -> 10)

In order to sort the data structure, we then convert the map to list collection of tuples.

scala> map.toList
res1: List[(String, Int)] = List((Megan,15), (Anna,5), (Jane,3), (Brian,7), (Steve,1), (Sally,8), (Peter,10))

Now we can sort using the tuples. Here is the descending order on the values:

scala> map.toList.sortWith( (x,y) => x._2 > y._2 )
res2: List[(String, Int)] = List((Megan,15), (Peter,10), (Sally,8), (Brian,7), (Anna,5), (Jane,3), (Steve,1))

Here is the ascending order on the values

scala> map.toList.sortWith( (x,y) => x._2 < y._2 )
res3: List[(String, Int)] = List((Steve,1), (Jane,3), (Anna,5), (Brian,7), (Sally,8), (Peter,10), (Megan,15))

Here is another tip. Let’s say you need to create a histogram of 100 different product items. You can create this data structure
immutable at the beginning. However, as you are building the statistic, you may prefer to use an mutable collection map instead.

    val buckets = collection.mutable.Map.empty[Int,Int]
    buckets ++= (1 to 100).toList.map{ x => (x,0) }.toMap

Now in your statistic gathering part, you can write something like this:

    val keyName: String = ???
    val keyIndex: Integer = convertNameToIndex(keyName)
    buckets(keyIndex) =  buckets.getOrElse(keyIndex, 0) + 1

And then render the sorted data into a top ten products

 val sortedProducts = buckets.toList.sortWith{ (x,y) => x._2 > y._2 }
 println(sortedProducts.take(10))

That’s all.

Categories: Development, programming, Scala Tags:

My Up and Coming Conferences

May 30th, 2014 Comments off

I will be attending the following events for the remainder of 2014

Perhaps, I will bump into you at one of these events. See you there.