We will write an application that loads a list of todos and renders them in a table with line-through on todo title text if already completed.
Here is our remote data URL:
https://jsonplaceholder.typicode.com/todos
which return something like below
[
{
"userId": 1,
"id": 1,
"title": "delectus aut autem",
"completed": false
},
{
"userId": 1,
"id": 2,
"title": "quis ut nam facilis et officia qui",
"completed": false
},
{....}
]
Below is the mockup design of our exciting application.
Function and passing values to function is something that we all do every day of out software engineering life.
This writing tries to help optimising function argument passed.
Consider this below function. This function takes four arguments.
function myFunction(employeeName,jobTitle,yrExp,majorExp){
console.log(`Meet ${employeeName}`);
console.log(`He is working as ${jobTitle}`);
console.log(`He has ${yrExp} year of Experience`);
console.log(`He is an expert in ${majorExp}`);
}
This is how we will call this function
myFunction("John","Project Manager",12,"Project Management");
The output is:
Meet John
He is working as Project Manager
He has 12 year of Experience
He is an expert in Project Management
This principle suggests that a function…
Having your code analyzed can feel invasive and uncomfortable. Even worse, reviewing other people’s code can feel like a painful and ambiguous exercise where you’re searching for problems and not even knowing where to begin.
Code reviews are a necessary part of the software engineering process because you alone can’t catch every problem in a piece of code you write. That’s OK, though. Even the best basketball players in the world miss shots.
Having others review our work ensures that we deliver the best product to users with the least number of errors.
This article aims to provide some solid…
“Code never lies, comments sometimes do.” — Ron Jeffries
Code Commenting! Some people say it’s ugly , Some says it’s standard and good practice to do.
Commenting is the “art” of describing what your program is going to do in “high level” English statements.
Here I have listed 4 simple protocol to follow while writing comments.
Although these suggestions can be applied to any programming language, we’ll use JavaScript to illustrate them in practice.
“Comments are an apology, not a requirement. Good code mostly documents itself.
Below one looks shitty.
function hashIt(data) { // The hash let hash = 0…
“In computer programming, a naming convention is a set of rules for choosing the character sequence to be used for identifiers which denote variables, types, functions, and other entities in source code and documentation.” — Wikipedia
Naming things is hard!
This article will try to focus on the A/HC/LC method for naming, hoping this will enhance code readability.
Although these suggestions can be applied to any programming language, we’ll use JavaScript to illustrate them in practice.
This practice suggests using the following pattern for naming a function.
prefix? + action (A) + high context (HC) + low context? (LC)
A…
In computer programming, a naming convention is a set of rules for choosing the character sequence to be used for identifiers which denote variables, types, functions, and other entities in source code and documentation.
Naming things is hard!
This writing is tried to focus on some rules and protocol for naming a variable which will improve code readability.
Although these suggestions can be applied to any programming language, we will use JavaScript to illustrate them in practice.
A name must be Short, Intuitive and Descriptive.
/* Bad */ const a = 5 // "a" could mean anything const isPaginatable =…
Please Note: Software licensing is serious!
A software license is a legal instrument (usually by way of contract law, with or without printed material) governing the use or redistribution of software.
Here I have listed some funny licenses that may make you laugh.
TL;DR Noting serious here! Read this just for fun!
/* * ---------------------------------------------------------------------------- * "THE BEER-WARE LICENSE" (Revision 42): * <phk@FreeBSD.ORG> wrote this file. As long as you retain this notice you * can do whatever you want with this stuff. If we meet some day, and you think * this stuff is worth it, you can buy…
Dart is a client-optimized language for fast apps on any platform.
Well, what does this mean?
JavaScript is dominating client side technologies so far but dart is gaining a lot of attraction these days. Already flutter, which is a cross platform mobile framework, already passed the github stars over react-native in its very early age.
I am developing with react-native for over 3 years and recently I have tried flutter. The development experience I would say is simply awesome.
It’s fast, has out-of-the-box widgets, and hassle free debugging and troubleshooting.
Here I have listed some of the useful code snippets…
All HTTP response status codes are separated into five classes or categories. The first digit of the status code defines the class of response, while the last two digits do not have any classifying or categorization role.
This writing tried to help you to determine or narrow down the problem you are facing while talking to your server.
With only 3 codes (100, 101, 102), the 100 series is the shortest one. Basically, what it does is return an information message such as “I am working on it”. No success or error, just a “Roger that!”
A code 200 is…
Docker is a tool designed to make it easier to create, deploy, and run applications by using containers. Well that all developer is aware of.
Here I have listed some basic docker commands that every software developer should be familiar with.
Note: This list will enrich as days go on. Feel free to write comment is anything missed.
docker ps
# your can add available [OPTIONS] belowdocker ps -aq
# only shows IDs
[OPTIONS]
few are .. More you can find from here
--all
# or -a Show all containers (default shows just running)--filter # or -f Filter…
Software Writer. Now Learning Flutter.