Clean Code: Etiquette for your Code

Image Source from Unsplash

What is Clean Code Architecture?

How to implement Clean Code?

// Bad Example.alert{background-color: #43978D;color: white;font-family: 'Open Sans', sans-serif;}// Good Example.alert{     background-color: #43978D;     color: white;     font-family: 'Open Sans', sans-serif;}
// Bad Exampleusrnm = form.cleaned_data.get('usrnm')pswrd = form.cleaned_data.get('pswrd')// Good Exampleusername = form.cleaned_data.get('username')password = form.cleaned_data.get('password')
// Bad Exampledef render_login_logout(request):
if login:
form = AuthenticationForm() username = form.cleaned_data.get('username') password = form.cleaned_data.get('password') user = authenticate(username=username, password=password) else: return render(request, 'logout.html')// Good Exampledef render_logout(request): return render(request, 'logout.html')
// Good Example def user_logout(request):    request.session.flush()    logout(request)    return redirect('login_petani_username')
// Bad Example# Function for login_petani_username.def user_logout(request): request.session.flush() logout(request) return redirect('login_petani_username')

Writer with a Big Dreams