teleren/devto huggingface dataset:
Regular Expression (Regex) with Python
Tags: python, regex, beginners, tutorial
Published: 2022-04-14 01:45:42

## The Playground

the `re` package is a built-in package in python to work with Regular Expression. You can use the package within any python environment like (Anaconda) Jupyter Notebook, Google Colab, even from your favorite editor like VS Code. I will use the example text from the [https://regexr.com/](https://regexr.com/). You can also test and play with expression there before applying it to `re` functions. So here is the starter in our python/ipynb file:

```py
text = "\
RegExr was created by gskinner.com, and is proudly hosted by Media Temple. \
Edit the Expression & Text to see matches. Roll over matches or the expression for details. PCRE & JavaScript flavors of RegEx are supported. Validate your expression with Tests mode. \
The side bar includes a Cheatsheet, full Reference, and Help. You can also Save & Share with the Community, and view patterns you create or favorite in My Patterns. \
Explore results with the Tools below. Replace & List output custom results. Details lists capture groups. Explain describes your expression in plain English. \
"
```

## `search` function

The `search` function is used to find out whether the expression match any of the string and return `Match object` when it's matched.

Here is the example of how to search if there is any word that ends with `.com`:

```py
from re import search

match = search('([a-zA-Z]*.com)', text)

if match:
  print("matched")
else:
  print("not matched")

print("span:", match.span())
print("group:", match.group())
print("slice text with match span:", text[match.span()[0]:match.span()[1]])
```

## `findall` function

The `findall` function used to get a list of the matched. Here is an example of finding all word that has `y` character in it:

```py
from re import findall

matched_list = findall('([a-zA-Z]*y[a-zA-Z]*)', text)

print("list of word:", matched_list)
print("words count:", len(matched_list))
```

## `split` function

The `split` function used to get a list of string that splitted by the given expression or pattern. Here is the example of getting all words that splitted by whitespace character:

```py
from re import split

splitted_words = split('\s', text)

print("list of word:", splitted_words)
print("words count:", len(splitted_words))
```

## `sub` function

The `sub` function used to replace certain string based on the expression from the original text. Here is the example of changing the original text by replacing `&` with `and`:

```py
from re import sub

new_text = sub('&', 'and', text)

print(new_text)
```
Any Golang?
Tags: go, programming
Published: 2022-04-14 01:32:07

Golang and Rust are often compared to each other as they were relatively released in the _same time_ (Nov 2009 & July 2010 respectively), Rust uses the idea of ownership to manage memory, while Golang utilizes a smart garbage compiler. Both are very fast as they use native compilers, and are mainly used for systems programming, so am I gonna use Golang? 

I've thought about this question quite a lot because before I knew what Rust was, I mainly used Golang, however I haven't touched it for years, and so seeing it again feels weird, and will take time to get used to it. 

I am really considering writing Mufi in Golang, but I also want to build projects that utilize Golang, C and Rust, not sure of the project, maybe another project manager, but my lack of Golang projects is also because of my lack of experience in the language. I understand the general, but I have yet to build any meaningful projects with it, and without projects to stem off from, I haven't gone too far with the language. 

I've also considered learning machine learning using Golang, and it's a huge possibility, but I will look more into machine learning once I get a firmer stance in linear algebra which I'm learning next year. Golang is an amazing language, and it's definitely something I want under my belt, so I definitely want to learn it by some type of project (most likely a compiler or machine learning). 

Please feel free to comment ideas of projects I can build with Go
Why you should write good commit messages?
Tags: codenewbie, development, github, git
Published: 2022-04-14 00:21:45

I read a lot of posts that describe how to write awesome commit messages?. This is an undeniable fact that every developer needs to do it for some or more reasons. It’s a habit, hard to adopt but once gained, it returns a fruitful response. On professional grounds, I have sensed my top 3 reasons for this:

## Codebase Versioning

Your commit resolves to a particular version of the codebase. It can include a bug fix or a new feature or an enhancement. All this means that a change has been introduced. To identify this, there must be a meaningful one-liner sentence without digging into details. Viewing and reading code snippets within a bunch of files is not cool at first! Think about the scenario when you are chasing a buggy commit to extract out.

## Back & Forth Tracking

When a team collaborates on a project, they have assigned their specific branches. One’s scope of work will decide how many features are required? Lines of code and actions they need to integrate? During work if a bad commit is introduced and being pushed to the stack by upcoming ones, it becomes hard to trace the buggy part if you don’t have a relevant trail commit message. Always Remember! Healthy and appropriate commit history for each iteration provide a backtrace, resolution in relevance to bug!

## Seamless PR reviews

PR helps to understand the state in which code has been built, changes integration and avoids code smells. PR Review is a challenging task. You have to analyze code and report smells when they exist. Having a low discouraged commit history results in poor state lookup for a module or piece of code. As PRs are a way of getting response

Hungry to learn about writing commit messages? Check this [link](https://www.freecodecamp.org/news/how-to-write-better-git-commit-messages/) from freeCodeCamp

Happy committing !!
Easiest way to fix navegation error usign Netlify
Published: 2022-04-14 00:12:45

---
title: Easiest way to fix navegation error usign Netlify 
published: yes
description: Have you ever published a SPA on Netlify and get a 404 when you tried to change the page?
tags: 
//cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/95rqai15ncg20gd1mpfn.png
---


![Netlify 404 error print screen](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/95rqai15ncg20gd1mpfn.png)
So I developed the English Online Games to learn some Vuejs and SPA development, I was proud of my work so published it in Netlify but as soon it ran I got an error.
After searching a lot, I find this much complicated and the easiest way to fix it is by creating a file name "_redirects" in your public folder, like this:
 
_redirects
```
/* /index.html 200
```




Here you can see the file in my repository:

https://github.com/JorgeMadson/englishonlinegames/blob/main/public/_redirects
Is Cracking the Coding Interview a good book to have?
Tags: hiring, community, questions, interview
Published: 2022-04-14 00:08:11

I found a copy of the 2020 6th edition at a used book store and I left it there. Would it be worthwhile to go back and get this book? Is the interview format presented in this book even used still (as a web dev, software engineer, software developer)? It seems to be a lot of algorithmic questions and answers. I just needed to know if this was worth the time reading it in particular, this is a thick book.
What does the team say?
Tags: culture
Published: 2022-11-11 19:39:44

---
title: What does the team say?
published: true
cover_image: https://jhall.io/images/bn-team-leader.jpg
date: 2022-04-14 00:00:00 UTC
tags: culture
canonical_url: https://jhall.io/archive/2022/04/14/what-does-the-team-say/
---

I encounter a lot of people asking for advice along the lines of “What should my team do in [X] situation?”

These are usually good questions. They usually come from team leads, engineering managers, scrum masters, or someone else in a position of either formal or informal leadership with respect to the team. The team is stuck, or facing some challenge, and the person asking has a genuine desire to help.

I usually offer my best advice, based on my experience and the situation. But there’s one piece of almost universal advice that applies to each one of these situations:

**Ask the team what they want to do.**

There are truly exceptional situations where the team simply doesn’t have any idea what to do, or their ideas (or attitudes) are destructive. These situations require extra care (because simply telling them what to do is often damaging in these situations). But in _most_ cases, the team has a lot more insight than the leader asking for advice. And even when they don’t, a mediocre decision made by the team is usually better than a perfect decision made by a single leader, as long as the team is able to learn from its mistakes.

* * *
_If you enjoyed this message, [subscribe](https://jhall.io/daily) to <u>The Daily Commit</u> to get future messages to your inbox._
How to Stop Preparing and Build
Tags: react, webdev, tutorial, typescript
Published: 2022-04-13 23:24:35

## Welcome Back!
**Where we left off** - [GitHub](https://github.com/samp-reston/my-website/tree/aee5220d27a6f18303e6b62ad5e83affa158ea5b)

**What we're doing today**:
- Building the base layer application

---

## Start at the back

As discussed in the last chapter, we deconstructed the design into a hierarchy of components. All components within the design are built on top of 1 component... the App component.

The App component will act as the background for the webpage and will provide context across the application.

The main feature of the webpage is the light to dark vertical gradient, so we'll start there.

We'll create a new directory called Styles with the new App.css file within. We'll now import that into the App component.

```js
import './styles/App.css'

function App() {
  return (
    <>
      Hello World!
    </>
  );
}
```

Using a neat website called [CSS Gradient](https://cssgradient.io/) we can generate the CSS easily to create the background:
```css
body {
  background: linear-gradient(0deg, rgba(0, 3, 10, 1) 0%, rgba(0, 25, 34, 1) 100%);
  height: 2779px;
}
```

Until we start adding the components I have hard coded the height in which the design specifies.

![Gradient Background](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dqnrnl2x2g2u4ima64lt.png)

## We need structure
Now we've completed the background we can start by adding the Body component into the mix.

For this we'll create a new Body component within the component directory.

The body will house the main components within the application and will be the centrepiece in which the user browses the site. However, for the mean time we'll be implementing the CSS for it for now.

Within the Body component we must first import the Body.css file, something which I forgot to do for 10 minutes. As per the Figma specification we must then create a centred black background with 80% opacity. To achieve this we implement the following:

```css
.frame {
  background: rgba(0, 0, 0, .8);
  height: 2779px;
  width: 720px;
}

.x-center {
  margin: auto;
}
```

```js
function Body() {
  return (
    <div className='frame x-center'>
      
    </div>
  )
}
```

This will product the following:
![Body Frame](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/39o392mnko7m9zlsh0hq.png)

## The Final Footer
Just before we finish up we'll add the framing for the footer. Following a similar process we end up with this:
```css
.footer {
  position: absolute;
  bottom: 0;
  left: 0;
  background: rgba(0, 71, 98, 0.2);
  height: 79px;
  width: 100%;
}
```
```js
import '../styles/Footer.css'

function Footer() {
  return (
    <>
      <div className='footer'></div>
    </>
  )
}
```

The final design should look something like this currently (this is zoomed out):
![Framework](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/i7zornsca3h8xyambstc.png)
 
## GitHub
To view where we're at you can follow this [link](https://github.com/samp-reston/my-website/tree/d1aac8da5e053d39d12e442b0a8342aa308827da) to the final commit at the end of each post to follow along!
Tech start-up ideas
Tags: discuss, career, startup, webdev
Published: 2022-04-13 23:18:56

Hello World!

Here is a list of start-up ideas you can take into consideration when making your start-up! All start-up ideas listed below are unique and creative. 

If you have an idea, please add them in the comments, I promise I'll read all comments posted in the comment section, and I'll add those ideas into this article(and I'll give credits :joy:)

1. Create an interactive tutorial (Author: Me)
2. Create a platform for developers to chat & socialize (Author: Me)
3. Create a SaaS that is self maintained(Maintained by your viewers) (Author: Me)

I hope this inspires you, and please add your ideas in the comments below!
Day 0:
Published: 2022-04-13 23:07:27

Grad Student Life - Tried completing A MERN todo- list app today, using some youtube references. Few more things on my plate to cover :

- To go through the lecture again 
- To complete one co-op assignment
- Start of with the MERN project.

Personal - Need to learn about javascript in depth,
- Have to develop problem solving skills
- Learn JS, node and more about mongo db.
- Build personal projects


Goals for today: 

1. Complete co op assignment
2. Solve atleast one question.

Update here before bed!! :
My first experience at a Frontend Mentor Challenge 👀
Tags: webdev, beginners, css, html
Published: 2022-04-13 22:53:24

_(This is not a paid for promotion, this is my personal experience before anyone asks!)_

As my first Frontend mentor challenge I thought i'd start small, a small component with just HTML and CSS. 

**This was my experience;**

To start, I chose a simple QR Code component. You're given a starter pack with a READme file with all the information on how to start your first project, it explains about using GitHub and how to set up a live link as well as where to go for help. There is also a style guide on fonts, colours and if they want some responsiveness to the design then some breakpoints too. 
You then have your index.html file, some images of the final component and away you go! 👏🏻
(If you pay for pro you can also access the figma file, this i do not have)

I found although the challenge itself was very simple, it took me around 3 hours to complete with some cheeky breaks 🤫. I did come across some challenges but I also took away a lot from the experience 🙂

**Challenges I faced:**

- I've definitely become accustom to the luxury that is VueJs and Tailwind CSS frameworks. It was like muscle memory to type in a tailwind class just to tweak some margin, in reality it was much back and forth between style sheets. I had to google more basic css than i'd like to admit! 🥴
- Importing the font was new to me, it's not something i've done before. Seems simple enough, in practice it didn't want to play ball at first.
- Being on one monitor, just my laptop it was quite difficult to look by eye if my sizing was completely right, too much or too little padding in places?
- At the end I worry I may have over complicated it a little, a div in a div, with a header and footer? 👀 

**Take aways;**

- Great experience again with basic HTML and CSS, made me realise how comfortable I had gotten and not in a good way.
- Made me excited to take on more challenges! 💪🏻

**Things to remember (note to self 📝)..**
- Although its good to see other peoples solutions I would recommend doing this after, it can be good for inspiration but you don't want to give the solution away, this is all about your own style. 
- There is no right way to completing the challenges!
- If you think your code is starting to smell then step back, make a cup of tea and come back, you may be overcomplicating things so its good to come back with fresh eyes, same if you get stuck.

Overall, I think Frontend Mentor was a great experience and good for those looking for either challenges or little side projects they want to do. I'm definitely looking forward to more 😊

If you wish to view my results you can do so here [My Solution](https://www.frontendmentor.io/solutions/first-challenge-complete-html-and-css-Bk4MFT4E9)

![Frontend Mentor Challenge](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6sx049nwh5gjo3xquhko.jpg)
Menyelesaikan soal "Plus Minus" di HackerRank
Tags: javascript, programming, beginners
Published: 2022-04-13 22:44:51

![Soal 1](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0ykmjetlcfq23hg6erqh.jpg)![Soal 2](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jspi0ak4if6fq49c2i9p.jpg)
Pada soal di atas kita diminta untuk menghitung jumlah bilangan positif, negatif, dan nol dalam sebuah array. Kali ini saya akan membagikan cara saya menyelesaikan soal tersebut menggunakan bahasa pemrograman javascript. Berikut kode pemrogramannya:
```javascript
function plusMinus(arr) {
    const counts = [
        arr.filter(el => el > 0).length,
        arr.filter(el => el < 0).length,
        arr.filter(el => el === 0).length
    ];
    
    for (const count of counts) {
        const ratio = (count / arr.length).toFixed(6);
        console.log(ratio);
    };
}
```
Pada kode di atas saya membuat variabel counts yang berisi jumlah elemen dari bilangan positif, negatif, dan nol yang terdapat pada array arr. Di bawahnya saya melakukan perulangan dari variabel counts. Di dalam perulangan saya menghitung rasio dari masing-masing bilangan (positif/negatif/nol) dari jumlah elemen pada array arr. Rasio tersebut kemudian saya bulatkan maksimal 6 angka di belakang koma menggunakan method toFixed(). Terakhir, saya tampilkan hasilnya pada konsol.
Object Storage
Tags: object, storage, amazon, minio
Published: 2022-04-13 22:27:29

Object storage defined
Object storage is a data storage architecture for large stores of unstructured data. It designates each piece of data as an object, keeps it in a separate storehouse, and bundles it with metadata and a unique identifier for easy access and retrieval.
Object storage vs. file storage vs. block storage
Object storage takes each piece of data and designates it as an object. Data is kept in separate storehouses versus files in folders and is bundled with associated metadata and a unique identifier to form a storage pool.
File storage stores data as a single piece of information in a folder to help organize it among other data. This is also called hierarchical storage, imitating the way that paper files are stored. When you need access to data, your computer system needs to know the path to find it.
Block Storage takes a file apart into singular blocks of data and then stores these blocks as separate pieces of data. Each piece of data has a different address, so they don’t need to be stored in a file structure.
Benefits of object storage
Now that we’ve described what object storage is, what are its benefits?
Greater data analytics. Object storage is driven by metadata, and with this level of classification for every piece of data, the opportunity for analysis is far greater.
Infinite scalability. Keep adding data, forever. There’s no limit.
Faster data retrieval. Due to the categorization structure of object storage, and the lack of folder hierarchy, you can retrieve your data much faster.
Reduction in cost. Due to the scale-out nature of object storage, it’s less costly to store all your data.
Optimization of resources. Because object storage does not have a filing hierarchy, and the metadata is completely customizable, there are far fewer limitations than with file or block storage.
Object storage use cases
There are multiple use cases for object storage. For example, it can assist you in the following ways:
Deliver rich media. Define workflows by leveraging industry-leading solutions for managing unstructured data. Reduce your costs for globally distributed rich media.
Manage distributed content. Optimize the value of your data throughout its lifecycle and deliver competitive storage services.
Embrace the Internet of Things (IoT). Manage machine-to-machine data efficiently, support artificial intelligence and analytics, and compress the cost and time of the design process.
What is Amazon S3 Storage?
Amazon Simple Storage Service (S3) is a storage system for the internet, where you can store and retrieve any amount of data, anytime, anywhere. This make web-scaling computing easier for developers, and it also gives them access to the infrastructure that Amazon uses to conduct a global network of websites. The Amazon S3 API offers a common path for rapid development and the creation of hybrid cloud deployments at scale.

---

References:
https://cloud.google.com/learn/what-is-object-storage
https://www.netapp.com/data-storage/storagegrid/what-is-object-storage/
How to Fix Tech's Mentorship Problem w/ Amex's VP of Technology, Sarvenaz Myslicki
Tags: career, podcast, techtalks, devops
Published: 2022-04-13 21:59:16

*We want to make the Dev Interrupted podcast a vital, enjoyable part of your week.* ***Please take 2 minutes and answer our new [Listener Survey](https://www.surveymonkey.com/r/PRYRNC5).*** *It lets us know a bit about you, what you want from Dev Interrupted and what you want from podcasts in general!*

If you looked up the term “firing on all cylinders” in the dictionary, I’m fairly confident there would be a picture of Sarvenaz Myslicki next to it.

A next-gen leader who earned the role of VP of Technology at [American Express](https://www.americanexpress.com/) by the age of 30, Savernaz is a published author, an in-demand thought-leader on mentorship and has one of the largest followings on programmer [TikTok](https://www.tiktok.com/@sarvenazm).

Our favorite thing about Sarvenaz, though, is that all her work is aspirational but radically inclusive. She tailors her message, content and guidance based on wherever someone is in their professional journey – even if they’re just tinkering with code in a junior high classroom.

Sarvenaz joined us and 1700 other engineering leaders for an incredible live conversation at our [INTERACT conference](https://devinterrupted.com/event/interact/) about the real trial and errors that have led to her role at Amex, as well as the beliefs, mindset and rituals that have allowed her to become a mentor for developers she’s never met.

{% spotify spotify:episode:3b3guYvWcMOzFpVnMEyT3h %}

## Episode Highlights Include:
* (4:30) Sarvenaz's team at AMEX
* (14:46) How to launch yourself from junior dev to senior dev
* (18:18) Why she never commits to an aggressive deadline
* (22:54) Personal productivity & habits
* (45:20)  TikTok & mentorship, an unexpected perfect pairing
* (50:00) Maintaining success without making enemies
* (51:13) Contributing good ideas when you’re shy by nature

***Starved for top-level software engineering content? Need some good tips on how to manage your team? This article is inspired by [Dev Interrupted](https://devinterrupted.com/podcasts/) - the go-to podcast for engineering leaders.***

*Dev Interrupted features expert guests from around the world to explore strategy and day-to-day topics ranging from dev team metrics to accelerating delivery. With new guests every week from Google to small startups, the Dev Interrupted Podcast is a fresh look at the world of software engineering and engineering management.*

[***Listen and subscribe on your streaming service of choice today.***](https://devinterrupted.com/podcasts/)

![https://devinterrupted.com/podcasts/](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gl8yy3hpnevlyboet97b.png)