teleren/devto huggingface dataset:
IAC & DevX Updates; PDK 2.1, Cloud CI, and project management experiments
Tags: team, status, pdk, cloudci
Published: 2021-04-14 22:08:39

---
title: IAC & DevX Updates; PDK 2.1, Cloud CI, and project management experiments
published: true
date: 2021-04-09 00:00:00 UTC
tags: team,status,pdk,cloudci
canonical_url: https://puppetlabs.github.io/iac/team/status/2021/04/09/status-update.html
---

## Community Contributions

Although this week we did not have any contributions merged, we would like to say a special thank you to [Daiana](https://github.com/daianamezdrea) and [Michael](https://github.com/michaeltlombardi). Between them 39 PRs were processed for tooling and supported modules as other team members were on PTO.

On top of that we are really happy to announce that [puppetlabs-ibm\_installation\_manager](https://github.com/puppetlabs/puppetlabs-ibm_installation_manager) is now [supported](https://forge.puppet.com/modules/puppetlabs/ibm_installation_manager) by the team.

Check [all the ways to reach us](/iac/team/2021/01/20/reaching-out.html) if you want to directly contact us about anything module related.

## PDK 2.1 Release

We’re delighted to announce the release of PDK 2.1! This is the first release that the DevX team have performed but it certainly won’t be the last! Exciting things in store for the PDK and more regular releases planned for 2021. Check out the release notes for 2.1 [here](https://puppet.com/docs/pdk/2.x/release_notes_pdk.html)

### Cloud CI Update

This week we are closing a new milestone for the Cloud CI. We finally decided to close the multi-node testing milestone as we currently have a couple of modules already using this feature (puppetlabs-kubernetes, puppetlabs-ibm\_installation\_manager and soon puppetlabs-websphere\_application\_server). More good news is that this week, the support team managed to port their first module to use the Cloud CI provisioning for their PR/Nightly tests on the [support-tasks](https://github.com/puppetlabs/support-tasks) module. We are hopeful this will make testing and releasing a lot easier in the future for them. We are now mainly focusing on training and educational materials so a couple of demo videos will soon follow.

### Other work

**Important** : We are preparing to clean up our supported module repositories and the previous _master_ branch will be removed from all repositories by the end of next week.

The IAC Team is currently evaluating [ZenHub](https://www.zenhub.com/) and [Zube](https://zube.io) for managing issues across our repositories. The team would really appreciate any feedback from the Puppet Community, so please feel free to reach out to us if you any suggestions/recommendations ?
DevOps is not a set of tools
Tags: devops, tools, productivity, practices
Published: 2021-04-12 08:40:22

---
title: DevOps is not a set of tools
published: true
date: 2021-04-09 00:00:00 UTC
tags: devops,tools,productivity,practices
canonical_url: https://jhall.io/archive/2021/04/09/devops-is-not-a-set-of-tools/
---

A woman went to a photography exhibition, and fell instantly in love with the photographs on display. She approached the photographer and invited him to her home for dinner to discuss the artwork. He accepted.

After dinner the woman says “Your photographs are so beautiful. You must have a really expensive camera.”

The photgrapher smiled and replied, “The dinner you prepared was so delicious. You must have very expensive cookware.”

![](https://jhall.io/archive/images/photographer.jpg)

In the same way that tools don’t make art, tools don’t make DevOps.

A skilled photographer can use the cheapest cameras to make [amazing art](https://amzn.to/3mvwBxn). Likewise, an unskilled photographer can use the most expensive tools, and produce nothing of inspiration.

DevOps, like art, is all about the mindset. The tools come later, and only make the job easier.
How to output the full object or nested objects to the console in Nodejs?
Tags: node
Published: 2021-04-09 00:00:00

---
  title: How to output the full object or nested objects to the console in Nodejs?
  published: true
  tags: Nodejs
  date: Fri Apr 09 2021 05:30:00 GMT+0530 (India Standard Time)
  canonical_url: https://melvingeorge.me/blog/how-to-output-full-object-or-nested-object-to-console-nodejs
  cover_image: https://melvingeorge.me/_next/static/images/main-1c6fb1b713638a78f9b819ec38f4a0bf.jpg
  ---
  [Originally posted here!](https://melvingeorge.me/blog/how-to-output-full-object-or-nested-object-to-console-nodejs)
  
Sometimes when you log out the contents of an object into the console in Node.js, you may get something like this `[Object]` 🤧, which can be a pain sometimes to visualize the contents inside.

No more of that! 😎 You can print out the full contents using the `console.dir()` method then pass the object which contaitns nested objects as the first argument and then pass an options object with key of `depth` and value of `null` like this,

```js
// A big nested object
const objectWithNestedObjects = {
  name: {
    name: {
      key: {
        key: "",
      },
    },
  },
};

// using console.dir() with depth of null
console.dir(objectWithNestedObjects, { depth: null });

/*
OUTPUT:

{
  name: { name: { key: { key: '' } } }
}

*/
```

- Setting the `depth: null` will dig into objects recursively and then print out the contents.

See the above code live in [repl.it](https://replit.com/@melvin2016/log-objects-with-nested-objects-into-the-console-in-nodejs).

You can also use an alternate way using the [JSON.stringify()](https://melvingeorge.me/blog/print-json-output-beautifully-javascript) function.

That's all 😃!

### Feel free to share if you found this useful 😃.

---
Top 5 DEV Comments of the Past Week
Tags: bestofdev
Published: 2021-04-08 23:06:33

---
title: Top 5 DEV Comments of the Past Week
published: true
description: 
tags: bestofdev
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nvjh80kv1nr41sw6wxke.png
---

_This is a weekly roundup of awesome DEV comments that you may have missed. You are welcome and encouraged to boost posts and comments yourself using the **[#bestofdev](/t/bestofdev)** tag._

---

Sometimes getting tips on "little" things like how to [delete node_modules like a Pro](https://dev.to/nirazanbasnet/delete-nodemodules-like-a-pro-17270) make life a lot easier. We appreciate the tip, Nirazan. 
{% devcomment 1d515 %}

Coding is a whole lot like detective work, so we think that [alternate path](https://dev.to/devlorenzo/if-you-weren-t-a-dev-you-d-be-a-31c4) would've suited you well, Jasper!
{% devcomment 1d3eo %}

Great to hear about your [journey to coding](https://dev.to/fikradev/my-coding-journey-soldier-who-codes-3829), Angelo. Thanks for the inspiration and sharing your experiences with the community.
{% devcomment 1d417 %}

It can be a real struggle to [successfully juggle side projects](https://dev.to/ms_yogii/5-tips-to-work-on-your-side-project-while-working-full-time-n7i), and Ash offers us some wisdom to keep us going. Thanks!
{% devcomment 1d6ep %}


Liyas is celebrating an awesome win from last week — and we're right here cheering them on, too! I'm sure it was a fantastic talk.
 
{% devcomment 1d5hi %}
---

See you next week for more great comments :v:
phpMyAdmin Alternatives (Web based SQL Client)
Tags: php, database, mysql
Published: 2021-04-08 23:00:43

So I want to share a little experience.

For those of you who have just learned programming and the language that PHP has learned, you must be familiar with XAMPP.

Now, when installing XAMPP, you must have included it for database management using phpMyAdmin.

In appearance it is good. But when our source code is uploaded to the server, it will be very inconvenient if we have to install XAMPP or phpMyAdmin.

So I found a web-based SQL Client that I use until now. His name is Adminer (website: https://adminer.org).

The way to run the admin is very simple:

There is a PHP web server on your laptop (you can use XAMPP, or NGINX)

Download the adminer.php file on the official website.
Put the file in the htdocs folder.

Open it via a browser at the address http: //localhost/adminer.php
Done

Apart from being practical because it only takes 1 php file, Adminer also supports many DB types such as PostgreSQL, Oracle, SQLServer, etc. Please check the official website.

Oh yes, in appearance this Admin is not really bad. In fact, I like its simplicity. Just download the theme we like, and ...

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/w4kcr7yst01wv6jfjrtr.jpg)

Indonesian version you can go to my [Vosy.Net](https://vosy.net) article here -> [alternatif phpMyAdmin](https://vosy.net/p/2)
Why do we need the Abstract Factory pattern?
Tags: solid, designpatterns, cleanarchitecture
Published: 2021-04-08 22:50:39

I had a really hard time understanding what are real benefits of using AbstractFactory pattern. Now, when I've finally got it, let me explain it in 6 steps :)

#### Step 1

Let's imagine a quite common situation in which we've been working on a custom code and we've just realised that we need to reuse some logic from utility class created by the friend of ours, working on the same team.

It can look like this:
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7h5hwend7mq44u8gqoae.png)


#### Step 2

We have a working code but there is at least one problem with it - it violates **Dependency Inversion** principle. Let's try to fix it then:

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3in28wpj87zq27ul3ygs.png)

#### Step 3

Ok, much better. But the next question arises: how to create **Utility** class before using it...? Of course, we have a **Factory** pattern for this:

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2ssoghja2lvymo2wqwb9.png)

Our custom code is using **Factory** class that creates instance of **Utility** class and returns it as an interface for us to use.

#### Step 4

One thing immediately to notice is that we again violate **Dependency Inversion** principle. For some people it can be enough reason for putting AbstractFactory in between custom code and **Factory** class. 
But we don't have to stick to the rule, just for the sake of doing so :)
Let's ignore **Dependency Inversion** principle for a moment and see what will happen.

Well, on many occasions nothing will happen.....difference can be seen for more complex scenarios though.

Let's imagine that we have more than one **Utility** class that implements the same interface. It can look like this:

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/grj2f216zjasp4by2xwz.png)

#### Step 5

What is the problem with our design? To notice it, let's look at source code dependencies:

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7gvtq4kia3bxyjepzuxy.png)

Custom code is placed in File 1. To make it work we need to import File 2, File 3 and apparently all files that contain all possible implementations of **Utility* class - even if we use only one implementation.
It is clearly not an optimal solution.
 
#### Step 6

We would like to apply **Common Reuse** principle. In short - we don't want to depend on things that we don't need. 
If we use **Utility** class, version X - we wan't to depend only on its source code. Nothing more.

So, here is the final design with a use of  AbstractFactory:

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tj1h4o88ho7nicqxb6qd.png)

Assuming that each **Factory** class is a different module, we depend physically only on File 1, File 2, File 3, File 4, File 5. 
For complex and big systems this kind of flexibility can bring many benefits.
WhatsApp Akan Mengizinkan Pengguna iPhone Melindungi Cadangan iCloud dengan Kata Sandi
Tags: berita, whatsapp, ios
Published: 2021-04-08 22:44:24


Pada tahap ini, WhatsApp memberi pengguna opsi untuk mencadangkan riwayat obrolan mereka ke iCloud, tetapi setelah data diunggah ke server cloud Apple, tidak ada enkripsi yang digunakan.

Dengan kata lain, jika diminta oleh penegak hukum, Apple tidak memiliki pilihan lain selain memberi mereka akses ke cadangan pengguna, yang dapat mencakup apa saja mulai dari pesan hingga foto dan video.

Dilansir dari [WABetaInfo](https://twitter.com/WABetaInfo/status/1368837911471403009), perusahaan milik Facebook itu saat ini sedang menangani semuanya dengan mengizinkan pengguna iPhone untuk mengatur kata sandi sebelum mereka mencadangkan data di iCloud.

# Tidak ada cara untuk mengatur ulang kata sandi

Dengan kata lain, WhatsApp akan segera memberi pengguna metode enkripsi baru yang tidak memungkinkan penegak hukum untuk mengakses data meskipun Apple menyerahkannya.

Kata sandi harus memiliki setidaknya delapan karakter seperti kebanyakan kata sandi saat ini, pengguna diminta untuk mengonfirmasi nomor telepon mereka. WhatsApp mengatakan tidak ada cara yang dapat memulihkan kata sandi yang terlupa, jadi setelah Anda mengaturnya, segera simpan kata sandi tersebut di tempat yang aman karena waktu tidak berjalan mundur.

*“Untuk mencegah akses tidak sah ke cadangan iCloud Drive Anda, Anda dapat mengatur kata sandi yang akan digunakan untuk mengenkripsi cadangan di masa mendatang. Kata sandi ini akan dibutuhkan saat Anda memulihkan dari cadangan. Masukkan nomor telepon Anda di bawah ini untuk mengonfirmasi bahwa Anda ingin melindungi cadangan Anda, ”* demikian pemberitahuan yang muncul di WhatsApp.

Untuk saat ini, belum diketahui kapan WhatsApp meluncurkan fitur baru tersebut, tetapi sepertinya fitur ini akan segera di rilis ke pengguna karena WhatsApp sendiri sedang dalam pengujian fitur tersebut.

*Originally published at [MauCariApa.com](https://maucariapa.com/whatsapp-akan-mengizinkan-pengguna-iphone-melindungi-cadangan-icloud-dengan-kata-sandi/) on April 08, 2021.*
Day 341 : Circles
Tags: hiphop, code, coding, lifelongdev
Published: 2021-04-08 21:54:06

_liner notes_:
- Professional : Had a few meetings today, filled out a few forms. One of the meetings involved going to a pretty large codebase that I'll be taking over. It was like 2 hours. haha I had to take a break for the rest of the day and do some networking on Twitter.

- Personal : Last night I did some coding on my side project then fell down a rabbit hole of tabs and how to make them accessible. haha Thinking to clean up some UI elements and make some space, I'll put things in tabs. I always like to look up things in documentation sites like MDN to see the best practices and that's when I started my rabbit hole journey. Then I had to think about how to integrate in Svelte. Got tired then went to bed.

![View of the Golden Gate bridge from the shore in San Francisco, California](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gqmm6dghys79wp8a5vug.jpg)

Going to put some more work into my side project. Really want to get this thing out there soon. Hopefully in a couple of months. It's starting to feel like I'm going in circles. I always say I'm going to watch an anime and never do because I'm coding. haha. That's it. Back to the code.

Have a great night!

peace piece
Dwane / conshus
https://dwane.io / https://HIPHOPandCODE.com
{% youtube vM09uPsvWIM %}
PHP 8 & PHP 7
Tags: php
Published: 2021-04-08 21:42:39

#Constructor property promotion#

 **PHP 7**

     class Point {

    public float $x;
    public float $y;
    public float $z;

    public function __construct(float $x = 0.0, float $y = 0.0, float $z = 0.0) {
        $this->x = $x;
        $this->y = $y;
        $this->z = $z;
    }

   }

**PHP 8**

    class Point {

      public function __construct(public float $x = 0.0,public float $y = 0.0,public float $z = 0.0,) {
        
      }

     }
Branding Yourself is Easy
Tags: career, codenewbie, programming, productivity
Published: 2021-04-08 21:22:39

Branding yourself is important if you have to survive in the industry for long. Good news is, it's easy for people like us whose professional playground is the internet👌

> A **Github account** with little or more nerdy user name with few repos. Don't get demotivated by looking at others repo. If others have lots of repo or unique research that means they've been doing this constantly for long

> Join **Communities** like Dev, hashnode, medium, fcc, Twitter or just gBlog and keep posting your (*research) and interesting findings 

> Plain **Profile picture** suits social media but for tech forums, it should reflect who you are

> **Open source Contribution** is great but ignore it if you are offered code comments kind if task only 

> There are **"coding models"** on Instagram and most of them are either coding amateur or just got stated but their contents creation style motivates other developers. You should try this too

> You don't need to own a domain with your full name for **Portfolio**. You can use heroku or any other forum which serves subdomain based blog. Great one is "github pages" Which will force you to learn how to push code successfully

> **Pitch yourself**. This skill requires both connections as well as courage. There's a saying "if product you built is not great then make sure the marketing is great". This skill is the backbone of this saying 

> You won't survive on **Stack overflow** so better use this platform for learning until you are confident

> Having **SEO** skill is nice but not important people talk about you and your work 

> Follow **Technical blogs**. for example mit, deepai, FbAi, google etc. This will keep your knowledge of the domain on track

Follow my [Twitter](https://twitter.com/slimDestro/status/1380237743721082881) account for regular updates

-Thanks
HadCRUT5 visualization
Published: 2021-04-08 21:19:51

HadCRUT5 is a gridded dataset of global historical surface temperature anomalies relative to a 1961-1990 reference period. The dataset is a collaborative product of the Met Office Hadley Centre and the Climatic Research Unit at the University of East Anglia.

This project is made of a couple Python scripts: `hadcrut5-plot.py` and `hadcrut5-bars.py`. They parse the HadCRUT5 data files and produce a few different plots:
 * line plot
 * line plot using the N-year means data (smoother version)
 * bar plot

Each plot can be generated on different periods:
 * 1961-1990 (the default one)
 * 1850-1900
 * 1880-1920

The scripts require the Python libraries: `Matplotlib`, `netCDF4`, `NumPy`, and `Requests`.

Project code available at: [GitHub](https://github.com/madrisan/HadCRUT5)
Easy functions and transactions using Postgres + PostgREST or Supabase
Tags: postgres, supabase
Published: 2021-04-08 20:49:00

These days, I'm taking advantage of PostgreSQL's ability to handle logic, saving me all the work of an entire middleware layer.  (Instead, using generalized middlewares like Graphile, Supabase, or Postgrest.)

A little gotcha in the Postgres learning curve has been working out the difference between *stored procedures* and *functions*, and realizing that the simpler table `trigger`s and `constraint`s (using `with check`) actually does a lot of what I need.

One place I got stuck is sql transactions, or grouping several sql statements into a group so that if one fails, they all "roll back" as if they didn't happen. PostgreSQL has some specific rules about using transactions in or out of functions and stored procedures -- but I found a simple way out.

It turns out that PostgREST, the middleware Supabase is based on, surrounds rpc() calls in a transaction already.  So I could just define a function in sql with:

```
CREATE OR REPLACE FUNCTION public.topup(user text, amount integer)
    RETURNS integer
    LANGUAGE 'plpgsql'

AS $$
begin
  update users set balance = balance + amount;
  insert into "transactions" (user, amount, note) values (user, amount, 'top up');
  return 1;
end
$$;
```
In Supabase and PostgREST, this automatically exposes `topup` in the API. When called over the API, it's automatically wrapped in a transaction.  (I tested this by placing a contraint on user.balance to not let it go above 100, and when the user's balance was higher than the amount in the rpc call, neither user.balance was updated, nor was a new record added to transactions.)

Now, I can write a lot of logic into the PostgreSQL database itself.  This simplifies my middleware a lot, and often enables me to make apps that call Supabase/PostgREST/Graphile calls directly from my front-end components.  An entire layer of devops and code removed.
Handy Tools I Use
Published: 2023-07-19 08:11:15

---
title: Handy Tools I Use
published: true
date: 2021-04-08 21:18:53 UTC
tags: 
canonical_url: https://davidgs.com/posts/category/programming/handy-tools-i-use/
---

This started as a simple post to an internal Slack group. Then I got asked to post it to another channel in that Slack. Then I decided to post it to the DevRel Collective Slack. At which point I was asked to make it a blog post so it didn’t get lost in the scroll-back (DevRel Collective uses a free Slack account, so we can only scroll back 10,000 messages. With 2,000+ members, that happens faster than you think.
Web Components 101
Published: 2021-04-08 21:09:40

# What are Web Components?
Web Components are technologies that can help you create reusable custom elements to be used in your web apps. These technologies can be encapsulated away from the rest of your code, and help you make versatile custom elements.

## Three Main Technologies
**Custom Elements:** These JavaScript APIs help to define custom elements and their behavior to be used in the user interface. This is particularly helpful when working on a team, so that everything stays the same across the board.
**Shadow DOM:** These JavaScript APIs are used for attaching an encapsulated "shadow" DOM tree to an element. This keeps an element's features private, so they can be scripted without colliding with other aspects of the document. Its also a way to make sure all the CSS rules can be kept the same.
**HTML Templates:** Both the <template> and <slot> elements allow the coder to write markup templates that will not be displayed in the rendered page. They can be reused many times.

### Youtube Video
Check out my youtube video for a more in-depth explanation of Web Components and see them in action.
https://youtu.be/XvOLmOWff04