Friday, August 21, 2015

Accuracy and Precision

Accuracy refers to the closeness of a measured value to a standard or known value. For example, if in lab you obtain a weight measurement of 3.2 kg for a given substance, but the actual or known weight is 10 kg, then your measurement is not accurate. In this case, your measurement is not close to the known value.

Precision refers to the closeness of two or more measurements to each other. Using the example above, if you weigh a given substance five times, and get 3.2 kg each time, then your measurement is very precise. Precision is independent of accuracy. You can be very precise but inaccurate, as described above. You can also be accurate but imprecise.

For example, if on average, your measurements for a given substance are close to the known value, but the measurements are far from each other, then you have accuracy without precision.

A good analogy for understanding accuracy and precision is to imagine a basketball player shooting baskets. If the player shoots with accuracy, his aim will always take the ball close to or into the basket. If the player shoots with precision, his aim will always take the ball to the same location which may or may not be close to the basket. A good player will be both accurate and precise by shooting the ball the same way each time and each time making it in the basket.

Source: http://www.ncsu.edu/labwrite/Experimental%20Design/accuracyprecision.htm

Startups Funding news

Thursday, August 6, 2015

Personal Knowledge: Web/App Design from Accessibility Perspective

LĂ©onie Watson - Design it like a Damn!
https://www.youtube.com/watch?v=vK1tlLOavvM

Personal Notes:
Motivation
Its not just for the disabled ones. Its for older version of you as a being who may loose 1 ability or the other and find the internet world suddenly difficult.

alt text is important
choose elements as per function and standard user interpretation
e.g. do not make a link if what you intended was a button

modern screen readers built in browsers provide keyboard shortcuts to navigate through website
elements like article, nav, header, footer etc are very important
take care of website semantics

alternative hierarchical model for assistive technologies.
label element foreign key hooking input type to label
<input type="checkbox" id="drink"/>
<label for="drink"> Tequila </label>

the screen reader will read Tequila and understand user's input when he says check the tequila checkbox.

semantically neutral elements like div, span must be carefully used

ARIA W3C standard - attributes that only change the semantics of a html element
<span role="button">
<span tabindex="0"> // order in which one can use tab key to browse the page





Django MVC explanation

Django follows this MVC pattern closely enough that it can be called an MVC framework. Here’s roughly how the M, V, and C break down in Django:
  • M, the data-access portion, is handled by Django’s database layer, which is described in this chapter.
  • V, the portion that selects which data to display and how to display it, is handled by views and templates.
  • C, the portion that delegates to a view depending on user input, is handled by the framework itself by following your URLconf and calling the appropriate Python function for the given URL.
Because the “C” is handled by the framework itself and most of the excitement in Django happens in models, templates and views, Django has been referred to as an MTV framework. In the MTV development pattern,
  • M stands for “Model,” the data access layer. This layer contains anything and everything about the data: how to access it, how to validate it, which behaviors it has, and the relationships between the data.
  • T stands for “Template,” the presentation layer. This layer contains presentation-related decisions: how something should be displayed on a Web page or other type of document.
  • V stands for “View,” the business logic layer. This layer contains the logic that access the model and defers to the appropriate template(s). You can think of it as the bridge between models and templates.
If you’re familiar with other MVC Web-development frameworks, such as Ruby on Rails, you may consider Django views to be the “controllers” and Django templates to be the “views.” This is an unfortunate confusion brought about by differing interpretations of MVC. In Django’s interpretation of MVC, the “view” describes the data that gets presented to the user; it’s not necessarily just how the data looks, but which data is presented. In contrast, Ruby on Rails and similar frameworks suggest that the controller’s job includes deciding which data gets presented to the user, whereas the view is strictly how the data looks, not which data is presented.
Neither interpretation is more “correct” than the other. The important thing is to understand the underlying concepts.

References
  • http://www.djangobook.com/en/2.0/chapter05.html#the-mtv-or-mvc-development-pattern
  • http://reinout.vanrees.org/weblog/2011/12/13/django-mvc-explanation.html
  • http://stackoverflow.com/questions/6621653/django-vs-model-view-controller

Tuesday, August 4, 2015

piping hot pip!

Django 1.6 - What's new!

Dev Utilities

CloudInit - Initialize your cloud instance

Some of the things it configures are:
  • setting a default locale
  • setting hostname
  • generate ssh private keys
  • adding ssh keys to user's .ssh/authorized_keys so they can log in
  • setting up ephemeral mount points
Byobu Flexible Terminal to use for development

How to scale beyond the basics?

Starters - Django vs Flask

Django aims to follow Python's "batteries included" philosophy. It ships with a variety of extra, optional tools that solve common Web-development problems. 

--

Django's power shines by concept of quick application development where you can find enormous number of full-stack extensions. Getting a boilerplate for Flask will have the same effect but you won't find flask specific applications much, instead you will be able to upgrade components easily.

I'm a Django developer for 5 years but now headed for a marketplace project and that is the only thing I want to develop. I will switch to Flask within a year. I could break Django into parts but that would break current applications, which is also bound to Django version. Yes, I could use well-maintained libraries with Django as well but that wouldn't catch our 'deadlines'. Upgrading Django version with a fresh start is also an option but I don't want to do wide migrations every year.

No regrets using Django up to this point, it really forces you to learn general best practices, and helps you get the funding. I call it a startup framework as it helps you to change your business logic quickly. If you are a starter, go with Django, switching to Flask in future won't be painful once you need it.