teleren/devto huggingface dataset:
Well... let's write this?
Published: 2022-10-27 20:06:33

Me creé una cuenta hace 2 años aquí para poder escribir las desventuras al programar y... bueno, empecemos ahora y al estar al 40% de un proyecto 😹

Técnicamente aprendí NodeJS por gusto propio, porque me encantó la flexibilidad que tenía para varias cosas (anteriormente miraba a JS con malos ojos y me arrepiento de ello) por lo que fuí adentrandome posteriormente al desarrollo de bots para Discord y otras herramientas/utilidades con esto...


Actualmente llevo 5 años en la empresa donde trabajo, buena estabilidad, buen ambiente, buen todo...  Hasta ahora todo se sigue realizando con PHP por la facilidad que representa y que todos manejamos este lenguaje, salvo que se presentó la situación de empezar el desarrollo de una plataforma para la facturación electrónica que, el año entrante será ya obligatorio para algunas empresas con las que trabajamos y, como habíamos encontrado varios recursos (en JS) que servirían para avanzar relativamente rápido, por lo que me dan para llevar a cabo este proyecto en su totalidad...

Desde el inicio del proyecto hace un mes, fuí perfeccionando varios aspectos y aprendí varios detalles más de JS, a la par de conocer nuevas librerías para poder implementarlas y así sucesivamente~ Por obra y desgracia... Por otra parte, agradezco haberme sumergido a JS mucho tiempo antes para poder saber bien y rápido que y como hacer varias cosas para desde un comienzo manejar un esquema relativamente rápido, trackear correctamente los errores y cosas así...

Hasta el momento de aplicar un simulador de estrés, por lo que armamos con PHP un script para realizar 200 consultas simultáneas POST (con curl) para medir el rendimiento y como toleraba el caos, hasta que, por obra y desgracia de la vida, una dependencia depende de realizar acciones en JAVA, por lo que el servidor termina completamente saturado, el servidor registrando en el log de errores que Java está consumiendo bastante RAM (#ChromeApproveThis) y pues, así todo muere; como trabajo en un entorno con Windows, una hermosa BSOD para que nada pierda la costumbre y posterior a escribir esto de forma rápida para quitarme las ganas de querer redactar las cosas, estamos probando nuevas dependencias que sean 100% JS para lidiar mejor con las situaciones.




`--- fin del reporte`
Hacktoberfest-9 | My third year @Hacktoberfest
Tags: hacktoberfest, opensource, github, digitalocean
Published: 2022-10-27 19:41:10

**Hacktoberfest** is for everyone. Whether it’s your first time or your ninth— it’s almost time to hack out four pristine pull/merge requests and complete your mission for open source. :rocket: 

## Hacktoberfest 2022
With the start of September, all opensource enthusiasts started getting the *vibes* of Hacktoberfest approaching. 🍁
Participating in Hacktoberfest is a great way to get involved with the open source community wherever you are on your tech journey. And why only tech, this year the team has come up with Non-Code Contributions too! :white_heart:

## What is Hacktoberfest :thinking:
Hacktoberfest is a month-long celebration run by [DigitalOcean](https://www.digitalocean.com/) to celebrate and give back to opensource projects and software. The initiative is open to everyone, and the goal is to encourage everyone in the global community to contribute to open source.

## How to contribute :walking_man:
Everyone is welcome regardless of experience or skill, whether it's your first or ninth time. To participate, head over to Hacktoberfest.com and then `Start Hacking`.

You can register anytime from the date of opening of registrations until and October 31st.

As I have mentioned above, [Hacktoberfest](https://hacktoberfest.com/participation/) has recently started accepting no-code and low-code contributions, so everyone is included, regardless of their work and experience.

You can contribute in various ways, just remember that at any date and time, **_quality >>> quantity_**.

## Talking about My Hacktoberfest2022

This year, was my third time @Hactoberfest, and exactly like the previous years, I enjoyed, and learned a lot!
If you wish to see my previous years Hacktoberfest experiences, you can read my articles. (The links are at the bottom of the article) 👇👇

Needless to say if you participate once, you'll never want to stop. Goes the same for me and I was excited, and was eagerly waiting for the registrations to open. _I was watching the timer on the registration page!_
In my opinion, the driving force, when participating in such programs should not be the swag, but the things that one is going to **learn**. 

## How can YOU participate :milky_way:

There are multiple ways in which one can participate.
Listing a few of them:
* Code contributions
* Documentation
* Adding new feature in an existing open source project
* Graphic design

Believe me, it's never too late. Register yourself now, and get started. [Hacktoberfest2022](https://hacktoberfest.com/)

-------------

[Hacktoberfest2020](https://dev.to/noviicee/experience-of-my-first-ever-hactoberfest-2b62)
[Hacktoberfest2021](https://dev.to/noviicee/my-second-time-experince-and-learnings-hactoberfest-how-to-contribute-4k63)

------------

Feel free to reach out for any sort of discussion regarding the post, or other materials.

At last, I wish Happy Hacktober to everyone 🍈
May the source be with you. 💫
Ternary Operator
Tags: javascript, beginners, programming
Published: 2022-10-27 19:40:09

Hey Everyone!
SO as the title suggest this post will be about Ternary Operator in JavaScript.

## Why You ask?
Well I find myself on this long journey of learning JavaScript and ES6+, I really want to share my knowledge of the basics and hopefully this can be some what resourceful to not only myself but someone down the road.

## What is a Ternary Operator?
Ternary Operator is like a short-hand method of if/else statement.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/uhltur83fwprt6ypivdb.gif)

## What's so Great about it?
instead of having to code out something like this: 
`Function user(){
  if(something){
//Code that does something
}else{
// code that does something else.
}
}`

you can just use a ternary Operator.
Example of a ternary Op.
`Condition ? expression 1 : expression 2;`

## Some Good things NOT to do with Ternary OP.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/76773cafhmg6ilhrmnu6.gif)
- Nest the operator makes it harder to read

```
//example
condition
?
expression 1 :
expression 2
```
DON'T DO IT! I will hunt you down! (only kidding jeez)
- using it on complex problems (chances are it wont work anyways but be mindful.)
My Favorite Methods (max_by, find_by, and sum)
Published: 2022-10-27 19:39:36

We're just about done with Phase 3 of our program, so I'm back with another blog post! Today I'm going to highlight some of my favorite methods in Ruby. 

For the examples below, let's say that we have a `plant_store` with `plants` and `customers` that we'll want to look through, sort, and find. 

### max_by
Say we wanted to find the `customer` who had purchased the most number of `plants` from the `plant_store`. 

```
def self.most_plant_purchases 
    self.all.max_by {|customer| customer.plants.count }
 end
```
In the above *class* method, the `self` is referring to `PlantStore`. 
When we call this method on the `PlantStore` class, we iterate through every instance of customer. We do `plants.count` on each `customer` to get the total number of plants they've purchased. Once this method has gone through each `customer`, it will return the `customer` with the highest number of plants (lucky customer!). 

### find_by
What if our `customer` is looking for a specific plant? We can search for what they're looking for using find_by! 

```
def find_plant(plant_name)
    self.plants.find_by(plant_name: plant_name)
end
```
This *instance* method is called on the PlantStore class. We pass in one argument of a `plant name` and the method searches for any `plant_name` that matches our argument in the `plant_name:` attribute. It will return the first instance of a `plant` that has a name that matches `plant_name`. 


### sum 
Finally, what if we wanted to find out how much a `customer` had spent on plants at that `plant_store`? 

```
  def total_plant_cost
    self.plants.sum {|plant| plant.price}
  end
```
This *instance* method is called on the `Customer` class. It calculates the sum of all of a customer's plants by adding up the values of the price attribute for each plant that is associated with that customer. 


#####Thanks for reading!
Hopefully these methods are helpful references for your own projects! I tried to keep it simple so this would be an easy reference :)
CardView Vs MaterialCardView
Tags: android, material, design
Published: 2022-10-27 19:35:11

As we're focusing more on design, **Material Design** is a hot topic here. Google's Material Library ( _com.google.android.material_ ) created a huge impact in this area. Today I'm going to discuss one of the most used elements in the design, the **CardView**.

Google has introduced a new version of **CardView** called **MaterialCardView** . Both **CardView** and **MaterialCardView** could be used in the same cases and they look pretty similar. But there is still a vast difference in both design and functionality.

Let's start with some background data about these twos-

## CardView
Previously, **CardView** was provided by **Android Support Library** (_android.support.v7.widget.CardView_). But with the latest migration to **Andoridx**, now it is provided by **Androidx** (_androidx.cardview.widget.CardView_) Library. **CardView** is created by extending the **FrameLayout**.

## MaterialCardView
This is introduced with Google Material Library (_com.google.android.material_). It is provided by **Material Components Library** ( _com.google.android.material.card.MaterialCardView_). **MaterialCardView** is created by extending the **CardView**.

## Differences
**MaterialCardView** has all the elements of **CardView** with its extra features. Here is a list containing the differences-

- **Stroke Color** and **Stroke Width** can be added to **MaterialCardView** which wasn't possible using **CardView**.
- **MaterialCardView** is Checkable. Check icon, color, and position can be set in **MaterialCardView**. Check conditions can be called also. This will be really useful as CardView has a huge usage in lists and grids.
- **Ripple Color** can be set to MaterialCardView which is not available in CardView.

## Code Example

CardView 
{% embed https://gist.github.com/ahmmedrejowan/9b63fde9cd63f21a4b5e17b8b108bef8 %}
MaterialCardView 
{% embed https://gist.github.com/ahmmedrejowan/02b83489eb2a5e4cc6cf4049a2f49382 %}

## Shots
**CardView**
![CardView Example](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kq54nlhfbgbvkl0pdocf.png)

MaterialCardView
![MaterialCardView Example](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4ww1yipycp3tzxb7gfc2.png)

## Details
- [CardView docs](https://developer.android.com/reference/androidx/cardview/widget/CardView)
- [MaterialCardView docs](https://developer.android.com/reference/com/google/android/material/card/MaterialCardView)
- [MaterialCardView on material.io](https://m2.material.io/develop/android/components/cards/)

Thanks for reading. Have a good day.

Find me on - [Github](https://github.com/ahmmedrejowan), [Facebook](https://www.facebook.com/ahmmedrejowan)

More- [CuteLibs Projects](https://github.com/CuteLibs), [CuteDialog](https://github.com/CuteLibs/CuteDialog)
Why is cybersecurity so crucial for Startups?
Tags: cybersecurity, startup, security
Published: 2022-11-08 00:13:56

---
title: Why is cybersecurity so crucial for Startups?
published: true
date: 2022-10-27 19:33:12 UTC
tags: cybersecurity,startup,security
canonical_url: https://guptadeepak.com/why-is-cybersecurity-so-important-for-startups/
---

 ![Why is cybersecurity so crucial for Startups?](https://images.unsplash.com/photo-1522071820081-009f0129c71c?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwxMTc3M3wwfDF8c2VhcmNofDZ8fHN0YXJ0dXAlMjBzZWN1cml0eXxlbnwwfHx8fDE2NjY4OTkwMDU&ixlib=rb-4.0.3&q=80&w=2000)

Think again for all the startups who think your data security doesn't matter!  
  
Cybersecurity is important, even for small companies. If you're breached, you could end up losing customer trust and even losing customers as a result of the incident. Because if you are a small company, and some serious issue, data incident, or cybersecurity breach happens, customers are the first to go because they would see it as a risk. So it has a tremendous impact indeed, especially for a small startup.  
  
Startups have unique challenges when it comes to cybersecurity—but we can help! Check out our video below 👇🏻 on "Why Is Cybersecurity So Important for Startups?"

{% embed https://www.youtube.com/embed/OcqS3W377-Y?feature=oembed %}

Major impacts for startups if you don't take care of cybersecurity:

- Operational Downtime

- Customer Trust

- Lose customers
Issue Launching IOS Sim from Windows
Tags: xamarin, xamarinforms
Published: 2022-10-27 19:32:24

I cannot seem to figure out why I cannot run the IOS simulator from my windows machine connected to a MAC.  

Windows Visual Studio Version: 17.3.6
Mac Visual Studio Version: 17.3.8
xCode Version: 14

Everytime I build on the Windows machine when it is loading the Simulator I get the following error.


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

Anyone seen this before.  I have removed Visual Studio from Windows and Mac and Removed and Reinstalled XCode and I get exactly the same issue.  Which seems to indicate there is something in one of the files that are part of the project that has something bad in it, but I cannot seem to figure it out.

Thanks in advance.
Reducing rerenders in nested/recursive components?
Tags: react, help
Published: 2022-10-27 18:55:02

[Codesandbox](https://codesandbox.io/s/elated-spence-70xdsy?file=/src/tree.js)

I'm trying to decide how to port an old pure-js Tree library to React. Because tree components are recursive, no matter my approach I'm seeing rerenders (react devtools profiler w/"record why each component rendered" enabled) because state has changed and needs to be passed to children. 

I've been able to avoid rerendering childless nodes by only passing state setters, but since state has to be passed to children, any node with children renders. So if I click a node to select it, all nodes with children rerender.

I'll need to eventually handle more than just an `isSelected` state, this is just a simple demo, but I can't figure out a good way to do this.

I could write my own logic to determine if a parent node needs to render but it would need know if any child nodes have changed state. A recursive check is bad, so I was thinking of setting some kind of `isDirty` flag on parent nodes, but being fairly new to react I don't know if there are better ways.

I'm hoping to avoid third party libraries as I'd like for this to be a public library eventually.
Pros & Cons Of Unity Game Development
Published: 2022-10-27 18:16:20

It is a popular game development platform that allows [unity game development company ](https://www.cubix.co/unity-game-development)to create games using a drag-and-drop interface. Unity Pros: 

- It is effective & best to utilize, making it a great choice for beginners.
- Unity is versatile, allowing developers to create games for a wide range of platforms, including mobile and desktop.
- Unity is affordable, making it an affordable option for small and large projects.
- It is compatible with a wide range of devices, making it a good choice for games that will be played on a variety of devices.
- Unity has a large community of developers, making it easy to find support when needed.
Paracetamol.test.js🧪| #7: Testea este código JavaScript
Tags: javascript, webdev, spanish, testing
Published: 2022-10-27 18:04:11

## **<center>Testea el siguiente código JavaScript</center>**
#### <center>**Dificultad:** <mark>Básico</mark></center>

```js
// arr.test.js
const everyFn = (arr) => arr.every((item) => item % 2 === 0);

//test A
test("[2,4,6,8,10] => true", () => {
  const res = everyFn([2, 4, 6, 8, 10]);
  expect(res).toBeTruthy();
});

//test B
test("[2,4,5,6,8,10] => false", () => {
  const res = everyFn([2, 4, 5, 6, 8, 10]);
  expect(res).toBeFalsy();
});
```

A. `Ambos test fallan`
B. `Ambos test pasan`
C. `Solo pasa el test A`
D. `Solo pasa el test B`

Respuesta en el primer comentario.


---
Material Compliance Dialogs Mobile
Tags: materialdesign
Published: 2022-10-27 17:51:41



## Material Design 

_Material Design_ é uma linguagem de design criada pelo Google. Tem por objetivo desenvolver um sistema de design que unifique a experiência do usuário em todos os seus produtos em qualquer plataforma.

Segundo o Google, _Material_ é a metáfora. Essa metáfora define a relação entre espaço e movimento. A ideia é tomar inspirações no mudo físico, para facilitar criatividade e inovação.

https://gwtmaterialdesign.github.io/gwt-material-demo/


## design system

Segundo Kholmatova, não existe um consenso na definição de _design system_ na internet e esse termo pode ser usado de diferentes formas. Contudo, a autora define _design system_ como um **conjunto de padrões interconectados e de práticas compartilhadas coerentemente organizadas que têm como objetivo servir à finalidade de um produto digital**.

- **Padrões** são os elementos repetitivos são combinados para criar uma interface: Como fluxos de usuário, interações, botões, campos de texto, ícones, cores, etc.
- **Práticas** são como escolhemos criar, capturar, compartilhar e usar esses padrões, especialmente quando trabalhando em equipe

Kholmatova, Alla (2017). Design systems: a practical guide to creating design languages for digital products. Smashing Media AG. p. 18.
Which WebAPIs are supported on this device in this browser?
Tags: webdev, webapi, productivity
Published: 2022-10-27 16:05:15

I had trouble finding this out while working on two side project, both PWAs, [Journalistic](https://journalisticapp.com) and [RepoTracker](https://repo-tracker.com).

As I ended up adding developer-only pages to each app, checking and displaying the status of the WebAPIs that I wanted to use and testing it in different browsers, I realized that is stupid. Better to have a tool that can do that independently of my apps without the hassle.

A few hours later [webapicheck.com](https://webapicheck.com) was up and running. Atm there are only a couple dozen APIs that get checked but I'm adding more as we speak. 

It's ridiculously easy to use. Just open [the page](https://webapicheck.com) on the device and with the browser you want to check and you get an instant visual overview of the APIs that are supported/not supported and whether or not they are in experimental stage. Selected APIs even have a quick test with which you can try the APIs and play around at the click of a button.

If you're building modern web apps, try it out, would love to get some feedback.

🙏🏽 ✌🏽
If You Give a Function a Function...
Published: 2022-10-27 16:50:25

---
title: If You Give a Function a Function...
published: true
date: 2022-10-27 16:05:13 UTC
tags: 
canonical_url: https://alex.party/posts/2022-10-27-if-you-give-a-function-a-function/
---

S﻿o Cassie Evans tweeted this the other day:

> Frameworks obfuscate away & front-end dev spans so many specialities.  
>   
> When there's a 'discussion' on here it's common to see folks say 'learn the web platform'.  
>   
> Got me thinking.   
>   
> What's the most useful thing you've learnt about the web platform for YOUR area of expertise?
> 
> — CSS Evils 😈 !important (@cassiecodes) [October 26, 2022](https://twitter.com/cassiecodes/status/1585199459826159616?ref_src=twsrc%5Etfw)

This got me thinking about a thing that it literally took me YEARS to understand (and frankly severely hampered my coding skills during that period.) And when I say years, I don't mean like 1 or 2 years. I started learning BASIC and HTML/CSS around 2000, and have been on and off developing since then. So by years, i mean about 15+ years.

## T﻿he thing about functions...

S﻿o the thing I never learned is that a function isn't some magic thing. **Most languages allow you to pass functions around. As arguments. To other functions.** This may seem obvious to others, but seriously, I did not understand this concept. Because I didn't understand this, GUI programming was impossible. JavaScript event handling was not understandable. Certain parts of WordPress were incomprehensible.

I﻿ remember trying to learn to use PyGTK, and never being able to do much with it.

O﻿ne day though, I think I was reading some JavaScript code at my first professional programming job, and I suddenly realized you could pass a function as an argument. **SO MANY THINGS CLICKED FOR ME.** All at once, the ability to use a bunch of libraries that I could not understand before became open to me and it completely revolutionized how i think about things.

S﻿o, for all you new to development, understand this: **You can pass a function as an argument to another function.**

T﻿hank you.

Originally Posted as [If You Give a Function a Function...](https://alex.party/posts/2022-10-27-if-you-give-a-function-a-function/) at alex.party
Day33 of #100DaysOfCode
Tags: 100daysofcode, css, tailwindcss, webdev
Published: 2022-10-27 15:49:53

Today I finished the main structure of the Company Detail page.  I have now finished the main structures for the list-detail pattern for the companies section.

The next step is to prettify the design with CSS.

I think this time it will go much faster since I now have some experience doing it for the article list-detail section.  Plus, I’m a lot more familiar with tailwindCSS now.

Hopefully I can get it done fast so I can move on to the backend part. 🥳
ANNOUNCING SCRF RESEARCH PULSE NEWSLETTER
Published: 2022-10-27 15:31:11

Hey folks, if you're looking for a curated list of web3 research, check out the weekly "Research Pulse" newsletter from Smart Contract Research Forum (SCRF).

Every week, Research Pulse offers a collection of the best new papers that provide insight and real-world solutions for crypto/web3 developers.

Subscribe to the newsletter on Substack (https://scrf.substack.com/) or Mirror (https://mirror.xyz/0x9Ff650e0836C3a5135fBc41ACA99a8B8D9D3559e)
Vytvorenie kostry aplikácie v Laravel framework (ver.9)
Tags: laravel
Published: 2022-10-27 15:27:13

V nasledujúcom postupe je ukázané ako si vytvoriť kostru (resp.úplne najzákladnejšiu) aplikáciu vo framework-u Laravel (vo verzii 9).

Vytvorím si kostru aplikácie v Laravel, príkazom:

```
composer create-project laravel/laravel NazovLaravelAplikacie
```
čím je vytvorený podadresár "NazovLaravelAplikacie" v adresári, z ktorého som spustil tento príkaz, a v ňom je vytvorená potrebná štruktúra súborov Laravel projektu:

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kp15zpzgeily5o3893a8.JPG)
V tomto adresári, kde mám vytvorenú túto základnú (prázdnu) Laravel aplikáciu, spustiť príkaz na štart developovacieho servra:

```
php artisan serve
```

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

A v prehliadači si teraz spustiť URL:

```
http://127.0.0.1:8000
```
a zobrazí sa základná Laravel aplikácia:

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

dole, v aplikácii vidím použitú verziu framework-u Laravel (ver.9.7.0) a tiež verziu PHP.