Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

Sorry, you do not have permission to ask a question, You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please type your username.

Please type your E-Mail.

Please choose an appropriate title for the post.

Please choose the appropriate section so your post can be easily searched.

Please choose suitable Keywords Ex: post, video.

Browse

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

Querify Question Shop: Explore Expert Solutions and Unique Q&A Merchandise

Querify Question Shop: Explore Expert Solutions and Unique Q&A Merchandise Logo Querify Question Shop: Explore Expert Solutions and Unique Q&A Merchandise Logo

Querify Question Shop: Explore Expert Solutions and Unique Q&A Merchandise Navigation

  • Home
  • About Us
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • About Us
  • Contact Us
Home/ Questions/Q 4308

Querify Question Shop: Explore Expert Solutions and Unique Q&A Merchandise Latest Questions

Author
  • 61k
Author
Asked: November 26, 20242024-11-26T10:46:08+00:00 2024-11-26T10:46:08+00:00

Coding with an accent

  • 61k

After few years working in the software industry, I realized that most of the companies do not really care enough about conventions. They mostly focus on the “Getting Things Done” and keep using accent – sometimes unconsciously – in their code base which make the integration of newcomers very difficult.

Natural Languages & Software Languages

We use natural languages to communicate with humans as we use software languages to communicate with computers. The fact is when we code we do not communicate only with the computer but also with other coders. So basically we want other to understand what we do.
As you can feel the accent of a french native speaker speaking in English without respecting words pronunciations, you can also feel the accent of a developer from Java world coding in Python without respecting conventions. It's the same thing when a developer comes from technology A and apply its conventions to a technology B.
In natural languages, accent is not that bad. However, it can provoke a big mess in software development.

Avoid using accent

I one day worked on a project where the technology used was Python/Django. The first time I joined the team – as usual – they gave me the requirements to read. After reading them and jumped into the project, I was a little lost. The project architecture did not respect the Django conventions and there were no documentation in the project saying it. It took me time to get into it and start coding. “Why you didn't use the default architecture?” “Is there any purpose on changing it?” I asked. “No, We've used to design like that” one of my teammate answered.
It was not the only weird thing I've found. For each python .py files, there was only one class that has the same name as the file. Then I realized those guys are from Java or C# where the convention is to have only one class for each file (required in Java, preferred in C#). In fact in those languages, files are not modules whereas they're in Python. So they were coding with accent.

The following snippets shows two Python code: the first with accent (brought from Golang) and the second with Python's conventions:

Python code with Golang accent:

 def multiply(x, y):     error = False     result = None     if not x.isdigit() or not y.isdigit():         error = True     else:         result = x * y     return result, error   result, error = multiply(5, 4)  if not error:     print(result) 
Enter fullscreen mode Exit fullscreen mode

Python code without accent:

 def multiply(x, y):      if not x.isdigit() or not y.isdigit():          raise ValueError("inputs should be digits")      return x * y   # Python doesn't use errors. It uses exceptions.  try:     result = multiply(5, 4)  except ValueError as e:     print(e)  else:     print(result) 
Enter fullscreen mode Exit fullscreen mode

This shows how bad it is to code with accent. It's because people usually don't read the official technologies documentations. They pick a technology and apply a foreign conventions to it. It makes the code harder to understand.

Don't fall into the trap.

beginnersprogrammingwebdev
  • 0 0 Answers
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

Sidebar

Ask A Question

Stats

  • Questions 4k
  • Answers 0
  • Best Answers 0
  • Users 2k
  • Popular
  • Answers
  • Author

    ES6 - A beginners guide - Template Literals

    • 0 Answers
  • Author

    Understanding Higher Order Functions in JavaScript.

    • 0 Answers
  • Author

    Build a custom video chat app with Daily and Vue.js

    • 0 Answers

Top Members

Samantha Carter

Samantha Carter

  • 0 Questions
  • 20 Points
Begginer
Ella Lewis

Ella Lewis

  • 0 Questions
  • 20 Points
Begginer
Isaac Anderson

Isaac Anderson

  • 0 Questions
  • 20 Points
Begginer

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help

Footer

Querify Question Shop: Explore Expert Solutions and Unique Q&A Merchandise

Querify Question Shop: Explore, ask, and connect. Join our vibrant Q&A community today!

About Us

  • About Us
  • Contact Us
  • All Users

Legal Stuff

  • Terms of Use
  • Privacy Policy
  • Cookie Policy

Help

  • Knowledge Base
  • Support

Follow

© 2022 Querify Question. All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.