Sunday, January 15, 2017

Upgrading my bash on MacOSX and simple tips found on the internet.

I find my self doing lots of work in the terminal lately, I have to admit I was not that type of guy or an expert, but over the years I needed to step my bash/cmd/terminal game up. 

So I just red yesterday this very short and simple article, and I was like , wait a minute I've done some of these mistakes in the past.  Master Bash and Terminal. Worth your time. I guess any bash / linux wizards already knows all of these simple trics. It was funny because in the examples the author claims that he searches a lot his bash history for previous executions of 'kubectl', I was like, Yes i do this a lot every day.

After reading this article I ended up to this simple guide on how to upgrade your default 'bash' version on MacOSX, from version 3.2.x to 4.4.x .

$ brew install bash
$ chsh -s /usr/local/bin/bash
And then make sure on iTerm to add this, so that it starts as a login terminal. (/usr/local/bin/bash --login)

ps) I have tried to switch to 'fish' some time ago, but still some incompatibilies and extra tricks you need to do, in order to have the very same experience with bash - i was not ready for this.

Saturday, December 03, 2016

Moving to the cloud & tech debt - a trap

I am thinking (or maybe I can see), that while more companies jump  to the cloud, migrating their existing software solutions and services, things like 'tech-debt' or 'architectural-debt' are going to become a first class citizen and hot topic, again. Which is a good thing! Really!!!

I am very happy about it, because I do believe that tech debt, over-engineered solutions or hype driven development do actually contribute to an increase rate of  'mediocre' software solutions and services, while we (the software engineers) think that we are doing just great.

But how tech debt is going to be again, a hot topic among meetings while migrating to the cloud? It is simple, the bill by the end of the month! Are you doing micro-services for no reason at all? Do you have a small monolith broken down to 1000 different pieces because this is the trend- for no good reason? Is your API chatty? Have you bundled a ton of libraries and features to your product that actually are not needed but it was just to play around with tech or your engineers to feel happy? Is your code spinning the CPU for no good reason? Is your code using the filesystem inefficiently? 

Maybe you had a 'hint' of these problems, but there were not so intense when you had full control or ownership of the deployment platform.

But now you don't control the hardware, you are being billed by individual operations.You PAY!
And at a certain point people will start to think about it again. Why our Google Cloud bill or AWS bill is so big? Maybe some will decide to go back. Who knows?

What I do suggest though is, spend some time and review your solution, your architecture and the quality of your code. There are for sure, great advantages offloading your infrastructure concerns to a more flexible - elastic world, but it is still YOUR software. And all the sins and mistakes of your software are not going to be 'hidden' or auto-magically resolved because you moved to the cloud, there is a high chance they are going to get' bigger'.

The cloud is great, but it wont make bad software great.

Monday, October 24, 2016

Voxxeddays Thesaloniki - a quick note #vdthes

Last Thursday & Friday, I did a short trip to Greece in order to attend the very first Voxxed Days in Greece, it took place in Thessaloniki

First of all, I would like to congratulate, the master mind behind the overall organization +Patroklos Papapetrou , who eventually succeeded and materialized a long lasting dream (for many of us), to establish in our small country, a  conference and activities that would bridge the gap between our small IT market with the rest of world or even the bigger European Markets and developer communities.

The 'Voxxed' family of conferences, is the ideal way for putting our country back in the map of IT conferences, and a great start to warm up again the local developer community.

So overall for me, the most important thing, is not if this particular first attempt was successful  (which was). The real important thing is (Athens or Thessaloniki) Voxxed Days,  to continue to exist next year and the year after, so that the local community can grow on them and vice versa! So we all need to support this initiative. The price was more than fair and I want to make a call to all the developers (and their companies) in Athens, in a few months time, to support the Athens Voxxed days.

So I am really excited we are going to have an Athens Voxxed Days, which I'm planning to attend and already thinking maybe submitting a talk as well.

During the conference I had the chance to talk with lots of  'blog' friends. Developers and subscribers of my blog. Thank you guys, I promise to keep the blog live and maybe make a new attempt on the podcast.

I was very happy to meet some old friends and talk about the latest state of the Greek IT market, like Spyros Anastasopoulos (one of the founding members of JHUG). You can read his thoughts and review about the conference here. I wish we had more IT professionals like Spyros, both technically but in terms of professional ethics. 

Eventually my trip was...very short, so I could not enjoy the beautiful city of Thessaloniki, maybe next time!

See you all in Voxxed Days Athens!

Monday, October 10, 2016

Set default file associations on MacOSX with duti..and save some time

Wow, how many lost minutes or  hours, every day, because I did not know this a long time ago. I am bit ashamed.

How many times, while working on your mac you get to Open a File, and the system by default opens an editor or an application that is usually set by default. I can not count how many times I have killed Xcode when trying to open a shell script, a csv file a java source file or whatever. When I was fully irritated, I was right clicking the file, and I was manually changing the 'Open With' option. This is the end!

Step 1:  Install duti from brew  (give the guy a Star in github plz) : 

brew install duti

Step 2:  Check the current default application for a specific file extension, e.g '.java' files :

duti -x java

It will prompt something like the following, indicating that Xcode is the default editor.
/Applications/ ---> this is the bundle ID

Step 3:  Find the 'bundle ID' of the application you want to be default editor. 

I want to open by default with IntelliJ, so I need to find the bundle ID. Thanks to this excellent post, I found out about osascript (its bundled in MacOS)

osascript -e 'id of app "IntelliJ IDEA"'

It will output the following :


Step 4:  Use duti to update the .java file association to IntelliJ.

duti -s com.jetbrains.intellij .java all


Do you want to do more? For example usually I want Sublime to open many files.

Get the Bundle ID

osascript -e 'id of app "Sublime Text 2"'

And set some 'known file types'

duti -s com.sublimetext.2 .sh  all
duti -s com.sublimetext.2 .md  all
duti -s com.sublimetext.2 .txt  all
duti -s com.sublimetext.2 .json  all
duti -s com.sublimetext.2 .xml  all
duti -s com.sublimetext.2 .adoc  all

Sunday, August 28, 2016

A dream come true...teaching - Professional Java developer: Tools and best practices

I always enjoyed sharing knowledge. One of the reasons I blog is to share my knowledge on things around my job as a software engineer. Founding and running (with a handful of friends) the first Java User Group in Greece back in 2003, was due to the fact that we could not get sufficient training or access to personal development around our work, so we wanted to shared and re-use the knowledge we had as a small developer community. When I get to work, at any job, in any place, one of the things I look for during my first days, is how much knowledge is there for me, so I can read and get up to speed. I always enjoy, 'training' young developers, show them what I know, bringing them up to speed, shaping their 'developer' personality. 

I am really happy and excited that in a month's time I am going to fulfill a big dream, teaching. I am not an academic, I am a professional, a software engineer and under this context I am going to share some my views, experiences and knowledge, in a short course at the City University of London. You can find the link here. The title is ' Professional Java developer: Tools and best practices ' . My main goal is not to become a teacher, for me the whole initiative is mostly giving back some of my passion and love for my work as a software engineer,  to people that are willing to walk the same road and join me-us in the software development market/world.

The course's main target is to infuse the experiences and standards of today's Java developer job market into a short  course. I am planning a more hand's on learning experience, with an opinionated agenda rather a classic academic computer science course, that you will get as an undergraduate computer science student. I want to provide (as much as possible) the main skills and knowledge that any junior Java developer is nice to have and be familiar with, when he/she joins for the first time a company and a software development team. At least introduce them and then let the student expand on this knowledge.

The agenda and course content is almost finalized (with some minor exceptions) but I am planning to go through topics like
  • Modern Java IDE's - using effectively a Java IDE
  • Using code versioning tools like Git.
  • Latest Java  language's features.
  • Build tools for the Java related, walking through the basics of Maven or Gradle.
  • Testing with Java, using frameworks and libraries towards test driven or behavior driven development
  • Modern enterprise development with Java, a walk through to the available enterprise level micro frameworks, like Spring Boot, Wildfly Swarm, Vertx etc.
  • Development of RestFul API's in Java, using available tools and libraries. 
  • Cloud and Devops tools for the Java developer, a walk through tools like Vagrant, Docker, Amazon Webservices, the cloud.
  • Coding dojo's where we will investigate and learn about, 'famous' Java libraries that you most probably going to 'use' in your Job and it would be nice to know about them.
  • Tips and exercises similar to many interview questions a junior java developer might encounter during his/her job hunt. 
The course is suitable for different kinds of people
  • Computer science undergraduates that are preparing to enter the market
  • IT professionals that they want to have a quick intro to the practices and tooling of the Java world
  • Non IT professionals that are converging to the IT industry and specifically to software development using Java - but are already familiar to developing code with Java

I am very excited, I hope we could start on the 8th of October (assuming that there is enough interest and students). The class is going to be every Saturday from 10 to 5 (or so) and is a 5 part course, meaning 5 Saturdays.

Special thanks to my friend Dionisis Dimakopoulos, who eventually was the one that had the idea and gave me this opportunity, to share my passion through this course.