Tech General

User avatar
Speaker to Animals
Posts: 38685
Joined: Wed Nov 30, 2016 5:59 pm

Re: Tech General

Post by Speaker to Animals » Fri Sep 08, 2017 2:55 pm

This is the naming convention for variables in Python:
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
What the fuck? Why? Explain yourselves.

User avatar
TheReal_ND
Posts: 26035
Joined: Wed Nov 30, 2016 6:23 pm

Re: Tech General

Post by TheReal_ND » Fri Sep 08, 2017 3:03 pm

They have different functions to fill. How does C do it?

User avatar
Speaker to Animals
Posts: 38685
Joined: Wed Nov 30, 2016 5:59 pm

Re: Tech General

Post by Speaker to Animals » Fri Sep 08, 2017 3:15 pm

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).

User avatar
TheReal_ND
Posts: 26035
Joined: Wed Nov 30, 2016 6:23 pm

Re: Tech General

Post by TheReal_ND » Fri Sep 08, 2017 3:21 pm

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.

User avatar
Speaker to Animals
Posts: 38685
Joined: Wed Nov 30, 2016 5:59 pm

Re: Tech General

Post by Speaker to Animals » Fri Sep 08, 2017 3:25 pm

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.

User avatar
Speaker to Animals
Posts: 38685
Joined: Wed Nov 30, 2016 5:59 pm

Re: Tech General

Post by Speaker to Animals » Fri Sep 08, 2017 3:27 pm

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).

User avatar
SuburbanFarmer
Posts: 25283
Joined: Wed Nov 30, 2016 6:50 am
Location: Ohio

Re: Tech General

Post by SuburbanFarmer » Fri Sep 08, 2017 8:35 pm

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.
SJWs are a natural consequence of corporatism.

Formerly GrumpyCatFace

https://youtu.be/CYbT8-rSqo0

User avatar
Speaker to Animals
Posts: 38685
Joined: Wed Nov 30, 2016 5:59 pm

Re: Tech General

Post by Speaker to Animals » Fri Sep 08, 2017 8:56 pm

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.


Image

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.

User avatar
SuburbanFarmer
Posts: 25283
Joined: Wed Nov 30, 2016 6:50 am
Location: Ohio

Re: Tech General

Post by SuburbanFarmer » Fri Sep 08, 2017 9:01 pm

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.


Image

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.
That looks like an incredibly fucked-up way to learn it.
SJWs are a natural consequence of corporatism.

Formerly GrumpyCatFace

https://youtu.be/CYbT8-rSqo0

User avatar
Speaker to Animals
Posts: 38685
Joined: Wed Nov 30, 2016 5:59 pm

Re: Tech General

Post by Speaker to Animals » Fri Sep 08, 2017 9:05 pm

GrumpyCatFace wrote:
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.


Image

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.
That looks like an incredibly fucked-up way to learn it.

You have to understand the math beneath it.
Image

It bored the shit out of me.