Monday, June 10, 2019

How To Code? Types Of Functions In Programming

how to code: types of function in programing - img

Types Of Functions In Programming:

In previous post we briefly discussed what are functions in programming and how to use them  in a generic way. Here, you will learn what are different types of functions.
Functions are divided into two categories based on where their definition exists.
  1. Built in functions
  2. User define functions

1. Built-in Functions

Built-in functions are those which are already defined in a library. All you need to do is to import the library and call the function. There is no need to define and declare the required function.

Steps to use Built-in function:

Each and every language has a rich set of libraries developed for specific purposes. It is really hard to remember all of these libraries and functions and there is no need to remember at all. Here are listed some steps that I would suggest you to find a library and its functions for certain task.
  1. Understand both the problem and your solution
  2. Search a library suitable for your need
  3. Find your required function and read its documentation
  4. Use

2. User define functions

As the name suggests, user define functions are those which are defined by the user. 
A user define function is declared by the user (the developer) and the definition is written before a function call is made to it.

Types of Functions:

Recall the input/parameter and output/return from previous post. Based on these 2 features, functions are of 4 types:
  1. Functions with no input no output
  2. Functions with only input
  3. Functions with only output
  4. Functions with both input and output
types of functions in programming
Functions are like puzzle pieces. You can use it the way you want.

1. Functions with no input no output 

As far as I know, this type of function is used in very rare cases. It does not accept any input parameter and does not return any output value. But it does not mean it is useless. It depends upon your creativity how you use it.

How to use?

I use this type only when I need to display fix information for user or for debugging. It could also be used in combination with global variables which is considered the worst practice or with constants.

2. Functions with only input

Function with only input is declared and defined with a certain number of input parameters but no return value. It takes values from other scopes in the code but does not transfer the result to any other scope.

How to use?

The output value could be directly printed on screen, written to a file, stored in a reference parameter or passed to another function as input.
Again, it is your creativity how you use it.

3. Functions with only output

Functions with only output have only return value type and no input parameters. 

How to use? 

The input for this type of functions does not come from another scope. Either the global values or constant values are used (not recommended) or input is created by internal processing. For example input could be read from a file or any other function with a return value.

4. Functions with both input and output

It allows us to pass the parameters to the function while calling the function. This type of functions will return some value when it is called. Data Type of the return value depends on the return type of function declaration.

How to use?

This type of functions are fully dynamic functions which provide maximum control to the developer. It is most widely used type of function. Decoupling, one of the best programming practices is easily achieved using functions with both input and output.

Next: Function Overloading

Thursday, June 06, 2019

How To Use Notepad To Keep Your Credentials Secure From A Kelogger?

avoid keylogger
Thanks to Dmitry Ratushny
Keylogging is considered one of the most dangerous attack in cyber security because it is hard to detect and it can steal your most valueble information.
Keylogger is a malware which records your keystrokes and send it to the intended person or store it in local storage which can latter be used for any purpose.
It can record your social media account passwords, bank acount PIN, emails you type to your boss, messages you send to you ba, litrally everything you type.
Keyloggers are spread through the same means other malware are distributed. It could be directly installed in a victim's device or sent via the Internet.
Direct installation is hard and could be easily prevented. However, you need to take some security measures in order prevent remote installation. 
There are some useful methds which can keep you secure from keyloggers. Gavin Phillips lists here 5 of them to protect yourself against keyloggers.
But these precautionary measures work only for your own device.
Consider a situation when you need to use someone's else computer or phone for some purpose and you are required to enter your credentials. The task is crutial but you are not sure whether the device is secure or not.
There could possiblly be a spying eye watching you type your PIN and password.

How to avoid keylogger in these conditions?

Act like a magician. Keylogger is your spectator. All you need to do is to distract it.
Open a text editor and type something radom which contains your credentials. If your password contains dictionary words, write a sentence ot having those words. For numerical values, type from 0 to 9. Write extra special characters in combination to those in your password. Then make selctions and copy and paste the required parts of your credentials.
This method is secure because keyloggers record only the things you type. 
You type nothing or you distract it.

Saturday, May 25, 2019

How To Code? Functions in Programming

what is a function in programming
unsplash-logoFabian Grohs

What is a function in programming?

A function in computer programming is just a block of related and reusable code which performs a single task or activity.
Function is also called method, procedure, sub-routine etc. I will try to cover each and every aspect of functions here. I have divided this post into two sections. One section explains the structural components and the other explains non-structural components. I am categorizing these things because I think it will help you better understand functions. These categories are not official. Tell me in the comments whether you liked the categorization or not. Based on your response, I will update this post.

Structural Components: 

There are four structural components of a function:
  1. Name
  2. Body
  3. Input
  4. Output

1. Name:

Function name is the same as a variable name. It follows the same conventions a variable name follows. Special characters and spaces are not allowed in function name. Name of a function is used latter in the code to call/execute the function. Name of a function should reflect the type of task it is performing. That's it. There is no rocket science. Just follow naming conventions.

2. Body

Body of a function consists of the lines of code which you want to execute whenever the function is called. It could be of any size, depends on your problem and your logic. But the body must contain only those lines which are related to each other and solve a single, independent sub-problem of your problem. Read the definition again, the block of code must be reusable. For example, you have to write code for some kind of mathematical equation like
c = a2 + b3
    Here, calculating square is one sub-problem while cube is another sub-problem. There will be two separate functions for each.

    3. Input

    The code in function body performs some operation and it might need data to operate on. In above example, you will need to specify the number you want to take square of. Same is the case with the cube function. The best approach to give input to a function is to use parameters. Parameters are also called arguments and are given during function call. For now, just remember that input to any function is given via parameters. I am going to explain it latter in this post.

    4. Output

    The output of a function is the result that we get after execution of the function. It could be in the form of a value or set of values, screen prints, files or combination of any of these or any other format. If the output value of a function is needed at the point where the function is called, then return is used. Although, it is not necessary for a function to return some value but in order to transfer data from one scope to another, return is used. An opening and closing brackets make a scope. Variables declared inside a scope are accessible only in that scope and its sub-scopes. It is often called lifespan of data/variables.

    Non-Structural Components:

    1. Function Definition
    2. Function Call
    3. Function Declaration (it is optional in many programming languages that's why it is on 3rd

    1. Function Definition

    Function definition contains two things: 
    • function signature
    • function body
    • Function Signature 
    Function signature consists of function name, types and numbers of parameters (input) and type of return value (output). These three things as a whole are called function signature because compiler or interpreter differentiate between functions using their signatures. If you are complete beginner and can't fully understand what I am trying to say, just believe me and remember that function signature contains function name, number of parameters and type of each parameter and return/output value type and it is used by compiler to recognize the function. These information will help you in function overloading.

    In order to define a function, you have to give it a name (should be meaningful) first. You need to specify the number and type of parameters if there are any. Parameters are placeholders for the input values which the function expects from function call. A parameter is defined the same way a variable is defined. It has a type and a name. The value then comes from function call.
    In mathematical equation example above, the square function could take float value or integer value but not a character value. Type and number of parameters are specified during function definition.
    •  Function Body
    Function body is just a block of code which performs the actual task you want it to do. Make sure, each function you define is an independent unit. What is meant by independent unit? It means that you can move each function to another project and it works there with no or little modifications. Try not to use any global variables inside a function. Provide all the input data using parameters and get the result using return value or reference parameters.

    2. Function Call

    Function call is a statement which specifies the name of the function to execute and values for input parameters defined in function definition. It also gives you the value which is returned by a function. You can store that value in a variable or use is directly as you use variables. For example a function which returns integer value can be used anywhere where integer variable could be used.
    Values that you mention in function call are copied to parameters in the function definition. Note that the sequence and type of values must the same as it is in the function definition.

    3. Function Declaration

    Function declaration is only one statement which specifies the function signature. It is function definition without a body. It is optional in many languages but still you should have an idea what it is. You might need it at some point.

    why do we use functions in programming?

     Functions are used because functions:
    1. are reusable units
    2. reduces code size
    3. makes debugging easier
    4. helps to make the code more modular
    5. makes the code easier to maintain
    Next: Types Of Functions In Programming

    Subscribe to our YouTube channel:

    Monday, May 13, 2019

    How to Code? Learn These 5 Basic Concepts of Programming

    How to code: 5 basic concepts of programming
    unsplash-logoLewis Ngugi
    If you are intrigued by the title and you are reading this, it means that you are interested to learn how to code. You might have heard people saying that programming is a God gifted skill and not everybody is blessed with it or programming is not for people like you or me or whatever. Believe me, that's bullshit. Computer programming is the most interesting and the easiest skill to acquire in computer sciences. At least, I think so. It is said that one can do almost everything with programming and its true. If you can do everything with something, it then definitely worths a lot of your time.
    A question arises here that how much time one should dedicate daily to learn how to code fast and effect? I would say 8 hrs if you are on your own. To reduce the time and effort you need to learn programming, you should benefit from those who have experience and are good at it.
    As far as I think, you can boost up your learning process if you learn the basics well. Different authors have a different opinion about what are the basic concepts of computer programming. They are also right. Everyone has own perspective. Here I have listed 5 of the basic concepts of computer programming. I am sure it will save you pretty much time and effort.
    I am not saying that you will become an expert in programming after reading this post. I am just helping you to get started, to give you a push. You will get an idea of what are the basics of programming and how these basic concepts work. In order, to get a full understanding of how to code I would recommend you to read 3-5 books of programming fundamentals.

    Programming Fundamentals

    1. Variables, Constants, and Arrays

    Anything that you write in your code is stored in computer memory slots. Each slot has a unique address. To read from and write to a memory location, its address is used. But it is hard to work with numbers like 0x19a823f2... this is how memory addresses look like. Naturally, humans are good at working with names than numbers. That's why a genius (idk who but God bliss him/her) thought that why not to use real world names to deal with computer memory. Variables, constants and Arrays and other similar things are named memory locations. Each offers a different approach to handle memory read/write operations.
    You need to remember only 3 things about variables and related terms.
    1. It is a memory location.
    2. It has a name.
    3. It has some data.
    Remember, a variable is always a variable. Irrespective of the language that you are using, every variable will have the above-mentioned properties. Once you declare a variable with a name suppose x, a constant or an array the operating system selects one or more memory slots (depends on the type of variable) and attach your given name to these slots. Anywhere you use that x in your code, the mighty Operating System resolves it into the memory address it is attached to. Hope it makes sense.

    Where to use?

    Use them wherever you have to read/write some data to/from memory again and again in your code.

    Constants are the same as variables but you cannot change its value once it is initialized.

    Where to use?

    Use constants when you have to write data only once and read many times.

    An array is just a sequence of memory addresses. It has a name, data type and data. The only difference is that it is just a sequence of memory slots. To use a specific slot in this sequence, indexes are used.
    It has also been observed that human remember the things which they see more than the things that they hear. For your convince, a video is included below which further explains the concept.

    Where to use?

    Use arrays whenever you have a sequence of the same kind of data.

    2. Conditional Statements

    Conditional statements (the decision is taken based on some condition(s)), also called control statements (control the flow of execution of your code) or if statements (have if keyword in syntax). We will use the term if statement onward.
    If statements come to the game when there are multiple choices available and one is to be selected based on a given condition. When there are multiple paths of execution if statements are used to direct the execution flow to one of the paths. It decides whether to execute a block of code or not.
    The easiest way to know where to use if statements are to look at your problem statement and identify if word. Any condition following the if word will be your if condition. Real world conditions are depicted in code by using variables and expressions. e.g if a person is at least 18 years old, show him the content (some age-restricted content).
    There are different varieties of conditional statements suitable for different scenarios.
    • if statement:

    Single if with one conditional expression and a single block of code. Decides whether to execute a piece of code or not.

    Example: if something happens to do something.
    • if-else statement:

    single if with one else. Has two blocks of code to choose from for execution based on only one conditional expression.

    Example: if something happens then do something otherwise do something else.
    • if-else-if statement:

    It is the same as if-else but with multiple conditions. Each condition following the first condition is written with the keyword else if. It has more than 2 blocks of code to choose from for execution.

    Example: if something happens then do something if something else happens, do something else and keep it going.

    Yes, I know, the examples are extremely dumb. Just tried to be more generic. If you have better examples, write in comments. I will include it.if-else-if statement : imgif and if-else statements : img

    3. Loops

    A loop is something which starts from one point, goes around and ends back on starting point. If there is a block of code which you see is consecutively used several times, add it to a loop. Note the word consecutively here. We will refer to it in the next section.
    When a block of code is written inside a loop body, it executes again and again. The execution control starts from the first statement of the loop body and progress until it reaches the end. In the end, it returns back to the start of the body. But wait, when will stop executing? Never?
    A loop is similar to if statement with an extra feature. The body of a loop is executed again and again based on a conditional expression. If the condition is true, the body is executed, otherwise not. The control returns back to check the condition every time it finishes executing the block of code until the conditional expression evaluates to false. That's why a dynamic conditional statement (not officially called dynamic) is required in loops.
    There are 4 widely used variations of loops in popular programming languages like JavaScript, Python, C++, Java. All the variations do the same thing, execute code repeatedly. However, each variation comes with a slight modification suitable for different scenarios.
    1. For Loop

      For loop is mostly used as a counter. Like if you want to execute a block of code several times, for loop is the best choice.

      Keyword: for


      1. initialization
      2. conditional expression
      3. condition update statement
      4. body
        the conditional expression is mandatory and the other two are optional.
    2. While Loop

      If you want to run a block of code repeatedly while a condition remains true, go for while loop. You make for loop work like a while loop by ignoring its 1st and 3rd component.

      Keyword: while


      1. conditional expression
      2. body
      Both of the components are mandatory.

    3. Do-While Loop

      The do-while loop comes in handy if you need a block of code at least once whether the condition is true or false. After the first iteration, it works like a while loop. However, in while loop, the condition is evaluated first before its body is executed and in do-while, the condition is evaluated at the end of iteration. Unlike while and for loops, two keywords are used in do-while.

      keywords: do, while


      1. body
      2. condition
        both components are required.
    4. For-Each Loop

      For-each loop is more suitable for situations when you have a list of elements and you want to execute some code for each element of the list. For example, you have a list of some sort of geometrical shapes and want to change the color of each object, use for-each instead of for and while.

      keywords: for-each has a syntax similar to for loop in almost all languages. Some languages use each keyword in combination with for and some use : operator.


      1. condition
      2. body
      both of the components are mandatory.
    types of loops in programming

    4. Functions / Methods:

    an activity that is natural to or the purpose of a person or thing.
    Here, we are not talking about the function of a person or things but a function of a block of code. The reason to include the above definition is to present an analogy between functions in the real world and functions in programming.
    You know what is the function of a printer, don't you? It prints electronic information on a paper. Printing is a sequence of related events. A printer pulls a paper from its tray, prints the queued information on it and pushes it smoothly. Similar to this, a function in programming is a block of code which performs a sequence of related operations. That's it.


    1. Function Name
    2. Parameters
    3. Return type
    4. Body
    5. Function Call
    All the 5 components are mandatory except parameters. A function must have a name which is used to call it, a body which is executed on each call, and a return type which is the type of data a function produces as a result. Parameters are optional. The same naming conventions are followed which are used for variables. 
    If a function needs input data from another scope then it is given either as a parameter or globally. There are many ways to exchange data between the function body and the rest of the code. Function call necessary for function execution. If there is no call to a function, it will never execute.

    When to use functions?

    If you have a piece of code for something and you need it more than in one places in your program, enclose it in a function and call it everywhere you need it.
    Functions and the upcoming topic deserves more of our time. I will write separate posts for each in detail.

    5. Class and Objects:

    You might have heard that class is a blueprint and an object is an instance of a class. I have read it like a lot time in books and blogs and it was the most confusing statement for me ever. Class and Object are the base concepts of Object Oriented Programming. If you a beginner (most probably you are if you are reading this), it will take you some time and some effort to understand what actually class and objects are and how to better use them. You will get some help from here and a lot more in the coming posts.

    What is a Class?

    In real-world problems we have several physical and non-physical objects like if you are working on a game, your main character is an object, a weapon is another object, enemies are separate objects. All have some features and functions. Based on their functions, we can categorize these objects. We can put all the similar objects in one category. For example, Weapons are similar to each other while different from humanoid characters.
    In OOP, such categories become classes. In the above example, the weapon is one class while the enemy is another class.
    In functions, a number of operations which belong to a single event are combined and used again and again with just one function call. Same is the case with classes. Functions which perform operations related to a single category or type of objects are combined into a single class. Obviously, these functions need some data to operate on, so the related data is also encapsulated with these function within the class.

    What is an Object?

    Can you sleep inside a blueprint of your house? Never. The map/blueprint must first be brought into a physical shape. You have to bring it into existence. It will occupy some space on earth. Yes, don't shout. I know people are trying to live on Mars but it may never happen. But there are crazy inventors are still alive. who knows. Anyhow, same is the case with classes. Once you create a class, it does not occupy any space in computer memory (RAM). So you cannot use it. Sorry.
    Unless and until at least one object of that class is created. 
    The object is used to access methods and data of a class. An object is created almost the same way a variable is created. It has a type (class name) and a name. The same naming conventions are followed to create an object of a class which is followed for functions and variable.

    Thursday, April 25, 2019

    7 Must Have Gadgets In 2019

    Sony WH-1000XM3

     Headphones: Sony WH-1000XM3

    Our recommendation for the best headphones, the ideal wireless and the very best noise cancelling headphones is the Sony WH-1000XM3. Simply speaking, we actually approve of those cans. Sony wins sound quality and layout, together with touch controls on the ideal earcup that work superbly along with a battery life that lasts around 30 hours. Together with USB-C rapid charging and outstanding wireless sound performance, these superstars are worth every cent.

    Fitbit Alta HR

    Exercise tracker: Fitbit Alta HR

    If you don't have a fitness tracker, then the Fitbit Alta HR is a wonderful place to get started. Unlike a smartwatch, the battery lasts a whole week and the slim and discreet ring houses plenty of tech. It tracks steps, calories burned off, sleep and heart rate, includes extras such as hourly mini goals and comes in six colors with accessory bands sold separately. The only disadvantage is it's not waterproof.

     Laptop: Dell XPS 13

    The Dell XPS 13 is the definitive MacBook-killer. This 13-inch notebook weighs a mere 1.2kg yet is strong enough to take care of a heavy workload. There are many configuration options, such as non-glare displays and touchscreen versions. The tiny 4mm display bezel means it has a very compact footprint, which makes it easy to fit in any bag. We're analyzing the 2019 variant, with the webcam thankfully now positioned above the display.

    Jabra Elite 65t

    Wireless earbuds: Jabra Elite 65t

    Forget Apple's AirPods, if you'd like really wireless earphones for every occasion then we recommend the Jabra Elite 65t. Unlike the majority of Jabra's efforts, they are less concerned with the fitness center and running and much more tailored for ordinary use. They sound, and look, great and you get five hours of usage from a complete charge and a further two out of the charging instance. Unlike a few wireless headphones we have examined, we had no sound and video sync issues when viewing Netflix and while they are not equipped with running in mind, they are safe enough to be usable all the same.

    Samsung Q900

    TV: Samsung Q900

    Samsung's Q900 provides on the company's ambitious promise of an 8K TV that's prepared to purchase now. Coming in three dimensions (85-, 75- and - 65-inch variations ), it measures up the HDR functionality, hitting peak brightness amounts of 4,000 nits, meaning that content comes out exactly as its founders intended. The design exudes Samsung's standard high standards and the 15ms input lag makes the Q900 ideal for gambling. Most significant, as you'd expect, is your Q900's spectacular upscaling via its Quantum 8K Processor. In short, it's the finest LCD TV we've tested.

    Garmin Forerunner 935

    Running watch: Garmin Forerunner 935

    This gadget is for those who take running seriously. If you do, it might be well worth investing in it -- not the least due to the device's remarkable battery life, which lasts for up to fourteen days on standby mode, as well as 24 hours when always monitoring action. The watch can monitor a variety of tasks such as swims, cycles or rounds of golf clubs, in addition to displaying various
    training options. Additionally, it offers information on heart rates, lactate thresholds or retrieval times. All of that is packed in 49g; a comparatively lightweight gadget, so, making for an entire running watch.

    Huawei P30 Pro

    Check Huawei P30 Pro

    The Huawei P30 Pro provides the sacred trinity of superb design, screen and camera using no less than four versatile cameras, a fast in-display fingerprint detector and an all-screen, small top notch layout. It's so nicely specced and easy to live with.

    Saturday, April 20, 2019

    Unsupervised Singing Voice Conversion: Facebook's AI Can Convert Your Voice Into Any Other Singer's Voice

    unsplash-logoJason Rosewell

    You might have heard of the miracles artificial intelligence is doing these days. From movie recommendation on Netflix to Sophia, the robot, from intelligent humanoids in video games to super intelligent Google Assistant, artificial intelligence is dominating most aspects of our lives. It has an impact on our present and future in either way.
    Continuing the pursuit to a technology intensive future, Facebook in collaboration with Tel Aviv University published their new research last week on (Unsupervised Singing Voice Conversion). Researchers at Facebook have trained an intelligent machine which can instantly convert audio of one singer to voice of another singer. You check the sample results here. All that is needed is to record a song in own "beautiful" voice and feed the file to the machine. AI will never disappoint you. The results will astound you.


    Summary of the work

    According to authors of the work,
    Our approach could lead, for example, to the ability to free oneself from some of the limitations of one’s own voice. The proposed network is not conditioned on the text or on the notes [and doesn’t] require parallel training data between the various singers, nor [does it] employ a transcript of the audio to either text … or to musical notes … While existing pitch correction methods … correct local pitch shifts, our work offers flexibility along the other voice characteristics.
    It is clearly mentioned in the manuscript that no transcription technique is used. i.e. no song -> text and text -> song conversion.


    Datasets used:

    Two datasets are used and both are publicly available.
    1. Stanford’s Digital Archive of Mobile Performances (DAMP) corpus
    2. National University of Singapore’s Sung and Spoken Corpus (NUS-48E)

    Data Augmentation:

    Four data augmentation techniques are used.
    1. Audio file is played in forward direction
    2. Played in reverse direction
    3. Multiply raw file signals by -1 and played forward
    4. Multiply raw file signals by -1 and played reverse
    Authors have explained that when the signal is played in forward and backward, the energy spectrum remains the same.
    The network comprises of a CNN encoder, Google's WaveNet decoder and a classifier. The network is trained an unsupervised manner. Two techniques are used for training.
    1. Back translation
    2. Mixup technique

    1. Back translation:

    Back translation is a technique which is used for Natural Language Processing. This technique is used in translating text in one language to another. If their is no representation for an input in the target language, the input is represented by a unique symbol during training using Automatic Machine Translation (AMT). The training pair, the input with its corresponding symbol is then used to translate back from target language to source language.


    2. Mixup technique:

    As the name suggests, in mixup technique various unique virtual pairs of input are created by shuffling the input. e.g For learning a functino y=f(x), additional virtual samples are created from 2 samples (x1, y1) + (x2, y2) = (x', y'). It is actually a data augmentation technique.

    According to the authors,
    Our contributions are: (i) the first method, as far as we know, to perform an unsupervised singing voice conversion, where the target singer is modeled from a different song, (ii) demonstrat-ing the effectiveness of a single encoder and a conditional de-coder trained in an unsupervised way, (iii) introducing a two-
    phase training approach in unsupervised audio translation, in which backtranslation is used in the second phase, (iv) introduc-ing backtranslation of mixup (virtual) identities, (v) suggesting a new augmentation scheme for training in a data efficient way.



    The generated results are evaluated by a classifier and human reviewers to judge on scale of 1-5 the similarity of generated voices to the target singing voice. Reviewers alloted a scale of 4 on average while the classifier found that the reconstructed samples and generated samples were identified with almost the same accuracy.

     Don't forget to share your thoughts with us in the comments below.

    Thursday, April 18, 2019

    Samsung Galaxy Fold: Specs and Features

    Samsung Galaxy Fold smart phone is launched in February 2019. The phone has two displays one is 7.30-inch touchscreen primary display with the resolution of 1536x2152 pixels, and its second display is a 4.60-inch touchscreen, with a resolution of 840x1960 pixels.

    Samsung Galaxy Fold comes with 12GB RAM and is powered by an octa-core processor.

    Samsung Galaxy Fold is powered by 4mAh battery. It also supports wireless charging and also a quick charging 2.0 Fast charging.

    It runs Android Pie version 9.0.

    Samsung Galaxy Fold has three Cameras, the rear packs a 16-megapixel primary camera with an f/F2.2 aperture; a second 12-megapixel camera with an f/F1.5/F2.4 aperture and a third 12-megapixel camera with an f/F2.4 aperture. It supports a 10-megapixel camera on the front for selfies, with an f/F2.2 aperture.

    Samsung Galaxy Fold has a memory of 512GB. and is android pie.

    Samsung Galaxy Fold includes Wi-Fi, GPS, and USB Type-C connectivity.

    About Samsung Phones 
    The Samsung company is one of the biggest company in the world. founded back in 1969 as Samsung Electric Industries, Suwon, South Korea-headquartered Samsung Electronics. Its first smart phone was released in 2009. The company is among one of the largest company in the world.

    Samsung Galaxy Fold

    512GB, 12GB RAM
    16MP Ultra Wide Camera
    12MP Wide-Angle Camera
    12MP Telephoto Camera
    10 MP Selfie Camera
    8MP TGB Depth Camera

    capacitive Fingerprint sensor
    Accelerometer sensory
    Barometer sensor
    Gyro sensor
    Geomagnetic sensor
    Hall sensor
    Proximity sensor
    RGB Light sensor
    Battery4480 mAH

    Wednesday, April 17, 2019

    Samsung Galaxy Fold: A Smart Phone or A TV Remote?

    Samsung Galaxy Fold

    This week The South Korea electronics company has revealed Samsung Fold to media. Bloggers and YouTubers have got their hands on the device but it is not yet released for customers. The phone comes with novel technology, a foldable screen. Although it is a huge move to make smartphones smarter but customers feedback has yet to be seen. Prior to the release of the phone, it is hard to say whether Samsung Galaxy Fold is something that users wanted or something that users needed.
    MAYA (Most Advanced, Yet Acceptable), a theory by Raymond Loewy who has designed almost everything says that the most advanced design should be given to users, but not more advanced than what they are able to accept and embrace. An innovation is more likely to be welcomed by its user if it lies at the intersection of novelty and familiarity. If the product is full of astounding innovation but people are not familiar with it and vice versa, the chances of failures are high. As people have seen foldable phones and they are familiar with this technology and a foldable screen is actually something new, Samsung Fold I think lies right in the center of the novelty/familiarity scale. The chances of success are pretty high unless it does not have any surprises waiting for us like other Samsung hand grenades.


    Despite the foldable screen, the device comes with other remarkable features. With 6 high definition cameras, 512GB internal memory and 12GB RAM, it has phenomenal multitasking support. Users can run and interact with up to 4 apps at a time. Left screen, top right, bottom right, and a pop-up screen. I love this feature. If Samsung Fold failed to earn its users trust, as we have seen many sliding and folding phones failing in the past, this feature would be pretty productive if introduced in tablets. A quick overview of other specs has been give below.


    When unfolded, Galaxy Fold has 7.3 inches screen which looks elegant and is near to perfect for reading books, watching videos, playing games and other activities. It feels more like an elegant tablet than a phone. However, there is a groove right in the middle of the screen which could be pretty annoying for phone addicts. Although Samsung claim that the screen is created from flexible material and glued with advance technology but the chances of failure are high. It is just an intuition. A personal thgouht.
    Samsung Fold has another 4.6 inches HD+ display on one of its outer panel which can be used for everything the unfolded screen can be used for. However,
    the folded version loses all of its grace and aesthetics and it looks more like a TV remote. It is too large and too heavy to fit in a pocket. I imagine the user would look like an idiot using TV remote in front of no TV.


    The battery is one of the thing or metric or something else which is usually used to measure the quality of a device. Samsung Galaxy Fold comes with a 4380 mAh battery which is shared by two screens. For normal phone, 4000 mAh battery lasts for more than 36 hrs by standard usage but for this device, two screens have to be maintained, battery won't last that long. It will consume pretty much amount of charge even on stand by. 


    Another stunning feature of the mighty Fold is its 6 camera setup. It has 3 rear cameras, a 16MP ultra-wide camera, a 12MP wide-angle camera, and a 12MP telephoto camera. Telephoto lense provide a narrow field of view to focus better at things at a certain distance. 10MP camera and 8MP depth lense on device front can help you grow your fans on Insta. A 10MP selfie camera is also available if you use the TV remote version of the device.
    The Samsung Galaxy Fold will be released on April 26 fn the US at an initial price of $1980. Expected release for Europe is in May.

    Sunday, April 14, 2019

    Deep Learning: A Quick Overview

    Deep Learning: drone
    Photo by William Stitt on Unsplash

    This photo is from 1980, and the reason why we are dwelling into history is that neural networks along with deep learning have been around for quite some time. They have started picking up now and impacting the world right now, but if you look back into the 80s you will realize that even though they computers weren’t invented in 60s and 70s they really caught on to a trend and got the wind in 80, So people started talking about them a lot. There was done a lot of research in that area and everybody thought that deep learning or neural networks this new thing that is going to impact the world and is going to change everything and will solve all the world problems. And then it kind of slowly died for the next decade. So what happened why didn’t the neural networks survived and not change the world? The reason was they were not just good enough, they are not that good at predicting things, and not that good at modeling or they were not a good invention or is there any other reason. So actually there is another reason and the reason is in front of us is the fact that technology was not up to the right standard to facilitate the neural network.

    In order for neural networks and deep learning to work properly you need two things, one is you need Data and you need a lot of  Data and other is you need a processing power you need a strong computer to process that Data and facilitate the neural network’s. So let's have a look at how data or storage of data has evolved over the years, here we got three years in the above image, how does storage look back in 1956 there is the hard drive and that is 5MB hard drive been transporting to some other place. A company had to pay 2500$ of those days’ dollars to just to rent it not buy it and just for one month.
    After that in 1980, the situation improved a little bit, so you have 10MB for 3500$ and was still very expensive and has only 10MB and can store only one pic of nowadays.
    And today in 2017 we have got 256GB for 150$ which can fit on your finger. If we compare these years across the board and before even taking price and size to consider, just take compare the capacity from 1956 to 1980 the capacity increased about double and then from the 1980s to 2017 it increased about 25600x times. And the length of the period is not that much but a huge jump in technological progress.
    Here we have a chart of hard drive cost per gigabyte (USD).

    Over the years this going to go even further right now scientist are even looking into using DNA for storage. From 10 to 20 years from now, everybody is going to use DNA storage if we go in this direction. Here are some stats.

    So all of this brings us to what is deep learning?

    here is the image of Geoffery Hinton and is known as the God Father of deep learning and he did research on deep learning in the 80s and he has done lots of work on Deep learning and published lots of research papers he now works in Google.
    The idea behind deep learning is to look at the human brain, how the human brain operates. because human brain seems to be a very powerful tool in this planet for learning and adapting skills and applying it if the computer can copy that then we can just leverage what natural selection had already decided for us for all that algorithm.
    So in the brain, we have neurons and us hundred of billions of neuron in the human brain and each neuron is connected with thousands of neurons with its neighbor. In below pic, this is what it looks like.

    This is an actual section of the human brain this is called the cerebellum.and is responsible for balance so you can see there are billion and billion of neurons so that is what we are going to recreate.
    So how do we create this on the computer?

    In the above image: We will create an artificial structure called an artificial neural network. Where we have nodes or neurons, so we are going to have some neuron for input values. Which will take some input values in the input layer and we will have an output layer which will show the predicted result. And in between, we have hidden layers so before giving output it will go through billion and billions of neurons before it gives us output, so this is the whole concept behind it so we are going to model the brain. so we need this hidden layer. the input layer neurons are connected to hidden layer neurons and hidden layers neuron is then connected to output layers neurons.
    So why is it called deep learning?
    Now, we take this to next level we separate the input and output layers and we have not just one hidden layer, we have lots of lots hidden layers, and then we connect everything just like the human brain. Interconnect everything and that’s how input values are processed through all hidden layer just like the human brain and then we have output value. Now we are talking about deep learning.

    How Reading More Helps You Get Smarter: Benefits of Reading

    When you read a book, you live a certain time of the author's life. It takes less than a week on average to read a book of average size. Within this one week, we acquire all the knowledge and experience that the author has got in many years. Reading is so powerful that it could lead you to a word which does not exists, it could make you believe the things that you have never heard of. It can make you rich, smart and successful. This is why reading is one of the most common things among successful people. Elon Musk, Bill Gates, Dan Pena and many more like them recommend to read regularly on daily basis.
    Any kind of reading either a book, an article, journal or magazine can boost memory and empower imagination. It stimulates different areas of your brain and develops new neurological pathways inside your main processing unit which has delightful effects on your personality. Effective reading broadens your vision and always push you one step ahead in the competition. Effective reading not only means that you understand what you read but you actually act upon what you have learned. I am not saying that one should start behaving like a zombie after reading a fiction. Although reading fiction is also recommended and it has its own outcomes and reflections.
    Once, I heard an Indian motivational speaker, I just forgot his name, saying that you never earn more than you personality is worth of. The more you invest in self development, the more you earn. Dan Pena says
    Show me your friends and I will show you your future.
    If you have books as your friend, Dan will absolutely show you a bright future. Ernest Hemingway said:
    There is no friend as loyal as a book.
    But many of us are not loyal with our loyal friends. Our readings are quantity driven not quality driven. We want to read more and more and forget what we have already read before. This kind of behavior does not help us to thrive instead it  stagnates us. Ineffective reading rises level of frustration. If you are reading by keeping quantity in mind, you are waisting time. Time is money and money is power. You are losing power.
    There are some techniques can really speed up you reading with little or no affect at all on the quality. At the end, I have included a video which I follow and I would suggest you too.
    Below is a list of reasons why you should read more.
    • Improves your 'theory of mind'
    • helps you be more empathetic
    • supercharges learning and sharpens memory through imagination
    • Improves decision making and emotional processing
    • Improves your vocabulary and verbal skills
    • Slows down your mental aging
    Do you have more reasons in mind? Tell us below in comments.

    Saturday, April 13, 2019

    Games on Play Store Which Can Ruin Your Kids' Lives: Be Aware

    Young Kids can download and play games packed with Shooting, stabbing, gore and micro transaction gambling on Google's Play Store even when parents turn on controllers to make them toddler-friendly. All these games and programs have something in common: they are marked as being safe for young children. Few examples are given here.

    Mad Max Zombies

    An Android first-person shooter, full of spurting blood, disturbing imagery of walking corpses and realistic firearms, has been  rated by its creator as Pegi 3 - a rating that is considered appropriate for all age classes, with no sounds or pictures that are very likely to frighten young children and only the lightest, most childlike depictions of violence.

    It is just one gory example of a growing problem. The Play Store is filled with apps that withstand Google's era rating policy and filtering tools. A number of those matches have been installed millions of times. After we sent Google a sample of 36 matches with improper content for their ratings and a further 16 with different types of dubious articles and permissions, including a few which tracked the location of users, 16 matches have so far either been entirely removed or re-released with revised ratings and permissions.

    The Play Store is big business for Google. The company takes a 30 percent cut of all purchases, subscriptions and microtransaction payments around the store, with its share of subscription fees dropping to 15 percent following 12 months. It also runs on the AdMod advertising positioning portal which allows programmers to monetize free apps. Although it's difficult to split out precisely how far Google makes from the Play Store, Sensor Tower statistics demonstrate that Android cellular game earnings added up to a total of $21.5 billion in 2018.

    In contrast to Apple, which has a rigorous age rating policy and acceptance process on all apps, Google seemingly doesn't invest its profits into building a robust, human-monitored method to make certain all age evaluations across its platform are right. In fact, there's very little control whatsoever of evaluations given to games that may be downloaded by children through the Play Store. Behind the scenes, every game's age appropriateness is assigned automatically by means of a questionnaire
    filled in by its creator. For anybody downloading a game, the Play Store shows a formal Pegi era rating, despite there being no manual monitoring and rating for individual titles.
    You win each level in Mad Max Zombies by gunning down the moaning horde, lining their rotting faces up on your system gun sights and pulling the trigger since blood gouts from the trunk of a walking human corpse. Which wouldn't be out of place in the area of gambling, if it had not been rated as safe and proper content for a three-year-old? Mad Max Zombies was removed from Google  Play before being re-released with a brand new name and a PEGI 12 rating.

    Of programs submitted every day by small developers, the evaluations process is automatic via a questionnaire created and administered by the International Age Rating Coalition (IARC), with the cost of issuing ratings borne by the storefront, instead of individual developers.
    Developers Have to fill out this questionnaire in good faith when they upload a program or game, however, Google itself not checks the truth of a score unless a game is submitted to its separate, safer, more Designed for Families scheme - an area of the Play Store that is vetted by Google, but can't be used by parents as a locked-down, child-friendly space to download programs and games.
    Bacioiu Ciprian, the owner of Bearded Giant Games, recently released the completely age-appropriate endless runner Retro Sail on the Play Store. He says the Play Store's age evaluation questionnaire is"100 percent based on the honor system".

    Technically, it's the job of the regional evaluations agencies, for example, Pegi, to monitor precision utilizing the tools IARC provides them. "Given the large volume of published games and programs, engaging rating authorities aren't able to monitor each and every launch," an IARC spokesperson says.
    This means that lots of ratings aren't checked by anybody in any way. A number of program publication guides suggest answering'no' to all of the questions so as to find an E for Everyone or Pegi 3 rating. Tick a few boxes, affirm that what you have said is accurate, and your game is
    automatically assigned an age rating based on your responses.

    The Worldwide regulators Involved in IARC work together to run human tests on programs that are submitted. But because of around 10,000 IARC-rated programs are published every day, it's not feasible for them to monitor every single one. "The authorities focus their efforts by checking the top downloaded programs and by performing targeted hunts," says a spokesperson from the UK's Pegi-affiliated Video Standards Council.

    But, even games that get plenty of downloads over a long interval, such as Drive Die Duplicate - Zombie Game, Released in 2016 and with over 100,000 installs, still had a Pegi 7 evaluation to go with gameplay which has the player mowing down zombies using their car in an explosive spatter of blood. Since we increased it with Google and Pegi, it has been updated to Pegi 12. The game has
    always needed a 12+ score on iOS.

    The IARC poll is utilized by many online shops, including the Nintendo eShop along with the Microsoft Store for Windows and Xbox. But rogue apps boosting adult gameplay to children aren't a conspicuous problem for Nintendo, which manually testimonials every name submitted to the eShop. Apple runs its strictly enforced age rating system. Google, by comparison, has opted to rely almost entirely on IARC, despite the massive size and reach the Play Store.

    Apple's App Store also uses a questionnaire to give apps an age rating however, unlike Google Play, Apple includes a review procedure that typically requires a day or two. Apple doesn't comment on its
    program approval procedure and the way it's implemented and declined to tell us how much human involvement there's when it comes to approving programs. But, Apple is quite clear about its era rating categories and requires developers to trace them so as to release anything on the App Store.

    Developers Are asked to classify how often content including a variety of sorts of violence, adult themes, simulated or real gaming, and sexual content seems in their programs. "The default is four plus," says programmer Tom Royal.  "Some settings give you an immediate notice which you just can't print that on iOS, and it warns you if the settings you have chosen will protect against the book in [certain states ]."

    Google And Pegi were fast to eliminate or re-rate the many concerning apps when presented with our research, although a number, such as realistic depictions of guns and gambling-style microtransaction matches, were abandoned with Pegi 3 evaluations because of a lack of proper classification standards.

    "When we find that an app has violated our policies we remove it from the Google Play,"a Google spokesperson says. "We want kids to be safe on the internet and we work hard to help safeguard them." But, thanks to an easily gameable rating method, it's content filtering programs are next to useless.

    Baby Panda Dental Care

    The improper games we discovered - which are mostly free to download - are not anything
    particularly unusual, and many would be OK if they had been suitably rated for teenagers or adults. However, they generally make their money on a per-view or even per-click foundation by displaying ads either onscreen or between levels. And by providing the answers that lead to the broadest
    rating, a developer ensures that their program can be seen and installed by the broadest possible audience - which makes them money.

    "The volume of games being Uploaded shouldn't be used as an excuse for enabling games to be rated," says Anne Longfield, the Children's Commissioner for England. She says that "although it's the duty of game developers to ensure that they protect kids," any system that depends wholly on game developers rating their own games will sometimes fail, given firms want as many individuals as
    possible to play with their games."

    There are plenty of games available on the Play Store which aren't correctly rated for children. (Pegi 3) begins as a slice-of-life sim in which you feed and tidy up after your stony-faced loved ones and, three levels later, have you awakened to deliver bloody headshots to disguised criminals holding up a bank.

    Is a Pegi 3 rated gun and firing range simulator with over 50 million installs, a wide variety of weapons, and just a camera style that superimposes bullet holes over anyone or anything that you care to put in the frame when you pull on the digital trigger. There's no gore, but the sounds and images of guns are realistic and detailed, and the program also lets you pick photos from your
    cellphone to hang in its digital firing range. Similar matches on iOS are typically rated 12+ or perhaps 17+, as an issue of Apple's coverage. By James Temperton.

    Augmented reality games

    Augmented reality game FPS Gun Camera 3D (Pegi 7) has an even more involved camera-based real-world shooting attribute. When you tip your phone camera at the world around you, the match superimposes a first-person shooter style gun and heads-up screen. When you shoot things, bullet holes and blood spatters seem.

    The Problem with most games of this kind, explains Pegi director of operations Dirk Bosmans, is that they don't fit into any of Pegi's classification categories. He highlighted other problematic grey areas, such as cosmetic surgery simulators, that could represent content that's not suitable for kids in a broad cultural and societal context, but don't meet classification standards to give them a rating above
     Pegi 3.

    Pegi has a professional group that looks into is Standards to make certain they're current. "But for the moment," Bosmans states, "our position is that when there is no explicit violence or perhaps suggested violence in these games, there's nothing to give them a higher age rating."

    Meanwhile, with strobing screen and camera flash effects, taser simulators such as Electric Stun gun
    (Pegi 3), set up by more than five million people, not only emulate firearms but also come with no kind of warning for those who have photosensitive epilepsy - Google does not need those apps with strobing lights to carry such warnings. Apple doesn't do much better on that front, with Prank Stun Gun App rated 4+.

    There is also a whole ecosystem of slot machines and video poker programs rated as suitable for children. While these are technically not real cash gambling - in that there is no payout - they include expensive microtransactions to buy virtual coins to gamble when you operate out of your free allowance.

    Most are Pegi 12, but there are plenty with Ratings which allow younger kids to install them Pegi's simulated gaming criteria now only cover names that just replicate real-world casino games. These include Slingo Shuffle - Bingo & Slots and Pirate Master: Coin Raid Island Battle Adventure, both graded Pegi 3, emblazoned with adorable cartoon characters and packaged with microtransaction systems that encourage players to purchase virtual coins when they run out of free spins. Rated suitable for seven-year-olds, FPS Gun Camera 3D enables you to flip a Digital weapon on your environment

    The UK's Gambling Commission is currently monitoring using social casino games among young men and women. Its most recent Young People and Betting poll revealed that 13 percent of 11 to 16-year-olds have played online gambling-themed games. As with loot boxes, winnings cannot be cashed outside as actual money and in its own 2017 virtual monies paper, The Commission states that it won't pursue greater regulation if the industry maintains a"proactive and credible socially responsible approach". But it's among several European regulators that, in September 2018, issued a statement of intention to analyze and explore social casino gaming.

    We downloaded knife-and-finger matches rated Pegi 3, all-ages first-person-shooter style gun games with virtual environments to games rated for three-year-olds and forcing games in which the
    objective is to mow down zombies. While Zombie Crime's (Pegi 7) simple 3D urban driving
    environment and auto controls aren't too different to dozens of kid-friendly games, the zombies here burst into flying body parts which you kick and shoot. The majority of these titles have been eliminated or re-rated.

    Although the very Goriest games we turned up needed install numbers in the low thousands, we watched hundreds of thousands of installs on kid-rated zombie games with realistic - rather than cartoon-style - blood and dismemberment, in addition to microtransaction slot machines, along with scores of the fanciful knife and gun simulators.

    Other programs we discovered, though obviously designed and meant for younger kids, rather than being completely unsuitable, featured content which has been nonetheless potentially disturbing, like pulling out a baby panda's broken teeth or curing distressing looking bruises and cuts to a mermaid.

    The panda game (Dentist Games - Baby Doctor) had over 500,000 installs and has been eliminated from Google; while Mermaid Mommy - New Ocean Baby had 100,000+ matches, has been rated Pegi 3 and has been eliminated. We separately cataloged and reported several matches for young kids that demanded excessive permissions like location and identity tracking.

    Research To the well-worn controversy over video game violence has found that older teens' pleasure of these content is not likely to affect their real-world behavior. But there is proof that violent media can be distressing for younger children, making a belief that their world is much more dangerous than it really is.

    "Early Childhood exposure to violent films and television programmes is connected with a number of adverse cognitive, emotional, and behavioral consequences," states Caroline Fitzpatrick, assistant professor of psychology at the Universit├ę Sainte-Anne in Nova Scotia, Canada. "Video games which reward players for violent behavior, as is the case with first-person shooter games, are likely to have an especially pronounced impact on young children's development."

    Clinical psychologist Abigael San adds that while a child will not automatically do something
    dangerous just because they watched it in a game, it's important not to surround children with examples of matters that we do not desire them to mimic or take emotional cues from. "Whilst not all children are going to directly copy what they see, they could absorb the emotional tone of it," she says. "And that may be a concern because then play could be a bit more aggression-fuelled."

    Bosmans emphasizes that ratings Are just 1 tool to help parents avoid exposing their children to unsuitable content. But, when using evaluations "will probably shield your child from stuff that you really do not desire," he states, "it doesn't stop there." He adds that parents will need to invest more time in understanding and engaging with the games their children play.

    You will find tools to create Google Play safer, such as the company's very own Family Link device management support. But although it is possible to limit a few of the data Google stores about your kid, using Family Link comes in the cost of creating an account for them and allowing their activities to be tracked.