teleren/devto huggingface dataset:
3 Lesser-Known Facts about Amazon S3
Tags: cloud, aws, security
Published: 2023-03-07 17:26:50

Amazon S3 is known for its reliability, scalability, and low-cost storage options. However, despite its popularity, there are still some lesser-known facts about Amazon S3 that are worth exploring. 

In this article, we will discuss three of these facts.

**1. Amazon S3 has built-in lifecycle management**

Amazon S3 has a built-in [lifecycle management](https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lifecycle-mgmt.html) feature that can automatically move objects to different storage classes or delete them based on predefined rules. 

This can be used to reduce storage costs by moving infrequently accessed data to lower-cost storage classes such as Amazon Glacier. It can also be used to comply with data retention policies by automatically deleting data that is no longer required. 

The lifecycle management feature can be configured using rules based on object name, age, size, and other factors.

**2. Amazon S3 allows cross-region replication for disaster recovery**

Amazon S3 allows users to replicate data across regions for disaster recovery purposes. 

[Cross-region replication](https://docs.aws.amazon.com/AmazonS3/latest/userguide/replication.html#crr-scenario) is a feature that replicates data across multiple regions, providing an additional layer of protection against data loss due to a regional outage. Cross-region replication can be configured to replicate all objects in a bucket or only selected objects based on predefined rules. 

The replication process is automatic and ensures that data is replicated securely and efficiently.

**3. Amazon S3 has a powerful analytics service built-in**

Many people are unaware that Amazon S3 has a powerful analytics service built-in. 

This service is called [S3 Inventory](https://docs.aws.amazon.com/AmazonS3/latest/userguide/storage-inventory.html), and it provides detailed reports about the objects stored in an S3 bucket. S3 Inventory can generate reports on object size, creation date, last modified date, and access frequency. It can also identify objects that have not been accessed for a specified period and provide cost estimates for storing the objects. 

S3 Inventory can be used to optimize S3 storage costs, monitor compliance, and perform forensic analysis.

By leveraging these features, organizations can optimize their storage costs, improve compliance, and enhance the security of their data.
Tabnine, programa con IA
Tags: ia, programacion, javascript, python
Published: 2023-03-07 17:25:39

Tabnine es un completador de código de programación que utiliza inteligencia artificial para proporcionar sugerencias de código mientras escribes. Es una herramienta muy útil que puede ahorrar mucho tiempo y evitar errores de sintaxis.

Lo que más me gusta de Tabnine es su capacidad para aprender de tu código y proporcionar sugerencias personalizadas. También es muy rápido y eficiente, y funciona con una amplia variedad de lenguajes de programación.

Otra característica interesante de Tabnine es que funciona tanto en línea como fuera de línea, lo que significa que puedes utilizarlo en cualquier momento y en cualquier lugar. Además, se integra con muchos editores de código populares, incluyendo Visual Studio Code, Sublime Text, Atom y más.

En general, creo que Tabnine es una herramienta imprescindible para cualquier programador que quiera aumentar su productividad y mejorar la calidad de su código. Es fácil de usar, potente y muy útil. Lo recomendaría altamente a cualquier persona que trabaje en desarrollo de software.

Funciona para casi cualquier lenguaje de programación, desde Python a Javascript pasando por Ruby o PHP.
[
En esta tabla encontrarás una lista de IDE's y editores que integran Tabnine](https://yourgeekweb.com/es/2023/03/07/top-ide-y-editores-de-codigo-para-linux-fedora-ubuntu-debian/).
ChatGPT shares its interview experience with Google for the post of SDE Intern.
Tags: chatgpt, ai
Published: 2023-03-07 17:24:00

I asked ChatGPT to share its interview experience in detail with Google for the post of SDE Intern.

Here’s what it wrote…


![ChatGPT shares its interview experience with Google for the post of SDE Intern.](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ztzwo0y67z2rehv2ryzq.png)

As an AI language model, I haven’t experienced an interview process with Google or any other company.

However, I can provide some information about what a typical interview experience with Google for the SDE Intern position might entail based on information available online.

The SDE Intern interview process at Google typically consists of several rounds of interviews, which can include phone screens, technical interviews, and onsite interviews.

The interviews are usually conducted by a combination of engineers and hiring managers, and are designed to assess the candidate’s technical skills and problem-solving abilities, and fit with Google’s culture.

The first round of interviews may involve a phone screen with a recruiter or a hiring manager, where the candidate will be asked basic questions about their experience, technical skills, and interest in the company.

The next round of interviews will typically involve one or more technical interviews, which can be conducted over the phone or via video conferencing.

These interviews will focus on the candidate’s technical skills and may include coding exercises, algorithm design questions, and other technical challenges.

If the candidate successfully passes the technical interviews, they may be invited to an onsite interview, where they will meet with several members of the engineering team and participate in more technical interviews and possibly a culture-fit interview.
This may include a coding challenge or whiteboard exercise, and the candidate may be asked to explain their thought process and approach to problem-solving.

Throughout the interview process, Google is known to value strong communication skills, collaboration, and creativity, in addition to technical proficiency. The company seeks candidates who are passionate about technology and innovation, and who demonstrate a willingness to learn and grow within the company.

Overall, the interview process for an SDE Intern position at Google is designed to be rigorous, challenging, and thorough, but also fair and inclusive.

Candidates who are well-prepared, confident, and able to demonstrate their technical skills and cultural fit are more likely to succeed in the interview process and secure a position at this prestigious company.

**- ChatGPT**

> CONCLUSION: ChatGPT can help you crack interviews.

**Follow at Linkedin:** [Ansh Singh Sonkhia](https://www.linkedin.com/in/anshsinghsonkhia) for more life-changing content.

**Follow at Twitter:** [AnshSSonkhia](https://twitter.com/AnshSSonkhia)
Pythons on a Battleship (a terminal game)
Tags: python, beginners, gamedev, git
Published: 2023-03-07 17:13:47

For the past couple of months, I’ve been learning how to code through Codecademy’s Computer Science 101 course path. For my final project in the “Intro to Programming” section, I was instructed to research, plan, build, use a git repository, commit changes, and write a blog about a fully functional python terminal game. For the first program in my coding career, I chose to make a game of battleship.
_

This game takes in the names of two players and decides who goes first through a game of heads or tails. The winner selects from a list of their available ships and places each one using the front and back coordinates. The program loops until the coordinates are given in the correct format, have a distance equal to the length of the selected ship, and are not already occupied by another. The player’s grid is updated and printed with the newly placed ship, prompts another selection, and repeats. After, the player is asked to confirm or relocate the original placements. If the player chooses to relocate a ship, the grid is updated accordingly, and the confirmation process repeats until all ships have been confirmed. The opposing player then follows the same procedures for setting up their fleet. 

On each turn, a player is asked to select an enemy coordinate to fire upon, confirm that coordinate, and fire on command. A new grid is printed for the player with no ships displayed but informs the player of the results, marking an “X” for a hit or an “O” for a miss, along with a description of the move. Once all a player’s ships have been destroyed, the game is over, and the survivor is crowned the winner.

[Pythons on a Battleship](https://github.com/mmcdon96/Battleship-Terminal-Game)
_

This project challenged me to deep dive into ‘while’ loops and eventually led me to place print statements after every function so I could understand what was happening and debug at one point. I also learned the use of input functions and cleaned up print statements by using f-strings. 

I plan to continue with the CS 101 path, which includes data structures and algorithms next, and after, move to C++ and game dev. If you have the time, please feel free to review the game and provide any feedback or advice on improving the program, cleaning up the code, or anything else related. Thank you.
JBuilder Arrays and non-collections
Tags: ruby, rails, jbuilder
Published: 2023-03-07 17:03:22

JBuilder may not be the most efficient way to present an API but for simple cases it works pretty well. Our JSON-API standardized API could return the current authenticated user like so.

#### *`show.json.jbuilder`*
```ruby
json.data do
  json.id current_user.id
  json.type 'users'
  json.attributes do
    json.(current_user, :uuid, :email, :full_name)
  end
end
```
#### *`GET /api/v1/me`*
```json
{
  "data": {
    "id": "1a2b3c4d000001",
    "type": "users",
    "attributes": {
      "uuid": "aaaaaaaabbbbbbbbccccccccc",
      "email": "rob.lacey@buttonmoon.co.uk",
      "full_name": "Mr Rob Lacey"
    }
  }
}
```

Ideally I want to now add an included block so that can included related objects such as Tenant. Something like

```json
{
  "data": {
    "id": "1a2b3c4d000001",
    "type": "users",
    "attributes": {
      "uuid": "aaaaaaaabbbbbbbbccccccccc",
      "email": "rob.lacey@buttonmoon.co.uk",
      "full_name": "Mr Rob Lacey"
    },
    "included": [
      {
        "id": "1",
        "type": "tenants",
        "attributes": {
          "name": "superadmin"
        }
      }
    ]
  }
}
```

All of the JBuilder examples talk in terms of Arrays of objects being built from a collection. Most of the time they probably are.

```ruby
json.array! @comments do |comment|
  next if comment.marked_as_spam_by?(current_user)

  json.body comment.body
  json.author do
    json.first_name comment.author.first_name
    json.last_name comment.author.last_name
  end
end

# Or
json.array! @people, :id, :name
```
 
But not always. If we want to add an array that is made up or arbitrary builder blocks, you find yourself thinking in terms of doing.

```ruby
json.included do
  json.merge! do
    json.id current_user.tenant_id
    json.type 'tenants'
    json.attributes do
      json.(current_user.tenant, :name)
    end
  end
end
json.included [
  json.data do
    json.id current_user.tenant_id
    json.type 'tenants'
    json.attributes do
      json.(current_user.tenant, :name)
    end
  end
end
]
```

Neither of which work, turns out the way to do it is using the undocumented child! method.

```ruby
json.data do
  json.id current_user.id
  json.type 'users'
  json.attributes do
    json.(current_user, :uuid, :email, :full_name)
  end

  json.included do
    json.child! do
      json.id current_user.tenant_id
      json.type 'tenants'
      json.attributes do
        json.(current_user.tenant, :name)
      end
    end
  end
end
```

Think I’ll do a pull request for the README as this took me a while to work out. [https://github.com/rails/jbuilder/pull/507](https://github.com/rails/jbuilder/pull/507)
Read and Write Python Json
Tags: python, programming, tutorial, beginners
Published: 2023-03-07 16:43:24

JSON(stands for JavaScript Object Notation) is a lightweight text based format for representing data in structured format. JSON is often used for exchanging data between a web server and a client in web applications. It can be used with any programming language that can parse and generate JSON data.

In this article we will learn how to read and write json file using python. Python have the inbuild package to handle json.

Python dictionary and JSON are similar in terms of their syntax, but both are different. [Python dictionary is a built-in data structure](https://www.programdoc.com/python/dictionaries) that stores a collection of key-value pairs in a mutable way, only exist in memory. Where as JSON is a lightweight data interchange format, can store in physical storage for later use.

## Let see how to write a json to a file using python
Using the write w operation in with and json dump we have converted the dictionary data to json file.
```py
import json
 
data = {
    "name": "George",
    "age": 35,
    "phone": "409-356-4961"
}

with open("jsonfile.json", "w") as file:
    json.dump(data, file)
```
![write json file using python](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2xt0tdtug1iim64n4z8t.jpg)

## How to read a json file using python
We are going to use the read r operation in with an use json loads to convert the json data to back to dictionary.
```py
import json
 
with open("jsonfile.json", "r") as file:
    data = json.load(file)
    
print("data:", data)

# Output:
data: {'name': 'George', 'age': 35, 'phone': '409-356-4961'}
```


### Explore Other Related Articles
[Python List Comprehension](https://dev.to/max24816/python-list-comprehension-24hk)
[How to combine two dictionaries in python using different methods](https://dev.to/max24816/how-to-combine-two-dictionaries-in-python-using-different-methods-3hcc)
[How to check if a key exists in a dictionary python](https://dev.to/max24816/how-to-check-if-a-key-exists-in-a-dictionary-python-132i)
[Python try exception tutorial](https://dev.to/max24816/python-try-exception-tutorial-2nlp)
[Python classes and objects tutorial](https://dev.to/max24816/python-class-and-objects-21k6)
[Python Recursion Function Tutorial](https://dev.to/max24816/python-recursion-function-tutorial-3jmo)
Ask me Anything About Certificate Pinning
Tags: ama, pinning, security, android
Published: 2023-03-07 16:39:00

---
title: "Ask me Anything About Certificate Pinning"
published: true
description: "I am Paulo Renato, a Developer Advocate for Mobile and API Security and author of a series of articles on Mobile and API security."
tags: "ama, pinning, security, android"
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fzs5dm6dmgxc271rl0zb.png
# Use a ratio of 100:42 for best results.
published_at: 2023-03-07 16:39 +0000
---

I am Paulo Renato, a Developer Advocate for Mobile and API Security and I am making me available to reply to any questions you may have about certificate pinning on mobile apps.

I am the maintainer for the [Mobile Certificate Pinning Generator](https://approov.io/tools/static-pinning) web page, that allows you generate your certificate pinning configurations for Android and iOS. 

You can also find me [answering security questions](https://stackoverflow.com/search?q=user:6454622+security) on StackOverflow.

FInally, I am also the author of a series of articles on Mobile and API security, where some of the articles are about implementing certificate pinning, bypassing pinning and secure against bypassing it. You can see the series of articles on this Twitter Thread:

<blockquote class="twitter-tweet"><p lang="en" dir="ltr">🧵 A thread on <a href="https://twitter.com/hashtag/Mobile?src=hash&amp;ref_src=twsrc%5Etfw">#Mobile</a> <a href="https://twitter.com/hashtag/ApiSecurity?src=hash&amp;ref_src=twsrc%5Etfw">#ApiSecurity</a><br><br>🗓️ Today a <a href="https://twitter.com/hashtag/developer?src=hash&amp;ref_src=twsrc%5Etfw">#developer</a> on Likedin asked me for help on how to minimize the risk of <a href="https://twitter.com/hashtag/ReverseEngineering?src=hash&amp;ref_src=twsrc%5Etfw">#ReverseEngineering</a> an <a href="https://twitter.com/hashtag/ApiKey?src=hash&amp;ref_src=twsrc%5Etfw">#ApiKey</a> on a <a href="https://twitter.com/hashtag/MobileApp?src=hash&amp;ref_src=twsrc%5Etfw">#MobileApp</a><br><br>✍️ Turns out that I wrote a series of blog posts to educate <a href="https://twitter.com/hashtag/developers?src=hash&amp;ref_src=twsrc%5Etfw">#developers</a> on this concern<br><br>Read all in sequence ⬇️ <a href="https://t.co/H9ssL3ooed">pic.twitter.com/H9ssL3ooed</a></p>&mdash; Paulo Renato (@Exadra37) <a href="https://twitter.com/Exadra37/status/1546987198234431490?ref_src=twsrc%5Etfw">July 12, 2022</a></blockquote>
JavaScript functions
Tags: javascript, beginners, programming
Published: 2023-03-07 16:24:00

## **What are functions?**

Functions are like recipes. 
They execute a set of instructions on data or variables and return the result.

1. Functions can be recycled
2. Helps keep your code **DRY** 
_("Don't repeat yourself")_

If you are like me and need an example to visualize what functions do here is one.

<u>**Example:**</u>
_Let's just say we have an espresso machine that can be programmed to make customized drinks._

_It allows you to enter a command that will instruct the machine to brew espresso, add hot cocoa mix, and froth milk. Can you imagine how tedious it can be to type all steps every morning? What if we have more than one type of drink, when some drinks require more steps._

_Instead of typing each step everyday, what if we could create functions with all the steps in the code block?_

_For the sake of this example, I used keywords that relate to the explanation above._






![Function example](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/t3jz6og9ul7iekgehmge.png)

 

 

## How to create a function:

1. Use the **function** keyword

2. Name the function 

- In this case we named it **makeMochaLatte**

3. We add a set of parenthesis and curly brackets

- makeMochaLatte(){}

4. The first curly bracket is the beginning point and the second bracket is the end point of the function

5. Everything inside of the curly brackets is called the block of code

6. Lastly, we call the function **makeMochaLatte();**



_Now that we learned the simplest form of a function. What if instead of just saying `makeMochaLatte();` we do something like this._


![parameters and arguments](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4jlpwupi6ggzggtcjjd7.png)

In the example above we see the word "cups" in `makeMochaLatte(cups){}`, we call this a **parameter**, the word cups is used like a variable that is bound to the input.
Now when we call the function `makeMochaLatte(3);` we are giving it an input of 3, this is called an **argument**.

By giving it an input of 3 we are essentially specifying that now we have a variable named cups that is equal to 3.

This is not the only way to write functions, but that is another topic we can dive in the next blog.
I will go over various ways you can write functions, such as arrow functions, expression functions, and functions with multiple parameters, and arguments.





##Sources:

1. _"Methods and Functions"_, CodeCademy  https://www.codecademy.com/article/fwd-js-methods-functions

2. Yu, Dr. A. _"Functions Part 1"_
https://www.udemy.com/course/the-complete-web-development-bootcamp/learn/lecture/12371950#questions

3. Yu, Dr. A. _"Functions Part 2"_
https://www.udemy.com/course/the-complete-web-development-bootcamp/learn/lecture/12373850?start=0#overview
Wednesday Links - Edition 2023-03-01
Tags: java, jvm, spring, kotlin
Published: 2023-03-01 10:29:46

Finding Java Thread Leaks With JDK Flight Recorder and a Bit Of SQL (4 min)✈️
https://www.morling.dev/blog/finding-java-thread-leaks-with-jdk-flight-recorder-and-bit-of-sql/

Caches in Microservice architecture (10 min)🪶
https://blog.softwaremill.com/caches-in-microservice-architecture-cfd4c8766db9

Jarviz Delivers Inspection and Insights to JAR Files (7 min)🔎
https://www.infoq.com/news/2023/02/introducing-jarviz/

Web applications and Project Loom (5 min)🧵
https://spring.io/blog/2023/02/27/web-applications-and-project-loom

From Spring Native to Spring Boot 3 (2 min)📈
https://spring.io/blog/2023/02/23/from-spring-native-to-spring-boot-3

Quake III Arena and the fast inverse square root algorithm (4 min)📐
https://groovy.apache.org/blog/quake3-inverse-square-root

Advanced Search and Filtering with JPA Specifications in Kotlin (3 min)🕵️
https://brightinventions.pl/blog/advanced-search-and-filtering-with-jpa-specifications-in-kotlin

Kotlin and JPA — a good match or a recipe for failure? (14 min)🌻
https://medium.com/@pientaa/kotlin-and-jpa-a-good-match-or-a-recipe-for-failure-e52718d93b4f

Big Data is dead (15 min)💀
https://motherduck.com/blog/big-data-is-dead/
c++ da cin buyrug'i haqida qisqacha malumot
Published: 2023-03-07 16:11:27


Biz sizlar bilan bugun **c++**  da _cin_ buyrug'ini ko'rib chiqamiz dastlab **//int** bu qisqartma shakli bu esa **integer**  qisqarmagan shakli  biz bundan butun sonlarni saqlashda foydalanamiz.Endi esa biz o'rganadigan **//string** biz bunda tekstlarni saqlashimiz mumkin.Bunga misol tariqasida bularni ko'rishimiz mumkin.

```cpp
#include <iostream>
using namespace std;

int main(){

int n;
cin >> n;
cout<<n<<n<<n<<n<<n<<n<<endl;
cout<<n<<"    "<<n<<endl;
cout<<n<<"    "<<n<<endl;
cout<<n<<n<<n<<n<<n<<n<<endl;
return 0;
}
```
Six Years on DEV, Already?
Tags: badges, milestone
Published: 2023-03-07 16:06:42

I just got my six year badge. While I've been a member of DEV for six years, I lurked for the first few years and didn't really become active till the pandemic hit and I needed more community. 

Blogging here helps me cement what I am learning. One of the best way to learn is to explain it to someone else.

![Badge the reads"Six year club" The image is a head with an arm over is to resemble a six.](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jjydnknx93gd3n4hjhwp.jpg)

It's been a great six years and I hope DEV continues to grow. I trying to help by being a DEV Trusted Member, where I can help point out great content.

It been great to express ideas here and share things I build. There are a lot of great developers and content here.

```
-$JarvisScript git push 
```
What is the most minimalistic app you'd ever created?
Published: 2023-03-07 16:04:28

---
title: What is the most minimalistic app you'd ever created?
published: true
description: 
tags: 
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6s0gcmor66c73abausld.jpeg
# Use a ratio of 100:42 for best results.
# published_at: 2023-03-06 14:33 +0000
---

I've been a big proponent of minimalism. 
Especially when it comes down to engineering.
Especially for the software engineering.

Albert Einstein -- Everything should be made as simple as possible, but not simpler. 

According to the second law of thermodynamics, in the physical world the entropy keeps increasing.
So does the complexity of our software, and we, the software engineers, are to be blamed.

I wrote about minimalistic architecture: https://dev.to/dmitryame/minimalistic-architecture-for-minimalistic-product-ffd

I even tried to invent most minimalistic social sharing platform: https://www.echowaves.com/

The most minimalistic app I've ever came up with https://www.echowaves.com/chimingclock -- it's only about 100 lines of code, 1 screen, no customizations, but I still think of it as very useful app. Of course, there is a lot of complexity that went behind the scenes building it. It took me almost a week to find the right combination of those 100 lines to make it work -- simple is not easy.

If you are as passionate about eliminating complexity in our lives (read in software we build every day), and if you've ever created something that just bare bones simple, share in comments about your experiences.


![This machine will set us free](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6s0gcmor66c73abausld.jpeg)