teleren/devto huggingface dataset:
If-Else Vs Switch-Case
Tags: webdev, beginners, codenewbie, programming
Published: 2023-03-25 21:45:11

Before I did my research on this post, I use if-else with reckless abandon 😂, however, what matters as one progresses in software engineering is not just writing code that works but writing code that is efficient.

A times comes in one's career, where you move from the know-how to the know-why.

Enough of my ted talk, let's dive into the topic of discussion.

"if-else" and "switch-case" are both conditional statements in programming that allows for the execution of different code blocks based on different conditions.

"if-else" statements can be used to evaluate Boolean expressions or comparison operators, hence, they're suitable for complex conditions and also for cases where the number of conditions is not known in advance.

"switch-case" statements are typically used with discrete values, such as enums or integer values, and allow for cleaner and more concise code. However, switch-case statements are less flexible and cannot handle complex conditions.

Here's the question, How do you when to use "if-else" or "switch-case" statements?

Use if-else when:
» The condition to be evaluated is complex or involves multiple comparison operators
» The number of conditions to evaluate are small
» The conditions are not based on discrete values

Use switch-case when:
» The condition to be evaluated is based on a discrete value, such as an enum or integer value
» The number of conditions to evaluate are large
» The conditions are simple and can be expressed as equality tests

Knowing what conditional statement to use will help you move from writing code that works to writing efficient code.

Which of these conditional statements do you use? 🤔


kyrios Iesous
Important Concepts Related To Buffer Pool
Published: 2023-03-25 21:44:30

 <u>**Buffer Pool**</u>
Buffer pool is an in-memory cache used for faster access to frequently accessed data. It stores data and indexes reducing disk I/O.
**<u>Working of Buffer Pool</u>**

Buffer pool mechanism works on the the two sublist concepts the **new sublist** and the **old sublist** where every item when accessed first time gets on the top of old sublist and on being called while in the old sublist moves to the top of new sublist. By default **37%** of space is reserved for old-block.

**<u>Size of Buffer Pool</u>** 

The size of the buffer pool is determined by **innodb_buffer_pool_size** system variable. The size of buffer pool should be adjusted per your needs to see the best performance. In order to configure the size of buffer pool set **innodb_buffer_pool_size** system variable, the InnoDB Buffer Pool should usually be between 50%-75% of the memory available.

 <u>2 ways to configure size of buffer pool</u>

1) The size of the InnoDB buffer pool can be changed dynamically by setting the innodb_buffer_pool_size system variable using the SET GLOBAL statement which requires SUPER privilege.

2)Changing the size of buffer pool by setting **innodb_buffer_pool_size** system variable in configuration file. Ensure that your custom configuration file is read last by using the z- prefix in the file name so that changes made by you are not overwritten. 
**innodb_buffer_pool_size** system variable in the configuration file.
**innodb_buffer_pool_size** needs to be set in a group that will be read by MariaDB Server, such as [mariadb] or [server]. When set in a configuration file, the value supports units such as "M" (Megabyte), "G" (Gigabyte), etc. For this method server restart is needed to reflect the changes.

<u>** Saving And Restoring Buffer Pool State**</u>

Innodb stores some percentage of most recently used pages from buffer pool at server shutdown and restores them at server restart. This is managed by **innodb_buffer_pool_dump_pct** configuration option which is used to reduce warmup period.
**innodb_buffer_pool_dump_at_shutdown** and **innodb_buffer_pool_load_at_startup** system variables should be enabled to allow buffer pool dump at shutdown and restore at server restart.
 
<u>**Some Important Points Related to Buffer Pool**</u>

- Pages are evicted using a least recently used (LRU) algorithm.

- InnoDB reserves additional memory for buffers and control structures, so that the total allocated space is approximately 10% greater than the specified buffer pool size.

- The size of each page in the Buffer Pool depends on the value of the **innodb_page_size** system variable.
Single point of failure
Tags: programming, career, devjournal, management
Published: 2023-03-25 21:11:01

Is it a database? → Is it a component? → Is it an API…?

👉 No… it’s a software developer…

👉 A single point of failure can be a disaster for your software system, but when that single point of failure is a developer, it could be a disaster for your whole team and potentially your business...

**It might look a bit like this:**

Only [Chris] knows how that feature/system works... The rest of the team doesn't understand it and are scared they'll break it if they change it...

[Chris] wants to share his knowledge, but he's just so busy all the time...

The team and business dread [Chris] taking time off - or even worse, handing in his notice.

👉 They don't realise the impact on [Chris].
👉 [Chris] is a "top developer":
→ He stays late,
→ Tackles hard tasks
→ and helps non-tech areas of the team too.

👉 [Chris] doesn't take much time off:
→ He feels pressure,
→ Stress
→ and responsibility for the team - although this might not show.

👉 When [Chris] takes time off, it's short, and he worries things will go wrong at work.
👉 [Chris] doesn't relax:
→ He checks his emails
→ and is distracted by his phone in case work calls.

👉 [Chris] can't go on like this forever... He's not:
→ Recovering
→ De-stressing
→ Relaxing
→ Recharging...

Having a software developer as a single point of failure is a massive business risk, but more importantly, it's disastrous for the wellbeing and performance of your software developer.

👉 How can we help [Chris]?

👉 How can [Chris] help himself?
Azure Cloud Storage
Tags: cloudskills, storage, azure
Published: 2023-03-25 20:21:04

Azure Storage is a cloud-based storage solution that provides highly scalable and secure storage services for data objects, files, and messages. It is a reliable, cost-effective, and versatile storage platform that can be used by businesses of all sizes. In this blog, we will explore Azure Storage in detail and provide some examples of how it can be used.


Azure Storage Types
Azure Storage provides several types of storage, each with its unique features and use cases:

1. Blob storage: Blob storage is designed for storing unstructured data such as documents, images, videos, and audio files. It is ideal for use cases such as media storage, backup, and archive.

2. File storage: File storage is a fully managed file share service that supports the SMB protocol. It is ideal for enterprise applications that require shared file storage.

3. Queue storage: Queue storage provides a reliable messaging solution for asynchronous communication between applications. It is ideal for decoupling workloads and ensuring reliable message delivery.

4. Table storage: Table storage is a NoSQL key-value store that can be used to store large amounts of structured data. It is ideal for use cases such as IoT data storage, logging, and analytics.

Azure Storage Features
Azure Storage provides several features that make it a powerful and versatile storage platform:

Scalability: Azure Storage is highly scalable and can be easily scaled up or down as per the storage needs of your applications.

Security: Azure Storage provides several security features such as encryption, access control, and network security to protect your data.

High availability: Azure Storage provides high availability and durability, ensuring that your data is always accessible.

Cost-effective: Azure Storage offers a cost-effective pricing model that allows you to pay only for what you use.

Azure Storage Example
Let's consider an example of how Azure Blob Storage can be used to store and serve images for a website. In this scenario, the website is hosted on Azure Web Apps and needs to serve images to its users.

1. Create an Azure Storage account: Start by creating an Azure Storage account and selecting the Blob storage type.

2. Upload images: Upload the images that need to be served to the users to the Blob storage account.

3. Set permissions: Set the appropriate permissions on the Blob storage account to ensure that the images are accessible to the website.

4. Update website code: Update the website code to retrieve the images from the Blob storage account and serve them to the users.

By using Azure Blob Storage, you can easily store and serve images for your website without having to worry about the storage infrastructure.
It’s time for me to give back
Tags: learning, softwaredevelopment, introduction, aws
Published: 2023-09-18 00:45:25

---
title: It’s time for me to give back
published: true
date: 2023-03-25 20:18:45 UTC
tags: learning,softwaredevelopment,introduction,aws
canonical_url: https://medium.com/@paulboeck/its-time-for-me-to-give-back-68b29ffa8026
---

Hi, I’m Paul Eggerling-Boeck. I’ve been in the software development industry for over 25 years. In that time, I’ve had the opportunity to work with a wide range of employers and clients, and I’ve used my expertise to design and implement RESTful APIs, web applications, big data ETL systems, and countless other projects. I’ve always had an interest in using DevOps methodologies and tools to automate processes and improve software quality, and I’m continually looking for new ways to create scalable and reliable solutions.

I’ve decided that it’s time for me to start sharing some of what I know and what I’m currently learning with the wider developer community, so I’m excited to begin posting articles about my journey working with and learning new CI/CD tools and AWS services. I hope that sharing my experiences, insights, successess, and failures can help you learn and grow in your own career. If not, at least it will help cement my own learning :)

![Two Women Looking at Code on a Laptop](https://cdn-images-1.medium.com/max/1024/1*d1c3gzIV2X_nnnQSykQrMg.jpeg)
_by Christina Morillo_

My latest personal project is a Java-based Spring Boot AWS Lambda that integrates with AWS RDS to store weather information gathered from a public weather data API. Ultimately it’s not a very useful to anyone in and of itself, but it’s useful to me as a learning opportunity. I’m working on this project in a public GitHub repo that you can find below if you want to follow along with my journey.

[GitHub - paulboeck/weather-tracker-java-lambda-rds](https://github.com/paulboeck/weather-tracker-java-lambda-rds)

I’m always happy to connect with fellow developers to discuss new ideas and opportunities so feel free to reach out to me here on Dev.to or on [LinkedIn](https://www.linkedin.com/in/paul-eggerling-boeck-7a13302/).
Skills a cloud engineers must have
Tags: cloudskills
Published: 2023-03-25 20:14:37

Cloud computing has become an essential part of modern businesses, and cloud engineers play a crucial role in designing, building, and managing cloud infrastructure. If you're interested in pursuing a career as a cloud engineer, here are the skills that you should focus on developing:

- Cloud platforms: A cloud engineer should be familiar with at least one major cloud platform, such as AWS, Azure, or Google Cloud Platform. They should understand the different services offered by these platforms and be able to choose the appropriate ones for a given use case.

- Networking: Networking is a critical aspect of cloud computing, and a cloud engineer should have a solid understanding of networking concepts, including routing, VPNs, load balancing, and firewalls.

- Security: Security is a top priority in cloud computing, and a cloud engineer should have a strong knowledge of security best practices, including access control, encryption, and threat management.

- Infrastructure automation: Automation is essential for efficiently managing cloud infrastructure, and a cloud engineer should be proficient in tools like Terraform, Ansible, or Puppet to automate infrastructure provisioning and deployment.

- Scripting languages: A cloud engineer should have a good understanding of scripting languages like Python, Bash, or PowerShell to automate tasks, create custom scripts, and integrate with other tools.

- Containerization: Containerization is a key trend in cloud computing, and a cloud engineer should have experience working with containers, especially with Kubernetes, Docker, or other container orchestration platforms.

- DevOps: A cloud engineer should be familiar with DevOps principles and practices, including continuous integration and continuous deployment (CI/CD), source control, and testing.

- Soft skills: Finally, a cloud engineer should have good communication skills, be able to work in a team environment, and have strong problem-solving and troubleshooting skills.

In conclusion, becoming a cloud engineer requires a mix of technical skills and soft skills. Focusing on the areas listed above can help you build a strong foundation for a successful career in cloud computing.
HTTP Status Codes
Tags: webdev, protocol, http, beginners
Published: 2023-03-25 20:11:24

## What are the most common HTTP status codes?

HTTP status codes are essential in understanding the response returned by a server after making an HTTP request. They provide the information about the status of the request and response from the server.

### 🎯HTTP response codes are categorized into five groups:

Informational (100-199)

Success (200-299)

Redirection (300-399)

Client Error (400-499)

Server Error (500-599)


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



### 🎯Here are some of the most common HTTP status codes:

- 200 OK: This status code indicates that the request was successful.
- 404 Not Found: This status code indicates that the requested resource could not be found on the server.
- 500 Internal Server Error: This status code indicates that there was an error on the server that prevented the request from being fulfilled.
- 401 Unauthorized: This status code indicates that the client is not authorized to access the requested resource.
- 403 Forbidden: This status code indicates that the client does not have permission to access the requested resource.

These codes are just a few examples of the many HTTP status codes that exist. The exact list of most common HTTP status codes can vary depending on the context and the specific application.

### 🤔**Over to you:**

HTTP status code 401 is for Unauthorized. Can you explain the difference between authentication and authorization, and which one code 401 check for?👀

Let me know in the comments😀

### 🎯**Conclusion**

HTTP status codes are essential in understanding the response returned by a server after making an HTTP request. By categorizing the codes and having a clear set of definitions for each, developers can quickly identify and troubleshoot issues with their applications.

---

That's all for today.

If you enjoyed this content, please share your feedback and consider retweeting the first tweet 😀.

New to my profile? 🎉

Hey! I am Ayush, a full-stack developer from India. I tweet and document my coding journey 🌸.

Follow [@ayushsoni1010](https://twitter.com/ayushsoni1010) for more content like this 🔥 😉.
Managing Distributed Transactions in PostgreSQL and Golang using two phase commit
Tags: golanguage, postgres, transactions, atomicity
Published: 2024-06-19 20:27:26

---
title: Managing Distributed Transactions in PostgreSQL and Golang using two phase commit
published: true
date: 2023-03-25 20:04:09 UTC
tags: GoLanguage,PostgreSQL,transactions,atomicity
canonical_url: https://blog.gkomninos.com/managing-distributed-transactions-in-postgresql-and-golang-using-two-phase-commit
---

Implementing Distributed Transactions with gosql2pc: Learn how to use gosql2pc, a Golang library for managing 2 phase commit transactions in PostgreSQL.
Jumpstart Your Tech Career with AWS Community Builder!
Tags: aws, cloud, career, community
Published: 2023-03-25 20:03:25

Should I become a AWS Community Builder?
_**Yes!**_

For those from underrepresented or remote areas, or who have graduated but do not have hands-on experience or the skills to compete, the AWS Community Builder Program provides essential exposure, guidance, and support. Through training sessions on soft skills and technical skills growth, connecting individuals with mentors, and providing access to resources, the AWS Community Builder Program can help newcomers hone their skills and become ready for the world.

Being a newbie in the tech industry from a  underrepresented or remote areas,can be daunting. It takes a lot of effort to reach the standards to develop something extraordinary, and often newbies are unable to access the mentorship and guidance they need to get started. Fortunately, the AWS Community Builder Program provides a great opportunity for early professionals to get their feet wet in the tech industry.It help newcomers hone their skills and become ready for the world.

Not only you can learn the fundamentals of working with AWS,launching AI/ML projects but you can also connect with other tech professionals and experienced AWS users in the community. Additionally, benefit from AWS's $500 credits, cloud academy courses and AWS open source projects, allowing you to create projects and applications with minimal cost. The AWS Community Builder Program is also very flexible and allows individuals to work on their own timeline, so you can fit it in around other commitments and activities.

From cloud academy you can learn about cloud computing, big data, programming, security and business management. From the sessions by the community you can learn story telling, startup pitching, content creation, etc and AWS services training. AWS Team and AWS Heroes are always available to guide you.
AWS provides certification vouchers for AWS exams to assist you in obtaining internationally recognized professional certification.

For those who have experience and have a portfolio, AWS provides a chance to be selected to travel to the biggest event of cloud computing, AWS Re:invent. They provide fully-sponsored travel to the event.

The application form for the program is currently closed and is scheduled to re-open in July 2023. To be notified when the form re-opens, please add your name to the [waitlist](https://pulse.buildon.aws/application/5N4TVOCW).
5 Chrome extensions you must have in your computer
Published: 2023-06-12 17:17:25

---
title: 5 Chrome extensions you must have in your computer
published: true
date: 2023-03-25 19:24:39 UTC
tags: 
canonical_url: 
---

As someone who spends some time on the internet, I know how important it is to have a reliable browser that can keep up with your needs. And when it comes to browsing the web, Google Chrome is one of the most popular and versatile options available. Here are my top 5 must-have Chrome extensions:

1. **AdBlock Plus** - This extension is a must-have for anyone who's tired of being bombarded with ads while they're trying to browse the web. AdBlock Plus blocks most ads from appearing on your screen, making your browsing experience faster and more streamlined.

2. **Bitwarden** - With so many websites and accounts to keep track of, it's easy to forget your passwords. Bitwarden takes care of that problem by storing all your passwords in one place and automatically filling them in when you need them. Bonus: It's open-source!

3. **Grammarly** - Whether you're writing an email, a social media post, or a blog post, Grammarly can help you improve your writing by catching grammar and spelling mistakes in real time. It's like having a personal editor right in your browser.

4. **Honey** - If you're an online shopper, Honey is a must-have extension. It automatically finds and applies coupon codes to your online purchases, saving you money with minimal effort. I personally do not shop much, but it works well.

5. **Manganum** - Finally, if you want to make your browsing experience more enjoyable and productive, try Manganum. This extension replaces your new tab page with a beautiful, customizable dashboard that includes whatever you want. Plus, you get a sidebar on sites that you can show when you hover the right corner of the page, which includes ChatGPT, Google Keep and much more.

Happy browsing!
choosing the size of the swap and setting up
Published: 2023-03-25 19:11:45

choosing the size of the swap:

https://wiki.ubuntuusers.de/Swap/
The appropriate memory size depends on several factors and cannot be specified in general. Depending on system usage, around 1 GB of swap space or 1 GB + RAM capacity for suspend-to-disk is sufficient. If the swap space (and RAM) fills up, the system may crash and all data not synchronized with the hard disk is lost, which is why a generously designed swap area can make sense

what about a Swap:

https://wiki.ubuntuusers.de/Swap/


```
[martin@martineos ~]$ lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
sda      8:0    0 232,9G  0 disk 
├─sda1   8:1    0   300M  0 part /boot/efi
└─sda2   8:2    0 232,6G  0 part /
sr0     11:0    1  1024M  0 rom  
[martin@martineos ~]$ 

```
see also 

```
[martin@martineos ~]$ df -h
Dateisystem    Größe Benutzt Verf. Verw% Eingehängt auf
dev             1,9G       0  1,9G    0% /dev
run             1,9G    1,3M  1,9G    1% /run
/dev/sda2       228G     33G  184G   15% /
tmpfs           1,9G    201M  1,7G   11% /dev/shm
tmpfs           1,9G     23M  1,9G    2% /tmp
/dev/sda1       300M    296K  300M    1% /boot/efi
tmpfs           383M     60K  383M    1% /run/user/1000
```



well now i want to set up a swap 

that said i want to narrow down the partition abotu 8 gb and then create a swap

https://wiki.archlinux.de/title/Swap 

```
$ swapon --show Or to show physical memory as well as swap usage:```



```$ swapon --show```

Or to show physical memory as well as swap usage:

```$ free -h
Swap partition```


A swap partition can be created with most GNU/Linux partitioning tools. Swap partitions are designated as type 82 on MBR and 0657FD6D-A4AB-43C4-84E5-0933C84B4F4F on GPT.

To set up a partition as Linux swap area, the mkswap(8) command is used. For example:

```# mkswap /dev/sdxy```



Warning: All data on the specified partition will be lost.

To enable the device for paging:


```# swapon /dev/sdxy```



To enable this swap partition on boot, add an entry to /etc/fstab:


UUID=device_UUID none swap defaults 0 0
where the device_UUID is the UUID of the swap space.


See fstab for the file syntax.

Note: The fstab-entry is optional if the swap partition is located on a device using GPT. See #Activation by systemd

**querstion** _ how to do that necessary steps - how to lower down the partiion for ´8 gb and have space for swap
Data Analysis and Visualization with Power Bi
Published: 2023-03-25 19:07:20

Well, Power Bi is my favorite Microsoft power platform tool. Over the weekend I gave a talk to a group of students on what Power bi is and how to use it to generate insight from a data store. We spoke on what data visualization, data analysis entails and also had few minutes of hands-on on the bi platform.


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

Therefore, I won't be writing about what Power bi is in this blog post but, I want to point you to a recorded resource of the event for your own learning.

Below is the recorded video of my talk…cheers!

{% embed https://www.youtube.com/embed/2aTwuCKB5n4 %}