6 weeks training – Android Development

Making of Pocket Keeper- An app to manage all your mess bills

Day 22
Miscellaneous Concepts of Java
Day 23
Introduction to Android, its version & its applications, Download Android
Studio
Day 24
Introduction to Android App Development:
1. Activity- UI ( View + Controller)
2. Service – Background Component
3. BroadcastReceiver – EventHandler
4. Content Provider – Database
Day 25
Introduction to Gradle Scripts ,its dependencies & the other settings of the
Android Studio
Day 26
Flaticons Explored for downloading SVG & PNG icons, changing icon of
app & adding images in the activity
Day 27
Life cycle of Activity:
1. onCreate()
2. onStart()
3. onResume()
4. onPause()
5. onStop()
6. onDestroy()

Day 28
Explored XML file in android studio, got to know its attributes & other
features, some attributes of tags are width, height, id, text, color ,
orientation etc…
Layouts as well as tools( button , switch, text box ) are displayed in the
XML file automatically once they are dragged & dropped.
Day 29
Made first app project using button; on click displays Toast showing
current date & time.
Day 30
Data Passing in Activity
1. Forward Passing
2. Backward Passing
Day 31 & Day 32
Intents , Views & Menus explored
Day 33
Introduction to Web view & project to show news on the app
Day 34
List View , Reading data from SD card, Manifest permissions, Made file
Explorer app
Day 35
Different Layouts used:
1. Constraint Layout
2. Relative Layout
3. Linear Layout
4. Frame Layout
5. Table Layout

Day 36
Scientific Calculator App developed using table layout
Day 37
Java networking in android, Views in android, Spinner, autocomplete Text
view, Edit text ,Scroll view & Dailogs in Android
Day 38
Data Persistancy:
1. Files – Internal or External
2. Shared preferences
3. Content Provider
Day 39
Service, Event Handling, Recycler View, Working with Fragments
Day 40
Exploring other activities, SnackBar & FAB, View Pager- Fragments float in
this, it has Fragment Pager Adapter
Day 41
Working with Google maps by:
• Choose google maps activity
• Login—-Create—Select Project—–Library—-Maps SDK for Android—-
Manage—-Enable then Credentials—-create credentials
• SHA-1 Secure Hash , add API key on Xml File
Day 42
Sensors & SensorManager, Geocoding, Location Manager, Voice
recognition, text-to-Speech, Intent filters
Day 43
Content provider

Day 44 & Day 45
Project Discussed & planned to implement in next few weeks.

6 weeks training – Android Development

45 Days in Android – App Development

Day 1
Softwares required:
1. JDK ( Java Development Kit)
2. Eclipse
working of Operating system with JVM to convert .class file to machine
codes. JVM( Java Virtual Machine) is pre-installed in OS. .class is the
Bytecode.
Day 2
Containers in Java:
1. MVC( Multi value container) – It can be homogeneous &
heterogeneous
2. SVC ( Single value Container)- It can have only single value. Eg
primitive data types
How primitive data types are stored in memory & how memory
optimisation is done.
Typecasting in java: explicit & implicit
Day 3
Introduction to new operator, its working & memory utilisation.
Operators in Java , their precedence & usage in various expressions. Other
operators like shift operators
Arrays in JAVA, their memory utilisation & traversing arrays in two ways:
1. For loop
2. Enhanced for loop – For each
Types of array : Single Array & Multi array( 2-D, 3-D…). N-D array is a
collection of N-1D array.

Day 4
Strings in java, memory utilisation, string Methods & its API’s
Day 5
Constructors & its types, Static variables , blocks & their order of execution
String Buffers & String Builders

Day 6
Has-A relationship on Java, array of objects, Overriding from class to class
& object to object, Polymorphism in Java, super variable & access
modifiers ( public, private, default & protected)
Day 7
Point of Sales Project using the Has-A relationship
Day 8
Polymorphic Statements: ParentClass pRef=new ChildClass();
Abstract class & methods, Introduction to Interfaces, why they are
required, used in runtime polymorphism.
Day 9
Built-in methods in objects eg. .toString(), .getClass(), .hashcode() etc.. ,
SOP Demo
Day 10
Exceptions in Java : unchecked , checked , Packages in Java, wrapper class
:AutoBoxing & AutoUnboxing
Day 11
File Handling in Java, create, read ,write & close operations, Serialisation
& de-serializtion , their usage & implementation
Day 12 & Day 13
Collections in Java: list, set, Queue & map, their Syntax, types, different
ways of traversing them & their usage in various fields
1. List- array list, vector

2. Set – HashSet , TreeSet
3. Queue – Priority Queue
4. Map – Hash Map, Hash-table
Day 14
Threads in Java: Parallel Execution —–> Concurrency —–> Asynchronous
Behaviour
Can be implemented by runnable interface, or by Thread method
Day 15
States of thread & its various methods: join(), yield(), priority, …Exploring
java.util.concurrent.*, volatile keyword
Day 16
Made small project on replicating BookMyShow using thread
Synchronisation,
Day 17
GUI( Graphical User Interface) , packages java.awt & java.swing
Model—–View ——-Controller
Day 18
Swings in Java, XaMPP installation & overview
Day 19
MySQL – RDBMS introduction, Type4 Driver
Day 20
Project on Registration Page using GUI in Java
Day 21
Java Database Connectivity:
1. Load the Driver
2. Create connection
3. Write SQL statement

 

Learning about THE COMMAND LINE

“Every Mountain top is within reach if you keep climbing.”

mountain-climbing-768813_960_720

Good Evening all!! It’s been a long time I wrote a blog. I don’t know what exactly the reason is, whether I didn’t have any interesting topic to talk about or I was just too lazy:-}

Can’t say but I guess second reason would be more appropriate: -p

Ever imagined a day your PC’s mouse stopped working and only keyboard is working and you are supposed to do some urgent tasks related to finding some files and editing them. What would you do in that situation??I have an idea that can come handy in such situations, and that is having knowledge of how to operate command line.

Recently I was given a task of learning about the Unix shell through a website named Software Carpentry (https://software-carpentry.org/) by my sir(). This was a time oriented task as the unit Unix shell was further distributed into 7 different lessons each given with a teaching time.

Screen Shot 2018-01-21 at 12.46.07 PM

So beginning with the introduction of Unix shell, it went on with how to navigate files and directories, following with how to create, copy and delete files. On further it taught how to work with loops and locate files. It ended with how to find files, how to merge files and how to overwrite some files.

As it was a time based task I began with the introduction which had 5 minutes of teaching time and I took around 9 minutes. In this it taught me about basics that what is a shell, how the command line looks like. It taught me the principle of command line i.e. REPL(read evaluate print loop) which means firstly the computer reads it, then executes it, and later on prints its output.

Then I moved to the next lesson. It was about how to move from one directory to another, how to move from one file to another. It also taught me some basic commands we frequently use in command line like ls, cd, pwd and so on. It further on taught me how different alphabets have a role in the commands like for eg. –a means ignore entries/files starting with ‘.’, -r means reverse order while sorting, and so on. It also taught me how using ‘..’ we can move up one directory, how directory name are separated using ‘/’. It’s teaching time was about 30 min and it took me around 50 min.

On further moving I moved to next lesson that was about how to copy files from one directory to another directory using cp command, how to make new directory using mkdir command, how to use mv(move), rm(remove) commands. It’s teaching time was around 25 min and I took 32 min.

The next lesson was named as pipes and filters. It’s teaching time was 30 min and it took me around 29 min to read through this lesson. In this it talked about the 2 wildcards i.e. ‘*’ and ‘?’. The first is useful in matching zero or more characters whereas second is useful in matching a specific character. On further reading it taught how we can overwrite/direct the output of a file to another file using ‘>’ character. It also taught about what actually happens behind the scenes when we create a pipe. When a program is executed — any program — it holds the program’s software and its current state in memory. Every process has an input called standard input. Every process also has a output channel called standard output. A second output channel called standard error also exists. This channel is used for error or diagnostic messages, and it allows a user to pipe the output of one program into another while still receiving error messages in the terminal. Other commands that can be handy were head, tail, sort, and so. Head is used to display first few lines whereas tail is used to display last few lines of input and sort as name suggests is used to sort it’s inputs.

Screen Shot 2018-01-21 at 12.37.54 PM

 

The third last lesson was loops. This lesson took the least time to complete. The teaching time was 40 min and I took around 19 min. Loops are the key to productive automation. It’s because of loops we are able to execute commands time and again without any error. While using loops ‘$’ sign changes to ‘>’ as it knows more commands are to be entered and when done is entered it again changes to ‘$’. Along with how to use for loops it also taught shortcut to move at the beginning of a line or the end of a line. By using ctrl-a we can move at start of a line and ctrl-e at end of line. Alongside this Ctrl-R and history command can be used to search through previously used commands.

Shell Script is a file in which commands we repeat frequently use are saved so that we can re-run all those operations again later by typing a single command. These are actually small programs. We can write a comment using ‘#’ tag to provide details to user about the program. Also sort of known as pretty typing. To run commands saved in a file we can use bash filename and this would do our task. The teaching time of this lesson was around 30 min and I took around  18 min.

The last lesson was named as Finding Things. The teaching time was around 25 min and I took around 21 minutes to complete this unit. In this unit I learnt about the keyword ‘grep’ it’s somewhat similar to ‘Google’. As we use google to find certain things in much similar way we use ‘grep’ to locate lines in files. Grep stands for global/regular expression/print. Syntax for using it is first type grep then the keyword we are looking for and at last the file name, like for eg. grep hello file.txt will look for word hello in file.txt.

At last I would like to conclude by saying the Unix shell is a lot older and it has survived because it is one of the most productive programming environments ever created. Working on command line not only makes the job easier and simpler but also gives the person an intense feeling of a huge programmer/coder.

 

 

Installation of Certmate on Experimental Server Account(For GD members )

Today I will tell how to install Certmate on an experimental server account from Github and how to merge changes in it using command line.

First of all open command line, login into your experimental account by running this command: “ssh userName@ExpServer”. Once you enter this command type password and you are logged in. Now to install the project you are required to clone it from GitHub so for that first enter “cd public_html” this will take you to public_html directory and then run this command: “git clone https://github.com/GreatDevelopers/Certificate” this clones the repository into the chosen directory.

So you have installed Certmate successfully on your account. Now to create certificates just open a browser and type “lab.gdy.club/~Username“. Now here’s a twist when you will try to generate you may receive an error saying “The page isn’t working”, this is because for creation you need sudo power for that run this command in public_html directory “chmod -R 775 Certificate” and after this run this command “chown :www-data -R Certificate“these commands are required  when you want to set permissions to a folder or a file in linux, you use chmod. The 775 mode means that only these users can write to the file.

By this you have setup and are ready to use this project and create wonderful certificates, now if you want to merge certain changes made by others you do the following. I will explain this by an example now to add what Amisha had added to my project first we need to locate the Certificate folder using “ls” and “cd Certificate” command then enter this command “git checkout -b amisha_dir restructured” git checkout command lets you navigate between the branches created and updates the files in the working directory.

After you have done the above then write the following command “git pull https://github.com/amisha2016/Certificate my-single-change” this command get the specified remote’s copy of the current branch and immediately merge it into the local copy i.e. on experimental account. Now it’s done the latest changes made have been added to local machine and use can use that particular feature.

If you want to merge another change from remote copy then follow the same steps i.e. “git checkout” and then “git pull” but before doing that use the command “git stash” git  stash save changes made to your working copy so you can work on something else, and come back and re-apply them later on. Hence by using git and terminal we have set up the project on our account. Also if you want to check at once which all commands you have used in past you type “history” and you will get the list displayed of all the previously used commands.

 

 

 

 

 

Certmate, Terminal and I

 

A day well ended or a day well begun I am confused what to say but I am sure it was just an awesome and tremendous experience for me and it couldn’t have been possible without the guidance of Amisha(https://amisha2016.wordpress.com) and support of Mandeep(https://mandeep7.wordpress.com/). It was around 10:00 PM and I was given a task to check changes made to the Certmate project by Amisha are working or not. The changes made were:

  1. Allowing user to choose whether to upload Image or not.
  2. To check if multiple certificates are being created or not by giving .csv file input.

So new to terminal and GitHub I was assigned the task and I  began to do the task and in hearts of my hearts I was afraid as I didn’t have any prior knowledge of terminal. After trying for about 30 mins, I was up to nothing much appreciable, then Mandeep asked Amisha to help me and I guess then I began experiencing new things. Earlier when I used terminal,  I never entered a command correctly on my first attempt  and that day by Amisha’s help every command was correct on first go, making me feel as if I am a high end Programmer.

Then I installed the Certmate project on my Experimental Account by first logging into the account and then cloning the project from GitHub to my experimental account. This installed the project on my account. Then I merged the changes made with the project and ran the project on my browser and was successful. I frequently shared my progress either sharing the link or a screenshot. And at last I was successful  by creating the certificate with and without an Image. Damn!! feeling out of the world. It was just about midnight but feeling as energetic as If I woke up from 8-10 hours of sound sleep. Then Amisha asked me if I will test another change and I was like why not go on and then following the previous steps I tested it and hence created multiple certificates by giving a .csv file as input and it also worked. I was so happy not because I did the testing but because for the first time I contributed something for the Certmate project and the things I learnt through this were just countless. And at last when I was going to sleep it was around 1:30 AM, so that’s the reason I mentioned in starting whether it was a day well spent or a day well begun, I am confused!!

 

OSM

Open source software is a software which is free and accessible to all and the user/developer is provided with the source code which can be modified or edited according to his/her requirements.

One of the best example of OSS is OSM(Open Street Map). Few days ago,  I attended a seminar on OSM given by Amisha(https://amisha2016.wordpress.com/). The script created by her is https://lab.gdy.club/.

stock-vector-vector-flat-paper-city-map-lying-open-top-view-369305768

It was for the first time that I heard of OSM and was amazed by exploring the amendments we can make in it. So, first of all for those who don’t know what exactly OSM is.

OSM, also known as Open Street Map, is a software by which a user can create a free, editable map of any place, may it be a village, a city, a country or whole world. In this, all the map data required for creation is collected by volunteers by surveying. The tools used are a handheld GPS unit, a notebook, digital camera, etc.This data is then entered into the OSM database and a map is generated. Also a competition named Mapathon is organised by non-profit organisations and local governments to map a particular area.

You all might be thinking, we all have access to google maps so why we need to use OSM?? Right? I was also thinking the same as you are.

Well, it is much similar to Google Maps but on the other hand it is quite different too.

So here’s the answer to that question: The key difference between these two mapping environments is “Open” vs. “Closed” approach with how the data is collected and stored. The most basic difference is that every edit/change you make to OSM is owned by you and the community, while every change you make to Google Map will be owned by Google. Open Street Map was born in 2004 and became very popular among the developers. Seeing this, Google also introduced Google Map Maker, in 2008. File extensions of OSM files are .pbf(Protocolbufffer Binary Format) and .osm(Open Street Map).

At last, why I feel OSM is better than Google Maps is the flexibility that OSM provides i.e. it is ready for any styling you need to apply for your project and is always available for free to the users, developers and companies.

I’m still researching more on OSM and finding which softwares could be used for map editing, how data is stored and processed, so for further information on OSM stay tuned.

 

 

Your Only Limit is You

What a remarkable day it was! I don’t think the day was meant to go, the way it went. A G.B.M.(General Body Meeting) was organised so that all the members could discuss the problems they faced while working on their projects and share their experiences.

Two persons named Vigas Deep and Mandeep Singh were also present. They are not studying in college rather they are running their respective start-ups quite successfully. They came forward to share their experiences. While they were sharing their experiences, audience also played a vital role by interacting and questioning them especially Mahesh(https://maheshmadhavblog.wordpress.com/) and Amisha(https://amisha2016.wordpress.com/) .stock-photo-password-management-multicolor-inscription-on-white-brick-wall-with-doodle-icons-around-modern-388523242Mandeep Singh(https://mandeep7.wordpress.com/) gave a beautiful presentation on Password Managers. In his presentation he explained how we can solve the problem of remembering complex passwords by using password manager. We just need to remember a master password and in that all our account passwords can be saved.stock-photo-i-can-self-motivation-cutting-the-letter-t-of-the-written-word-i-can-t-so-it-says-i-can-264221285‘Thinking Yet? Start!’ was the topic on which Vigas Deep(https://vigasdeep.com/) gave the speech. It wasn’t a technical one, but a very helpful and morale booster speech. In his speech, he discussed about the day to day problems and gave tips as to how to tackle them. His main emphasis was on being focussed, dedicated and passionate towards our goals. He mentioned that we should live our life fully and not be scared of what others would think about us and enjoy every moment of our life.

 

 

while( ! (succeed=try()));

stock-photo-different-machine-code-languages-programming-button-on-the-computer-keyboard-d-illustration-288042365.jpg

I attended a seminar where a code developed in C++ language was discussed. The code was about addition of 2 numbers. The two no. were accepted from user and added and the result was displayed. A header file was created consisting of prototype and then included in the main program.

Through this, various basic but important things were taught i.e. meaning of term void in program, importance of header file, function performed by keyword return0 and use of cout and cin with <<, >> signs.

 

Working With APIS

api (2)

                                    “Success is born from Struggle”

This quote is just enough to explain my current state.  4 days ago I started to work on what is an API. So according to me, an API is just like messengers which takes inputs from user, processes the inputs and returns the desired output. In simple language it’s just what a waiter do in a hotel, our order is the input, kitchen is the processing and food is the output. Possible use of APIS is I guess everywhere where there is a link with the database of something. Any sort of form which accepts data from a user and then do processing backend is an application of API.  Application like booking of flight, train tickets, etc. are examples of APIS.

From my research, I had a task to create an attendance form. I created a simple form using Google Forms but faced data validation issue. Date Validation is a way to ensure that data entered by a user is correct, i.e. in an email text field user enters an email only, but I couldn’t do the same for Name text field as in that user can enter numbers also along with alphabets.

Later I got to know that form was not having authentication factor that would confirm the presence of student in a particular lecture.

Here I guess struggle actually began. I added a feature that would limit only one entry per email id but it would allow only once i.e. not every day but only once a lifetime. I searched to find a way to it, but couldn’t succeed. Consulting with two friends nothing could be made out. At last I would say we succeeded when we thought of adding an image feature to the form. In this a student would take an image which would confirm his presence in the classroom, upload it to Google drive and save it in the form. From image time and date would be extracted and matched and then the student’s attendance would be marked. And whole responses would be saved in a single spread sheet.

But still working on how to reopen the form after certain time period so that again a student enter his attendance  and also how to extract date and time automatically by using if-else and looping statements in script editor.