Posts

Showing posts with the label Software Engineering

Frameworks vs Libraries vs Services

Image
Framework, libraries and services are usually overlapped. In this blog post we'll see how are these things different from one another. First let's have a look at framework .. Let's tokenize this word. Framework is composed of two terms. one is frame and second is work. Frame is anything that you can put something into . Like a photo frame, you have some sort of skeleton in which you can put your photo. but the most important thing is that your photo must be of the size of the frame. If this isn't the case then you might need to buy some other frame or you might need to cut your photo from the borders, or the bottom or the sides or from anywhere. (in order to fit it into the frame) The second word is "work" what does work mean... Well according to Physics you are only doing work if and only if some force is applied and you cover displacement in the direction of applied force. But this is not the case with this work word. Here the work is nothing ...

Pintos : Series : Part 4 : Final

Image
In this blog post, we will be done with our Pintos Project #1 and this Pintos Series AlhumdullillAllah. so let's start... In the previous posts of this series, we have looked at the problem that is of busy waiting. To solve this problem I took help from code written by other people on Github,  so to learn it deeper you can get to look at this code, by Muhammad Zaheer  .  The basic modification is done in two files i.e. timer.c and thread.h;       ALARM CLOCK IMPLEMENTAIONS      ========================== Changes in timer.c:   - A global list of sleeping threads is created as: -static struct list sleep_list; Changes in thread.h:   - For keeping track of a sleeping thread when woken up, we declared: -int64_t sleep_time;   - When a thread calls timer_sleep(), it gets into the sleep list as: -struct list_elem sleep_list_elem Algorithms Used ...

Bitcoins : Part 2

Image
In the  previous blog post  we were looking at the problems with physical forms of money. So now according to our agenda lets talk about the solutions to those problems... Solutions... Plastic money like credit cards to make money portable. But the above solution still go as the physical form of money. Solution # 2 is that we make something that is digital. Where there is no need to have any middle man while doing transaction of money. no need for any central authority for check and balance. The system should be distributed as well as decentralized. (What this system is? Is it about bitcoins? Or Something else? ) But again many problems are associated with this system... I am pausing this session here, now if you are really concerned about crypto-currency then what you need to do is: Go here   (bitcoin.org/bitcoin.pdf),  read this paper and write in the comment section what you found from this paper. Also think about some of the problems associat...

Bitcoins

Image
Points to cover: What is money ? Problems Solution ? bitcoin Bitcoin origin Advantages Disadvantages Books related to it.. Future Assignment  code : fun factor :) Conclusion 1. What is Money? source: https://i.gifer.com/FU8l.gif Definition: Currency, coins, asset, property that we spend/ sell to buy something materialistic. Or that other people give us for our services. Everyday we need to deal with one another and we get some services from other human beings, similarly other people get some reward in exchange of their provided services in order to make a living. That reward could be and mostly is in the form of money. 2. Problems with simple money There are many problems associated with currency in paper or other physical forms, some of them are: They could be stolen. Could get distorted, or torn out. Could fell down. Could become wet in rain. You could lost them in your school bag or any cupboard. and many other unconcerned or l...

Palindrome : php

Image
Image source : https://www.grammarly.com/blog/16-surprisingly-funny-palindromes/ Words, numbers, digits, or ... anything,  that remain the same as original if we reverse them are Palindromes. So how could we find if a word or a sentence is palindrome or not? We will use php for this... code: <?php function semiPermeableMembrain ( $str ){ $str = strtolower( $str ); $split = str_split ( $str ); foreach ( $split as $obstacle ){ if ( $obstacle == " " || $obstacle == "'" || $obstacle == "." || $obstacle == "," || $obstacle == ";" || $obstacle == ":" || $obstacle == "-" ) { $obstacle = "/ $obstacle /" ; $str = preg_replace ( $obstacle , '' , $str ); } } palindrome( $str ); ...

PHP chess board : how to make ?

Image
As we have learned much of the basics of  HTML and CSS . Let us now learn how can we make our web applications more user friendly, flexible and versatile, using php . Today we will see how to make a chess board using php in collaboration with HTML and CSS .  So, Let's start: BASIC php SYNTAX: Starting Closing Tags: <?php ?> Php code must be written in these tags. Variables:              Start with "$" sign e.g. $num=3;               ; is really important to put after every statement. Functions:              Functions start with the keyword "function". E.g. function power(){} Print:             echo "printing by using echo";             echo ("printing by using echo");             print "pri...

Learning : 2 Years : EXAMZ (2)

Image
About 2 years have been passed in the university and I have learned a lot in these two years. By "learned a lot" I don't mean only the academic learning but it also involves non-academic learning. When I was in my college, I read in my English book, that you had less number of classes to attend and less number of books to study in the university, but this is not the case, NOT AT ALL! This is true that courses are less in number but they are much in content... So coming back to the learning point, let's have a look at the list below: Always try to do your own work by yourself, never ask for help to other people a lot , people might help you in the beginning but when you ask them a lot then they will   be annoyed of you. So, do your work by yourself till the end point, and when you try your best, when you give your best, the best will come to you. No matter how much is the task difficult, if you are trying but are not succeeding in it, you will witness ...

Github : EXAMZ (1)

Image
You can visit some of my codes here . I will add more code in the coming days Insha'Allah. That's it for today? Yes, for today's post that's it ! EXAMS SEASON....

GDG Islamabad : DevFest GDG 2018

Image
On 17th November, 2018, there was a 4th session of GDG Islamabad naming DevFest GDG 18 , at NUST  NICE  H-12 , Islamabad Pakistan. The event commenced at 1100 hours. The whole hall was full of business owners, entrepreneurs, developers and students. A boosting music was playing in the background.  In the beginning, community co-manager of GDG Islamabad introduced GDG. He said that digital wellbeing is the main focus of Google technologies.  Saad Hamid is a manager at GDG Islamabad. Muhammad Bin Masood is its co-manager. In the session the audience were told about different technologies of Android P mobiles. Some of these technologies and applications are: Gesture Navigation (Much needed Application) Wind down Notch support Lock-down Mode Smart Notification Auto-Rotate Button Media Panel Digital wellbeing Disconnect at night Time spent on app MOTO OF DIGITAL WELLBEING: " GREAT TECHNOLOGIES SHOULD IMPROVE LIFE, NOT DISTRACT FROM IT " ...

PintOS : Series : Part 2

Image
I hope you have installed PintOS . Now it's time to move forward... In the first assignment we need to check and pass first six test cases of alarm. These are as under: alarm-single alarm-multiple alarm-simultaneous alarm-priority alarm-negative alarm-zero You will find them in " /tests/threads " directory. You need to make changes to " timer_sleep() " function in " timer.c " file under " devices " directory, to pass these tests. But first you should start learning from : here also I have a paper :  here After reading and understanding the reading material, you will be able to start coding! (exceptional cases are always there...) I also need to read it first, so I will let you know more later (after understanding it fully..) So, let's jump right into it (I mean let's start reading!)

Pintos : Series : Part 1 : Installation

Image
PintOS is an Operating system, but this is not a complete OS. There are many kernel level functions implemented but we need to modify it to implement it correctly. So, if you are taking OS course or interested in Operating Systems then you can follow my PintOS Series. As installation of PintOS is the most important and tedious task, so we need to do it first! Actually I have learnt about the installation steps from various sites, I will share their links side by side. What I grasped from there, I will compose it into this post. I know you might be thinking if the installation steps are already available on-line, then why am I writing them for you? The reason for this is that, when I installed PintOS, I found a lot of problems initially but then it worked. So, what I understood from my experience and from the sites, I will share that. I believe that if learning is done through mutual cooperation,  then this will benefit everyone . So, let's learn together.... First Mist...

Let's write a Story..

Image
HTML provides us the opportunity to write stories by using beautiful background and themes. Let us write a story using HTML (do not ignore CSS) (NOTE: I took the story from here ) HTML Code with Internal CSS: (The code within <style></style> tag is CSS code. This is used for styling.) <!DOCTYPE html> <html> <head><title></title></head> <style> body { background-image : url(https://ubisafe.org/images/leaf-transparent-gif-3.gif) ; } header { background-image : url(https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTtDfPZ1vWpRDFkDl8dZ7h1IYsNolC3Mqos_7DitiaztuzI-8yi0w) ; width : 100 %; /*background-repeat: no-repeat;*/ text-align : center ; height : 100px ; padding-top : 0.1px ; padding-bottom : 17px ; } #header { } #container { background : white ; width : 50 %; padding : 20px ; text-align : justify ; margin-left : 25 %; border : 10px solid orange ; box-shadow: -...

Guess Number GAME : HTML

Image
Python is pretty good language but HTML is pretty web language... so, in first semester I wrote a python code for guess number game, but, now we will learn how to make a guess number game using HTML... so below is the code for it, I will try to upload all my codes on github... and will share a link with you. But for now consider the below mentioned code, in HTML and styling using internal CSS. Code: <!DOCTYPE html> <html> <head><title></title></head> <script src= "https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js" ></script> <style> body { background : url("https://cdn.pixabay.com/photo/2015/01/08/15/54/lines-593191_960_720.jpg") ; } h1 { margin-top : 10px ; font-family : cursive ; color : black ; background : white ; } table { padding-top : 20px ; border : 10px solid purple ; padding-left : 60px ; padding-bottom : 20px ; } td { width : 20 %; heig...

Think Like a Programmer

Image
How? Read this book Why? Because you are to become a software engineer and programming is the basic need, the food for thought of a software engineer especially a programmer software engineer... But... This is too long So what? You have to read it! May be it contains something that is beneficial to you..

Banana News Network

Image
So, yeah a quick blog post on HTML. You need to make a news website layout, how do you do that? I made a simple web page, that I want to share with you.. The code: <!DOCTYPE html> <html> <head><title> Banana News Network </title></head> <body> <table style= "font-family: georgia;" cellspacing= "0" > <tr> <th width= "100%" colspan= "3" style= "padding-left:50px; background-color: yellow; font-size:30px" ><h1><img src= "b.png" width= "50px" > BANANA NEWS NETWORK </h1></th> <td></td> </tr> <tr> <td colspan= "3" ><span> <ul type= "none" style= "background-color:black; font-size: 30px; font-family: georgia; " > <li style= "display:inline-block" ><a href= "something.html" style=...