Saturday, December 31, 2016

Learnings from 2016

Starting a new series of blog posts to capture all my learnings outside of my paid day job (Inspired by +Sankar P). 2016 was a decent year for me in terms of learnings outside day job. The year started well with an exciting side project at work (Similar to the 20% project at Google). Over time I became very busy with lots of personal and professional commitments / events. Here is a quick summary of things that I have explored this year:
  • Kickstarted the year with a side project at work. Learnt quite a lot of technologies as part of this project. Got to know about the internals of few proprietary frameworks as well. 
    • As part of the project, explored various techniques available for describing API endpoints. Ended up using Swagger Open API specification for defining our APIs. 
    • To automate the process of generation of API stubs (language specific SDKs) and API specification, learnt about maven plugin development. Wrote my first maven plugin for this task. Learnt a bit about gradle as well. 
    • Learnt about Swagger UI and built an API playground for trying out our internal APIs (HTTP). Customized it to meet the needs of our internal APIs. 
    • To try out our Java / Python SDKs, built a sandboxed code execution environment (similar to JSBin but for Java and Python). Explored various techniques used in this space. The primary challenges here are: 1. Sandboxing code execution 2.  Limiting the resource usage 3. Whitelisting packages / modules to be used. Leveraged Eclipse's next generation Cloud IDE - Che for getting this done. The project is quite modular and it exposes API for managing projects, building code, etc. We have slapped our code execution UI in front of Che's API. On executing the code from the code editor (CodeMirror), a new project gets created inside a pre-configured eclipse workspace and the code gets injected into a predefined template (pseudo-sandboxing). Then, they are executed using maven builders in Che. Templates took care of including only the necessary packages. We wanted to build a full-fledged sandboxed environment using docker but never got to do that. We were able to limit the resource usage with the help of builder API provided by Che. Though we were never close to getting a complete code execution tool, we were able to create a fully functional basic version and were quite happy with the learnings in this space.
    • Learnt a bit about Jackson JSR310 serializer. 
    • Our team came out as the winners of the 2016 edition. Won a firm sponsored trip to Singapore to attend Tech in Asia 2016 conference. 
  • Started using the latest and the greatest version of JavaScript ES6 in mainstream projects. Got a good understanding of babel transpilation process.  It is the plugin ecosystem that makes babel so powerful. Wrote a simple plugin for performing root lookup of ES6 modules. 
  • Tried some micro web frameworks in Java - liked Spark. They seem to be heavily inspired by Sinatra, Express. 
  • Been reading about new Java 9 features. Java AOT compilation and modules look interesting. Java is getting inspirations from many dynamic languages.
  • Learnt about the concept of instant pages. Google's AMP. Facebook's Instant articles. Apple News. I am pretty convinced that they are not going to be the solution to make web faster. They are in fact breaking the standards of the web. 
  • I have been a huge fan of Sublime Text. Moved to a new editor this year. Any guesses? Yes, it is the open source code editor from M$ - Visual Studio Code. VSCode has good support for web development. Intellisense for JavaScript is by far the best I have seen in any editor. VSCode has similar mappings as Sublime Text. The migration was quite easy that way. I am that kind of person who gives importance to the look and feel of the editor. The default theme of VSCode was quite pleasing on the eye.  
  • Worked on another exciting side project at work. This was another good learning experience. Built a tool called 'Aevalan', a voice assistant for internal data.
    • Explored Electron, an open source framework for building desktop GUI applications using standard web technology stack. There were many similar attempts in the past. But, electron looks very fresh and solves real problems with desktop app development. Quite impressed with its architecture. VSCode, Atom, Slack are all built using Electron.
    • Wrote some Alexa voice skills. I had bought an Echo in early 2016. I am really impressed with its capabilities (Natural Language Understanding - NLU). It understands the context and responds accordingly. More than me, Adhiyan is huge fan of Alexa. 
    • Wanted to use Alexa for this project. But, couldn't use Alexa as it expects a publicly available endpoint. Wrote an Alexa clone - its voice interface primarily - using Webkit speech recognition API. Gained good understanding of how any AI chatbot / voice responder works - Intents.
    • Built microblogging capabilities into this application. Wanted to explore a NewSQL (not NoSQL) database for this use case. Explored CockroachDB, an open source equivalent of Google's Spanner. CockroachDB is a distributed database with support for SQL, joins, transactions, etc. The database is not yet production ready. We have chosen CockroachDB as it is still being actively developed. It helped us to learn core concepts of a distributed database. Read good number of PRs to understand how things are implemented. There are a bunch of items to follow up on this space. 
    • Used gRPC for exposing our APIs. Not very impressed with it as it has very poor support for browser access.
    • Used react + redux stack for developing this application. My first complete react app. Implemented the PRPL pattern.
  • Explored new bundlers (Webpack 2 and Rollup) available in the web development space. Learnt about the tree shaking technique which helps reduce the size of your bundle. (Tree shaking vs dead code removal). Learnt about another related concept - Code splitting.
  • Tried the new package manager, Yarn. It seems to be solving all problems that npm couldn't. However, it has too many bugs at this point to be able to use in production. I am using it as the primary package manager for side projects.
  • Started learning some new languages (Lua, Elm) but never got to do anything significant using them. Been wanting to learn Go and Swift for quite sometime. Hoping that 2017 will be the year.
  • Made another failed attempt in trying out web assembly (wasm). Demos and getting started guide are available now. This time it was more of a constraint on my hardware resources. Enscripten SDK was taking too much space for my Macbook Air to handle. Time for disk space upgrade. 
  • Wanted to have better understanding of at least one containerization platform but never done that. Need to catch up on Serverless architecture as well (have used lambdas a bit). More items to explore in 2017.
  • Started reading about TensorFlow but didn't get anywhere with that. Another item for 2017. 
Overall, 2016 was a decent year with good amount of learnings. Let's see what 2017 has in store of us. Happy new year to all!! :)

-- Varun

No comments:

Post a Comment