My First Android App

After i learned basic react native, my next journey was making an android app, so I started by download android studio from this link

https://developer.android.com/studio

Then when I open the android app I create a new project called basicCounter

First I start by adding the text view component with the value 0 and i added some attributes to make it looks beautiful, then added one other text view as header text called counter. in the end, I added two buttons one for count up and one for count down

So after making an emulator and run the app, it will build Gradle, and if there is no error, it will say lunch succeed.

Merge sort by ruby language

Ruby is simplest language and easy to do data structure and algorithms

We arr going to explain merge sort in ruby, first we are checking if the array size equla or les than one, if yes we are return same array, other wise we are going to second step. …

# Dynamic Programing using Tabulation and bottom-up approach solution to solve Coin Change Challenge.

In this post, we are going to use Dynamic programming to solve coin change problem,

Dynamic programming is an algorithmic technique for solving the optimizing problem by breaking it down into simpler subproblems.

Problem

we have an array of integers of coins {c1,c2,c3,c4,c5,}and the total value of change that we are going to make, so in this problem, we are going to check how many ways we can make to get the Total change that given us in the input.

We are going to make tabulation in,

Tabulating is a way of processing information or data by putting it in…

Improve Front End Skills By Doing Clone SpaceX

I saw most peoples start doing a clone, I decided to do one clone, so i started looking for famous websites on google, so I decided to go with an easier one SpaceX. I used in this clone react CSS and HTML programs,

I started by collecting necessary pictures and logos, then I discover which fonts family they used. I did 3 components in this clone logo, header, and page component. I found. …

# DFS(Depth First Search) example in real-world by applying it to the wireless sensor network

Depth First Search(DFS) Algorithm

Let say we have 10000 sensor nodes are deployed in the border of one country and each one of this sensor has a mac address and other attributes behaviors, let’s assume those sensors doesn’t have a GPS. Our goal is to find the node that detects the thank of the enemy in the specific area, well, we will use the DFS solution to find the sensor, these sensors are deployed at the same distances, and the distance between every two nodes is 15 meters, all nodes separated to the same distance

Applying DFS solution

when the…

# React Native App

React native is a javascript library used for developing both ios and android mobile apps, it’s different than react.js but very similar syntax, it stands on react.js the library but instead runs on a mobile platform. .

Some of benefit of using React native :

1- Because of he stands on react, so most of his he will inhert most of concepts from react.

2-It works on multiple platforms like IOS, Android , Web and TVOS.

3- Makes app works faster and accurate since has strong development tools .

4- Large community helps developer to comunicate and and help each…

# Unit Testing in React Using Jest test And Enzyme Test

We are going to use two types of test in react, one is called jest(JavaScript testing framework) is a JavaScript testing framework maintained by Facebook, Inc automatically injected when we created our react app and the second one is by using Airbnb’s API called an enzyme.
First, we are going to talk about jest, this is what we created in our first test:

How does the unit test is working?

We start our jest test by running “npm run test”, jest at the beginning will run description on the screen, then it will start to check inside arrow function if…

# Higher-Order-Component(HOC) in React

HOC is a new feature in React to reuse components, HOC takes an old component and returns a new component for reused in

const Hoc=(WrappedComponent,data)

HOC takes two argument wrapped component and data and returns a new component. The component sends props to another component while the HOC component transfers the component to another component.

I did a simple web page to explain how we used Higher-Order-Component in react. I made three component movies, songs and tvshows , each component receives data and renders it. As you see below Songs component no need to declare a state inside the component…

# Functional Component using hooks in react and redux JavaScript libraries.

Many years ago functional component has limited functionality until new version of react React v16.8.0 been developed with new features, one of these features called react hooks, so instead of using the class component in react and redux, we can use a functional component by using hooks. We are going to explain them in the example, we will make a table to compare the using of the functional component with hooks and using class component without hooks, first will compare the state between both components:

As you see above, when we use functional components, we used fewer codes and nice…

# Custom serialization in spring boot java.

Using Custom JSON serialization in spring boot java API, by using JoinView annotation with spring boot will customize our JSON response when you want to serialize your JSON response, @JsonView is the best approach is to limit your JSON response, In another hand to specify one or more views of properties of an object to be serialized or not.

How to use @jsonView?

1. -import jsonView from java JSON library Jackson

import com.fasterxml.jackson.annotation.JsonView;

2. -JSON view should receive an argument @JsonView(BasicView.class)

3. Create class basic view Serializer, I called it class ViewSerialization in this project.

public class View {

}

4…

## AHMED AFANDY

Junior software developer

Get the Medium app