Programming Curation Compilation #7

Words
1104
Reading
5 min
Listen
Play
3y

ContentThumbnail(11).png

OCD support is expanding!

This is our newest curation effort that aims to curate posts that are shared under programming and development niche. These post highlighted are the best and most helpful content that our curators submit for the curation.

We also encourage you to visit these blogs and engage those in the community. Engagement is what makes the community thrive, so we hope that you are taking a time to visit each other post.

Author: achimmertens@achimmertens
Curator: incublus@incublus

alt

How To Get Access To HiveSQL With Squirrel

Hello Hivers, developers and all othersin this post I explain, how I got an HiveSQL account, installed a SQL client and executed my first SQL query:

Author: albro@albro
Curator: incublus@incublus

alt

Comments and Variables in JavaScript By albro

Comments are actually lines in the source code that are not executed. These lines are used for different purposes, which I will mention the most important uses:* Code explanation: Sometimes developers solve a problem after weeks of effort and explain it in the form of a comment next to the code so that they don't forget. Comments can also be used to teach newbies.

Author: albro@albro
Curator: incublus@incublus

alt

Writing Clean Code By albro

When we talk about clean code, we mean the same stress points, but when we talk about clean architecture, we mean how to structure your projects, "where" to write the code and how to "structure" it (for example: do you whether to use dependency injection or not and such examples). Therefore, clean code and clean architecture are two separate issues. Clean architecture is highly dependent on your programming paradigm (eg, do you use object-oriented programming?) and your programming language. Our stress in clean code is on a specific problem, such as a specific function, but our stress in clean architecture is on the integrity and overall structure of the project (modeling and data distribution).

Author: albro@albro
Curator: incublus@incublus

alt

Arithmetic Operators And Tricks In JavaScript By albro

> You can see arithmetic operators in JavaScript below: 1. +: adding (var x = 100 + 50;) 2. -: Subtract (var x = 100 - 50;) 3. *: Multiply (var x = (100 + 50) * a;) 4. **: Exponentiation (var z = x ** 2;) 5. /: divide (var z = x / y;) 6.%: Divide remaining (var z = x % y;) 7.++: Add one unit (x++;) 8. --: Subtract one unit (x--;)The "Exponentiation" operator is only supported in ECMAScript 6 and later, which was introduced in 2015.

Author: pibara@pibara
Curator: incublus@incublus

alt

Extracting info from the HIVE C++ source code

There are multiple libraries for interacting with the HIVE blockchain, and these libraries seem to all share one property that from a distance seems rather silly, untill you look at the actual C++ source code for the HIVE blockchain and realize that with new hard forks important things might change.hen you are going to sign an operation on the HIVE blockchain, for example a simple vote on this post, a little bit of JSON is sent to one of the HIVE nodes, and added to this JSON there is a signature string.

Author: albro@albro
Curator:incublus@incublus

alt

Spelling Mistakes In Clean Code By albro

In this section I'd like to examine some common naming mistakes. The first common mistake that developers make is that they choose names that are too descriptive and try to describe everything inside that variable. For exampleuserWithNameAndAge = User('albro', 27 Apart from the fact that choosing long names for variables makes the code heavier and also makes it crowded, the provided information (name and age) is clear without choosing such a name. The first argument (albro) is a name, and since it is the name of the User class, it is likely that the second argument is the age, so we have not helped the readability of the code. Imagine if the User class also took more arguments like "entertainment" and "access level" and "interests". In this case, the names of the variables will be too long.

Author: albro@albro
Curator: incublus@incublus

alt

Commenting, Code Structure and Tricks By albro

In this post I want to talk about commenting for codes as well as code formatting. Usually, novice developers think that these two items are not so important in code readability and cleanliness, but the truth is that both items can make our code more readable or give it a big blow. So without further ado I will begin.

Author: brunolutador1992@brunolutador1992
Curator: incublus@incublus

alt

creating flashing titles

You should choose a title using the element h1, h2, h3,button, etc...

Write the class Blinking-title and right after closing the curly brace, write the title name, in my case, I used the h1 element.


Author: albro@albro
Curator: incublus@incublus

alt

Horizontal Formatting and Tricks By albro

The only rule I told you about this was that vertical spacing should separate unrelated concepts (for example, we should separate methods in the above class using whitespace), but what about related concepts? Is it correct to convert the code above to the code below?

Author: pibara@pibara
Curator: incublus@incublus

alt

physicalquantity 0.1.0 (python): Walkthrough usage and the added support for planck units and log-scale units.

We all know we shouldn't compare apples and oranges, you can't do math with apples and oranges unless you do fruits math, losing some of the core attributes of both the apples and the oranges.

In physics things are a bit different. The laws of physics as they have been discovered through the ages have shown us that maybe you can't compare core physics concepts, they are mathematically related. Its like in physics you cant subtract apples from oranges, but you can multiply and divide them.

For example, you can multiply an electric potential measured in volts and multiply it by an electric current measured in amperes. The result will be a power measured in watts that you can divide my an acceleration measured in meters per second, and the result will be a force measured in newton.

Physics is made up of circumstancial relationships between measurable physical quantities that are quentified in terms of physical units. There are about three dozen physical phenonema where we as humans have created physical units for. The laws of physics allow us to express any of these units in terms of a collection of others.


We hope you were able to take away something different, fresh, and new from these posts. We also strive to highlight the best and helpful programming and development content on Hive. We look forward to highlighting even more of you.

OCD Has a Hive Witness ... @OCD-Witness!

You can vote for ocd-witness@ocd-witness, with Peakd or on Hive Witnesses.


ocdb@ocdb supports community curation!

Join our Discord channel for more information.