What the fuck? Why? Explain yourselves.module_name, package_name, ClassName, method_name, ExceptionName, function_name, GLOBAL_CONSTANT_NAME, global_var_name, instance_var_name, function_parameter_name, local_var_name
Tech General
-
- Posts: 38685
- Joined: Wed Nov 30, 2016 5:59 pm
Re: Tech General
This is the naming convention for variables in Python:
-
- Posts: 26035
- Joined: Wed Nov 30, 2016 6:23 pm
Re: Tech General
They have different functions to fill. How does C do it?
-
- Posts: 38685
- Joined: Wed Nov 30, 2016 5:59 pm
Re: Tech General
Nukedog wrote:They have different functions to fill. How does C do it?
You can do it however you want, but every language has a community and a common standard. C is a mess like Python because it didn't have anybody like Google to establish some standard.
When I was an embedded software engineer in the wireless industry, everything we did was in C, and our naming convention used all underscores. There were no mixed conventions like in Python (which is ridiculous, really).
C++ is kind of arcane in that a variable might look like iVariable which is a variable name with Hungarian notation prefix denoting the type, in this case being an integer (a more realistic variable name: iSSN, for a variable representing a social security number stored as an integer).
-
- Posts: 26035
- Joined: Wed Nov 30, 2016 6:23 pm
Re: Tech General
I'm not sure if the capitalizations are necessary to invoke functions in python. I know they matter in bash and it's annoying me so maybe I remember it not mattering in python. I think there is a way to turn it off in bash though.
-
- Posts: 38685
- Joined: Wed Nov 30, 2016 5:59 pm
Re: Tech General
Don't take me the wrong way. I am just shit posting here. Python is really cool for what it does. If you are interested in just using code to do something (i.e. the code produces the product rather than the code being the product), Python is great. Python is really great for any kid of data analysis.
But from the perspective of building highly polished software libraries and commercial tools, it's incredibly sloppy, in my opinion. Python people seem to embrace inconsistency as a virtue too. It's distressing for somebody who comes from a highly formalized engineering background.
You can use some of the deep learning and other AI libraries to put together a pretty slick tool in Python with very little code. That part is pretty cool. Data visualization is nice too. There is far more overhead in a more formal language like Java, but Java scales up better and allows for more complex architecture that is better maintained over time.
But from the perspective of building highly polished software libraries and commercial tools, it's incredibly sloppy, in my opinion. Python people seem to embrace inconsistency as a virtue too. It's distressing for somebody who comes from a highly formalized engineering background.
You can use some of the deep learning and other AI libraries to put together a pretty slick tool in Python with very little code. That part is pretty cool. Data visualization is nice too. There is far more overhead in a more formal language like Java, but Java scales up better and allows for more complex architecture that is better maintained over time.
-
- Posts: 38685
- Joined: Wed Nov 30, 2016 5:59 pm
Re: Tech General
Nukedog wrote:I'm not sure if the capitalizations are necessary to invoke functions in python. I know they matter in bash and it's annoying me so maybe I remember it not mattering in python. I think there is a way to turn it off in bash though.
Naming conventions are not necessities. They are customs within a language community. You don't want to look like an asshole by using other conventions in a language.
If you ever work as a software engineer, you will have conventions and standards clearly articulated and documented anyway. In the workplace, it's not optional, but the Python interpreter doesn't care what you name something (unless it's a reserved token).
-
- Posts: 25283
- Joined: Wed Nov 30, 2016 6:50 am
- Location: Ohio
Re: Tech General
SQL is so much easier to understand.
I cannot comprehend why someone hasn't made a programming language that translates to English. All these bolted-on keywords and nonsense are counter-productive.
I cannot comprehend why someone hasn't made a programming language that translates to English. All these bolted-on keywords and nonsense are counter-productive.
-
- Posts: 38685
- Joined: Wed Nov 30, 2016 5:59 pm
Re: Tech General
GrumpyCatFace wrote:SQL is so much easier to understand.
I cannot comprehend why someone hasn't made a programming language that translates to English. All these bolted-on keywords and nonsense are counter-productive.
In a computer science undergrad program, most have to take a database design course. That doesn't mean building a database in MySQL but, rather, how you build so.ething like MySQL. The math is pretty interesting, but not really easy.
What is cool is how we were able to get something as deep and nuanced as databases to the point where we can build these things from just a scripting language, simply.
-
- Posts: 25283
- Joined: Wed Nov 30, 2016 6:50 am
- Location: Ohio
Re: Tech General
That looks like an incredibly fucked-up way to learn it.Speaker to Animals wrote:GrumpyCatFace wrote:SQL is so much easier to understand.
I cannot comprehend why someone hasn't made a programming language that translates to English. All these bolted-on keywords and nonsense are counter-productive.
In a computer science undergrad program, most have to take a database design course. That doesn't mean building a database in MySQL but, rather, how you build so.ething like MySQL. The math is pretty interesting, but not really easy.
What is cool is how we were able to get something as deep and nuanced as databases to the point where we can build these things from just a scripting language, simply.
-
- Posts: 38685
- Joined: Wed Nov 30, 2016 5:59 pm
Re: Tech General
GrumpyCatFace wrote:That looks like an incredibly fucked-up way to learn it.Speaker to Animals wrote:GrumpyCatFace wrote:SQL is so much easier to understand.
I cannot comprehend why someone hasn't made a programming language that translates to English. All these bolted-on keywords and nonsense are counter-productive.
In a computer science undergrad program, most have to take a database design course. That doesn't mean building a database in MySQL but, rather, how you build so.ething like MySQL. The math is pretty interesting, but not really easy.
What is cool is how we were able to get something as deep and nuanced as databases to the point where we can build these things from just a scripting language, simply.
You have to understand the math beneath it.
It bored the shit out of me.