The Serverless Database You Really Want

The dreaded part of every site reliability engineer’s (SRE) job eventually: capacity planning. You know, the dance between all the stakeholders when deploying your applications. Did engineering really simulate the right load and do we understand how the application scales? Did product managers accurately estimate the amount of usage? Did we make architectural decisions that will keep us from meeting our SLA goals? And then the question that everyone will have to answer eventually: how much is this going to cost? This forces SREs to assume the roles of engineer, accountant, and fortune teller.

The large cloud providers understood this a long time ago and so the term “cloud economics” was coined. Essentially this means: rent everything and only pay for what you need. I would say this message worked because we all love some cloud. It’s not a fad either. SREs can eliminate a lot of the downside when the initial infrastructure capacity discussion was maybe a little off. Being wrong is no longer devastating. Just add more of what you need and in the best cases, the services scale themselves — giving everyone a nice night’s sleep. All this without provisioning a server, which gave rise to the term “serverless.”

Building a 32-Core Raspberry Pi Cluster From Scratch

A Raspberry Pi is a mini-computer board to which you can connect a monitor, mouse, and keyboard, and install a Linux-based operating system with a GUI. Or you can use it in “headless” mode with no GUI and run, for example, a database server. There are many usages you can give a Raspberry Pi—from building a Minecraft server to smart mirrors, the possibilities are endless.

Since I started to discover MariaDB and learned about database clusters, Distributed SQL, and Xpand, the idea of building a Raspberry Pi cluster has been in the back of my head. A cluster like this is a great way to experiment with distributed systems.

Event Mesh: Point-to-Point EDA

In watching the 2022 EDA Summit presentation "Powering Your Real-Time, Event-Driven Enterprise with PubSub + Platform" by Shawn McAllister, CTO of Solace (sponsor of the Summit), I learned of the origins of his company. This article recounts his presentation with my personal synopsis. As he recounted, let’s “start with capital markets…where Solace started."

Presentation Highlights and Additional Commentary

Shawn began by stating: "Capital markets became digital…over 20 years ago…They had, of course, on-prem applications…but the magic really happened in these 'colocation centers,' ... data centers that are not owned by the bank or the buy-side firm... They’re shared, so they’re kind of like the clouds that you have today… and those colocation centers were then located close to the execution venues, where a lot of the trading happened."

When Disaster Strikes: Production Troubleshooting

Tom Granot and I have had the privilege of Vlad Mihalcea’s online company for a while now. As a result,  we decided to do a workshop together talking about a lot of the things we learned in the process. This workshop would be pretty informal ad-hoc, just a bunch of guys chatting and showing off what we can do with tooling. 

In celebration of that, I thought I’d write about some of the tricks we discussed amongst ourselves in the past to give you a sense of what to expect when joining us for the workshop but also a useful tool in its own right.

True Component-Testing of the GUI With Karate Mock Server

In my previous post, I discussed the difference between tests that target code versus those that target an API. A subset of the second category are automated tests for a web/mobile interface that mimic user behavior and validate the rendered responses, using Cucumber/Selenium, Cypress, or any other stack. These are typically written and executed as end-to-end tests, in that they require a production-like setup of the backend; but that needn’t be the case. GUI tests can turn into true component tests if they target the browser, but with a fully mocked backend. In a complex microservices architecture, it makes good sense to do so. In this article, I will highlight the motivation for writing those tests, and in a follow-up, I will give tips and examples on how to do so with the Karate framework. Feel free to dig into its excellent document if you can’t wait. 

Separation of Concerns Between Frontend and Backend

Traditionally, in the world of JSP and JSF, the backend of web applications would contain mostly display and rendering logic, on top of handling all business rules. With so much server-side rendering, you had no choice but to spin up the actual backend code if you wanted to automate a user scenario in the browser. Without the backend, nothing much would work. 

How to Auto Format Google Form Responses in Google Sheets

When you submit a Google Form, it stores a copy of the form response as a new row in the Google Sheet. The only problem here is that Google Forms will not add any formatting or styles to the new row that you may have applied to the previous rows of the sheet. Let me illustrate this with a small example.

Here’s a Google Sheet that is storing Google Form responses. I’ve changed the default font family to Droid Sans, center-aligned the Country and Age column and also applied a different date format to the Date of Birth column.

Google Forms Response Sheet

Everything looks good but as soon as a new form submissions is made, the new row appended to the Google Sheet via Google Forms will lose all the formatting.

The cell alignment is not preserved, the custom date formats are ignored and so is the default font size and font family. Here’s a screenshot of the same sheet but with a new row added through Google Forms.

Google Forms Auto Formatting

Also see: Automate Google Forms through Workflows

Auto Format New Rows in Google Sheets

Since there’s no way for us to override this Google Forms behavior, we can take the help of Google Apps Script to automatically format new rows in Google Sheets that are added through Google Forms.

The idea is simple. We’ll create an onFormSubmit trigger inside the Google Sheet that will be executed whenever a new form is submitted. This trigger will take whatever formatting that has been applied to the previous row and apply to the current row.

To get started, open the Google Sheet and format the last row with the styles that you would like to apply to incoming form responses.

Next, go to Extensions > Apps Script menu and copy-paste the Google Script below. Run the createTrigger and you are good to go!

/**
 * @OnlyCurrentDoc
 */

const createTrigger = () => {
  ScriptApp.getProjectTriggers().forEach((trigger) => {
    ScriptApp.deleteTrigger(trigger);
  });
  ScriptApp.newTrigger('formRowOnFormSubmit').forSpreadsheet(SpreadsheetApp.getActive()).onFormSubmit().create();
};

const formRowOnFormSubmit = (e) => {
  if (!e) {
    throw new Error('Please do not run this function manually!');
  }
  const { range } = e;
  const row = range.getRowIndex();
  if (row > 2) {
    const sheet = range.getSheet();
    // Select the previous row range
    const sourceRange = sheet.getRange(`${row - 1}:${row - 1}`);
    // Get the recently added row
    const targetRange = sheet.getRange(`${row}:${row}`);
    // Copy the format only from the previous row to the current row
    sourceRange.copyTo(targetRange, SpreadsheetApp.CopyPasteType.PASTE_FORMAT, false);
  }
};

Conditional Formatting in Google Sheets

Learn more about conditional formatting in Google Sheets that allows you to apply automatic formatting to cells in spreadsheets that meet certain criteria.

Reasons Why DevOps Adoption Might Be of Help for Business

As far as this modern and tech-oriented IT domain goes, DevOps has become a standard to judge operations’ overall efficiency and smoothness. However, like it is with everything in the world, there is still a sizeable chunk of enterprises in the process of either understanding what it means or completely not being aware of it at all.

In this post, we will try to cover a few crucial points that will include a brief overview of DevOps and why DevOps adoption might be helpful for businesses.

Functional vs. Non-functional Testing: Can You Have One Without the Other?

Functional and non-functional tests are the most popular approach to categorizing the different types of software testing. These two categories refer to the very essence of the testing process and what exactly is being tested. There are two things to know about functional and non-functional testing if you’ve never dug deep into these two testing categories before. 

One, the division between non-functional and functional testing is not set in stone, and for some testing types, categorizing them is no easy feat. Two, both functional and non-functional testing are essential for the success of your software testing project, albeit in different ways. Today, we will take a closer look at the difference between functional and non-functional requirements, where these two types of testing stand in the software testing process, and how they influence the cost of testing.

How to Perform Visual Regression Testing Using Playwright

Regression testing verifies that system changes do not interfere with existing features or code structure. They are part of almost every test suite in software development lifecycles. It is common for developers to change or add a code section and unintentionally disrupt something that is working just fine.

Visual regression testing functions on the same logic but confines it to the visual aspects of the software. It works by comparing two images and automating complicated scenarios, like when we cannot identify the elements in the DOM tree. However, visual regression can be used on any website.

How to make a c++ function that stops when a nonpositive number is inputted

hi, I'm miah and i need help for a project.

our task is to create a program that will ask user a positive integer until the user inputted a non-positive number or 0 and then display the product of all positive inputs. Use the following function prototypes. int accept_number();, bool ispositive(int);, int product(int, int);, void display(int);.

the output should look like this:

Enter a number: 3
Enter a number: 10
Enter a number: 2
Enter a number -213
The product is 60.

AWS Lambda Basics: Writing Serverless Code

Introduction

There are four key capabilities necessary for a service or platform to be serverless:

  • No server management
  • Flexible scaling
  • High availability (fault tolerance)
  • No idle capacity

In this post, we will learn the basics of AWS Lambda and how you can use it for different use cases with ease. This will be an introduction post that can provide a foundation for upcoming demos and posts to help you learn AWS.

Web Performance Testing — What, Why, How of Core Web Vitals

A website needs to be constantly tested and optimized to be in line with Google's web and SEO guidelines. As a result, it has an advantage over others in terms of visibility, brand image, and driving traffic. However, to tactically assess the website's performance, it needs to be measured in a well-thought-out manner. Core Web Vitals is a key performance metric that analyzes the website's performance by investigating the data and provides a strategic platform to scale up the website's user experience. This article will learn about web performance testing and how Core Web Vitals plays a crucial and strategic part in it.

What Is Web Performance Testing?

Web performance testing is executed, so that accurate information is provided on the application's readiness by monitoring the server-side application and testing the website. This is done by simulating a load that is in line with real conditions so that the expected load can be supported by the application that has been evaluated. 

Expand Your Horizons (June 2022 Desktop Wallpapers Edition)

There’s an artist in everyone. Some bring their creative ideas to life with digital tools, others capture the perfect moment with a camera or love to grab pen and paper to create little doodles or pieces of lettering. And even if you think you’re far from being an artist, well, it might just be hidden somewhere deep inside of you. So why not explore it?

For more than eleven years, our monthly wallpapers series has been the perfect opportunity to do just that: to break out of your daily routine and put your creative skills to the test. And, well, creative folks from across the globe once again took on the challenge this month and created unique and inspiring wallpapers for June 2022.

The wallpapers in this collection come in versions with and without a calendar and can be downloaded for free. As a little bonus goodie, we also compiled some designs from our wallpapers archives at the end of this post. Maybe you’ll spot one of your almost-forgotten June favorites, too? A big thank-you to everyone who shared their designs with us — this post wouldn’t exist without you!

  • You can click on every image to see a larger preview,
  • We respect and carefully consider the ideas and motivation behind each and every artist’s work. This is why we give all artists the full freedom to explore their creativity and express emotions and experience through their works. This is also why the themes of the wallpapers weren’t anyhow influenced by us but rather designed from scratch by the artists themselves.
  • Submit a wallpaper!
    Did you know that you could get featured in our next wallpapers post, too? We are always looking for creative talent.

Editor’s Note

In this month’s post, you will notice that some of the wallpapers are dedicated to Ukraine and its traditional embroidery patterns found in different regions of the country. As a design community, we can’t be silent in these times. It’s our obligation to help as much as we can, and so we are donating all proceeds of the “Interface Design Checklists PDF” to support Ukraine.

We have already donated 16,944.73 EUR (US$ 18,663.86) to Aktion Deutschland Hilft e.V. and will continue to donate to other organizations as well. A heartfelt THANK YOU to our wonderful community for all of their help and support! 💞

Create Your Own Path

“Nice weather has arrived! Clean the dust off your bike and explore your hometown from a different angle! Invite a friend or loved one and share the joy of cycling. Whether you decide to go for a city ride or a ride in nature, the time spent on a bicycle will make you feel free and happy. So don’t wait, take your bike and call your loved one because happiness is greater only when it is shared. Happy World Bike Day!” — Designed by PopArt Studio from Serbia.

Old Kyiv

“This picture is dedicated to Kiev (Kyiv), the capital of Ukraine. It is loosely based on a 13th century map — this is what the center of Kyiv looked like ca. 900 years ago! The original map also included the city wall — however, I decided not to wrap the buildings into the wall, since in my dream world, a city would not need walls.” — Designed by Vlad Gerasimov from Georgia.

World Environment Day

“On June 5th we celebrate World Environment Day — a moment to pause and reflect on how we impact Earth’s health. A few activities represented in this visual include conserving energy and water, shopping and growing local, planting flowers and trees, and building a sustainable infrastructure.” — Designed by Mad Fish Digital from Portland, OR.

Summer Chamomile

“Our designers were inspired by the lightness and innocence of June, as well as the desire to use bright colors. More calendars are here.” — Designed by MasterBundles from Ukraine.

Ukrainian Embroidery

Vlad Gerasimov from Georgia designed a series of wallpapers in which he explores traditional embroidery patterns found in different regions in Ukraine and the stories behind them.

Kherson

“This picture is dedicated to the Kherson region. Forms of fruits, flowers, leaves close to nature are typical of Kherson region. Viburnum motifs are usually found on women’s shirts, it is a symbol of beauty. Oak motifs are most often seen on boys’ shirts, they are a symbol of strength, development, and life. So, the boys wore a miraculous amulet of life-giving power of some kind.” — Designed by Vlad Gerasimov from Georgia.

Mykolaiv

“This picture is dedicated to the Mykolaiv region. A large number of embroidered products of Mykolaiv region is characterized by floral ornaments. The symbol of the triangle, which is found on embroidered shirts, has long been associated with the element of fire, where fire represents the striving for freedom. The main colors were mostly red, blue, black, and yellow.” — Designed by Vlad Gerasimov from Georgia.

Kirovohrad

“This picture is dedicated to the Kirovohrad region. From ancient times in Ukraine poppies were consecrated. People and cattle were sown with them. People believed that the poppy has a magical power that protects against all evil. Poppy motifs can be seen on the shirts of the Kirovohrad region.” — Designed by Vlad Gerasimov from Georgia.

Ternopil

“This picture is dedicated to the Ternopil region. Embroidery of Ternopil region is characterized by rich, dark, up to black, colors. Made of wool, thick, almost without gaps, the ornaments completely cover the sleeves of women’s shirts. Floral motifs are often found on the shirts of Ternopil region, in particular marigold flowers, sunflowers, mustard.” — Designed by Vlad Gerasimov from Georgia.

Sumy

“This picture is dedicated to the Sumy region. Geometric and plant-geometrized patterns were embroidered on the shirt from Sumy region. Most often there is an embroidered pattern called broken branch. This pattern has its ancient and deep meaning and depicts the creation of our Galaxy.” — Designed by Vlad Gerasimov from Georgia.

Looking At The Stars

“This month we travel to the stars. We find a planet and we sit down to observe the universe.” — Designed by Veronica Valenzuela from Spain.

I’m So Good

Designed by Ricardo Gimenes from Sweden.

Awesome Summer Sunflowers

“Sunflowers are one of the symbols of Ukraine. There is especially a lot of them in the south, where the fighting is now taking place. Our designers were inspired by our nature and belief in our victory and therefore created this calendar. More calendars are available at https://masterbundles.com/. Welcome!” — Designed by MasterBundles from Ukraine.

Mr Broccoli Doesn’t Like You Either

Designed by Ricardo Gimenes from Sweden.

Summertime

Designed by ActiveCollab from the United States.

Oldies But Goodies

Ready for more? Below you’ll find a little best-of from past June editions. Please note that these wallpapers don’t come with a calendar. Enjoy!

Travel Time

“June is our favorite time of the year because the keenly anticipated sunny weather inspires us to travel. Stuck at the airport, waiting for our flight but still excited about wayfaring, we often start dreaming about the new places we are going to visit. Where will you travel to this summer? Wherever you go, we wish you a pleasant journey!” — Designed by PopArt Studio from Serbia.

Summer Party

Designed by Ricardo Gimenes from Sweden.

Dancing In The Summer Moonlight

“If you’re happy and you know it, show some dance moves, because summer is finally here!” — Designed by ActiveCollab from the United States.

Summer Coziness

“I’ve waited for this summer more than I waited for any other summer since I was a kid. I dream of watermelon, strawberries, and lots of colors.” — Designed by Kate Jameson from the United States.

Solstice Sunset

“June 21 marks the longest day of the year for the Northern Hemisphere — and sunsets like these will be getting earlier and earlier after that!” — Designed by James Mitchell from the United Kingdom.

Oh, The Places You Will Go!

“In celebration of high school and college graduates ready to make their way in the world!” — Designed by Bri Loesch from the United States.

Deep Dive

“Summer rains, sunny days, and a whole month to enjoy. Dive deep inside your passions and let them guide you.” — Designed by Ana Masnikosa from Belgrade, Serbia.

Ice Creams Away!

“Summer is taking off with some magical ice cream hot air balloons.” — Designed by Sasha Endoh from Canada.

Strawberry Fields

Designed by Nathalie Ouederni from France.

Bauhaus

“I created a screenprint of one of the most famous buildings from the Bauhaus architect Mies van der Rohe for you. So, enjoy the Barcelona Pavillon for your June wallpaper.” — Designed by Anne Korfmacher from Germany.

Merry-Go-Round

Designed by Xenia Latii from Germany.

Summer Surf

“Summer vibes…” — Designed by Antun Hirsman from Croatia.

Melting Away

Designed by Ricardo Gimenes from Sweden.

Pineapple Summer Pop

“I love creating fun and feminine illustrations and designs. I was inspired by juicy tropical pineapples to celebrate the start of summer.” — Designed by Brooke Glaser from Honolulu, Hawaii.

<img src="https://cloud.netlifyusercontent.com/assets/344dbf88-fdf9-42bb-adb4-46f01eedd629/16db22ee-c7f8-47a3-856c-992c82cd61f9/june-16-pineapple-summer-pop-preview-opt.png" alt="Pineapple Summer Pop"

Fishing Is My Passion!

“The month of June is a wonderful time to go fishing, the most soothing and peaceful activity.” — Designed by Igor Izhik from Canada.

Getting Better Everyday

“The eternal forward motion to get better and excel.” — Designed by Zachary Johnson-Medland from the United States.

Expand Your Horizons

“It’s summer! Go out, explore, expand your horizons!” — Designed by Dorvan Davoudi from Canada.

Happy Squatch

“I just wanted to capture the atmosphere of late spring/early summer in a fun, quirky way that may be reflective of an adventurous person during this time of year.” — Designed by Nick Arcarese from the United States.

Nine Lives

“I grew up with cats around (and drawing them all the time). They are so funny… one moment they are being funny, the next they are reserved. If you have place in your life for a pet, adopt one today!” — Designed by Karen Frolo from the United States.

Setting Up a Dedicated Database Server on Raspberry Pi

There is certain gratification when you get a little “naked” mini-computer board to run the software you install on it. Maybe even your own application. Most (if not all) of the real-world applications I have implemented connect in one way or another to a database. It’s not a secret that relational databases are the most popular option in mission-critical applications that require truly ACID compliance. So, installing a good performant SQL database in a Raspberry Pi is, to say the least, a fun exercise to do. Even though the Raspberry Pi can connect to the Internet and consume a Database as a Service (DBaaS) like SkySQL, smaller applications might benefit from having a local-only database running on the same device.

In this article, I show you how to install and set up a MariaDB server on a Raspberry Pi 4 Model B with 8 GB of RAM that you can connect to your local network through WiFi or Ethernet. You can use models with much less RAM memory as well.

Listview vb play all songs

Hello all,

I have a question I have a list view in eg and there are songs in it now I want when I click on a button that he plays all the music in succession but I can't get that done can someone send me an example?

Thank you