teleren/devto huggingface dataset:
Working with props declaration in Vue 3 + Typescript
Tags: vue, typescript, javascript
Published: 2022-06-24 14:01:05

In this post I will show you'll how to work with component props in Vue 3 + Composition API using `<script setup>`, there's few ways to work with it, let's take a look!

_**Using the defineProps() macro we can declare props like:**_

**1 - Array of strings**

```javascript
<script setup>
const props = defineProps(['foo'])

console.log(props.foo)
</script>
```

**2 - Object syntax**

```javascript
<script setup>
const props = defineProps({
  title: String,
  likes: Number
})

console.log(props.title)
</script>
```

**2.1 - Object syntax with details**

```javascript
<script setup>
const props = defineProps({
     title: {
         type: String,
         required: true,
         default: '---'
     },
})
</script>
```

## Working with props in Vue 3 with Typescript

Let's see how to declare props in Vue 3 script setup with Typescript:

**1 - Type-based declaration**

```javascript
<script setup lang="ts">
defineProps<{
  title?: string
  likes: number
}>()
</script>
```
_In this case we have **title** and **likes** props, title is optional and likes is an required prop._

**2 - Type-based declaration with default props values**

```javascript
<script setup lang="ts">
 withDefaults(defineProps<{
   title?: string
   likes: number,
 }>(), {
     // here we have default values
     title: '---',
 })
</script>
```

**3 - Advanced types with PropType<T>**

For use PropType interface you need to import it from vue:

```javascript
<script setup lang="ts">
import { type PropType } from 'vue'

export interface Book {
  title: string
  author: string
  year: number
}

const props = defineProps({
    book: {
        type: Object as PropType<Book>,
        required: true,
    }
})
</script>
```

That's it! 

If you want to read and learn more details about component props declaration, please make sure to visit the [**Vue 3 official documentation about props.**](https://vuejs.org/guide/components/props.html)

_**See'ya!**_
Access Github Copilot for free
Tags: github, githubcopilot, codenewbie, opensource
Published: 2022-06-24 13:59:23

If you are student, use Github, used Copilot and are now unable to access the service for free after the recent upgrade, you just have to follow the following steps.
1. Add your student email to your Github account.
2. Verify your student at Github.
3. Log on to https://github.com/github-copilot/free_signup


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zaqh0gjrjj7ae6z58y0t.jpg)
Why scalability is important?
Tags: programming, codequality
Published: 2022-06-24 13:55:00

---
canonical_url: https://blog.aamchora.space/why-scalability-is-important
---

Scalable tech sounds **SCALABLE** but what makes scalability important???

**Remember** - we cannot build scalable tech in a jiffy.

We all know it is important to ship fast features when a product needs to thrive and live up to the expectations of users and stakeholders. 

But in most startups, it doesn’t work that way.

Founders often assume that

- Hiring a bigger team of developers will ship features faster.
- Code is perfect as long as the feature functions well.
- It’s not important to create a scalable tech or clean code.

These assumptions backfire as slow progress when they wish to scale. On top of it, they end up paying high costs for building tiny features which takes more time and effort.

 

But, what if? I tell you there is a way 

> You can add any feature and functionality at very minimal cost & effort in no time.
> 

Yes, it's possible!

### Things to keep in mind while building a scalable tech.

1. Code scalability.
2. Server scalability.

### **Code scalability**

Writing scalable code is super important for large-scale apps. 

Because -

1. It helps multiple teams work together in a single codebase conveniently. 
2. It gets easier to add new features.
3. It takes less time to understand the code and focus more on the building.

**Your code should be clean and maintainable.**

- Components, functions, and variable names should be meaningful.
- Use comments to explain the code logic.
- Use DRY and KISS rules while writing code but don’t abuse these rules.

**Code navigation.** 

- Navigating through your code should be easy.
- Create a good folder structure and group similar files altogether.

**Well-documented code.**

- Reading documentation is fun but writing one is painful. Have some empathy, and don’t be lazy.
- Don’t keep flowcharts and algorithms in your mind. Spit it out in the documentation.

### **Server scalability.**

At any stage, your app users can drastically increase which means increased API requests. In most cases, single server can’t handle it well.

In such conditions, you don’t want your app to crash. To prevent your app from crashing you can do the following -


1. **Horizontal scaling.** 
    1. Buy more servers.
    2. Setup load-balancer.
2. **Vertical scaling.**
    1. Buy bigger server.
3. **Hybrid scaling(Horizontal + Vertical).**
    1. Buy more bigger servers.

---

_**follow me for more such blog posts.**
Let me know if this blog was helpful._
Full Stack Developer required - Remote, UK
Tags: fullstack, career, react
Published: 2022-06-24 13:53:32

Due to expansion, we are looking for a Full Stack Developer to join ROI’s in-house development team, CODIFI.

A bit about us:

ROI are an increasingly important and recognised business in the automotive sector and work with clients such as Jaguar, Land Rover, BMW, Mini, Audi, Volkswagen and Kia. ROI has previously won the ‘Outsourced Partner of the Year’ award at the European Customer Service and Contact Centre Awards and is proud to be accredited with both Investors in People and ISO27001.

Our CODIFI team are at the forefront of our business, developing innovative and game-changing technology solutions to our automotive customers. We are now recruiting for a Full Stack Developer to join us in a remote role, working on our latest technology projects. Looking to work with bleeding edge technology in a growing, ambitious business where you'll have the opportunity to make a real impact? This could be the role for you!

What will you do?

- Developing and maintaining web applications and micro services
- End to end handling of change requests and bug reports for customers
- Contributing to the design of applications
- Working on system integrations using web services

A bit about you:

We are open to applications from candidates with a range of development languages and are particularly keen for those with commercial experience of the following:

- React – currently migrating to modern features (ie hooks)
- C# .Net – local and web services
- JavaScript (ES6)
- Nodejs (v8)
- SQL Server.
- Git, Jira and CI/CD
- AWS

The ability to build robust relationships with colleagues and business users is a fundamental part of the role meaning strong communication skills are essential.

ROI has an excellent track record of innovation, and you will find that our approach will give you excellent support and career development. You will be:

- Supported by a skilled and passionate management team
- Part of a high growth business boasting 97% staff retention
- Provided opportunities for career progression
- Offered a highly competitive benefits package
- Part of a friendly team that actively enjoys team days out, hack days and social events
Technical Video Blogging vs written articles
Tags: webdev, discuss, career, writing
Published: 2022-06-24 13:53:12

I was looking for some opinions on financial reward vs time and effort spent.

I've been running my personal blog for over 13 years now. It's strictly written content with a mix of full on build something from start to finish to very very simple here is an error message I get with Nodejs and how to solve it.

I personally find that most of these articles don't take much effort, on average less than 1 hour.

I've been recently debating on trying to enhance my search volume by making pillar pages like jQuery Tutorial that takes all of the articles I've written over the past and link them and try to rank for the much more popular search times.

When I was searching for some results I noticed that after the first one or two results Google had several YouTube videos that ranked.

This had me thinking, is there potentially more financial reward in making videos? I doubt I could get anything decent as fast as I can write.

Anyone have thoughts on if there is value in this? For reference my blog receives roughly 200 visitors per day - mostly organic - and my only revenue source is Google Adsense which probably makes me $0.10 per day.

Would love to hear if anyone has experience with this.

PS My first post :)
CV based software development
Tags: discuss
Published: 2022-06-24 09:28:14

I once worked at a project that had everything from micro services to jQuery, Kafka to Azure Functions, MVC to MongoDB, plus a bajillion other moving parts, and it struck me that the guy who had originally architected the project had architected it this way because he needed to fill holes in his CV, and not because the project needed most of the things he had added to it.

How many other people here have seen such projects?

I suggest it's time we _stop_ looking at people's CVs as we hire developers, simply because it's not relevant. Whatever experience has been accumulated over the years is with 90% certainty added not because it was needed for the project, but rather because it was necessary for selfish reasons, where the architect needed to fill in holes in his CV, to ensure his or her own capability to secure his or her own future. If this observation is correct, this implies that the more tech the applicant has on his or her CV, the less likely he or she is to be capable of solving your business' needs. Literally, _the less stuff on the person's CV, the better the candidate_, simply because a great employee cares first and foremost about his employer's problems, regardless of whether or not he or she gets to use the _"latest and most amazing tech"_ that's being bragged about _"all over the place and asked for by companies looking for employees"_ ...

Really, the perfect CV should be as follows ...

> I solve business requirements with IT (and sometimes) software development

Then the candidate should _prove_ that he or she can solve your needs. Period!

I'll start; We're looking for developers. However, unless you can [prove your willingness and ability to work with Hyperlambda](https://dev.to/polterguy/create-a-web-api-backend-in-seconds-no-coding-required-2mji) I'm not even interested in knowing _"how many years of Kafka and Mongo you've got"_. In fact, the less Kafka and Mongo, the less stuff I've got to prune _out_ of you before you're productive ...

Thoughts ...?
I've created my own SVG Icon library
Tags: svg, webdev, library, ico
Published: 2022-06-24 13:48:04

There are already so many free SVG Icon Libraries available on web. I was thinking how quickly and easily one can download SVG icons and use within app so I've created my own for very simple basic usage. I've added option to change color on the fly and download.

[SVG ICON Library](https://svgicons.netlify.app/)

I hope you find this useful

Happy Coding:)

[![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8j7mbzyejoo4wr5o89d5.png)](https://www.buymeacoffee.com/nirvghla)
PHP session
Tags: php, webdev
Published: 2022-06-24 13:46:43


## Index for this blog

- Definition.

- How to start session ?

- How to store session variable ?

- How to destroy session ?

- How session works ?

Hello 
Let's talk about the session in PHP. 
So first of all what is a session --> 
A session is a bundle or a bag of data that is related to the current web application (on PHP) that you are using. 
(or)
A session is a way to store information (in variables) to be used across multiple pages.

Unlike a cookie, the information is not stored on the users computer.


**How to start a session in PHP ?**


```
<?php
     session_start();
?>
```
**When will you need to start the session ?**
- If you want that the user can only excess any page of your application after logged in.
While loging in you can set myusername as user's name or email of user or any other thing blahhhh blahhh.....

```
<?php 
     if( isset($_SESSION["myusername"]) ){
         header("location:home.php");
     }
?>
```

- If you want to display logged in user's age in your application more than once - then you can fetch age from database only once and store it in session variable like - 

```
<?php
     session_start();     
     $_SESSION['age'] = $age;
 ?>
```
 and use it wherever you want before destroying the session.

**What is meant by destroying the session**

- Suppose you have done all the work on an application and now you want to log out from this application.
You have to destroy the session in order to delete all your information stored in the session so that no one can use it for log in back to your account without your permission.

```
<?php
     session_destroy()
 ?>

```
**How session works ?**

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fca1xdxlcfwibi5b6mvs.png)

The session support allows you to store data between requests in the $_SESSION superglobal array. When a visitor accesses your site, PHP will check automatically (if session.auto_start is set to 1) or on your request (explicitly through session_start()) whether a specific session id has been sent with the request. If this is the case, the prior saved environment is recreated.
Aws Amplify Great App Development tool.
Published: 2022-06-24 13:34:23

Aws Amplify is designed for the App development Lifecycle.
<u>
Steps to Design Aws Amplify 👉</u>

1. Build
2. Test
3. Deploy/Host
4. Engage/Measure.

learn more about #AWS amplify and build with AWS amplify.



https://lnkd.in/dUyDyyyX


Watch the below video to learn more about AWS Amplify. 
https://youtu.be/uRbGMZ9oPjw
What are some best ways to learn graphic design online?
Tags: webdev, graphi, graphicdesigning
Published: 2022-06-24 13:31:30

You have probably heard the phrase "the Internet is a big place." This means that you might feel overwhelmed by how daunting it can be to search for resources. If you're serious about learning graphic design, you will need to invest time and energy into locating quality sources of information. 

Let us make your search easier with this list of the best **[graphic design courses](https://www.admecindia.co.in/courses/graphic-design-courses-delhi/)** from which you can learn graphic design skills.

1. Start with the basics
It’s never too early to start learning about graphic design, whether you want to specialize in digital or print production, web design, or user experience (UX). Although there are plenty of opportunities for creativity and artistic expression, it’s important to understand the many technical nuances involved in graphic design. Here are some of the best places where you can learn the basics of graphic designing.

If you are a beginner and do not know much about graphic designing then you must opt for a **[graphic design course in Delhi](https://www.admecindia.co.in/course/most-advanced-graphic-design-course-master-plus/)** that helps you to understand the term designing and make you familiar with software like **[Photoshop](https://www.admecindia.co.in/course/best-photoshop-master-course/)**, and **[Illustrator](https://www.admecindia.co.in/course/best-adobe-illustrator-master-course/
)**.

If you are familiar with this software and want to learn go in-depth about each software applications then you can go for **[short-term graphic design courses](https://www.admecindia.co.in/course/short-term-graphic-design-course-standard/)** as in course you can master software like Photoshop in a very short duration of time and once you master this software you can easily learn the other software also.

2. Master the basics
Some designers go straight to print design after graduating from art school, but those who want to move up the ladder quickly miss learning some of the technical aspects involved in graphic design. 

So if you want to master graphic designing skills then you need to learn some advanced tips and tricks that will help you to create designs like a pro and for learning these tips and tricks you can opt for a professional **[Diploma in graphic design in Delhi](https://www.admecindia.co.in/course/advanced-web-design-development-master-course/)**. With these courses, you can easily master graphic design skills and can kick start your career as an expert graphic designer.





There is a 6 months **[graphic design course in Rohini](https://www.admecindia.co.in/course/short-term-diploma-course-graphic-designing-premium/)** that you can think about to join. Under this diploma, you can not only learn graphic designing but can also master this skill and the best part of this program is that it is available in both online mode and offline. 

So don’t need to worry about time and traveling all you need to do to select any graphic design course according to your need and level of expertise and start learning.
PyScript : RUN Python IN HTML
Tags: pyscript, python, vscode, html
Published: 2022-06-24 13:18:42

**PyScript** is a framework that allows users to create rich Python applications in the browser using HTML's interface and the power of _Pyodide, WASM, and modern web technologies_. The PyScript framework provides users at every experience level with access to an expressive, easy-to-learn programming language with countless applications.

I have shown the detailed video about how to write you first PyScript program using VSCode. 

{% youtube PvFshrgv9sc %}
Afinal, quando o Ruby vai morrer?
Tags: webdev, programming, ruby, rails
Published: 2022-06-24 13:17:36

Acabei ver uma discussão sobre o porquê do pessoal de outras techs pensar que o ruby está morto ou já morreu e a conclusão é bem simples, nós devs apaixonados por ruby não estamos falando o suficiente sobre, as referências que quem começa hoje terá, são as mesmas de 10 anos atrás isso não é ruim mas como foi dito no grupo precisamos renovar, precisamos aparecer mais, temos pessoas incríveis no grupo que já fazem coisas incríveis, mas ainda precisamos de mais, precisamos atrair talentos de todos os níveis, o iniciante que chega com sangue nos olhos até o especialista que será o apoio do time.

Mas por quê? Por que sim horas! Ruby é uma das melhores linguagens para se trabalhar, existe um mercado enorme que ainda procura rubistas e muitas vezes pessoas de outras linguagens são convocados, por falta de mão de obra e isso trás alguns problemas, existe muita gente boa louca para trabalhar com ruby e que vem estudando a muito tempo e só precisa de uma oportunidade, não estou dizendo que se você começar hoje vai conseguir um emprego pagando 5k mensal amanhã, estou dizendo que se for se dedicar e for bom e principalmente, tiver paciência e não desistir a oportunidade cedo ou tarde vai aparecer. Eu mesmo trabalhei com php, c/c++, python e por fim agora ruby desde 2020, eu me apaixonei tanto pela linguagem que sempre falava para as pessoas, mas eu percebia que pouca gente levava a sério e até professores de quando eu fazia faculdade, meados de 2016, quando eu já trabalhava com python e conhecia ruby, falavam que essas linguagens iriam morrer logo logo, mas sua utilidade era muito especifica, bem eles não poderiam estar mais errados.

Mas a pergunta do inicio, quando ruby ira morrer? Bem, quando nós, a comunidade, parar de falar nela, apoiarmos trocas de stacks simplesmente porque sim, migrando para nodejs, django por puro preciosismo e falta de informação de gestores e diretores de tecnologia, temos que falar mais, mostrar mais o Brasil é de certa forma o berço do rails ( não foi criado aqui, mas foi apresentado pela primeira vez aqui ), temos diversos core commiters Brasileiros, muitos são referencia basicamente para todos que trabalham com rails, precisamos escrever mais sobre não só rails, mas sobre ruby também, muita gente não sabe que ruby é uma linguagem e o rails é um framework e a culpa disso é nossa.
.NET Project Folders Structure
Tags: dotnet, csharp, programming
Published: 2022-06-24 13:17:14

We read very often how to have a good architecture for a .NET project, but I don't read very often how to structure the folders of the project. 

You might think it's a minor problem, but it's also important to have a good folder structure and especially one that is always the same, to make it easier to find things at a glance and also to make it easier for other people to get into the project faster.

In the picture below you can see my typical structure of a project.

![My project folders structure](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/o6yj3h5uw0nwqei4v3jy.png)

Let's see what each item is.

- **artifacts**: where the build.cmd script puts the artifacts
- **build**: build customizations
- **docs**: markdown files, installation instructions, help files. I use this folder to put the Docusaurus project
- **lib**: if you have a custom library outside of NuGet, you can copy the files here
- **samples**: sample projects to use your solution or projects
- **src**: the code of your projects
- **tests**: all the tests projects live here
- **.editorconfig**: coding styles and other settings for your environment
- **.gitignore**: I think you don't need a description about it
- **build.cmd**: the script to build the project and create artifacts (I don't use it very often)
- **LICENSE**: the license file of your project. Useful especially for GitHub
- **Project001.sln**: the solution file of your projects
- **README.md**: useful for GitHub but also to give an overview of the project to the other people involved

Out of my curiosity: do you have a fixed structure for projects like me?
Share yours in the comments!
PDF Reviewer (1) - What is it?
Tags: pdfreviewer, pdf, annotation, markdown
Published: 2022-06-24 13:13:27

[PDF Reviewer](https://www.pdfreviewer.com/) is a cloud-based service that enables users to annotate PDF files in Markdown syntax, with support for Latex. It is a paid service with free trial, but no credit card is needed for the trial. Readers are encouraged to check it out.

Main features include
1. Manage PDF files on cloud
2. View PDFs online
3. Annotate PDFs in Markdown syntax
4. Annotations are stored on cloud and synced across devices
How to use Luos with Python?
Tags: luos, python, opensource, embedded
Published: 2022-06-24 13:12:17

In this video, you'll discover how to use Luos with Python.

⏩ https://youtu.be/OCbpLSiOuG4

In this tutorial, you will learn how to install Pyluos in order to use Luos with Python on a computer through a gate service.

#opensource #microservices #embedded #edge #luos
Print Matrix in form of a Spiral. Can you do it ? #exercise
Tags: 100daysofcode, javascript, programming, tutorial
Published: 2022-06-24 13:04:51

In this video, you will learn how to print a matrix in spiral form. 

The steps are very simple - we will first devise an approach that we will be going with for solving the problem and then once the main work is done we will write the code for same together. At the end of the video, we will also be doing a quick dry run in order to understand in depth the internals of how it all works in order to derive complete interpretation of the code. 


{% youtube UcIlm92eyso %}

🐱‍💻 🐱‍💻 Course Links:
Complete Code - https://github.com/The-Nerdy-Dev
Visual Studio Code - https://code.visualstudio.com
Git - https://git-scm.com/downloads

--- 
Support my channel:
💜 Join the Discord community 👨‍👩‍👧‍👦: https://discord.gg/fgbtN2a 
💜 One time donations via PayPal
Thank you! 🙏

---
Follow me on:
👉 Twitter: https://twitter.com/The_Nerdy_Dev
👉 Instagram: https://instagram.com/thenerdydev