Bake the data!


Data is a magical word we do use or hear people saying. what does it really do?

the amazing thing is that it will show the path to heaven. sometime, if we are biased with data then it will take us to ……

Mathemetics, Economic, Statistics have given us enough models to grind the data to predict the future or finding facts.

there are many stories revolving around the data in this world. it has been picturized for the audience.

  1. Moneyball – is a movie, a general manager, Billy Beane assembled a winning team by using an analytical and scientific approach.
  2. Lover, Stalker, Killer: in this movie, police forensic IT team used the database to process and find the answers to the puzzling question using SQL.
  3. Her – another movie that shows how effective a computer system connected with AI server to assist its users.
  4. Margin Call – is another one that showed the world how not to use this sophisticated data tools.

many more movie like this. the point is data is everywhere and we are contributing our part one way or another to someone to take decision.

Python – keywords, operators – Day 2


in the context of a programming language, following are the Jargons to keep in our mind for understanding and communicating to your fellow programmers. It is also important for the writing a software program. whilst, programming language uses it interpret or compile the code for execution.

  • keywords
  • identifiers
  • operators
  • constants

keywords:

these are the special words that are already taken by the programming language for its own use. we should not use that name as our identifier.

Keywords: if, import, for and etc…..

Identifiers:

it is the name user defines to store and evaluate in the expressions. it is case sensitive in python. there is a set of rules to define identifier in python.

  • it should not start with numbers. eg: 7name
  • it should not be a keyword. eg: import

however, you can do the following.

  • it can start or contains underscore. eg: _myself or my_self
  • it can have numbers. eg: my_guess_6, OO7 (is it letter o), get2gether
  • it is case sensitive. eg: cat and Cat

Operators:

operators are a symbol or word used to perform some operations. it can be an expression to compute or just assign a literal.

following are the classification of python operator.

  • Arithmetic operators are +, -, *, /, **, //, %
  • Assignment operators are =, +=, -=, /=, *%=, //= and with bitwise operators
  • Comparison operators are ==, >=, <=, !=, <, >
  • Logical operators are and, or, not
  • Bitwise operators are &, |, ^, ~, <<, >>
  • Identity operators are is, is not
  • Membership operators are in, not in
  • Concatenation operator +
  • repetitive operator *

demo, learn by doing:

  • a = 8
  • b = 2
  • a + b
  • a – b
  • a == b
  • a & b
  • ‘a’ * 3
  • ((4+5) + -3 / 3)

use the python interactive shell for this experiment: https://www.python.org/shell/

expression precedence as follows

  • P  ()
  • E   **
  • M  *
  • D  /
  • A +
  • S -

Constants:

it is another way of defining a variable that never changes in the program. We must have come across the name constant in our daily lives Pi, it is not the one we like to eat. Instead, it is a mathematical constant for ratio of a circle’s circumference to its diameter.

you can define a constant like the one as given below. we must follow the identifier rules for constant as well.

PI = 3.1415

want to learn more. Learn about operator as a function.

Python – Introduction – Day 1


This name has a power to transform this world. it can be taught to a young people to senior citizens. Since, the nature of this language is simple to read and write. You can write a program to print “hello, world!” or send a rocket to the moon.

Python is an interpreted language. It is a high level, Object-oriented programming language.

There are some basic to learn a programming language. It is vital to understand the following and it is same for all languages.

  1. Language Syntax – to construct the program structure.
  2. Variables – a name use to store a value.
  3. Data Type – Type of the value to be stored in a variable or as a literal for computation.
  4. Operators – symbols that represent operations to be performed.
  5. Control Structure – Control structures are used to perform different actions in a program. such as, conditional flow, repetitive code block and catch exceptions.
  6. Module – is a collection of subroutines that are essential or readily available for developer’s use instead of creating. for instance, print() is a standard function for output.

We will get to learn each item as given above. Learning the basic of a programming language basics gives you confidence to do more. Therefore, more you do will make you an expert.

There is a concept called 10K hours rule. If you practice a complex skill dedicatedly for 10K hours, you will become master in it.

Same goes for mastering a programming language.

Start your first day and wish you to reach the 10K hour.

Ref: https://www.python.org/

How to be SMART


Make the maximum out of your time.

Pomodoro Technique is a time management method developed by Francesco Cirillo in the late 1980s.

If you can understand the clock, it will be simple to experiment.

Pick up a task, work for 25 minutes and take a 5 break and repeat it for 3 to 4 times and in the round take a longer break for 20 to 25 minutes. That is it. Key is to break the tasks into smaller pieces and pick them in order to accomplish it.

25 / 5 = Work / Break

25 / 5 = Work / Break

25 / 5 = Work / Break

25 / 20 = Work / Break

REPEAT, Numbers are represented in minutes.

Next is SMART technique, goal setting methodology.

S – specific

What do you want to do?

M – measurable

How much do you want do?

A – achievable

How will you complete it?

R – Relevant

How is it related to what you want to do?

T – TIimely

When will you be able to complete it?

Again, this can be done with breaking tasks into small pieces and applying this technique.

That is all for now.

Thanks.

DECODE – Function – Oracle


The word decode triggers our mind to think of a mysterious task. But, in this context, it is a function in DBMS Oracle to perform a search task.

Functional usage:

DECODE compares expression to each search value one by one.

If expression is equal to a search, then it returns the corresponding result.

If no match is found, then it returns the assigned default value.

If default is omitted, then it returns null.

In a simple words to remember, this function is a simplified form of nested IF-Then-Else or a expression based Case statement.

Syntax:

DECODE(expression, search, result [, search, result ]...  [, default ])

Example:

This example is to give you a basic understanding on the function decode in the SQL statement. This example has hard coded values to show directions. But, you can also use this function in PL/SQL program.

SELECT 
       DECODE (3, 1, 'East', 
                  2, 'West', 
                  3, 'North', 
                  4, 'South',
                     'You are here') "Direction" 
  FROM Dual;

Thanks for reading. You can write the comment and share the usage of this function in your code.