teleren/devto huggingface dataset:
Boilerplates are everywhere
Published: 2024-04-24 17:17:02

Building boilerplate SaaS became trendy the last few months after some boilerplate providers made a huge success, which encouraged many to build their own boilerplates, and I am one of them. However, I don't want to copy someone else's success story because success stories can't be copied. 

I believe every indie hacker should build his own boilerplate or get at least one. Starting from scratch every time we want to build our own project is time-consuming and counterproductive. Doing repetitive tasks is boring and inefficient. 

## What encouraged me to build [Indie Starter](https://indie-starter.dev?ref=dev.to)?

By having a solid foundation, I can use it for my own projects and MVPs without starting from scratch and doing repetitive tasks. Beginning with what matters to the end users gets me close to the market, which is a competitive advantage.

Getting to know other fellow indie makers is not just great motivation; it's also an invaluable opportunity for collaboration and mutual growth. Building a network of like-minded individuals who share similar aspirations and challenges can open doors to exciting collaborations and partnerships. 

## Indie Starter is now available

While new boilerplates are popping up every now and then, it has become increasingly challenging for newcomers to stand out. But despite that, I believe there is room for improvement.

After hours of working on the demos and the landing page, I am excited to share Indie Starter with other indie hackers and developers to try out. Out of the box, you will have a lot of things already done, such as third-party integrations, global configuration, pre-built core components, and pages.

If you want to share your feedback about your experience using [Indie Starter](https://indie-starter.dev?ref=dev.to), feel free to send a [DM](https://twitter.com/AliHussein_20), and I'll send you a coupon code for a discount on your next purchase!

## Make 💰 with me

I set up a program on Lemon Squeezy🍋 where we can earn money together. Take a peek whenever you want [Affiliate program](https://indiestarter.lemonsqueezy.com/affiliates)!
Learning AWS Day by Day — Day 45 — Amazon DynamoDB — Part 1
Tags: aws, cloud, cloudcomputing, dynamodb
Published: 2024-04-24 16:59:07

Exploring AWS !!

Day 46:

Amazon DynamoDB — Part 1

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

Fully managed NoSQL database
Encryption at Rest
Serve any level of traffic, scale up and down your tables throughput
Capacity without downtime or performance degradation
Provides on demand backup
Point-in-time recovery-accidental write or delete operation, last 35 days
Delete expired items automatically

High Availability and Durability:
Spreads data and traffic over sufficient number of servers to handle throughput and storage requirements,

Write to table: put item
read: get item
delete: delete item
query: dynamodb query — tablename
list: list tables
RCU (Read capacity Unit): 1 strongly consistent read per second, or 2 eventually consistent reads per second for items up to 4kb.
WCU (Write Capacity Unit): up to 1 kb
Number of tables: Initial quota 2500 table
PageSizeLimit: 1 mb, LastEvaluatedKey: new request to read next page
Local secondary indexes: 5 (LSI)
Global secondary indexes: 20
Projected secondary index attribute per table: 100 attributes
Partition keys: minimum length 1 byte, maximum 2048 bytes
Sort key volume: minimum length 1 byte, maximum 1024 bytes
Maximum item size: 400 kb
Core components: Tables, items and attributes
Table — collection of item — item collection of attributes
Dynamodb streams — to capture data modification events in Dynamodb table
Table: Person, Item: FirstName, Attribute: abc
Primary key: uniquely identified each item
GSI: an index with partition key and sort key that can be different from those on table
LSI: same partition key but different sort key.
Multiple ways to Validate Email Addresses
Tags: php, laravel, jquery, webdev
Published: 2024-04-24 16:49:04


![Multiple ways to Validate Email Addresses](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ujg36g4d9wqr6gni6th1.png)


![Multiple ways to Validate Email Addresses](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/r7hrbta35578dcvau2my.png)


![Multiple ways to Validate Email Addresses](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rxfmhkycqgxtpfc9qtu7.png)
What's stopping you from coding like this...?
Tags: webdev, watercooler, career, productivity
Published: 2024-04-24 16:35:37

We've all seen the memes, haven't we? A picture of someone with a laptop, working, in all different sorts of settings - under water, on a slope in fresh powdery snow, on a beach, ... all topped with the (ironic) caption _"What's stopping you from coding like this?"._

In case you missed it, here is an example (more below): 

{% twitter 1306263579897688065 %}

(There's also a variety of these where people are sitting on each others lap while coding - I don't even want to get into those 😅)

But while of course, these are clearly meant to entertain - for me, they do raise an issue that goes a little beyond just programmer humor and memes: 

It feels like there is a lot of pressure to always be _better_. To keep up with the latest technologies, to ship faster, to always take it one step further. 

![Guy eating pizza in a sort of hammock above his computer, while working](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/oa2jhfrv2zxl34q57g48.png)

People sharing their GitHub contributions, badges, yearly round ups, talking about consistency and how you can make it as well, if you just stick to xyz (and maybe purchase a course from them ^^). 

Don't get me wrong, there is nothing wrong with consistency, coding in a hammock, on the beach or in a yoga pose, liking your job so much that you don't want to stop on the weekends. You do you. 

{% instagram CxhfndTApqB %}

But there is also lots of value in prioritising a work-life-balance, having hobbies away from a screen, or seeing coding as "just a job". 

Just because it seems like some other people are pushing out new content every hour of the day, contribute to open-source while having a full-time job and a side hustle and apparently need no sleep - you don't have to. 

So who ever needs to hear this - here's your friendly reminder, that it is perfectly ok to take things a little slower. That quality usually beats quantity, faster is not always better, and fancy coding locations usually come with a stiff neck and dust on your keyboard 😉

And, of course, there are always people gaming the system and hacking their GitHub contributions ([like with this script](https://github.com/umayr/badass)) to make them look a lot more productive, than they actually are. So don't believe everything you see 🙏
Native Popover API in HTML
Tags: html, webdev, javascript, news
Published: 2024-04-24 16:28:42

Popovers have been a problem that was typically solved by using a third-party solution. But that is no longer the case. We now have a native popover API in HTML supported by all browsers (Firefox added preview browser support on 16th April 2024 in version 125).

Let us take a look at how the native popover API works.

## Creating a popover element

Popovers are window-like components shown when a user interacts with an element (that serves as a trigger for showing them). It usually provides additional information or context. They are typically used as tooltips, context menus, toast menus, notifications, onboarding tours, etc.

First, look at the HTML needed to create a popover using the native popover API.

    <button popovertarget="wg-popover-container">Toggle popover</button>
    <div id="wg-popover-container" popover>Popover content goes here</div>

By default, the container element is hidden (thanks to the popover attribute) and is only visible when a user action triggers it. We can write some JavaScript to do that. However, we can simply use native popover API in HTML without needing any JavaScript. All we need is the custom attribute called ``popovertarget``. It controls the display/hide logic of the div with the same id as the value specified for the attribute. The corresponding element gets hidden or shown when the button gets clicked.

**Note:** The popover attribute has the value auto by default, meaning that the popover force closes other popovers (except ancestors) when triggered. It can be set to ``popover="manual"`` to not force the closing of elements, and manual popovers need to be explicitly closed programmatically.

## Popover API and JavaScript

Even though JavaScript is not needed for usage, the popover API does provide a way to trigger popovers using JavaScript for it. The ``HTMLElement.togglePopover()`` method can be used to toggle the popover state programmatically. There also are methods for ``hidePopover()`` and ``showPopover()`` if we want to do the actions independently. Additionally, there are two events available ``beforetoggle`` and ``toggle`` which are fired before and after a transition state of a popover element.

## Popover API and CSS

It is worth mentioning that the popover elements are stacked on a different layer above the rest of the page. So we do not need to worry about z-index’s. In addition to that, there are pseudo-classes, such as the ``:popover-open`` that allows us to target the element when it is opened and ``::backdrop`` allows us to add CSS to content behind the popover.

And that is all there is to the native popover API in HTML. It is also worth noting that there is no built-in support for responsiveness in the popover API, and it needs to be handled manually. There is no built-in animation support yet, but it is in the works.

Let us know in the comments if you have any questions!
Data Analysis techniques for Business Analysts
Published: 2024-04-24 16:21:52

Data Analysis Techniques for Business Analysts.

As a Business Analyst, mastering data analysis techniques is essential for extracting valuable insights from data to drive informed decision-making, and facilitate business success. Here are some key techniques every Business Analyst should be proficient in:
 
1. Descriptive Analytics: Descriptive analytics involves summarizing historical data to understand what has happened in the past. This technique allows Business Analysts to identify trends, patterns, and correlations within the data, providing valuable context for decision-making. 

2. Diagnostic Analytics: Diagnostic analytics focuses on understanding why certain events, or outcomes occurred by analyzing relationships between variables. By uncovering root causes, and factors contributing to specific outcomes, Business Analysts can identify areas for improvement, and optimization. 

3. Predictive Analytics: Predictive analytics leverages statistical algorithms, and machine learning techniques to forecast future trends, and outcomes based on historical data. Business Analysts use predictive analytics to anticipate customer behavior, market trends, and potential business risks, enabling proactive decision-making, and strategic planning. 

4. Prescriptive Analytics: Prescriptive analytics goes beyond predicting future outcomes by recommending actionable strategies to achieve desired objectives. By simulating various scenarios, and evaluating the potential impact of different courses of action, Business Analysts can make data-driven recommendations to optimize processes, enhance performance, and drive business growth.

5. Data Visualization: Data visualization techniques involve presenting data in visual formats such as charts, graphs, and dashboards to facilitate understanding, and interpretation. Effective data visualization enables Business Analysts to communicate complex findings, and insights to stakeholders in a clear, and compelling manner, fostering data-driven decision-making across the organization. 

6. Text Mining: Text mining involves extracting insights from unstructured textual data, such as customer reviews, social media posts, and survey responses. Business Analysts use natural language processing (NLP) techniques to analyze text data, identify sentiment, extract key topics, and uncover valuable insights about customer preferences, market trends, and brand perception.

7. Regression Analysis: Regression analysis is a statistical method used to quantify the relationship between one, or more independent variables, and a dependent variable. Business Analysts use regression models to analyze the impact of various factors on business outcomes, such as sales revenue, and customer satisfaction. 
By incorporating these advanced data analysis techniques into our skill set, Business Analysts can enhance the ability to extract actionable insights from data, drive strategic decision-making, and create tangible value for their organizations.
Speed Matters: Why PNPM and Yarn Outpace npm in Package Management
Tags: webdev, javascript, npm, programming
Published: 2024-04-24 16:06:16

**pnpm** and **yarn** are often perceived as faster alternatives to **npm** due to several key factors:

 
## **Concurrency:**

Both **pnpm** and **yarn** leverage parallelization and concurrency to execute operations more efficiently. They can perform multiple tasks simultaneously, such as downloading dependencies or building packages, which speeds up the overall process.


## **Package Deduplication:**
  **npm** installs packages into the `node_modules` directory of each project, which can lead to duplication of packages across different projects. pnpm and yarn use a shared global package store and [_symlink-based_ ](https://www.futurelearn.com/info/courses/linux-for-bioinformatics/0/steps/201767)approach, reducing disk space usage and installation times by avoiding redundant downloads.

    

## **Caching:**
  **pnpm** and **yarn** cache packages locally, reducing the need to re-download dependencies when installing them in subsequent projects or environments. This caching mechanism can significantly improve installation times, especially for large projects or when working in environments with limited internet connectivity.

    

## **Offline Mode:**
 Both **pnpm** and **yarn** have an offline mode that allows developers to install packages without an internet connection, provided that the necessary dependencies are already cached locally. This feature is particularly beneficial for scenarios where internet access is unreliable or unavailable.

    

## **Network Efficiency:**
 **yarn** and **pnpm** optimize network usage by fetching packages in a more efficient manner compared to **npm**. They employ strategies such as parallel fetching, selective fetching, and intelligent HTTP request management to minimize the time spent waiting for network responses during dependency installation.

Overall, while **npm** remains a popular choice for package management in Node.js projects, **pnpm** and yarn offer performance improvements and additional features that make them attractive alternatives, particularly for projects with complex dependency graphs or performance-sensitive requirements.
PM built another productivity timer
Tags: productivity, nextjs
Published: 2024-04-24 15:59:55

I've been a product manager for 5 years but each time my team launched a product or feature I barely understood how it actually worked (I came to PM from sales / CSM). 

Also I always had an impostor syndrome and wanted to grow a successful product on my own without any resources that working in a company usually provides to a PM: 

- dev team 
- marketing 
- sales 
- vision and insights of experienced founders 
- getting a salary regardless of results, etc

Then I discovered a term "indie developer", someone who can build, promote, sell, and support a product on their own in a niche too small for a VC-funded startups but large enough to let the dev eating ramen. So I saved some money and decided to quit my job for a while to learn coding 3 months ago.   

In indie community it is believed that one should scratch their own itches when deciding what to build. I found mine: staying focused. Every 5 min I was distracted by updating a social media feed to consume some fast dopamine. I found some apps made to help get focused but I found most of them even more distracting with cluttered and complex interface and lots of settings. 

So I built [Zentimer](https://www.zentimer.work/) - 25 min minimalistic timer with least distractions I could keep in it. After each session the timer shows one of the advices for a proper break that I collected among 100+ top Reddit comments.
 
Though it's a web app built with Next JS and Tailwind, it can be installed as a PWA shortcut and it can send you web pushes when the timer is over.  

I hope someone will find my short story helpful in a way. I'd love to get some feedback from experienced devs and promote my product a bit to get some initial users. The timer is free and I'm going to keep a free version of it regardless of future traction. Also they say that posting a website link here is good for SEO. 

I'll be glad to answer any of your questions and I wish happy coding to everyone.
Numeric Type Conversions
Tags: learning, java, programming, beginners
Published: 2024-04-24 15:54:03

Floating-point numbers can be converted into integers using explicit casting. If an integer and a floating-point number are involved in a binary operation, Java automatically converts the integer to a floating-point value. So, **3 * 4.5** is same as **3.0 * 4.5**.

You can always assign a value to a numeric variable whose type supports a larger range of values; thus, for instance, you can assign a **long** value to a **float** variable. You cannot, however, assign a value to a variable of a type with a smaller range unless you use _type casting_. _Casting_ is an operation that converts a value of one data type into a value of another data type. Casting a type with a small range to a type with a larger range is known as _widening a type_. Casting a type with a large range to a type with a smaller range is known as _narrowing a type_. Java will automatically widen a type, but you must narrow a type explicitly.

The syntax for casting a type is to specify the target type in parentheses, followed by the variable’s name or the value to be cast. For example, the following statement

```
System.out.println((int)1.7);

```
displays **1**. When a **double** value is cast into an **int** value, the fractional part is truncated. The following statement

```
System.out.println((double)1 / 2);

```
displays **0.5**, because **1** is cast to **1.0** first, then **1.0** is divided by **2**. However, the statement

```
System.out.println(1 / 2);

```
displays **0**, because **1** and **2** are both integers and the resulting value should also be an integer.

Casting is necessary if you are assigning a value to a variable of a smaller type range, such as assigning a **double** value to an **int** variable. A compile error will occur if casting is not used in situations of this kind. However, be careful when using casting, as loss of information might lead to inaccurate results.

Casting does not change the variable being cast. For example, **d** is not changed after casting in the following code:

```
double d = 4.5;
int i = (int)d; // i becomes 4, but d is still 4.5
```
To assign a variable of the **int** type to a variable of the **short** or **byte** type, explicit casting must be used. For example, the following statements have a compile error:

```
int i = 1;
byte b = i; // Error because explicit casting is required
```
However, so long as the integer literal is within the permissible range of the target variable, explicit casting is not needed to assign an integer literal to a variable of the **short** or **byte** type 
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gsyrw8qr2k3vy01jinvs.png)
Increment and Decrement Operators
Tags: learning, programming, java, beginners
Published: 2024-04-24 15:44:49

The increment operator (**++**) and decrement operator (**––**) are for incrementing and decrementing a variable by 1. The **++** and **——** are two shorthand operators for incrementing and decrementing a variable by **1**. These are handy because that’s often how much the value needs to be changed in many programming tasks. For example, the following code increments **i** by **1** and decrements **j** by **1**.

```
int i = 3, j = 3;
i++; // i becomes 4
j——; // j becomes 2
```
**i++** is pronounced as **i** plus plus and **i——** as **i** minus minus. These operators are known as _postfix increment_ (or postincrement) and _postfix decrement_ (or postdecrement), because the operators **++** and **——** are placed after the variable. These operators can also be placed before the variable. For example,

```
int i = 3, j = 3;
++i; // i becomes 4
——j; // j becomes 2
```
**++i** increments **i** by **1** and **——j** decrements **j** by **1**. These operators are known as _prefix increment_ (or preincrement) and _prefix decrement_ (or predecrement).
As you see, the effect of **i++** and **++i** or **i——** and **——i** are the same in the preceding examples. However, their effects are different when they are used in statements that do more than
just increment and decrement. 

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

Here are additional examples to illustrate the differences between the prefix form of **++** (or **——**) and the postfix form of **++** (or **−−**). 

```
int i = 10;
int newNum = 10 * i++;
System.out.print("i is " + i
 + ", newNum is " + newNum);
```
The result:
```
i is 11, newNum is 100 
```
In this case, **i** is incremented by **1**, then the _old_ value of **i** is used in the multiplication. So **newNum** becomes **100**. If **i++** is replaced by **++i** as follows, 

```
int i = 10;
int newNum = 10 * (++i);
System.out.print("i is " + i
 + ", newNum is " + newNum);
```
The results
```
i is 11, newNum is 110 

```
**i** is incremented by **1**, and the new value of **i** is used in the multiplication. Thus **newNum** becomes **110**. Here is another example:

```
double x = 1.0;
double y = 5.0;
double z = x–– + (++y);
```
After all three lines are executed, **y** becomes **6.0**, **z** becomes **7.0**, and **x** becomes **0.0**.

Using increment and decrement operators makes expressions short, but it also makes them complex and difficult to read. Avoid using these operators in expressions that modify multiple variables or the same variable multiple times, such as this one: **int k = ++i + i**.
Penrith Medical Centre
Published: 2024-04-24 15:42:22


Penrith Medical Centre in Penrith, NSW, is your trusted healthcare provider dedicated to serving the local community with excellence and compassion.Our experienced team of healthcare professionals offers a comprehensive range of medical services, including general practice, preventive care, chronic disease management, vaccinations etc.Whether you require routine check-ups, ongoing medical support, or urgent care, you can rely on Penrith Medical Centre for trusted, accessible, and compassionate healthcare services.

https://medicalfitness.com.au/