Hello Stemians,
I want to introduce a new concept of blogging for developers part of the community.
I have written a lot of posts related to a lot of different topics:
- Technology
- Entrepreneurship
- Coding Guidelines
- Startups
- Tech Ideas
- ........................
But in all the posts i have not shown or show a bit of coding. I have not share any #coding stories, or any part of my code and in all the posts that i have read on the community with these tags #development #software #coding it is the same.
Share your #coding stories
Why sharing #coding stories help everyone. Each developer has his own way of developing, his own way of writing code (Classes, Controllers, Models, Functions, .env conf etc..)
- Share your own coding story
- Write some code that are worth showing and share them with the community
- Help others during this process by using your expertise
- Introduce a Solution, a package a coding guidelines
Own your own narrative
Example #1 - ReactJs Some Code
Imagine you have a form in your page where you want to add something:
- Create Entity (user for example)
- The form has all fields (name, surname, job, email etc..)
- Also you have a Submit Button
- Onsubmit you POST the form to an API call or to the backend.
- Based on fields sent the backend with respond with exception in cases of some errors, warnings etc and with succees in case everything looks good.
- After the Backend responds the Frontend manages what to display. That’s where this piece of code doew its work.
static showNotification(type, message) {
return function () {
switch (type) {
case 'info':
NotificationManager.info(message);
break;
case 'success':
NotificationManager.success(message, message, 3000);
break;
case 'warning':
NotificationManager.warning(message, 'Warning', 3000);
break;
case 'error':
NotificationManager.error(message, message, 5000, () => {
alert('callback');
});
break;
default:
NotificationManager.info(message);
break;
}
}
}
}