Tuesday, December 24, 2013

Rant against SAP

For the past 2 months, I've been involved with one sap hana project of which I am doing predictive analysis(PAL). Since this is a proprietary technology, there is an inheritable handicap when it comes to trying various thing out of the ordinary. Basically the lowdown of this tech is that SAP HANA is a memory resident database. The definition ends there - no one has compared it with an existing solution like sqlite and especially this when the people at SAP are trying to market this inside a bundle of software aimed at startups - not cool attitude here, sap and I wonder why someone getting this step-motherly treatment would base his/her startup over this app stack?

For doing predictive analysis, the recommended way is to use the pal library- which consumes memory on the server itself for speeding things up - but currently is liable to crash the server by getting stuck. Call my approach stupid but I try to run PAL analysis over entire table - it basically freezes in execution and any other PAL job cannot run. Today, it took me entire day to get a calculation view straight - and don't ask me how because for the majority of the day I was getting aggregates of the results when the sql script simply contained:
var_out = select * from ..

There is a huge talk about integrating PAL with hadoop, but it is only for non-structured stuff and no MR job is present to simplify things for server jobs. I hope to see some active work in future for this.

What is most baffling for me is the SAP Hana studio that has tons of blocking calls like right clicking on the packages to create a new calculation view:
What I fail to understand is why the menu is not displayed immediately. Also, the overly usage of blocking IO is a very poor way - there are ways to run non blocking jobs in eclipse rcp and when developing eclipse plugin based projects, we were dissuaded from following the easier approach of blocking the user and running the job first. I understand that the team developing sap is having low latency to their sap cloud, but there are developers from India like me for whom network latency does play an important role.
I do hope things improve in the future versions where these problems do not harass us developers.

Thursday, November 28, 2013

Book Review: Java EE 7 Essentials

I have recently finished reviewing the book, 'Java EE 7 Essentials' by Arun Gupta which took me considerable amount of time as I was on and off in its study and have not done any major development/study in enterprise java space recently.
As I was having prior experience in j2ee, I was more keen in knowing what new changes have been transpired since the Java EE 6 in the enterprise java specification. One of the noticeable observation is the fact that this book does not follows a sample application (like the famous petstore example). Depending upon your reading habits, it may or may not bother you.
To understand topics like dependency injection, I had to use the internet as my resource as well, for example, to understand differences in its approach in enterprise java & spring. However, when comparing this against the standard j2ee resources, this is more fun to read and does not bores you down to every little detail (which can be obtained from the api/documentation itself).
The book covers the entire enterprise java stack which can be classified under the following points:

  • Servlets, JSF
  • RESTful and SOAP based Web Services
  • JSON processing
  • Websockets & server endpoints
  • EJB & JPA specification
  • Context & Dependency Injection in Java EE
  • Concurrency
  • Bean Validation
  • JTA and JMS
  • Batch Processing
It is helpful to know a basic idea of these concepts as the book dives right into what's new and noteworthy for JavaEE 7 release.
Finally, creation of a sample application is explained that is a three tired architecture which uses the enterprise java detailed in the book.
For an enterprise java expert or beginner, this is the current go-to book to get started with the Java EE 7 specification and makes the learning somewhat less painful that it used to be.
Although setting up application servers is not dealt with, basic instructions to install and use Netbeans IDE (Java EE bundle) are provided which contains the tomcat application server itself.
Disclaimer: I received my copy of the book in its beta version through the oreilly's bloggers review program.

Friday, November 22, 2013

how i learnt to stop worrying and love the Javascript

It's been an eventful week for me with lots of new things for me to try on. But the centerpiece for me remains into trying out various things using Javascript based programming application stack.
Even after doing javascript since 2005, until recently I never had the chance to dig deep into it. Also, when I first came to know about node.js in 2010, it was a pretty nascent technology in those days and was not developer friendly. However, a lot has changed since then and now this technology app stack is not only matured, but is also mainstream. Considering the recent interviews that I undertook in last month, apart from rails skills, people also asked if I was comfortable with node.js, which might not be an indicator for the rails community, but is nevertheless a repetitive occurrence for me.
Currently the app stack stands as follows

Client--(ember/knockout/angular)----json data----Backbonejs(nodejs)---Json data---Mongodb(database)

This is essentially a complete app stack built on javascript (with DSLs thrown in for convenience - such as json).

Coming to backbone, it is quite similar to sinatra and is considerably easier when compared with native nodejs and many concepts are used similar to what has been done in the sinatra framework.

var express = require('express');
var util = require('util');
....  //Other libraries in use here
var app = express();

app.set('views', path.join(__dirname, 'views')); // set the views here
app.set('view engine', 'jade');  // using jade view engine

app.configure(function(){
  //let the app use various activities
});

//routing stuff... that can also be delegated to separate files
app.get('/a/url/path', function(req, res){
res.render('jade_view_name');
});
app.post('/another_path'...

app.listen(8080); // port to listen upon


Using mongodb with this is also quite easy as many choices are present when it comes to selection of a data mapper. I used the mongoose for this, but the only caveat is that we have to explicitly define its metadata. For user authentication, I learnt and used passportjs, which is  quite lightweight and concise in using .
In the client side, there are a lot of Model, View + based  javascript frameworks out of which I am learning angular and ember frameworks. Currently I am not biased towards/against any framework out there and will definitely post my experiences..

Thursday, November 7, 2013

Win Free Copies of “Robot Framework Test Automation”

Win Free Copies of “Robot Framework Test Automation


Readers would be pleased to know that I have teamed up with Packt Publishing to organize a Giveaway of my book Robot Framework Test Automation



Two lucky winners stand a chance to win e-copy of the book. Keep reading to find out how you can be one of the Lucky One.

 

                         


Overview:
  • Create a Robot Framework test file and a test suite
  • Identify and differentiate between different test case writing styles
  • Full of easy- to- follow steps, to get you started with Robot Framework



How to Enter?
All you need to do is head on over to the Book page and look through the product description of the book and drop a line via the comments below this post to let us know what interests you the most about this book. It’s that simple.

Winners will get an e-copy of the Book.

Deadline


The contest is a limited time contest, so hurry. Winners will be contacted by email, so be sure to use your real email address when you comment (On that page: http://bit.ly/1bXReXr)!

Thursday, October 24, 2013

Enums come to Python, finally!

In the newly released python 3.4, although no new syntax has been added, the enum library module is a new addition amongst other changes. this library brings the enum type as a first class construct (PEP 435). Although it was discussed in 2005, but was rejected back then. However, this year various discussions occurred on this topic and it was decided to let the enums be a subclass of int and act as integer placeholders.
Since the syntax of the language has not changed, the enum is not a special keyword per se, rather you need to add an import line declaring the use of enums in your script
from enum import Enum
Thereafter, any enumeration 'class' can be created. Note that it is preferable to call this as enumeration rather than a class (and enumeration members instead of objects) for the obvious reasons.

class Avengers(Enum):
  captain_america =1
  iron_man = 2
  hulk = 5
  thor = 3
If you prefer to go functional, then this is the format:
Avengers = Enum('Avengers', 'captain_america, iron_man, hulk, thor')

Whatever the case, you are free to subsitute these placeholders in place of integers like other languages that support enums.
print(Avengers.hulk)
type(Avengers.hulk)

The iteration is performed in the order of enum member definition, not their values.
for avenger in Avengers:
  print(avenger)

results in captain_america, iron_man, hulk and thor being printed out.
At times, you will not have an idea of the enum members during runtime. For this, the values can be used which allow access to those members (which is quite different from enums in other languages as per my experience)
heavy = Avengers(5)

Members and Attributes

As the enumerations are python classes in its core, they also support use of various custom members:

class Avengers(Enum):
  captain_america =1
  iron_man = 2
  hulk = 5
  thor = 3
  def inform(self):
    return '{0} coming in {1} second'.format(self.name, self.value)
  @classmethod
  def tagline():
    return 'Avengers unite!'

...
Avengers.tagline()
Avengers.hulk.inform()

Duplicacy

Having enums with same names is invalid, but two enum members can have same values (as the second member will be an alias to the first). While iterating, the alias will be skipped.

Comparisons

The equality and identity comparisons are allowed:
>>> Avengers.hulk is not Avengers.thor
true
>>> Avengers.thor == Avengers.iron_man
false
The comparisons with values will evaluate to false. If you wish to do that, use IntEnum which can compare its members with integers and other IntEnum subclasses, but Not with enum.

Happy Enum-ing !

A true phonebloc - removing the evil software shackels

Recent efforts like phoneblocs have caught everyone's fancy (more than 1 million have signed up for them, including me). As the smartphones continue to improve at a breakneck pace, the marketing done by all phone companies(like the new feature their latest phone has is the greatest invention since sliced bread) leads to consumers buying phone (and tablet) devices even when there is not really a need to purchase them.
Such purchase and throwing off phones every year by enthusiasts is increasing the generated e-waste. It only benefits the mobile vendors, who can proudly proclaim their sales figures.
While phones can be broken and be easily re-assembled according to user needs, as explained in the phoneblocs video, there is another need to free the phone boot-loader/bios away from evil grips of software. Currently iOS or Android is created which only runs on a particular system on chip(SOC), or hardware. Projects like idroidproject exist, but are lacking driver support and community.
Hopefully with the advent of web based mobile os like mozilla, the dream of dual and multiboot mobile os can be made a reality - which could be a lifesaver for old phones with limited hardware constraints, but can support new UI altogether.
Ubuntu touch has demonstrated their OS on many android devices and is moving into the right direction while building a community. I am hopeful that other providers like google and microsoft take note and provide this interchangeability, which in turn will allow phoneblocs to be truly vendor neutral.

Wednesday, October 16, 2013

Learning just got cheaper - Packt Publication announces all products at half price

For the next 1 day (Till 17th October, 2013), you can purchase any book at half its listed price from Packt Publication. This is greater than offers present earlier as a flat 50% discount is being offered.
As this is being done to celebrate Columbus Day, the code COL50 is to be applied at checkout.

Due to my diverse reading habits, I always have a list of possible ebooks that I might purchase, and this presents a worthwhile opportunity.
Hope you avail this offer too!

(Update) Friday, October 18:  This promo has now extended till Monday, 21st!!
All the more reasons to smile :)