teleren/devto huggingface dataset:
How do I deploy AWS Lambda using Terraform?
Tags: terraform, aws, devops, cloud
Published: 2022-05-24 16:16:33

{% youtube JSR7U700h0U %}

Learn More about terraform - https://jhooq.com/categories/terraform/

AWS Lambda allows you to execute the code without any server and if you are using Terraform to manage your AWS infrastructure then you can use AWS Lambda module to write your Lambda implementation using Terraform. AWS Lambda natively supports Java, Go, PowerShell, Node. js, C#, Python, and Ruby.

In this lab session, we will go through the following steps - 


1. What is AWS Lambda?
2. What is work flow of AWS lmabda along with Terraform?
3. How to write AWS Lambda using Terraform?
4. How to verify your AWS Lambda created by Terraform
5. How to create test event for AWS Lambda?
How to setup Prometheus and Grafana
Tags: devops, sre, tutorial, monitoring
Published: 2022-05-24 16:15:00

{% youtube peH95b16hNI %}

Performance monitoring and alerting are very crucial to measure the performance metrics of an application running in a production environment. In this getting started tutorial , we are going to talk about two popular open-source tools Prometheus and Grafana also along with that we are gonna setup a node exporter-

In this lab session we will go through the following steps - 


1. Installation of Prometheus
2. How to create and Install Node exporter
3. Installing the Grafana
4. Setting up the Grafana Dashboard

For detailed steps refer to - How to setup Prometheus, Node Exporter and Grafana - https://jhooq.com/prometheous-grafan-setup/
Developing state of the art web apps with Node.js (QEWD-Up) back-end + NuxtJS/Vue.js front-end
Tags: tutorial, javascript, vue, vscode
Published: 2022-05-24 16:07:00

I wrote a step by step tutorial in the [qewd-howtos](https://github.com/wdbacker/qewd-howtos) repository how you can write state of the art multi-page web apps with [Node.js](https://nodejs.org/) using a [QEWD-Up](https://github.com/robtweed/qewd) WebSocket/REST api back-end integrated with a mainstream web framework like [NuxtJS](https://v3.nuxtjs.org/) & [Vue.js](https://v3.vuejs.org/). In particular with the latest [NuxtJS](https://nuxtjs.org/)/[Vue.js](https://vuejs.org/) frameworks, writing web applications becomes fun again, allowing you to write your applications very efficiently, hiding all boilerplate code from you.

The tutorial should be very easy to try out on your development machine and consists of two parts:

  * [instructions](https://github.com/wdbacker/qewd-howtos/blob/master/QEWD-Up-demo.md) for creating a basic Node.js [QEWD-Up setup](https://github.com/wdbacker/qewd-up-demo) with WebSocket & REST endpoints using an InterSystems IRIS/Caché database
  * [instructions](https://github.com/wdbacker/qewd-howtos/blob/master/Nuxt3-demo.md) for creating a [NuxtJS 3 front-end demo app](https://github.com/wdbacker/qewd-nuxt3-demo) (for the latest Nuxt 3 beta version) or - alternatively - [instructions](https://github.com/wdbacker/qewd-howtos/blob/master/Nuxt2-demo.md) for a [NuxtJS 2 front-end demo app](https://github.com/wdbacker/qewd-nuxt2-demo) (the current Nuxt 2.x production release)

You can simply clone both demo setups from GitHub and run them on your development machine using [Visual Studio Code](https://code.visualstudio.com/) where your IRIS/Caché development instance is running. The demo is kept as easy as possible, but it contains all major steps you need to start writing real-life apps.

Some screenshots:

  * the [NuxtJS 3](https://v3.nuxtjs.org/) front-end:


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

  * the NuxtJS 3 back-end running on Node.js:


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

  * The [QEWD-Up](https://github.com/robtweed/qewd) back-end running on Node.js + IRIS/Caché:


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

If you have remarks or encounter issues, please create an issue in the relevant GitHub repo!

Happy coding and post your comments below what you think!

Ward
How to change account size on Solana
Tags: solana, tutorial, blockchain
Published: 2022-05-24 16:05:47

Accounts are a key part of developing on Solana. For the longest time accounts were static in size and the only way to change their size was to create a new account. Your entire dApp architecture chained down by the fact that you cannot change your account size.

Now you can dynamically change the size of your accounts.

## Realloc

The Realloc feature was enabled since slot 133920008, or May 15th, 2022. 

[`realloc`](https://docs.rs/solana-sdk/latest/solana_sdk/account_info/struct.AccountInfo.html#method.realloc) is a new method on the `AccountInfo` struct that allows you to set a new size for an account. 

The `realloc` method:

```rust
pub fn realloc(
    &self,
    new_len: usize,
    zero_init: bool
) -> Result<(), ProgramError>
```

- `new_len` is defined as the new size in bytes
- `zero_init` is used to zero out new bytes if the account is resized smaller then larger again in the same instruction.

**Limitations**:

- Realloc can only be used on Program owned accounts
- Max increase in bytes per call is 10KB

## How to use Realloc

When you change the size of an account you must also make sure the account is still rent-exempt. Before the change, you can calculate the new rent requirements and fund the account.

```rust
let new_size = pda_account.data.borrow().len() + 32;
let rent = Rent::get()?;
let new_minimum_balance = rent.minimum_balance(new_size);

let lamports_diff = new_minimum_balance.saturating_sub(pda_account.lamports());
invoke(
    &system_instruction::transfer(funding_account.key, pda_account.key, lamports_diff),
    &[
        funding_account.clone(),
        pda_account.clone(),
        system_program.clone(),
    ],
)?;
```

Once you guarantee that the account achieves the rent-exempt status with the new account size, you can realloc the account.

```rust
pda_account.realloc(new_size, false)?;
```

That's it!

You can find a full code example [here](https://github.com/jacobcreech/realloc-tutorial).

## Use Cases

Dynamically changing the size of an account opens up the door to a ton of new use cases.

You can:

- Dynamically increase the size of a list
- Migrate accounts on program upgrade
- Allow users to pay their way for space

and much more!
Better estimate your features
Tags: programming, engineering, software
Published: 2022-05-24 16:05:45

- Take time to consider planning the project, breaking down into tasks, & creating some groundwork. (2-3D)
- Writing in TDD format. Red-green-refactor. (Depends on project and dev experience)
- Design completeness. (2-3D)
- Design rework. (Depends)
- Content completeness. (1-2D)
- Content rework. (Depends)
- Creating proper test situation for local/stage testing (sometimes for some features there needs to be some groundwork done before that feature can be tested). (Depends, sometimes .5D, to 3-4D)
- Oncall shift.
- Unseen p0 items. (Depends)
- Vacation timeoff. (Depends)
- Sick timeoff. (Depends)
- Coworkers not having access to environment. (3-7D)
- KT incase you are taking timeoff and there is a replacement in your place. (1D)
- Coworkers who you have dependency on taking timeoffs. (2-3D)
- Design reveiw.(2-3D)
- Content review.(1-2D)
- Internal testing.(1W)
- Documentation.(2-3D)
- Create insights & queries.
- Craft feature emails to send to eng team (1D)
- Create PPTs and other forms of comms for higher leadership to demo the feature (1-2D).
- Adhoc interviews if you need to take them
- Mandatory adhoc courses
- Your new code breaking existing test cases


p.s1 Not all of these may be applicable for every feature, for example a small feature with <=2 storypoint may not need all of these considerations, but this framework would still help.

p.s2 The estimates given above are assuming a mid sized project (2-3 months).
Luos Callback
Tags: opensource, microservices, tutorial, luos
Published: 2022-05-24 16:02:55

If you declare in the creation of your service a "Msg_Handler", when your service receives a message, Luos engine will call your message handler to deliver the message.
⏩ https://www.luos.io/docs/luos-technology/message/handling-message

In Luos, we call this a callback! It's an asynchronous way to receive a message.
Titanium RC 11 available
Tags: javascript, mobile, titanium, tidev
Published: 2022-05-24 15:46:13

The first release candidate of Titanium 11 is available!

It's a big step since that is the first version under the new TiDev Inc. since the hand over last year.

Some major features:
* first full working release workflow after the Axway -> TiDev Inc. handover
* updated documentation
* many fixes in the build process (e.g. Windows issues, iOS error messages,...)
* upgrade to Gradle 7.4.2 (Java 17 support)
* Android 12 fixes for round borders
* lots of fixes for dark/light mode switching
* integration of the community PurgeTSS project (Tailwind class support for Titanium!)
* updated core modules: map, facebook, identity and many more.

Check out the full release notes at https://titaniumsdk.com/guide/Titanium_SDK/Titanium_SDK_Release_Notes/ and the blog post at https://www.tidev.io/blog/release_sdk_11

I've helped a lot with the Android part and I'm looking forward to finally include many new feature in the next 11.0.x releases! So much stuff is waiting there (CameraX support, Snackbar, Shadow colors, Code cleanup,...) 🚀 Great time for the Titanium community.

Want to join and create mobile apps with an easy to use but still solid framework? Have a look at [fromzerotoapp.com](fromzerotoapp.com) and start creating awesome apps in no time.

And if you are a Java or iOS dev and want to work on the SDK yourself: have a look at the [official github repo](https://github.com/tidev/titanium_mobile). Pull request are always welcome!
Hard Work doesn't matter
Tags: innovation, creativity
Published: 2022-05-24 15:35:52

When you try to build something is no matter how much time you consume to do that thing. But the matter is how efficaciously and efficiently you implement such a feature. It doesn't matter if you spend more or less time. What you build should work fastly and well. In order to achieve such a result, you don't need (necessarily) hard work but **innovation** and **creativity**. If you spend too much time working and so little time innovating there is something that doesn't work in your job. So innovate first, and after you will find solutions more rapidly and with less effort. Yes, of course, innovation requires time but on my own, I find more pleasure in studying new technologies and solutions than staying stuck in the old and obsolete ones.

On the other hand, if you don't experiment, creatively, with other solutions, you never discover new possibilities. Besides, using creativity is a strong pusher on motivation and makes the job more enjoyable.

_In such a way you work less, with more joy and with more productivity, even though is still a job._
Top 7 Featured DEV Posts from the Past Week
Tags: top7
Published: 2022-05-24 15:17:36

---
title: Top 7 Featured DEV Posts from the Past Week
published: true
description: A round up of the most-read and most-loved contributions from the community this past week
tags: icymi 
cover_image: https://thepracticaldev.s3.amazonaws.com/i/sfwcvweirpf2qka2lg2b.png
---

_Every Tuesday we round up the previous week's top posts based on traffic, engagement, and a hint of editorial curation. The typical week starts on Monday and ends on Sunday, but don't worry, we take into account posts that are published later in the week._ 

## For the Web Means For All

"From the technology to the philosophy, the web is based on the idea that anyone, anywhere should be able to access your content." Well said, @abbeyperini!

{% embed https://dev.to/abbeyperini/web-development-accessibility-f8i %}


## Merge PRs like a Pro

How do so many contributors work together in sync without breaking production? @aniket762 shares how large companies circumvent this problem with merge queues.

{% embed https://dev.to/aniket762/merging-pull-requests-like-a-pro-with-mergify-30fa %}


## Button Up! 

Need buttons? @eludadev has ya covered with 100 different modern, accessible, & responsive buttons all built in CSS and free for you to use.

{% embed https://dev.to/eludadev/i-made-100-css-buttons-for-your-next-big-project-m55 %}


## Dockerize your Node App!

Learn all about Dockerizing your Node application in this short but sweet step-by-step tutorial from @pavanbelagatti.

{% embed https://dev.to/pavanbelagatti/dockerizing-your-nodejs-application-1o17 %}


## What's Your Setup?

@asheeshh kicked off the always entertaining conversation around editor preferences. Check out the discussion and let us know about your setup!  

{% embed https://dev.to/asheeshh/share-your-code-editoride-setup-1nlp %}


## Add Motion with a Single Line of Code.

Adding UI animations can be painful — especially for new, removed, and moved DOM elements. Thankfully, @justinschroeder introduced us to AutoAnimate which greatly eases that pain!

{% embed https://dev.to/justinschroeder/introducing-autoanimate-add-motion-to-your-apps-with-a-single-line-of-code-34bp %}


## How Debbie Arrived at Microsoft

@debs_obrien shares their story of starting as a site-building freelancer and working all the way up to their current role as a Senior Program Manager at Microsoft!

{% embed https://dev.to/debs_obrien/why-microsoft-and-how-i-achieved-my-goal-4194 %}


_That's it for our weekly Top 7 for this Tuesday! Keep an eye on dev.to this week for daily content and discussions...and be sure to keep an eye on this series in the future. You might just be in it!_
Lazy Loading React Components (with react.lazy and suspense)
Tags: react, reactlazy, suspense
Published: 2022-05-24 15:10:03

**What is React.lazy()**
It is a new function in react that lets you load react components lazily through code splitting without help from any additional libraries. Lazy loading is the technique of rendering only-needed or critical user interface items first, then quietly unrolling the non-critical items later. It is now fully integrated into core react library itself.

**Suspense**
Suspense is a component required by the lazy function basically used to wrap lazy components. Multiple lazy components can be wrapped with the suspense component. It takes a fallback property that accepts the react elements you want to render as the lazy component is being loaded.
Avion | Made with Meteor JS
Published: 2022-05-24 15:05:44

![Avion | Made with Javascript | Meteor JS](https://res.cloudinary.com/madewithjavascript/image/upload/v1652803715/large_avion_made_with_meteor_js_b2cebc4f5b.png "Avion | Made with Javascript | Meteor JS")


### User Story Mapping Tool for Agile & Product Teams

> User story mapping tool for product managers and agile teams. Plan product backlogs better using story maps integrating with Jira, Azure DevOps, Trello.
> 
> ### User story mapping for agile product teams
> Transform your backlog into one strategic product roadmap. Plan and build software more effectively
> 
> #### Build detailed user journeys
> Visualise your entire product in Avion by mapping out your user journeys. This helps you and your team to craft a truly user-centric backlog and set of user stories.
> 
> #### Plan releases, spot dependencies
> Because Avion gives you a view across your entire product, you can plan leaner releases and spot dependencies faster. If you're a true agile hero, you can detach your releases from your sprints, liberating your teams to deliver value whenever it's ready to go!
> 
> 

## Check out more such amazing projects on our website

[Made with Javascript](https://madewithjavascript.club)

## Want us to feature your project

[Submit your Project to Made with Javascript](https://madewithjavascript.club/submit-project)


You can also write to us for any of your queries at:

[Email Made with Javascript](mailto:madewithjavascript@gmail.com)

## Project already shared on our social media handles.

| SocialMedia | SharedLink |
| ----------- | ---------- |
| Twitter | [Avion on Twitter](https://twitter.com/withjavascript/status/1529114982574587904?s=20&t=N-afK1mGqoQew8T1BdBZPw)
 |
| Medium | [Avion on Medium](https://medium.com/@madewithjavascript/avion-made-with-meteor-js-f66b05bdb732)
 |
| Facebook | [Avion on Facebook](https://www.facebook.com/madewithjavascript/posts/pfbid0D9TyYzkRKwD9zqhwRApidXxsZUVhSCWNYxj9ADgWErvuLDFmStVpHxxez5EheWDdl)
 |
| Tumblr | [Avion on Tumblr](https://madewithjavascript.tumblr.com/post/685144355178168320/avion-made-with-meteor-js-user-story-mapping)
 |
| LinkedIn | [Avion on LinkedIn](https://www.linkedin.com/feed/update/urn:li:activity:6934881192475320320)
 |


Filled Under:
 - [Made with Javascript](https://madewithjavascript.club)
 - [Made with Meteor JS](https://madewithjavascript.club/categories/meteor-js)
 
Make sure to give this post ❤ 50 ❤ hearts, click the 🦄 unicorns 🦄 and follow 👉 @madewithjavascript 👈 for more such awesome showcases. Show you love for the people who have worked so hard!
Day 2 - Valid Parentheses
Tags: python, algorithms
Published: 2022-05-24 14:47:11

-> Given a string s containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid.

An input string is valid if:

    Open brackets must be closed by the same type of brackets.
    Open brackets must be closed in the correct order.
Eg -> 

Input: s = "()"
Output: true

```
class Solution:
    def isValid(self, s: str) -> bool:
        stack =[]
        for i in s: 
            if i == "(" or i == "{" or i == "[" : 
                stack.append(i)
            elif i == ")" : 
                if stack and stack[-1]=="(": 
                     stack.pop()
                else: 
                    stack.append(i)
            elif i == "}" : 
                if stack and stack[-1]=="{": 
                    stack.pop()
                else: 
                    stack.append(i)
            elif i == "]" : 
                if stack and stack[-1]=="[": 
                    stack.pop()
                else: 
                    stack.append(i)
                    
        if stack:
            return False 
        else: 
            return True

        
```
Paracetamol.js💊| #124: Explica este código JavaScript
Tags: javascript, spanish, webdev, programming
Published: 2022-05-24 14:26:18

## **<center>Explica este código JavaScript</center>**
#### <center>**Dificultad:** <mark>Básico</mark></center>

```js
let uuid = crypto.randomUUID();
console.log(uuid);
```

A. Genera un pseudo id poco seguro y poco recomendable. 
B. Genera un id criptográficamente seguro y nativo. 
C. `SyntaxisError`, no existe la interfaz `crypto` en JavaScript. 
D. Ninguna de las anteriores. 

Respuesta en el primer comentario.

---
WEB 3.0 my way
Published: 2022-05-24 14:19:51

The crazy period of web3.0 has been around the corner for a while and as a learner I've made some points to tell about it to a middle grade student.

Let me compare it with the famous lines of a democracy which says,
"Government is **OF** the people, **FOR** the people and **BY** the people"

similarly earlier we had Web1.0 in which we were able to consume the content being giver to us like a website with NO INTERACTION so this was **FOR THE PEOPLE**

web2.0 had made many websites very much interactive and people were able to share their interests in it so Web2.0 is **OF THE PEOPLE**

Now, In web3.0 the decentralization has made the public really powerful as they control it so this makes web3.0 BY THE PEOPLE

hope you all find it interesting
..
I'll be more than happy if you help me learn more by sharing your insights
Process to get Obj file from Assembly program Compiled using golang
Published: 2022-05-24 14:14:48

1) Does golang compilation/ build of golang program use GNU binutils (same as that of C/C++) ?
We tried with -v and --save-temps and both dont work.

2)Which golang assembler to use process the assembly program  and also to get obj file from assembler?
 Command used to get the assembler(riscv64) :
 go tool compile -S sample.go > sample.s
Using Standalone Components in an NgModule-based application
Tags: angular
Published: 2022-05-24 14:11:05

Earlier today I recorded a short video where I show you how to start using Standalone Components in an `NgModule`-based application.

{% youtube https://www.youtube.com/watch?v=aTRjXA_L1dU %}

This approach allows you to start using Standalone Components today! You don't have to go all in with Standalone Components. You can start by migrating a single route, or a single component. Then slowly work your way out through the rest of the application as you go.
Earn a free Microsoft Certification exam
Tags: cloudskillschallenge
Published: 2022-05-24 13:55:42

The #CloudSkillsChallenge starts at 9am PST! ✨

☁ Complete a challenge
⚙️ Gain new skills
🏅 Earn a free #MicrosoftCertification exam

Get ready to crush it: [LINK](https://www.microsoft.com/en-US/cloudskillschallenge/build/registration/2022?wt.mc_id=build22_twt_organicsocial_wwl)
Logging variables in Chrome DevTools using logpoints
Tags: javascript, todayilearned
Published: 2022-05-24 13:49:49

`logpoints` in Chrome DevTools allow you insert logging statements without adding breakpoints.

Right-click on the line you want to log:

![Screenshot 2022-05-24 at 9 19 45 PM](https://user-images.githubusercontent.com/4616064/170044768-23b8fc0e-7f97-4452-9089-0be65fd2a0c2.png)

Add the statement you would like to output to the console:

![Screenshot 2022-05-24 at 9 23 58 PM](https://user-images.githubusercontent.com/4616064/170045738-4ea2c14f-70b4-4e59-a907-f82487e610f6.png)

Everytime the code runs on this `logpoint`, it will output to the console:

![Screenshot 2022-05-24 at 9 27 54 PM](https://user-images.githubusercontent.com/4616064/170046595-7a2309f2-5733-49ec-9ba0-7e989c01eb6a.png)

This allows for quick console logging without having you to touch your source code and without having to add breakpoints.

**Today I Learned**
I share what I learn on [Today I Learned](https://petermekhaeil.com/today-i-learned/).
Sunsetting the DEV.to Android App
Tags: android, meta, mobile, forem
Published: 2022-05-24 13:40:44

About two months, I shared with you our new [Forem app for Android](https://play.google.com/store/apps/details?id=com.forem.android).  
{% embed https://dev.to/devteam/forem-for-android-is-here-38ik %}
As with our [Forem iOS app](https://apps.apple.com/us/app/forem/id1536933197), the Android app allows you easily find articles, podcasts, and discussion across any Forem community you are a member of.  Since we launched the Forem Android app we have seen over 10,000 downloads and received a 4.8/5 rating.
<br>

<mark>That means today it is time to say goodbye to the old DEV Android app.  </mark>

The Forem Android app works with all Forems in the Forem network and includes modern mobile features like mobile optimized content and push notifications.  It’s available on the Android store right now and your existing DEV, or Forem Account, login will work with it.  So jump on in and try out the new [Android app](https://play.google.com/store/apps/details?id=com.forem.android).  If you have the old DEV app on your phone, it’s time to hit that delete button. :sad:

Thank you for helping us complete this greatly improved Forem experience!
🪜 Escalators Parallax
Tags: codepen
Published: 2022-05-24 13:26:11

<h2>Hey there! 👋
<h3>Thank you for your interest in this project. 🙏</h2>
<p>This is a personal project on a parallax of an escalators.</p>
<p>All visuals used belong to <a href="https://fr.freepik.com/upklyak" target="_blank">Upklyak</a>.</p>
<p>Thanks to him for providing them.</p>

{% codepen https://codepen.io/paulchevrier/pen/KKQKOby %}