teleren/devto huggingface dataset:
Laravel shorts - Blade component gotcha
Tags: laravel, php, webdev, shorts
Published: 2021-09-18 05:16:42

__Update 2021-10-22__
An issue has been created on GitHub: https://github.com/laravel/framework/issues/39232

And a fix has been merged:
https://github.com/laravel/framework/pull/39319

---

[Blade components](https://laravel.com/docs/8.x/blade#components) are a great tool for structuring your view templates into small reusable pieces. But while working with them, I stumbled upon a gotcha that I think you should know about. First, let's take a look at this anonymous component:

post-title.blade.php
```php
@props(['post'])
<h1 {{ $attributes }}>{{ $post->title }}</h1>
```

And here is how it is used in, say, a post list page:

```php
@foreach ($posts as $post)
  <x-post-title :post="$post" />
@endforeach
```

In this example, the posts are Eloquent models that were previously loaded from the database. Now, if you run this code, you will notice nothing strange in particular. Everything works as intended. However, if you dig a little deeper, you will find some unexpected behavior:

**Every time the component is instantiated, the post model is being serialized to JSON.**

The cause for this behavior lies in the way the Blade component compiler processes attributes inside the `sanitizeComponentAttribute` function.

[CompilesComponents.php](https://github.com/laravel/framework/blob/4cb7660dc25b4a09ce2cdfff0d4195d1b4a48c70/src/Illuminate/View/Compilers/Concerns/CompilesComponents.php#L164)
```php
/**
 * Sanitize the given component attribute value.
 *
 * @param  mixed  $value
 * @return mixed
 */
public static function sanitizeComponentAttribute($value)
{
    return is_string($value) ||
           (is_object($value) && ! $value instanceof ComponentAttributeBag && method_exists($value, '__toString'))
                    ? e($value)
                    : $value;
}
```

Basically, any object that implements a `__toString` function will be converted to a string. In the case of an Eloquent model, this will convert it to JSON. Depending on how large your model is and how often the component is used, this will waste a significant amount of resources on constructing JSON strings that are never used.

## Solution: Use class based components

Instead of an anonymous component, use a class based component and add your props to the constructor arguments. After you do that, your objects will no longer be converted to strings.

```php
<?php

namespace App\View\Components;

use Illuminate\View\Component;

class PostTitle extends Component
{
    public $post;

    public function __construct($post)
    {
        $this->post = $post;
    }

    public function render()
    {
        return view('components.post-title');
    }
}
```

---

The post [Laravel shorts – Blade component gotcha](https://hbgl.dev/laravel-shorts-blade-component-gotcha/) appeared first on [hbgl](https://hbgl.dev).
Top 3 Best FREE Video Editing Software (2021)
Tags: tutorial, techtalks, devlive, tooling
Published: 2021-09-22 20:24:06

In this video, I've talked about the top 3 best free video editing software in 2021 for YouTube. All the free video editor I've talked about in this video is "completely" free and open-source projects. So, you have 100% rights to the programs.

**Sponsored by:** Manage your resources quickly & efficiently with [pvsid.com](https://www.pvsid.com/wartungsplaner-software-digitale-wartungsplanung).

This video is edited using the Olive video editor. It's my favourite.

[Watch More Videos](https://www.youtube.com/souvikpaultech)

## Free video editors for YouTube:
Shotcut: https://shotcut.org/
OpenShot: https://www.openshot.org/
Olive: https://www.olivevideoeditor.org/
Kdenlive: https://kdenlive.org/en/

## Tutorials:
Shotcut: https://youtu.be/PCMcyYAtRzw
OpenShot: https://youtu.be/rLWXlc1BW-I
Olive: https://youtu.be/R196PezaG_E
Kdenlive: https://bit.ly/3zstmvG

## Timestamps:
00:00 - Intro
00:27 - Shotcut
01:20 - OpenShot
01:38 - Olive Video Editor
02:33 - Kdenlive
03:06 - Tutorials
03:20 - My Favourite Video Editor
03:39 - Outro

Thank you for watching!

## Watch more videos:
BlackMagic: https://youtu.be/IYl6dW9xWZQ
Blockchain Domains: https://youtu.be/rOMi_ZsmJPs
Screenshot Hack: https://youtu.be/tflkwf7s3ro
Best IDE: https://youtu.be/6c5T5TiGJk4
IoT: https://youtu.be/ktrY7jSkyOU

My dev blog: https://souvikpaul.hashnode.dev/

## Connect with me:
Facebook: https://fb.com/thesouvikpaul
Instagram: https://instagram.com/amisouvikpaul
Twitter: https://twitter.com/thesouvikpaul
Fb Page: https://fb.com/amisouvikpaul
Smooth Hover Transitions Using CSS
Tags: css, codenewbie, tutorial, programming
Published: 2021-09-22 19:57:09


 It's standard practice across websites that hovering over certain components like links and buttons will cause them to change their appearance. Usually, it's something slight like adding an underline on a link, or altering the opacity of the text.

There is a built in method you're likely familiar with where you add these desired styles.

### Standard Hover Transitions

Let's say we have a class of `.btn`. Let's say it looks something like the following:

![Screen Shot 2021-09-22 at 12.40.06 PM](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4kzhff72dg5lhpnsxr1h.png)

Our HTML looks like this:

      <body>
        <div class="container">
          <button class="btn">Click Me</button>
        </div>
      </body>

Our stylesheet looks like this currently:

      .btn {
        padding: 4px 8px;
        background-color: red;
        border-radius: 4px;
        border: none;
      }

If we wanted to add a standard hover method that changes the background colour when we hove over it, we would make a new addition to our stylesheet that looks like the following:

     .btn:hover {
       background-color: rosybrown;
     }

The `:hover` specifies that the proceeding styles are applied when the hover actions occur on the class listed before the `:`.

Adding this results in the following:

![Hover GIF](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3qq3lmje1fj3ugpv6o4e.gif)

As you can see, it works perfectly fine, but it's choppy and not as smooth as we would love.

### Smooth Transition

We're going to change up how we apply this method. We're going to remove the above `:hover` addition completely and we will actually be making use of the `transition` method within the `btn` class.

Want to see how we've done it? Visit [the tutorial on CodeCast](https://www.codecast.io/casts/kEN59A2n5yo6-css-hover-transition) to see the full tutorial and code. You don't need an account and it's free, so feel free to check it out! 

If you do make an account on [CodeCast](https://www.codecast.io) be sure to give me a follow to stay up to date with the latest tutorials I put out.

Let me know what you think of this method and if you have any other ways of creating smooth transitions that stand out to you!
Mistakes I have made, as Junior Software Developer.
Tags: softwaredevelopment, programmer
Published: 2021-09-22 19:20:10


img from the IELTS Coach

After graduation, I got hired as SDE1 in 2020, and now this year I’m going to have complete one year of experience as junior software developer.

I did graduation in IT and started my career as junior software developer. Lets jumps to the mistakes I made during my journey.

Listening other senior developers ,what they are doing and what they have done during sprint in stand-up, I found it’s intimidating to me. I start doubting myself “Am I be able to do such complex tasks?”. But reality is Yes, I’m now also able to do such complex task , just by breaking those problems in to sub, sub problems.

I’m little introvert . Initial period , I talk less with my seniors or manager. This was my one of the mistake as junior developer. later I found , I have to let my manager know what deployment failures I made. I should be the one who convey those conversations.

I have been working on Spring boot applications, but I also wanted to work on MERN Stack. I never convey this though to my manager. But one day in 1:1 meeting I told him about that and he welcomed it and assigned a project with NodeJS. Finally I learn , I have to talk to not only problem related to project I’m having also If I’m wanna to pick some other domain project or else.

There is room to grow every time I made any mistake. I’m learning constantly from my mistakes. I would love to say, don’t leave yourself cold after pulling off any mistake in your developer journey, because it is sign that your learning and contributing.

Learn from your mistakes and grow.
🏹Kotlin&Arrow #2 - Gestión funcional de Errores
Tags: kotlin, arrow, showdev
Published: 2021-09-22 19:00:43

En esta segunda sesión continuamos con otro caso de uso del servicio especializado en ofrecer servicios turísticos a destinaciones saludables de 🦄**Wonderful Enterprises**.

Veremos de la mano de @ivanlorenz que en algunas ocasiones no basta con modelar ausencia de valor para nuestros métodos OO. Es conveniente a veces informar al código cliente de nuestras APIs con una explicación que aclare porqué no hemos podido satisfacer la petición.

Tradicionalmente en OO se han utilizado las excepciones pero nosotros queremos mostrar otra forma de hacerlo usando gestión funcional de errores con [Kotlin](https://kotlinlang.org/) y [Arrow Either](https://arrow-kt.io/docs/0.10/apidocs/arrow-core-data/arrow.core/-either/) 🤩

Puedes consultar el código fuente aquí 👇

{% github AdevintaSpain/wonderful-freshair-app no-readme %}

... y el vídeo de la segunda sesión aquí 👇

[0:00](https://www.youtube.com/watch?v=8RD_G6aY7Nk&t=0s) Introducción
[0:33](https://www.youtube.com/watch?v=8RD_G6aY7Nk&t=33s) ¿Qué fué antes ... el copy&paste o Roger Viñas?
[2:38](https://www.youtube.com/watch?v=8RD_G6aY7Nk&t=158s) Revisión sesión anterior
[11:16](https://www.youtube.com/watch?v=8RD_G6aY7Nk&t=676s) Primera implementación del Air Quality Comparer con Arrow-Option
[27:10](https://www.youtube.com/watch?v=8RD_G6aY7Nk&t=1630s) Error si comparamos y una ciudad no existe ¡Usemos Arrow-Either!
[51:36](https://www.youtube.com/watch?v=8RD_G6aY7Nk&t=3096s) ¡Hemos roto el caso de uso del Air Quality Computation! 😨
[58:10](https://www.youtube.com/watch?v=8RD_G6aY7Nk&t=3490s) Tenemos que dar detalle sobre los diferentes tipos de error ...
[1:32:19](https://www.youtube.com/watch?v=8RD_G6aY7Nk&t=5539s) Conclusiones y próximas sesiones

{% youtube 8RD_G6aY7Nk %}

[![Ofertas Backend](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/v2mvp64lwmjq0s1f8svp.png)](https://careers.adevinta.es/ofertas/?search=backend&stc=aff-blog%20dev.to-gesti%C3%B3n%20funcional%20de%20errores%20con%20kotlin%20y%20arrow)
Front End Stuff
Tags: codenewbie, webdev, career
Published: 2021-09-22 18:59:13

I have a genuine question about the popularity of the React framework. Just for context, I'd say I'm between and Junior and Mid developer - probably closer to Junior in many respects. As I'm looking at the job market for Front-End work, React is a requirement for quite a few of those positions. Every once in a while, I'll see postings for Angular or Vue. So again the question, why React?

I'll be totally honest honest here. I don't know enough about all these amazing frameworks to say one is better utilized this way or that way. I'm certainly not trying to stoke another war over which framework is best or whatever. What I do know is that the underlying tech for all of these is Javascript.

Now, based on my primitive knowledge of these frameworks in general, I'm beginning to see how these frameworks are abstractions of the Javascript programming language. The "magic" is happening behind this layer of abstraction - which makes things easier for a developer right?

I want to circle back to my initial question. What does React do well that Angular or Vue or any other front-end framework doesn't? What makes it so popular to use? Is it a ecosystem thing where once you use it, you just have to? Or is it because of the ease of development? I genuinely want to know because the market does seem to prefer React as the "de-facto" framework. I'd love some insight into this.
Software Testing/ SQA as career
Tags: softwaretester, sqa, career, testing
Published: 2021-09-22 18:54:45

Everyone Can´t Be a Software Tester
Testers are mostly creative people that look at the world from a different perspectives, they get into the user role and create different scenarios.

People outside the QA department think and even believe that anyone can test software and testing is not a creative job. However, testers know very well that this is a myth. Thinking alternative scenarios, try to crash a software with the intent to explore potential bugs is not possible for the person who developed it.

The current pandemic changed the world, many people lost their jobs and want to learn a new profession. Some of them decided to get into IT, as it’s one of the most promising industries. The false conviction that it’s easy to become a software tester kinda flouts this profession. All jobs look easy from the outside, but once you get on the train you will see that it’s more than just pressing buttons.

Testers are among the most creative people in IT, they have a massive influence on the whole development process because they see what others don’t. It’s not so easy to look at one thing from different perspectives, if you get to test an app you can’t follow the “ideal” user journey. They are the ones that create new scenarios, they fully commit to providing the most value for the client, and they are the unsung heroes of every project.

It is a common perception that testing is just clicking on UI randomly and tracking details in excel or other documents. The reality is that testers perform very well-defined test steps to assure that the UI/APP is working in exceptional cases as well. So, it is the vision that counts.
Since a user does not have boundaries on what they can and cannot do, the same goes for testers. This is why it is important to explore the UI, which might look like lots of random clicks.

Only we testers know that there is a method to this madness.

Testing is happiness. Be Proud to be a Tester. Cheers to Testing Community!
Hosting Several Go sites on one VPS
Tags: go, webdev
Published: 2021-09-22 18:15:44

https://hosting.go4webdev.org/howto

Hosting MANY Go executables is different from hosting PHP or similar. You have to set the Go to listen to different ports. And then tell Nginx proxy (redirect) which Go executable to open. This mini tutorial guides you how to set up a VPS and create a "Go Hosting".

Webmin is a tool to manage the entire VPS Host. Amongst other things, upload, config and monitor.

By using Cloudflare in front as an extra proxy you can add several cool things. Amongst others can Cloudflare handle the SSL certificate for your entire server if you want. The sites are cached automatically and if you want Cloudflare can compress your code for faster rendering.

When adding systemd support to each Go executable you make it simpler to restart Go. Both manually and automatically.

If you host only ONE Go executable, there is no need for Nginx. Just use port 80 and 443 as usual.
Render-Atlanta 2021 Recap
Tags: conference, javascript, react, events
Published: 2021-09-22 18:15:37

---
title: Render-Atlanta 2021 Recap 
published: true
description: A quick recap of Render-ATL 2021
tags: conference, javascript, reactjs, events
//cover_image: 
---

<img src ="https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1b1291fnc4gkgsyzdp3n.jpg"/>

<h2>I can't believe that it's over</h2> 
<p>
I know that I could be a little longwinded so I will try to keep this letter short, but I really can't believe that we just pulled off a full-scale software engineering conference since our new normal has began. I know that this wouldn't of been possible without the love, support, and determination of the more than 350 attendees that made their way down the intersecting path of culture and tech in Atlanta for three days. During those three days it dawned on me that we've built something much bigger than what I've envisioned in <a href="https://dev.to/thugdebugger/render-why-cjm">my earlier letter discussing my vision for the conference</a>, and now encompasses giving everyone a intuitive and vibrant outlet for shared experiences across the technology, specifically engineering, industry. While I was surrounded by many enthusiastic faces, I did feel a sense of "we could do more" to ensure that for our 2022 edition will award more than our previous 70 scholarships, and have 1,200 attendees in Atlanta to help stimulate the local economy further.
</p> 

<h2>Wild Ride</h2>
<p>2021 was a wild ride that encompassed a COVID variant, hurricane Ida, and many other unpredictable events that almost caused us to delay the dream of Render-Atlanta for the third time. But with your consistent support and admiration, the dream was only delayed and not denied. We're excited to have recently announced our upcoming 2022 lineup, along with announcing our deeper commitment to intersecting engineering and the culture by adding the <a href="https://milkandcookiesfestival.com/">Milk & Cookies Music Festival</a> to our week of events. More importantly my team and I can't wait to welcome you back for the festivities that could only happen in "the city that's too busy to hate", Atlanta </p>

<h1>2021 Recap Video</h1>
{% youtube C_wEszz13Zg %}

<h2>View & download your favorite photos below</h2>
<a href="https://drive.google.com/drive/folders/1aFplt7CK6ZKUrET-Rl131mcMyU-2UpfH?usp=sharing">Click Here</a>
Send Exchange Updates to Discord
Published: 2021-09-22 17:48:43

I’m using Binance as my main exchange. They add new symbols frequently and I want to be notified if there is something new I could trade.

Also, I set up my own Discord server, mainly to receive TradingView alerts so that my inbox is not flooded with emails.

To connect both pieces, I wrote a PowerShell script that checks for new symbols on a daily basis and sends the result to my Discord server. No worries, you need next to zero PowerShell knowledge to use this script.

![Results in Discord](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c82cnvoxa3l1doh80y50.png)

# Creating a Discord Webhook

The first step is to sign-up on Discord and create a server. That’s pretty straightforward - if you need assistance, though, there are hundreds of tutorials on the Internet.

Next, create a new text channel and give it a name like exchange-updates or similar.

![Name](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/curr2a52pozt7u3bvmv3.png)

Edit your channel, click on Integrations and create a webhook.

![Webhook](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gyuau030ghzk5np2u491.png)

Give it a name and copy/paste the webhook URL somewhere safe.

# Modifying The Parameters

The script `Update-TickerListToDiscord.ps1` is available on [GitHub](https://github.com/NobbisCrypto/Crypto). Go there and download it.

Paste the webhook URL from above between the '' in the following line:

```
$DiscordWebhook = ''
```

As you can see in the script, I’m checking three lists:

* USDT
* Futures
* EUR

You can also see that the script gets the lists from the website [edgesforledges.com](edgesforledges.com). If you trade other pairs than I, check the website for other lists, download them into the same folder as the script, copy the download URL, and change the variable `$Inputs` accordingly. [sandwich.finance](sandwich.finance) is another site to get lists.

# Running The Script

To run the script manually, right-click it and choose *Execute with PowerShell*.

To run it periodically on Windows, create a scheduled task and set the action as follows:

* Script: `powershell.exe`
* Argument: `-executionpolicy bypass -file "Full path to the script"`

I'm running this every day at 8 AM via cron on an Ubuntu VPS box.
Wednesday Links - Edition 2021-09-22
Tags: java, jvm, groovy, spring
Published: 2021-09-22 17:48:43



String interpolation in Java (10 min)🩰
https://github.com/openjdk/amber-docs/blob/master/site/design-notes/templated-strings.md

Statics inside of inner classes in JDK 16 (4 min)🔋
http://cr.openjdk.java.net/~jrose/jls/FunnyStatic.java

JDK 17 G1/Parallel GC changes (5 min)📈
https://tschatzl.github.io/2021/09/16/jdk17-g1-parallel-gc-changes.html

How much faster is Java 17? (3 min)🚄
https://www.optaplanner.org/blog/2021/09/15/HowMuchFasterIsJava17.html

Groovy 4.0.0 Roadmap (4 min)🛣️
https://speakerdeck.com/paulk/groovy-roadmap

Groovy 4.0.0 can support Java record as a language feature (30 sec)⏺️
https://twitter.com/daniel_sun/status/1438787018746593284

Reassessing TestNG vs. Junit (5 min read)🤺
https://blog.frankel.ch/reassessing-testng-junit/

“Secret” Agent Exposes Azure Customers To Unauthorized Code Execution (8 min)🥷
https://www.wiz.io/blog/secret-agent-exposes-azure-customers-to-unauthorized-code-execution

Practical API Design at Netflix, Part 2: Protobuf FieldMask for Mutation Operations (5 min)🧟
https://netflixtechblog.com/practical-api-design-at-netflix-part-2-protobuf-fieldmask-for-mutation-operations-2e75e1d230e4

Prettier Java (1 min)💄
https://github.com/jhipster/prettier-java

Running Scheduled Jobs in Spring Boot (11 min)⏱️
https://reflectoring.io/spring-scheduler/
Live Event: Static Analysis using MobSF by Edem Gold!
Tags: mobsf, livecoding, mobilesecurity
Published: 2021-09-22 17:46:54

#######Join here 📌 
https://bit.ly/3AyglSP

Coding & Coffee ☕️ is an exclusive up-skilling series for developers. We feature tutorials, live coding sessions, Q&A’s featuring some of the fastest growing Open Source projects out there.

This session will be hosted by Edem Gold, an Aviyel creator who has been working closely with the MobSF community.

###Why should you join?

-> Hands-on experience of working with a dynamic open source project MobSF, learn how to install MobSF, a free & open source project for mobile application testing.

-> Learn the difference between Static & dynamic analysis in Mobile application testing.

-> Bombard speakers with your questions to dive deep into open source technology (and maybe start a full-time career)

-> Run Static analysis on leading mobile apps used globally and become a Mobile security expert.

Mark your Calendar: 📆

Time- Sep 23rd: 7:00 PM IST

#######Join here 📌
https://bit.ly/3AyglSP

PS: The session is free, but your pre-event confirmation is required. Confirm your presence by registering today.

#####Impressed? Check out the rest of our events!

#####Building in the open. 🚩

Ajin Abraham started MobSF mainly to counteract the time-consuming and cumbersome overheads in setting up and maintaining a mobile application testing environment.

MobSF supports mobile app binaries (APK, IPA & APPX) along with zipped source code and provides REST APIs for seamless integration with your CI/CD or DevSecOps pipeline. The Dynamic Analyser helps you to perform runtime security assessment and interactive instrumented testing.

MobSF can be hosted on local environments so that the sensitive data doesn't interact with the cloud environment. With MobSF, mobile app test environments could be set up easily on all three major platforms, i.e. Android, iOS, and Windows.

Join the Open source revolution! ✨

Team Aviyel