Showing posts with label Tutorials. Show all posts

What is Programming ? | Learn to Code! - Chapter 1



Today our focus is to familiarize you with the notions and the concepts of programming. First of all I feel like its an imperative to remove the misconception that programming is meant for any sort of geniuses or you need to be specifically good at maths to embark on this creative journey.

In-fact, it is believed that programming like many other subjects, is a tool for developing your creativity and enhancing your logical perception. Of course, it is true to some extent that some subjects related to programming do require you to know some fundamentals of advanced mathematics but for now , I assume that you have little or no programming experience , though it would be helpful if you are familiar with some concepts of elementary maths. Even if you don’t, you shouldn't have any problems understanding these tutorials. Before getting on the technical stuff, we will explore the meaning of programming itself.

Programming:

Programming is simply a way to define specific instructions or commands that are required to solve a given problem or achieve some purpose . It is true that even before computers were introduced into the world, the concept was long obeyed by humans even without knowing it.The idea is to define a sequence of detailed steps required to achieve some result or make a product ;Where every process requires us to:-

• understand the problem itself
• identify what needs to be the result
• define appropriate inputs
• devise suitable processes on the input to get the final result .

To understand it in the most generalized terms , think of it as inputs being your raw materials and processes being a way to convert your raw materials into some useful items , and outputs being the end result of those items ,that are put to a good use. Such a sequence of detailed steps working their way to complete a job is known as an algorithm.

For defining algorithms , different approaches can be used , such as :-

Structured English :  You can use plain commands in your natural language to design a solution.

Flow charts: Graphical representation of the whole number of processes that take place for every process that defines a particular mechanism,where the basic  diagram symbols used are these :



Pseudocode : Well, pseudo means false. It actually resembles the real code, written in programming languages, but the one which cannot be executed.

Programming languages: For communicating with computers we need some languages which help us convey our message to the machine or write actual executable programs while following a particular syntax(like Grammatical rules in English language) . (Though, if it does not make any sense ,we will be discussing that later, so you don’t have to worry too much about it.) Examples include:- Java , C, C++, FORTRAN, Python and many more.

Machines are no different either , they are insensible . Unlike humans, they can't learn, adapt , create or produce . In-fact , its our job to give machines a particular algorithm to have it do some work for us. For example there is a simple algorithm presented in flowchart, psueodocode  or structured English for converting a length in inches to centimeters. Now , jumping to the basic ideology of writing any algorithm, we again need to know what the problem actually asks from us.

We need to get an input that is the length in inches:-

Structured English:

• Read length in inches from user
• Convert into cm
• Store the result
• Output the result

Further illustrations define the same algorithm in different forms:

Flow chart :


Psuedocode:

input inches
CM=inches*2.54
output CM

STILL CONFUSED?
or WANT TO KNOW MORE?
Have a look at our video tutorial for this Chapter:



                     

                                   
For the sake of simplicity , today we will not discuss  the context of any programming language.
But we know for sure that any process or system obeys the very sequential and algorithmic approach taken by computers.

Addition :
In the next chapter, we will be discussing what is known as variables, Constants and about primitive eliments.

Click the Subscribe button to get notified about the next chapter!



Learning to Hack! Beginners guide to Hacking (Part 1)



There are thousands of people out there who have a desire to become a professional hacker. Well, honestly, to learn hacking is not a bed of roses. But don't worry, we can make it a little easier for you. Let us first get to know basically what hacking is.

First let me tell you that there are two types of hackers.
1- Black Hat hackers   (The bad hackers / They Steal stuff)
2- White Hat hackers  ( The good guys / Ethical hackers)   (We want you to become this)
So which one do you want to be? Obviously the White hat hacker. We won't want you to become a Black hat hacker because there are strict rules in several countries on cyber crime which can even lead to life time prison.


Hacking:

To be precise and simple; Hacking is the act of gaining illegal access to someone else's system. So why would you want to hack someone's computer system? Maybe because you want the data stored in it or you want to simply delete it so the real owner of the data is not able to reach it. Simply, hackers hack data to gain access to it, to corrupt it or to delete it. This is called hacking.

Remember, there is a difference between Hacking and Cracking.




Cracking:

Cracking is when a hacker edits a program's source code either to exploit it or to use it for another purpose. When someone says,"I have hacked that software" or "I have hacked this game", simply, the person is trying to say that he has accessed the source code of the particular software and he/she can edit it to make it perform various tasks.
Now the question coming to your mind may be that what is a source code? It's no rocket science! By the words we can get that source code is the code or the programming done when making that particular program. When the hacker gains access to it, he/she can change it. This is called cracking.

Ethical Hacking:


You could even hack your own software to become aware of the flaws in the software before launching it so that it becomes safe after launching. This is the job of an Ethical hacker. Companies hire them so they can find out the flaws in their product and fix them. They pay them huge amounts of money for doing this. After the launch of a software, black hat hackers try to find out ways to crack it and use it their own way. White hat hackers / ethical hackers find out the vulnerabilities and fix them before the black hat hackers do. This is what they are paid for.

So today we have learnt that what basically hacking is,what's cracking, why someone does it and who an ethical hacker is. In the coming parts, we'll be discussing the methods of hacking and other cool stuff. This was quiet basic becomes most people DO NOT actually know what hacking is. So I decided to start it this way. Next posts will be more informative regarding hacking.  Stay tuned!

(For educational purpose only)

How to Encrypt your E-Mails for FREE ! Have a look!


First, it’s necessary to make a few basic points. Programs like Outlook and services like Gmail will talk about offering “encrypted” email to their users, and they certainly do, but that’s not what we’re talking about. Their encryption keeps your data safe while it’s traveling through the various lines on its way from one user to another — very important. This can (often) stop eavesdroppers with access to the physical lines of communication from abusing that access to read the bits going through them. If that’s what you want (and it’s not a bad idea at all), that’s as easy as changing a settings option.

There are also a number of far more secure email services that offer aggressive end-to-end encryption methods. Those are a big step up in security, but as the saga of Lavabit showed, leaving your emails on servers owned by real humans means that those real humans might be compelled to take measures that will reveal your information. A good rundown of encrypted email services can be found here, though they almost always come with a monthly fee and sometimes only accept payment in cryptocurrency like BitCoin. The most secure I’m aware of at the moment is probably the Lelantos Project, but this space is changing virtually week to week.
encryption 4

The user-based encryption we’re talking about is far more robust, since it encrypts your messages even from the person who’s supposed to receive it, if they’re not prepared to open them. It doesn’t give Google or anybody else the option of encrypting or not — you’re the one doing the scrambling, so only you and your chosen recipient(s) can decide if you both feel like doing any unscrambling. If you receive a user-encrypted message in your Gmail account, Google can only ever read the garbled version, because that’s all the company ever actually received. It nullifies the trust element of security for everybody except for yourself and your recipient.

As a result, it’s significantly more bothersome to set up and use. Encryption isn’t perfect by any means, but with a good understanding of secure email transmission, you can make sure that nobody without significant time and resources can eavesdrop on you — and how many of us are, realistically, worth government-level effort?
encryption 3

First, here’s how computer encryption works in basic sense. In crypto, there is a problem called key distribution: it’s easy enough to lock a file, but for an intended recipient to be able unlock it and read it, you have to get them a copy of the mathematical key — and if you could distribute things like that safely, you could just use that key-distribution method to send the message itself, and keys wouldn’t be needed at all. The eventual solution was to use a so-called public-private key combo, in which one user can lock a file with a publicly listed key unique to a particular recipient, but then only a corresponding secret keyheld by the recipient can open it.

It’s a fairly simple idea that was held back for years by the sheer difficulty of coming up with a mathematical operation that could do this — lock with one key, then unlock with another. When such a method was first discovered, it was called RSA. RSA didn’t really come into its own until it was put into practice by a guy named Phil Zimmerman in 1991, with the release of a user-friendly software suite called Pretty Good Privacy, or PGP.

There are a number of similar solutions include, but not limited to, PGP, OpenPGP, and GNU Privacy Guard, often called GPG.

We’ll need to do three things to get started: install the system itself, generate a public-private key pair, and publish our public key somewhere that people can find it. There are some browser extensions that will automate some of this process — but frankly, if you’re willing to give away control of that much to unknown parties, you can probably just get by with a paid encrypted email service anyway. We’re trying to do it ourselves, here.

GPG makes things very simple. If you’re using a Windows PC, you might want to try GPG4Win, on Mac GPGTools. The procedures for getting started with these systems are broadly similar, with only slightly different program names and on-screen prompts.
encryption 2

The GPGTools Suite is probably the most streamlined option. It uses a version of the Mac keychain called GPGKeychain to generate and manage any keys you make or encounter. When you make a new key-pair for your own use, or enter someone else’s public key so you can send them messages, GPGKeychain manages this information. This is the center of your security world from now on; someone with access to this program could get at yourprivate keys, reading all encrypted mail just as easily as you do. Make sure you have a screen lock on any system with this program installed.

Creating a new key-pair is as easy as clicking “New,” and following the instructions. This is where you decide on what level of encryption you want (the default is almost always fine), as well as what actual email address will receive the encrypted messages and the alias that will be displayed. You can use your real name if you’d like (I do) but you don’t have to if you’d like to remain anonymous. Once you click create, you’ll have access to a public key for you to copy and host somewhere on the Internet.

The easiest way to do this is probably to right-click and Export the key in question as a text file. Open it up and copy-paste the full key (header/footer and all) into the submit box on this website. MIT hosts public encryption keys for anyone, for free — they’re not the only ones doing it, but they’re the most reliable. If you don’t want to trust MIT to keep the servers up indefinitely, try hosting it on your own personal webspace. You’ll have to publish the link somewhere, so people can actually find it to message you — Twitter bios are popular places to host links to public keys.
encryption 5

Now, actually making use of these public/private keys to send or receive emails takes another program from the GPG Tools Suite: GPG for Mail. If you receive an encrypted message without this installed, even one correctly encrypted with your public key, it will appear as gibberish. By installing GPG for Mail, you teach the Mail app to put those keys to use both encrypting and decrypting messages. This means that if you were to lose or break the system with the properly patched Mail client on it, you’d have to reinstall GPGTools to read your own encrypted messages — even those you’ve already opened and read in the past.

GPG4Win works much the same way, with its own key-managers and plugins for Outlook. Linux has by far the broadest set of encryption tools available, but they also tend to be the most complex.

In the end, real user-based encryption is still fairly opaque to most users. On the other hand, a well-designed personal encryption regimen is the best communications protection it’s possible to have right now, and unlike professional encrypted email services it doesn’t cost a thing to operate. You’ll need to do just a bit of DIY work to get it running, but honestly not all that much.

Lastly , we thank ExtremeTech for the information provided. Thanks to Extremetech.com .