Profile

Cover photo
Hammad Fauz
Works at SEWA
Attended Ghulam Ishaq Khan Institute of Engineering Sciences and Technology
Lives in Sharjah
464 followers|98,840 views
AboutPostsPhotosVideos

Stream

Hammad Fauz

Shared publicly  - 
 
Jebel Hafeey, Al Ain
4
Add a comment...

Hammad Fauz

Shared publicly  - 
 
Zayed Grand Mosque, Abu Dhabi
5
Rosemegen Canas's profile photo
 
Wow its so beutful grand mosque
Add a comment...

Hammad Fauz

Shared publicly  - 
 
I posted this as an answer to someone on a community asking for help with basic coding. I think it can benefit a wider audience. (With some additions)

Here are the basics of coding (language doesn't matter)

Expression A step that performs a computation. It is the most basic unit of code. 2+3 is an expression that evaluates to 5, 2 > 3 is another expression, which evaluates to false.

Variable A (named) location in memory, you can used to store values in. Expressions do not need to evaluate to something every time. Sometimes, they just perform operations like moving values around in the memory. a = 3 is such an expression. It stores the value 3 in the location named a. Variables can be assigned values of different Types. When you use the variables in expressions, they evaluate to the values assigned to them, before evaluating the expression itself.

Type Different Types of values are treated differently by the computer. Some operations might be valid for some types, while being invalid for other types. An example of a type is number  like 5 and text like hello. You could multiply two numbers together, but not two texts. Different languages call types by different names (C calls a number, an int, a decimal number is a different type in C, called float, texts are called strings in C). Types define how the values are encoded when stored as binary values in memory (memory can only contain binary representations). There are simple Types (also called primitive types) and complex types.

Complex types are defined as different arrangements of Primitive types.

An Array is a complex type, which is basically an ordered collection of a single primitive type. So, in C, an int array would be an ordered collection of ints. An int array could be defined like this: [5 2 1 9] this array has 4 ints. You can select any int in the array by its index which is the position of the int you want to select. Index often start from 0, so the first item in the array above (5) has an index of 0. The Third item (1) has an index of 2. The nth item has an index of n-1.

Another example of a complex type is a Tuple also called a dictionary in some languages. It is an array of items that have user-defined values as indexes. And example of a dictionary would be, [(hammad, akhwand), (jae, yong)]. Here hammad could be used as index to select akhwand. You can combine, and mix and match complex types to make even more complex types, depending on the language you are using. I could have an array of items in the place of akhwand in the dictionary above, which would be returned on calling index hammad.

Complex types are also created by just grouping different types. C has such a type called struct, other languages may have something similar called objects. Such complex types make it easier to write code for real-world applications. We could have a struct or object called person which would be a combination of first name (a string), last name, (another _string), age (an int). There is a whole class (pun not intended) of languages called Object-oriented languages that use and define objects in fun and useful ways (using things like classes and prototypes, which are not strictly basic coding stuff).

It would get really boring and tedious if we had to code from scratch every time, or implement the same stuff over and over again. That is why languages have Functions. Some languages call them routines. A function is a group of lines of code that can be grouped together as a single operation, and 'called' when you need the same set of operations performed again. An example of a function would be something to calculate the area of a circle. Functions may take values or parameters as input to perform same operations of different sets of values. AreaOfCircleWith(Radius) could be a function which takes Radius as its parameter, and outputs Area. Not all functions might evaluate to a value. AreaOfCircleWith(Radius) function could have code for operations to Square the Radius, then, multiply it by 2, and then by Pi.

The most fun thing about coding is its flow. You can define in your programs, which part of the code you want to run(Conditional), and for how many times(Loop).

Conditional flow defines what you want the code to do, depending on different conditions. If else is a common way to define a conditional. If (user presses key) close window, else if (user clicks button) play sound, else wait for input, is an example of a conditional flow.

Loops have many common manifestations, a while loop will keep on repeating a block of code while some expression is valid. Loops are kind of like repeating conditionals. Specific conditions are checked after each end of loop. A for loop would just repeat executing a block of code, for a specified list or array of items. Lots of different languages have different ways of defining loops.

Now that the concepts have been introduced, here are tips for getting your hands dirty:
1. Choose a programming language. For learning purposes, choose something general, with a lot of community on the internet, so you can find someone to help you out if when you get stuck. To get you started, 
(http://en.wikipedia.org/wiki/Comparison_of_programming_languages)

2. Once done, google how to set up <language-name> development environment. Replace <language-name> with the language you chose in step 1. At the very basic, coding consists of creating or editing text files, and providing them as input to the language compiler or run-time. A lot of times, languages have many different dev-environment setups. Some use IDEs (Integrated Development Environments) which is like Photoshop for coding. They will provide all the tools, skeleton code (also called boiler-plate) , code editor with syntax-checking capability, code explorer, etc. Some setups are simpler, just consisting of your favorite text-editor (I personally like vi) and the run-time or compiler executable. My recommendation, for learning purposes is to use the simplest most minimal environment available. This is so that you get to know about the inner workings of programs, and how code is usually structured. IDEs will make stuff easier, but might cause you to skip the learning part.

3. Once your development environment is set up, you're ready to crack your knuckles and get coding. Decide what you want to make the computer do, and code it. When you get stuck, google the concepts introduced above for your specific languages (To see how to write a loop in Python, google Python loops or python looping or python for loop). www.stackoverflow.com is a website that will prove to be very helpful for very specific problems (like cryptic compiler errors and warnings).

Happy coding!

(Original post here: https://plus.google.com/109703415985876707530/posts/SpEeZSyGRTU)
2
Add a comment...

Hammad Fauz

Shared publicly  - 
 
A classic case of what happens when your client-side is decoupled from your server-side.
 
Look, maybe someone has had troll issues in the past, and they decided to set their posts to only allow comments from people in their circles. I can get that. But for the love of Christ, +Google+, can you please give us some indicator so we don't spend a bunch of time on a comment only to find out at submit that we're not allowed to? Just some tiny UI hint that we're wasting our time?

There is nothing more frustrating than seeing a really great post, crafting a thoughtful and relevant comment, and then getting the finger.
9 comments on original post
2
Liz Quilty's profile photoKashif Zahid's profile photo
2 comments
 
Ha ha... True. some feedback for +Google+ Help
Add a comment...

Hammad Fauz

Shared publicly  - 
 
Woah! This is happening!
1
Add a comment...

Hammad Fauz

Shared publicly  - 
 
 
Allah is the protector of those who have attained to faith, He takes them out of the darknesses and into the light.
(Quran 2:257)
236 comments on original post
1
Add a comment...

Hammad Fauz

Shared publicly  - 
 
Ok so Google replacing, search, music, camera, calendar apps with their own version seems reasonable(-ish). But keyboard and messaging? That's core "OS" functionality. Very alarming state of affairs indeed.
1
Add a comment...
In his circles
435 people
Have him in circles
464 people
‫محمد العسلي‬‎'s profile photo
Richard Taylor's profile photo
tasleem ahmad's profile photo
James The Cheetos Freak!'s profile photo
Sara Ajram's profile photo
abina kone's profile photo
Angelo S (AndroidUser00110001)'s profile photo
Bacia Stevenson's profile photo
Lewin Edwards's profile photo

Hammad Fauz

Shared publicly  - 
 
Courtyard of Grand Mosque, Abu Dhabi
8
1
ahsan khaliq's profile photoKashif Zahid's profile photo
2 comments
 
Beautiful!!! 
Add a comment...

Hammad Fauz

Shared publicly  - 
 
Awesome!
 
Yay, GitHub finally released traffic analytics: http://bit.ly/1gC9toI

Apparently, ga-beacon helped convince them that it's worth building:
https://twitter.com/jnunemaker/status/420634885552754688

Lesson learned: build more 1K star repos to get more features on GitHub! Also, for those wondering about "fate" of ga-beacon: you can use it alongside "native" GitHub analytics if you want real-time reports, and you can also use it outside of GitHub.. it's a generic beacon! Anywhere you can embed an image / pixel tag, you can gather real-time data and view it in GA.
4 comments on original post
1
Add a comment...

Hammad Fauz

Shared publicly  - 
 
That's 10 Million Bytes, you guys. Only $3.39(8) for ten thousand Bytes!
 
Introduction of a Hard Drive from the Past.

Not sure how many people reading this post actually remember the time of 5.25" & 3.5" floppy disks and cassettes before that. Arrival of the magnetic hard drive was a big thing.

Who remembers loading software from a cassette player connected to a BBC micro computer and waiting almost an hour before getting anything on The screen?


30 comments on original post
2
Jussi Kinnunen's profile photoHammad Fauz's profile photo
2 comments
 
+Jussi Kinnunen, you've been rich for that long.
Add a comment...

Hammad Fauz

Shared publicly  - 
 
Here are the faces, the actual people, living human beings. Flesh and blood, with hopes and dreams, like the rest of us. The dots in drone strike videos.
Last October, Rafiq ur Rehman was out visiting his sister when a drone missile struck near his home, killing his mother, Momina Bibi, 67, and injuring his three children.   Rehman,
1
Add a comment...

Hammad Fauz

Shared publicly  - 
 
So Google just gave me a custom url for my Google+ profile. Should I feel special? How special?

plus.google.com/+HammadFauz
4
Ursu Irinel's profile photoHammad Fauz's profile photo
4 comments
 
The rollout is spread over a week. So you will get yours before next Wednesday. Hold tight. :)
Add a comment...
People
In his circles
435 people
Have him in circles
464 people
‫محمد العسلي‬‎'s profile photo
Richard Taylor's profile photo
tasleem ahmad's profile photo
James The Cheetos Freak!'s profile photo
Sara Ajram's profile photo
abina kone's profile photo
Angelo S (AndroidUser00110001)'s profile photo
Bacia Stevenson's profile photo
Lewin Edwards's profile photo
Work
Occupation
Web Developer
Employment
  • SEWA
    Web developer, etc, 2012 - present
  • Tellabs
    Research Engineer, 2011 - 2012
Places
Map of the places this user has livedMap of the places this user has livedMap of the places this user has lived
Currently
Sharjah
Previously
Islamabad - Topi, Swabi - Karachi
Links
Contributor to
Story
Tagline
Where's the fun in "just works"?
Introduction
INTP. A happy geek. I see myself as Tux, the slightly over-weight, satisfied, happy penguin.
Bragging rights
Transferred 8-bit ascii over a 28.8k voice modem using Hyper terminal, when I was 11 years old. It was my first "home network".
Education
  • Ghulam Ishaq Khan Institute of Engineering Sciences and Technology
    Engineering Sciences, 2006 - 2011
  • English medium School (PVT), Dubai
    Whatever Kids Study, 1991 - 2006
Basic Information
Gender
Male
Looking for
Friends, Networking
Relationship
Single
Apps with Google+ Sign-in