What does .dist used as an extension of some source code file mean?

.dist files are often configuration files which do not contain the real-world deploy-specific parameters (e.g. Database Passwords, etc.), and are there to help you get started with the application/framework faster. So, to get started with such frameworks, you should remove the .dist extension, and customize your configuration file with your personal parameters. One purpose I … Read more

Does functional programming mandate new naming conventions?

In a functional programming paradigm, people usually construct abstractions not only top-down, but also bottom-up. That means you basically enhance the host language. In this kind of situations I see terse naming as appropriate. The Haskell language is already terse and expressive, so you should be kind of used to it. However, when trying to … Read more

Why use ‘lib’ vs ‘src’ directory names in JavaScript? Which is ‘standard’? [closed]

Interesting question, but it seems to me that some developers just take it by their own worldview. It also depends on the project: Some projects are built with smaller components, which are just little pieces of the main functionality: lib. lib/independent-pieces.js Other projects are monolithic, the components depend on each other: src. src/this-is-all-for-this-project-and-depend-on-each-other.js For third-party … Read more

What kind of prefix do you use for member variables?

No doubt, it’s essential for understanding code to give member variables a prefix so that they can easily be distinguished from “normal” variables. I dispute this claim. It’s not the least bit necessary if you have half-decent syntax highlighting. A good IDE can let you write your code in readable English, and can show you … Read more

What is the idiomatic naming convention for local functions in C# 7 [closed]

My standard is always PascalCase, also spell out the full word. I don’t like abbreviations as they can have multiple meanings. So, in your PascalCase scenario, I would spell out the ‘Calc’ word to be the following: public static int Factorial(int n) { return CalculateFactorial(n); int CalculateFactorial(int number) => (number < 2) ? 1 : … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)