teleren/devto huggingface dataset:
Coding Standards Demystified
Tags: beginners, programming, tutorial, career
Published: 2023-07-07 08:28:59

Lets start by answering the common question such as why do we have coding standards

## **Why ?**
  

- Code conventions improve the <u>**readability**</u> of the software, allowing engineers to understand new code more quickly and thoroughly.

- Adhering to coding standards promotes the use of best practices and industry standards, leading to <u>**higher-quality code**</u>.

- When multiple developers work on the same project, adhering to coding standards ensures a <u>**consistent style**</u> and approach throughout the codebase.

- During code review, reviewers can use to evaluate the code's quality, <u>**identify potential issues**</u>, and suggest improvements.

- For new team members, coding standards serve as a valuable reference for <u>**understanding the project's codebase**</u> and aligning with the existing development practices.

These are major points that can justify why do we need coding standards on the first place.
As we know why it is important, Lets state what expectation to be set in order to achieve above.

---


## **Goals**

1. Readability and Maintainability
2. Code Quality and Reliability
3. Consistency and Collaboration
4. Scalability and Future-proofing
5. Code Reviews and Onboarding

Now we have set ourself what we need to achieve, Let's see how can this be achieved. I will point out few general best practices here when its about programming.

---


## **Best Practices**

- **Consistent Formatting**, like indentation, line length, spacing, and alignment of code elements.

- **Meaningful Naming Conventions**, names that accurately convey their purpose and avoid cryptic abbreviations or single-letter variable names.

- **Commenting and Documentation**, concise comments to explain the code's functionality and especially for complex algorithms to provide comprehensive documentation for future developers and maintainers.

- **Code Reusability and DRY Principle**, strive for code reusability by avoiding duplications. Follow the Don't Repeat Yourself (DRY) principle.

- **File and folder organization**, well-structured organization enhances code readability and maintainability, allowing for efficient navigation and collaboration within the codebase.

- **Avoiding magic numbers**, using named constants instead of arbitrary values improves code clarity, maintainability, and prevents potential errors.
 

---


> Remember, coding standards may vary depending on the programming language, development environment, or team preferences. It's important to establish and document coding standards specific to your project and communicate them effectively within the development team.

---


**Conclusion**
In this article, you learned best coding standards that are used in the industry to use in your project.

_Additional Info_
You can deep dive into guidelines, paradigms, principles and laws. To help get started with, one of the resource that I had come across. [Click here](https://en.wikipedia.org/wiki/List_of_software_development_philosophies)
PgAdmin: About it, and getting it.
Tags: pgadmin, bitnine, postgressql
Published: 2023-07-07 08:10:28

pgAdmin is an administraction and development platform for PostgreSQL databases. It is opensource, and it provides a GUI for management and interaction with postgreSQL databases.

Features of pgAdmin include:
- Database Management: the creation, modification, and deletion of databases can be done effectively using pgAdmin. In addition, pgAdmin provides an intuitive interface for tasks such as defining constraints and managing indexes.

- Querying and Scripting: pgAdmin has a built-in SQL query editor, which enables the user to execute SQL queries against postgreSQL databases. Advanced features like syntax highlighting and query history are also available on pgAdmin.

- Visual Tools: these are used in the designing and modification of database schemas: you can visually edit and create tables, views, functions and triggers.

- User and Role Management: pgAdmin allows you to manage users that can access the database, and their privileges. Thus, you can use pgAdmin to create and delete user accounts, or set permissions and assign roles.

- Backup and Restore: PgAdmin offers features to perform backups (both full and partial) and restore them when needed.

- Extension Support: pgAdmin supports extensions of PostgreSQL. You can manage, install and configure these extensions through pgAdmin's interface.

PgAdmin is available for Windows, macOS as well as Linux Platforms, and it is widely used by database professionals and data analysts for managing postgreSQL databases. It is very rich in features and power, and it helps to simplify tasks such as querying, scripting, and user management for the user. 

To get pgAdmin on Windows, follow the video in the link below:
https://www.youtube.com/watch?v=E-Qn2tbcmDE

(source: Rishabh Mishra on YouTube).
How To Download File From Node.js Server
Published: 2023-07-07 08:05:44

In this article, I will explain how to download file from Node.js server using express framework. I am explaining here for express framework since its one of the most popular nodejs framework. And with express its very easy to download file from Node.js server, Since express framework provides helper function.

``````res.download(path [, filename] [, fn]);``````

This function, transfers the file at path as an attacchement. Browser will prompt the user for download. And when an error occurs or transfer is complete, the method calls the optional callback function fn. This method uses res.sendFile() to transfer the file.



### Get Started

Create  a new app by typing below commands over terminals

``````mkdir nodejs-app

cd nodejs-app

npm init --yes

npm i - express``````

Once all command run successfully, Then we will create the main file named server.js in the project folder. So create the file and put below code inside that file.

``````const express = require('express');
const app = express();
const path = require('path');
 
//route to download a file
app.get('/download/:file(*)',(req, res) => {
var file = req.params.file;
var fileLocation = path.join('./uploads',file);
console.log(fileLocation);
res.download(fileLocation, file);
});
 
app.listen(3000,() => {
console.log(`application is running at: http://localhost:3000`);
});
``````

In the above file, We have created a simple app which has a route to download the file.

Now run the app with command node server.js .   And put the link http://localhost:3000/download/your-file-name, add the filename at the end of the url.A download prompt will show 



### Conclusion

Download file from Node.js server is easy, We don't need to do much stuff here.

 

That’s all for now. Thank you for reading and I hope this article will be very helpful to understand file download from Node.js server.

Let me know your thoughts over the email demo.jsonworld@gmail.com. I would love to hear them and If you like this article, share with your friends.

This article is originally posted over [jsonworld](Jsonworld.com)
Semi Design ❤️ Figma Dev Mode
Tags: design2code, figmadevmode, designsystem, ui
Published: 2023-07-07 07:58:46

🎉 Happy to announce that  [Semi Design Plugin](https://www.figma.com/community/plugin/1166339852662786534/) has already compatible with Figma Dev Mode.


Now we can quickly view all code directly without open plugin，convert UI to code can be finished in seconds with fully design system support.

More info 👉🏻 https://semi.design/code/en-US

![devmode design2code usage](https://sf16-sg.tiktokcdn.com/obj/eden-sg/slepweh7nupqpognuhbo/dev-to/Release-DevMode.jpg)
#LearnedToday: .gitignore resources
Tags: learnedtoday, javascript, webdev, github
Published: 2023-07-07 07:55:00

`.gitignore` file specifies intentionally untracked files that Git should ignore.

THE PROBLEM: Whenever I start a new project, I always forget to add some files or folders...!

The [gitignore](https://github.com/github/gitignore) github project comes to the rescue with its collection of ready-made templates that simplify the creation of the `.gitignore` file by adding some common files and folders to be ignored.

It is also very convenient when approaching a totally new programming language.

There is also another cool project, if you are more to create `.gitignore` files on the fly with a simple UI: https://gitignore.io
Applications Opened For The AWS Community Builders Program!
Tags: aws, cloud, community, learning
Published: 2023-07-07 07:25:24

Happy Friday Everyone. Applications for the I AWS Community Builders Program is open! This is a great opportunity for all AWS enthusiasts who are passionate about sharing knowledge in the community and creating awareness on how cloud services can be used to achieve digital transformation whiles addressing the pressing problems of businesses and society in general. You can apply for the program using this link: https://lnkd.in/e74CKxmB
Best Security Practices for Crypto Wallets
Tags: cryptocurrency, web3, cryptowallet, security
Published: 2023-07-07 07:07:22

It is crucial to follow certain security measures to secure your crypto assets. With every new technology, new opportunities arise for miscreants. The cryptocurrency itself is immune to cyber threats, owing to the immutable nature of blockchain technology. However, the storage places like wallets and exchanges can be prone to attacks by scammers and imposters. 
So, it is important to think carefully and follow secure procedures when storing your cryptocurrency in wallets. You can protect your finances from potential dangers and eliminate the chance of unlawful access by putting the correct strategies into practice. Here are some guidelines to remember for safe cryptocurrency storage in wallets:
**Pick a Trustworthy Wallet:**
Choose a trusted wallet provider first, one that has a proven track record of dependability and strong security features. To add an additional layer of security, look for wallets that include two-factor authentication and strong encryption algorithms. [AnCrypto](https://ancrypto.go.link/?adj_t=11okogb4), [Exodus](https://www.exodus.com/), and [Metamask](https://metamask.io/) are some great options to consider.
**Keep Your Wallet App Updated:**
Ensure that your wallet software updated with the newest updates and versions. Staying up to date guarantees you receive the most recent improvements and bug fixes as wallet security is constantly being improved by developers.
**Protect Private Keys:** 
Passphrases, seed phrases, or private keys provide you access to your wallet account. So, you must store them in safe digital or physical formats. Your private keys shouldn't be shared, and you should never store them online or in the cloud.
**Configure two-factor or multi-factor authentication:**
For an additional layer of security, enable 2FA or similar options, wherever possible. Hackers have a harder time gaining unauthorized access, thanks to two-factor authentication, which demands a second verification step, like a code created by an app or texted to your mobile device.
**Stay Wary of Phishing Attacks:**
Avoid clicking on any emails, links, or communications that appear to be about your wallet if they seem to be phishing attempts. In other words, you should be on the lookout for phishing attacks that try to get you to expose your wallet details. So, before disclosing any sensitive information, always verify the source's reliability.

The security of your digital assets can be greatly increased by adhering to these safe procedures for storing cryptocurrency in wallets.
Coding 101: How Do I Get My Website Online?
Tags: codenewbie, beginners, discuss
Published: 2023-07-07 07:00:00

_This week's discussion series is dedicated to helping beginners on their coding journey by addressing common doubts and misconceptions. We will delve into fundamental concepts, explore essential tools, and shed light on industry practices, providing clarity and guidance to those who are new to coding. If you're an experienced developer, your valuable insights, explanations, and best practices are highly encouraged and appreciated to support and mentor aspiring coders!_

> Getting a website live and accessible to others can be exciting and challenging. Share your experiences, strategies, and tips for successfully taking a website online, and let's help each other navigate the intricacies of web hosting and deployment.

Follow the [CodeNewbie Org](https://dev.to/codenewbieteam) and [#codenewbie](https://dev.to/t/codenewbie) for more discussions and online camaraderie!

*{% embed* https://dev.to/codenewbieteam *%}*
Is Manual Testing Superior to Automated Testing?
Tags: discuss
Published: 2023-07-07 07:00:00

Let's debate: manual vs. automated testing. Is manual testing is more effective in specific scenarios? Manual testing offers human intuition, adaptability, and attention to detail, catching nuanced issues that automated tests might miss. But automated testing brings consistency and efficiency, saving time and effort. What do you think? Discuss! 

Follow the DEVteam for more discussions and online camaraderie!

{% embed [https://dev.to/devteam](https://dev.to/devteam) %}
[!] RollupError: Invalid value for option "output.file" - when building multiple chunks, the "output.dir" ..
Tags: rollup, javascript, bundler
Published: 2023-07-07 06:53:17

### Issue

When using Rollup for bundling JavaScript code, if your code includes dynamic imports (using the `import()` function), Rollup treats them as separate chunks. Therefore, Rollup expects to output these chunks into a directory instead of a single file.

If your Rollup configuration is set to output to a single file (using the `output.file` option), it will throw an error when encountering dynamic imports:

```
[!] RollupError: Invalid value for option "output.file" - when building multiple chunks, the "output.dir" option must be used, not "output.file". To inline dynamic imports, set the "inlineDynamicImports" option.
```

### Solution

There are two main ways to solve this issue:

1. **Use `output.dir` instead of `output.file`**: If you are okay with having multiple chunks as output, you can configure Rollup to output to a directory instead of a single file. This will allow Rollup to create multiple chunk files for each dynamic import.

```javascript
output: {
  dir: './dist',
  format: 'es',
  sourcemap: !isProduction,
},
```

2. **Inline dynamic imports**: If you want a single file as output but also have dynamic imports in your code, you can set the `inlineDynamicImports` option to `true` in your Rollup configuration. This will inline all dynamic imports into the single output file.

```javascript
output: {
  file: './dist/bundle.js',
  format: 'es',
  sourcemap: !isProduction,
  inlineDynamicImports: true,
},
```

Please note, when `inlineDynamicImports` is true, Rollup can only be used for single-entry point bundles.

Keep in mind, these solutions might require further adjustments in your codebase or build process, depending on the specific requirements of your project.
AWS EIC - Amazon EC2 Instance Connect
Published: 2023-08-07 04:02:51

---
title: AWS EIC - Amazon EC2 Instance Connect
published: true
date: 2023-07-07 06:28:04 UTC
tags: 
canonical_url: 
---

Amazon Web Services (AWS) has unveiled a fresh feature known as the Amazon EC2 Instance Connect (EIC) Endpoint. This innovative feature permits users to establish a secure connection to their instances and various resources within the Amazon Virtual Private Cloud (Amazon VPC) directly from the internet.

Previously, users had to navigate through a somewhat complex process to establish connections. They had to connect to a bastion host with a public IP address set up by their administrator over an Internet Gateway (IGW) inside their VPC. Further, they had to use port forwarding to reach their intended destination. The advent of the EIC Endpoint erases the need for an IGW within their VPC, a public IP address on their resource, a bastion host, or any agent to establish connections to their resources.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1688710633825/3404314a-fbb6-4eeb-8509-f41c4fdf6d35.png)

The EIC Endpoint marries identity-based with network-based access controls, aiming to meet an organization's security requirements. It promises to provide isolation, control, and comprehensive logging. Furthermore, the EIC Endpoint eases the load on the organization's administrator by removing the operational tasks associated with maintaining and updating bastion hosts for connectivity. It is compatible with the AWS Management Console and AWS Command Line Interface (AWS CLI), while still offering users the flexibility to use tools like PuTTY and OpenSSH.

The EIC Endpoint operates as an identity-aware TCP proxy and provides two operating modes. The first mode allows secure WebSocket tunneling from the workstation to the endpoint using AWS Identity and Access Management (IAM) credentials. This mode enables users to connect to resources in the usual way. Meanwhile, the second mode comes into play when not utilizing the AWS CLI. The Console guarantees secure access to VPC resources by evaluating authentication and authorization before allowing traffic into the VPC.
Seeking Passionate Collaborators for Artificial Intelligence Project - Multilingual Chatbot | Alliance EVO
Tags: ai, community, javascript, productivity
Published: 2023-07-07 06:22:32

Hello friends,

I have joined this community after conducting prior research on forums where I can get suggestions and support to build a project.

I am looking for collaborators for my artificial intelligence project called Alliance Evo. Given the opportunities offered by Artificial Intelligence, I believe there are various solutions that can be built to meet the specific needs of different sectors. With my experience in marketing and data analysis, I am constantly seeking spaces where efficient solutions can be provided. Currently, I see great opportunities within the sector.

Alliance Evo | Chatbots - AI

Alliance AI is a startup focused on data science, machine learning, artificial intelligence, and marketing. I started building this startup five years ago, but unfortunately things didn't work out as expected due to placing trust in the wrong people. However, I have learned from my mistakes.

Now, in light of the AI boom, I have a project in mind to build a multilingual chatbot capable of performing sales, support, and automated management activities. I have compiled a series of documents on the necessary foundations to build it, including research on structures provided by IBM and Google, as well as market analysis that supports the project's viability.

The configuration of Alliance Evo will be based on a set of previously researched points, which will enable us to offer high-value and differentiated solutions in sectors such as e-commerce, banking, telecommunications, and insurance. In its initial phase, we will focus on these sectors and later expand its capacity to others.

One of the main needs for the development of this project is to find collaborators with skills in UI design (dashboard), knowledge in JavaScript, storage configuration, and APIs. Building our own structure in collaboration with the options provided by IBM and Google will help us start with solid foundations, but it requires experienced developers.

This is a long-term project that will allow us to systematize and scale globally. Although these lines summarize the content, there are hundreds of hours of research behind them.

There are agreements with entities that can be executed, and the issue is not money. However, having a solid structure to present is crucial. I have no problem investing hours and hours answering questions and establishing mutually beneficial conditions to build the project's foundations.

Would you like to be part of an innovative challenge that can scale to other AI-based services?

There are no limits! Let's build a unicorn project!
When to choose AWS lambda
Published: 2023-07-07 06:07:10

AWS Lambda is a compute service that can be used for many applications. Few of the examples are mentioned below.

- To build serverless backend services
- IoT backend related applications
- Convert or processing uploaded S3 Objects
- Stream processing
- Convert files on demand
- Backup, automated and cron related jobs
- Mobile backend
- Email Service
- App authentication
- Chatbot
- Cleaning backend server
What is lambda and when to use lambda
Published: 2023-07-07 05:46:29

AWS Lambda is a serverless computing platform provided by Amazon. It is a part of AWS. Lambda is like a compute engine. It will take care of resources assigning and help to build applications quickly. 

Advantages:
- Cost efficiency: Because you only pay for the compute time you consume, using AWS Lambda can be more cost-effective than running your own servers.
- Scalability: Lambda take care of resource planning and spin up new resources based on incoming requests.
Reduced cost of execution: One of the biggest strengths of - 
AWS Lambda functions is the reduced cost of execution.

Drawbacks:
- Issue of Cold start: If the function called first time or being idle for some time, cold start will come into existence. It includes spin up a new server to run the code. This will cause the extra latency.
- Limited runtime options: Lambda supports only a limited runtime.

Sample Use cases:
- Email service - Lambda can be used to send emails
- Serverless website: AWS Lambda can be used to build serverless websites that are scalable and cost-effective
- App authentication: Lambda can be used to write authentication related services
- Real-time data transformation: AWS Lambda can be used to transform data in real-time
- Chatbot: Lambda can be used to build chatbot related applications
- IoT applications: Lambda can be used for developing IoT related applications