Tuesday, December 30, 2014

Book Review: Learning Python Testing by Daniel Arbuckle

This is a review of Learning Python Testing by Daniel Arbuckle which as its name suggests, delves into testing with python. The testing frameworks covered are already covered in comprehensive python texts but instead of only high level overview, this textbook covers various testing frameworks and approaches in detailed manner.
The first chapter covers various forms of testing - something which could be covered in few subtopics and test driven development could have been discussed in greater detail. It then moves into doctest, which is unique approach in python and was discussed in depth - I've only known it vaguely before and the provided details opened up a sea of possibilities for me. For instance, the AVL tree example provided an excellent demonstration of doctest and is worth quoting. The next chapter provided unit tests with doctest and correctly explained the essence of unit testing. The PID controller example however was confusing and it took me frequently eyeballing the code - the logic used was complicated and consequently the test cases were larger. Next, mock objects were detailed - which are not present in other python texts. unittest.mock library in python3 was explained in depth before covering the details of this module. In the next chapter, the Nose test runner was discussed and its various customizations were also explained.
Test Driven Development was introduced relatively late in the book after all the testing frameworks were covered and covered writing specification and tests before code. For someone new to TDD philosophy, this book offers excellent introduction and covers all its facets and challenging the reader to do more - which I found as a pleasant surprise. This was followed by integration and system testing doctrine. The final chapter covering importance of testing in code coverage, version control and continuous integration wrapped up this handy textbook sufficiently.

Apart from some places where I found the text opinionated with the example taken, I enjoyed the rest of the book and specially places where the reader is asked to get off reading and try things to test his/her knowledge of the topic.

Disclaimer: I received a copy of this book[http://bit.ly/1HKQaIj] for doing its review.

Thursday, December 25, 2014

Book Review: Think Stats

Think Stats by Allen B. Downey

Think Stats presents statistical analysis techniques with a twist - by showing how to code the solution in python rather than applying mathematically. There may be other books on data analysis using various techniques and python libraries, but this book is unique in the sense that it teaches the reader to apply statistics over real world data and answer common questions pertaining to it and one can even feel the author guiding through various exercises. Another takeaway from the book is that it also shows real world applicability- for instance, having empathy and gratitude for people providing personal information used in the creation of the dataset as well as understanding the context of data before applying any algorithm.
Like reviewing other books, I assumed that the potential reader would be new towards statistics and computing statistical methods in general and this book justifies itself by encouraging the reader identify problems and apply relevant algorithms for the same. While I was able to follow the chapters given in the book, the sole use of python was a bit of a concern - if you are comfortable in python, you will feel right at home otherwise the use of specific technology might cause slight disruptions. I prefer javascript based examples over NumPy and SciPy these days, but as these libraries are more mature, It serves as an excellent choice.

Aiming to replace your regular statistical class, all the key topics are presented in a refreshing manner. After discussing data analysis exploration, representation of data is demonstrated using basic methods before proceeding towards more complex ones. Advanced topics like regression and analytic functions are introduced towards the end. Here's the list of chapters in detail.
One issue that I faced was the fact the book went into theory and actual code analysis was missing at places. For instance, I was unfamiliar with pandas DataFrame and it required me to have a look into the code during the course of the book. This book would definitely in my references list for times to come.

Disclaimer: I have been provided a free copy of this book by OReilly under their Blogger review program.

Saturday, December 20, 2014

Packt Ebook Bonanza Campaign

I came across this promotional offer from packt publications for this festive season:

Following the success of last year’s festive offer, Packt Publishing will be celebrating the Holiday season with an even bigger $5 offer.
From Thursday 18th December, every eBook and video will be available on the publisher’s website for just $5. Customers are invited to purchase as many as they like before the offer ends on Tuesday January 6th, making it the perfect opportunity to try something new or to take your skills to the next
level as 2015 begins.
With all $5 products available in a range of formats and DRM-free, customers will find great value content delivered exactly how they want it across Packt’s website this Xmas and New Year.

 To avail this offer, visit: http://bit.ly/p5dlr
Or see twitter hashtag #packt5dollar

Sunday, December 7, 2014

D3.js Tips and Tricks: Using Plunker for development and hosting

D3.js Tips and Tricks: Using Plunker for development and hosting your D3.js visualizations 

I've just been finishing up with a D3 visualization pet project and found this free and amazing hosting service to showcase your product to the world. Hope this helps others too.