GopherCon India 2015

gophercon-con-logoGopherCon India happened from 19th to 21st February 2015 in Bangalore and it was an amazing experience for me. It started with workshop on first day followed by 2 days of main conference presented by speakers coming from different corners of globe. Slides from the conference are available on github and pictures on flickr

Go Workshop

I am totally new to coding in Go, so I thought it will be a good idea to attend the workshop. I hoped that it will help me in understanding the conference talks better. The topics covered by  William Kennedy during the workshop were very good. He covered all the basic and important topics like variables, pointers, functions, types, slices, methods, interface, goroutines, channels, etc very well with hands-on examples.  Goroutines are very interesting topic as all of them can run concurrently and leads to no block in your application. It took me some time to digest variable declaration in Go.

For example, for declaring an int variable in C/C++ or Python we do “int foo” while in Go we write “foo int”.

Same applies to function definitions. Function declaration in C, C++ looks like-

return_type function1(int *var1)

while in Go we write,

func function1(var1 *int) (return_type1, return_type2, …)

But from whole conference, I observed lot of speakers saying that while learning any new language you should forget whatever you learnt before and learn as if you are learning a new language.  I personally liked this idea and I would suggest everyone should follow this while learning new concepts.

       

Conference

Day 1

After usual registration work, everyone went to conference room to attend talks and keynotes. It was quite surprising to see cute little gophers sitting on chairs for everyone 😀

Conference started with Opening Keynote by Francesc Campoy Flores where he nicely explained various types of people who uses Go. He categorized Go users as

  • Newcomers – who are very new to Go and want to learn
  • Explorers – who are familiar with basic coding in Go and are now trying to make useful applications using Go to understand it more
  • Builders – who know Go very well and have developed Go applications
  • Experts – who understand specs and knows all details of Go

It was interesting to know about these tools:

  • gofmt – Formats your code according to Go standard (yay, you don’t have to worry about formatting anymore)
  • goimport – Adds missing import packages in your code and also removes unnecessary imports.
  • goreturns – The best one as it will run both gofmt and goimport for you, in addition to that it will auto add return variables in case your functions don’t have any.

Talks from Aaron Cruz and Gabriel Aszalos provided multiple tips on how one should be working on a Go project and how code should be written. Couple of tips were:

  • Use good editor of your choice which has support for Go like sublime, vim, etc to write code faster.
  • While contributing to new project, first go through README and documentation in order to understand overview.
  • To understand a new codebase, it is really important to follow the flow in which code is written and best way is to first look for entry point in project.
  • Every now and then you should look into components of project which you haven’t looked into from long time and refactor them in case needed.
  • Use gofmt, goimport and goreturn tools to keep code clean, formatted and less error prone
  • In order to get source code from Github, we can use “go get <source name>” instead of git clone.
  • Code should be well documented, tested for keeping code maintainable for long run. At least exported functions from libraries must be documented so that user can use them without hassle.
  • Code written in Go should be readable – not in english language but in terms of Go. For example if you are creating an empty struct in Go, no need to to create a new empty struct like type struct empty {} instead of it whenever you need an empty struct just write struct {} there
  • Try to use features available in Go libraries instead of writing your own. For that one should explore Go functionalities and should go through its specs.

Regardless of what language you are coding, I would say these tips are useful for everyone.
     

The next talk was about Mike Gehard’s journey from being a Rubyist to a Gopher. One of the things he suggested was to read the Go language specification to understand why certain design decisions were made. For the builder, he suggested to understand Go’s common idioms as it helps in producing effective code. The major difference he discovered between Go and Ruby was OO support. He suggested to use small structs and methods that operate on them instead of classes/objects. Learning to program to the interface is something he emphasized as well. For understanding concurrency, he asked people to watch the Concurrency Patterns talk by Rob Pike. For experimenting, he suggests using http://play.golang.org/ . Finally, he said that the golden rule is to forget old idioms from Ruby and not fight Go.

Julia Poladsky shared her experience on how she is using Go now in her work with Java Script. Being a web  front-end developer, she compared very well how Go is a better designed language than JS. She feels Go as one of language which is going to be used in future as well by developers due to features like providing async behaviour, concurrent, Garbage collection, enforcing error handling in code which makes code more robust and I too agree with her.

A Physicist at day and Android app developer at night, Verónica explained how easy it was for her to code in Go being a Physicist. While she was excited by the possibility of writing Android apps in Go, she mentioned that the current support is crude and very painful to setup with the Android SDK.

       

While I haven’t written Go packages myself, this talk about principles of designing packages gave a good insight in Go practices. Alan Shreve explained that usually Go packages should do everything synchronously and let the called handle the async. However, he also showed situations where the opposite was desirable.

Rajesh Ramachandran shared his experience with using Go at Qube cinemas where they do high performance digital media. Due to performance requirements, the actual processing happens in C and Go is used to do post processing with the results. He explained with code how to call Go methods from C and the other way round. He listed the caveats that one should be aware of when using Cgo to do this.

    

First day ended with closing keynote by Baishampayan Ghose. He told in a very beautiful way that Go is not a 6 year old programming language but it is more than 40 years old. He explained how Go used different useful concepts from various old programming languages like BCPL, Modula2, Newsqueak, SmallTalk, Pascal, C, etc and evolved as a powerful modern programming language.

It was interesting to see that lot of people have migrated from Ruby/Python to Go and are very happy with it. It was funny to hear everyone saying evil Java during conference. I was very happy with talks covered on first day and surprised to see Go solving multiple real world problems in fast way. I was eager to attend talks which were lined up for the next day.

Day 2

As Go is a high performance language which comes very close to C, it was not surprising to see people using it for embedded programming. Kunal powar  from SoStronk presented the EMBD package which lets people write embedded code which interacts with sensors and various communication protocols. The cool thing about EMBD was that it can work on a variety of boards like Raspberry Pi, BeagleBone etc. Kunal showed a demo of an accelerometer controlling an airplane model in a desktop application.

Martin Schoch talked about bleve which is a text indexing and search library for Go where you can index text based documents and later query for terms. You can have exact matches by keyword or a complete phrase. Martin demoed bleve by querying the Gophercon India talk schedule he had indexed earlier. He also showed that there is Unicode support by searching for the Hindi terms in Wikipedia pages he had indexed.
EDIT : In demo, taking Hindi Analyzer as example Martin showed Indic and Hindi character normalization, Hindi stemming, and Hindi stop word removal. Analyzers are what improve search recall when you customize the mapping to indicate data is in a particular language.

   

The next talk by Jyotiska NK was particularly interesting because I personally found Image Processing quite difficult in my college days. Jyotiska explained that their system extracts dominant colors from images in e-commerce websites such as Amazon. The earlier system was implemented in Python but was very CPU intensive and memory consumption was high. They later implemented the same in Go and got reduced CPU usage, reduced memory and could serve more requests thanks to Go’s easy concurrency. The only pain point was interfacing with C code for OpenCV which was complex even with tools like SWIG. The other limitation was that there weren’t that many libraries in Go which supported scientific computing like SciPy and NumPy in Python.

Dave Cheney ended the conference with his closing keynote in which he talked about why Go is simple by design. He explained that to the Go creators it was more important to be simple than to being complete.

     

There was also a FAQ session where panel members and speakers gave answers to questions asked by conference attendees as well as asked online

  • One of question was first Go experience of panelist members and kinds of problem they faced. Answers were quite mixed like for Julia, in Denver there is already active Go community while for Verónica in Mexico people are very repellent for learning new language.
  • Support for embedded system like Raspberry Pi – currently embd is there with few functionality. In future support for embedded devices will be added.
  • Can Go be recommend as first programming language to learn like C, C++, Python? The panel agreed it can be.

I must say that GopherCon 2015 was awesome with variety of talks on Go. For beginners in Go like me, this conference was the right place. Thanks to my employer Red Hat for sponsoring my workshop and conference ticket. Organizers had done very good job in arranging everything including venue, speakers, food, quality of talks and keeping conference on time. Being a C/C++ programmer, I must say that I am impressed by Go. Looking forward to learn it in more detail and also start with writing few applications using Go to get feel of its power. I would recommend others as well to give it a try.

Awesome days during Akademy 2013

Awesome days during Akademy 2013

Hi all,

Being a part of KDE Akademy is one of the most awesome experiences ever. This was my second Akademy after the one in 2012 . Akademy 2013 was held in the beautiful city of Bilbao in Spain. Held from 13th July to 19 July, it had 2 days conference followed by 5 days of workshop, Birds of a Feather sessions (BoFs), lots of hacking, and of course lots of fun!

Day 0

I reached Bilbao on 12th July and went for pre-registration where I also met many KDE folks (some of them I already met during last Akademy and some new people). It was great to meet everyone again, we all had a fun time together with greeting each other, drinks and lovely music.

Day 1

The first day of the conference started with a keynote by Eva Galperin . A member of EFF, she talked about the NSA surveillance and how it affects people outside the US.

After keynote, Kevin Krammer gave talk on Declarative widgets where he explained and showed demo on how to create widgets based UI in QML. This approach enables non-C++ programmers to participate in UI development for traditional desktop applications.

Till Adam talked about KDE on Blackberry where he explained about Blackberry 10 architecture which is totally based on Qt with QNX kernel and discussed why KDE should be interested in another mobile platform.

We got a chance to hear the story about the Mer Project and the current status by David Greaves. Mer is used by Jolla for the Sailfish operating system and Plasma Active as the base distribution for creating tablet systems.  He talked about how the Sailfish SDK uses virtual machines for even the SDK (apart from the simulator) as it makes it easier to run the SDK on different platforms.

I always wanted to see a live demo of the Jolla Phone, based on Sailfish OS, and I got lucky! Along with a beautiful demo of the phone, Vesa-Matti Hartikainen  from Jolla talked about the history behind it, how Jolla’s team collaborates with various open source projects such as Qt, Mer, and Nemo Mobile to build the system.

Further Will Stephenson talked about LightWeight KDE which try to exploit KDE’s modularity and tweakability by cutting down a full feature desktop to the lightweight desktop size, while retaining the ability to use additional components from the full feature set as needed.

This time we had a new guest at Akademy, the Razor Project. Jerome Leclanche talked about the effort towards a lightweight, modular, Qt-based desktop. He discussed how Razor project collaborates with other desktop environments and various efforts towards compatibility with KDE Frameworks. And if this was not enough, he pointed out that even LXDE is moving to Qt (yay!).

I think this is probably one of the coolest things about the Free Software communities, that even projects that are technically competitors actually collaborate with each other.

Marco Martin talked about Plasma 2 where he talked about changes in the Plasma library from Plasma 1 to Plasma 2, how to use it from any application, and how a single workspace will now be used for all form factors, such as Plasma Desktop, Netbook and Active. We are planning to move Plasma Media Center too from Plasma 1 to Plasma 2 (and hence, to Qt5) once the libraries are stable enough.

Later, Shantanu Tushar gave talk on “Pair Programming”. He shared his experience on benefits of doing pair programming and how did in KDE projects like Calligra and Plasma Media Center with me, Sujith and Akshay.

At the end of the day, Thomas Pfeiffer and  Björn Balazs gave a talk together on Task-Centered UIs in Plasma Active . Plasma Active is one of the best example I know which is a tightly integrated system combining various components into it. UI workflow is in such a way  that optimal user intervention is required while achieving required task.

   

Jolla phone demo                                Thomas Pfeiffer

Day 2

Similar to last year, there were Lightning Talks by students. It was interesting to see that this year students were from GSoC as well as other mentoring programs like SoK, Google Code-in, OPFW. Students were from different KDE project like Telepathy, KDE connect, Keyboard layout, Digikam, Tomahawk. It was good to see the progress and experience of students while working on KDE projects.

Lydia Pintscher talked about Negotiation Theory for geeks. It was about conflicts which arise in free software projects and techniques to resolve them.

As per tradition of Akademy, we had a group photo 😀

After lunch, Kevin Ottens gave Keynote on KDE Democracy where he looked upon the democratic and meritocratic structure of communities and how KDE has changed over the past few years.

Later, Vishesh Handa and Martin Klapetek gave talk on Metacontacts Library which aims towards a system to aggregate all multiple contact sources into a manageable way. This is done by keeping all information in Nepomuk and providing library to developers called KPeople.

Simon is KDE’s speech recognition system which is maintained by Peter Grasch who gave an interesting talk on FLOSS Speech Recognition. He explained current status of this project and also gave demo on how nicely speech recognition works.

At the end of conference, there were  short presentations by various sponsors of Akademy  like Blue Systems, BlackBerry, Red Hat  etc.

Like every year, we had the awesome Akademy awards given to:

Eike Hein          –   Best Application award for his work on Konversation

Vishesh Handa –   Best Non-application award for work done in  Nepomuk

Timothée Giet   –   Jury’s Award for shaping the future and community of Krita

Kenny Duffus   –   Jury’s Award for for being the memory and soul of Akademy

Dani Gutiérrez  –  Organization Award for organizing wonderful Akademy

I had a great time during Akademy by meeting old friends again, making new friends, learning new stuff and lots of fun 😀 Thanks to my employer, RedHat for sponsoring my travel and KDE eV for taking care of my accommodation.

Links

Schedule  –    https://conf.kde.org/en/Akademy2013/public/schedule/

Videos      –    http://files.kde.org/akademy/2013/videos/

Photo       –    http://www.flickr.com/photos/49657487@N07/sets/72157634760964024/